Default RoCE Mode Setting
Mount the configfs file.
# mount -t configfs none /sys/kernel/config
Create a directory for the mlx4/mlx5 device.
# mkdir -p /sys/kernel/config/rdma_cm/mlx4_0/
Validate what is the used RoCE mode in the default_roce_mode configfs file.
# cat /sys/kernel/config/rdma_cm/mlx4_0/ports/
1
/default_roce_mode IB/RoCE v1Change the default RoCE mode:
For RoCE v1: IB/RoCE v1
# echo
"IB/RoCE v1"
> /sys/kernel/config/rdma_cm/mlx4_0/ports/1
/default_roce_mode # cat /sys/kernel/config/rdma_cm/mlx4_0/ports/1
/default_roce_mode IB/RoCE v1For RoCE v2: RoCE v2
# echo
"RoCE v2"
> /sys/kernel/config/rdma_cm/mlx4_0/ports/1
/default_roce_mode # cat /sys/kernel/config/rdma_cm/mlx4_0/ports/1
/default_roce_mode RoCE v2