RoCE is a way of keeping RDMA while moving from a dedicated InfiniBand fabric to Ethernet: the same low latency and CPU offload, with the network built from the standard switches used by the rest of the data centre. The RoCE specifications are maintained by the InfiniBand Trade Association — the same body behind InfiniBand itself: RoCE takes the transport layer of the InfiniBand architecture and places it on top of Ethernet frames.
How the versions differ
The first version of RoCE appeared in 2010 as Annex A16 to the InfiniBand specification and worked at layer 2: RDMA packets travelled inside Ethernet frames with a separate ethertype, so there was no routing — only within a single L2 segment. In RoCEv2 the packets are wrapped in UDP/IP and routed between segments; IANA has assigned port 4791 to them, which is why RoCEv2 is sometimes called routable RoCE.
| Version | Transport | Where it runs |
|---|---|---|
| RoCEv1 | Ethernet frames (L2) | a single segment, no routing |
| RoCEv2 | UDP/IP, port 4791 | routable L3 network |
A lossless network
RDMA tolerates packet loss poorly: a lost packet has to be sent again, and throughput drops sharply. RoCE is therefore designed for a lossless network. The classic approach is Data Center Bridging: Priority Flow Control (PFC) halts the sender when congestion builds up on a particular traffic class, while ECN marks packets as congestion begins, and the adapters respond with CNP messages, slowing their pace. The PFC and ECN settings must be agreed on every node and every switch along the path: a mismatch on even one device breaks the whole fabric.
Where it is used
The second use case after neural network training is fast storage networking: NVMe-oF and distributed file systems serve data over RoCE with latencies close to those of local disks. On NVIDIA Ethernet platforms (Spectrum-X), RoCEv2 is a way to connect the GPU nodes of a cluster while staying within the familiar Ethernet setup. To a developer, RoCE looks like ordinary RDMA: the same verbs interface, the same programs as on InfiniBand.
RoCE can also run without specialised hardware: Soft-RoCE (the RXE driver in the Linux kernel) implements RDMA on top of an ordinary network adapter — fine for development and testing, but usually not for production.
sudo modprobe rdma_rxe && rdma link add rxe0 type rxe netdev eth0Sources
the term is written from these pages- InfiniBand Trade Association — IBTA Specification (FAQ: InfiniBand и RoCE)infinibandta.org/ibta-specification/(opens in a new tab)
- IANA — Service Name and Transport Protocol Port Number Registry (roce, 4791/udp)iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv(opens in a new tab)
- Linux kernel — RDMA_RXE (Soft-RoCE) driver Kconfiggithub.com/torvalds/linux/blob/master/drivers/infiniband/sw/rxe/Kconfig(opens in a new tab)
Verified 9 Nov