ETHERNET TESTING INSIGHTS

How to emulate RoCEv2 flows?

How to emulate RoCEv2-cover

What is RoCEv2?

RoCEv2 (RDMA over Converged Ethernet version 2) is a network protocol that enables remote direct memory access (RDMA) over routable IP networks using UDP encapsulation.

RDMA is a high-performance protocol that lets servers directly read from or write to the memory of another server without using the CPU, operating system, or intermediate data copying. It is commonly used in high-speed data center networks to reduce latency and CPU overhead.

What is the RoCEv2 header format?

RoCEv2 frames are essentially InfiniBand (IB) encapsulated in UDP, IP, and Ethernet, as shown below.

The UDP Destination Port 4791 indicates that the payload is RoCEv2.

RoCEv2 frame format

What is the RDMA Protocol?

The RDMA protocol involves the following high-level steps for the exchange of data from one memory location at one server to a memory location on another server:

1. Connection Establishment
– Two devices establish a connection using RDMA-capable hardware (e.g., NICs supporting RDMA).
– Both devices create queue pairs (send queue, receive queue and completion queue).

2. Memory Registration
– The sending and receiving devices register their memory regions with the RDMA hardware.
– Registered memory regions get pinned, meaning they cannot be moved or swapped by the OS during RDMA operations.

3. Exchange of Memory Keys
– Devices exchange memory keys (e.g., Remote Memory Address and access permissions) that allow direct access to the registered memory regions.

4. Data Transfer
– One device directly reads from or writes to the remote device’s memory, bypassing the CPU on both ends.
– Transfers occur with minimal latency since there is no involvement of intermediate buffers or kernel context switching.

5. Completion Notification
– RDMA hardware informs the application when the operation is completed, ensuring reliability and consistency.

6. Connection Teardown
– Once data exchange is complete, the RDMA connection is closed, and memory regions are deregistered.

The different types of packets exchanged between the two devices are encoded in the Base Transport Header (BTH). Since the data exchange is described in bullet 4 above, this is where performance testing becomes especially important. Data can be exchanged as either IPv4 or IPv6 and as Reliable Connection (RC), Reliable Datagram (RD), Unreliable Connection (UC) and Unreliable Datagram (UD). Furthermore, every data exchange consists of a SEND FIRST frame, several SEND MIDDLE frames and a SEND LAST frame.

This is shown in Figure 2 below, for the case of a RC SEND operation. The figure also illustrates how the BTH Opcode encodes the three types of RC SEND frames.

RC Send diagram

How to emulate RoCEv2 flows using Z800 Freya Traffic Generator?

Teledyne LeCroy’s Z800 Freya Traffic Generator can be used to generate RoCEv2 flows for performance testing of NICs, switches, and entire networks under various workloads.

It is important to note that while the Z800 Freya generates the RoCEv2 flows, it does not participate in the RDMA protocol itself. This helps to pinpoint potential issues by isolating the traffic generation from the protocol handling, allowing for more accurate identification of performance bottlenecks and network inefficiencies.

The Z800 Freya can be configured to emulate RoCEv2 flows using the XenaManager software and one of our config files. For more advanced scripting there is also a Python code for use with Xena OpenAutomation (XOA).

Load config file in XenaManager

How to configure RoCEv2 with XenaManager and config files?

To ease the configuration of RoCEv2 flows we have created four configuration files that you can use:

To load the files in XenaManager, simply right-click on the port and select “Load Port Configuration”, as shown on the left.

How to configure RoCEv2 using XOA?

To set up more advanced RoCEv2 flows and potentially integrate with your own test environment, we created an example Python script. This script provides flexible configuration options, such as adjusting the number of frames per flow, traffic rate, burstiness, repetition, and more.

The example can be found here: open-automation-script-library/rocev2 at main · xenanetworks/open-automation-script-library · GitHub

The file “headers.py” includes all the definitions of the various BTH Opcodes and other bits in the BTH. The file “roce2_emulate.py” defines the number of frames per flows, frame sizes etc.

How to emulate impairment of RoCEv2 flows using E100 Chimera?

The Teledyne LeCroy Xena E100 Chimera can emulate a broad range of network impairments, incl. latency, jitter, packet and port impairments, flexible distributions, and bandwidth shaping.

This is especially important for RoCEv2 traffic that is sensitive to latency, packet mis-ordering and other such impairments.

We have configuration file available for E100 Chimera, that once uploaded will filter RoCEv2 frames based on the UDP Destination Port 4791. This makes it easy to create a test scenario where only RocEv2 frames are being impaired.