RoCE v1 protocol is an Ethernet link layer protocol with ethertype 0x8915 that enables communication between any two hosts in the same Ethernet broadcast domain. RoCE v1 is the default version for RDMA Connection Manager (RDMA_CM) when using the ConnectX-3 network adapter.
RoCE v2 protocol exists on top of either the UDP over IPv4 or the UDP over IPv6 protocol. The UDP destination port number 4791 has been reserved for RoCE v2. Since Red Hat Enterprise Linux 7.5, RoCE v2 is the default version for RDMA_CM when using the ConnectX-3 Pro, ConnectX-4, ConnectX-4 Lx and ConnectX-5 network adapters. Hardware supports both RoCE v1 and RoCE v2.
Table 13.1. RoCE Version Defaults Using RDMA_CM
| Client | Server | Default setting |
|---|---|---|
| RoCE v1 | RoCE v1 | Connection |
| RoCE v1 | RoCE v2 | Connection |
| RoCE v2 | RoCE v2 | Connection |
| RoCE v2 | RoCE v1 | No connection |
Procedure 13.1. Changing the Default RoCE Mode When the Hardware Is Already Running in Roce v2
/sys/kernel/config/rdma_cm directory to et the RoCE mode:
~]# cd /sys/kernel/config/rdma_cm
ibstat command with an Ethernet network device to display the status. For example, for mlx5_0:
~]$ ibstat mlx5_0
CA 'mlx5_0'
CA type: MT4115
Number of ports: 1
Firmware version: 12.17.1010
Hardware version: 0
Node GUID: 0x248a0703004bf0a4
System image GUID: 0x248a0703004bf0a4
Port 1:
State: Active
Physical state: LinkUp
Rate: 40
Base lid: 0
LMC: 0
SM lid: 0
Capability mask: 0x04010000
Port GUID: 0x268a07fffe4bf0a4
Link layer: Ethernet
~]# mkdir mlx5_0
default_roce_mode file in the tree format:
~]# cd mlx5_0
~]$ tree
└── ports
└── 1
├── default_roce_mode
└── default_roce_tos
~]$ cat /sys/kernel/config/rdma_cm/mlx5_0/ports/1/default_roce_mode
RoCE v2
~]# echo "RoCE v1" > /sys/kernel/config/rdma_cm/mlx5_0/ports/1/default_roce_mode
~]$ cat /sys/kernel/config/rdma_cm/mlx5_0/ports/1/default_roce_mode
RoCE v1