Setting RDMA Type of Service with DOCA

Hi,

I recently noticed that MLNX_OFED is being deprecated in favor of DOCA(-OFED). I am testing switching over to DOCA-OFED for our cluster.

We use RoCEv2 and have some dedicated lossless queues set up on our switches. To select the correct queue for RDMA traffic, I set the Type of service (TOS) of the appropriate interface to 26.

Previously, with MOFED, I was able to do this by simply echoing the calculated TOS to a magic file in the interface:

TC="/sys/class/infiniband/$MLNX_INT/tc/1/traffic_class"
echo 106 > "$TC"

With DOCA, this tc folder doesn’t exist under /sys/class/infiniband/$MLNX_INT/. Is there an alternative way to set the TOS of an interface with DOCA?

I was unable to find anything in the transition guide.

Hi @jarulsamy,

How did you install DOCA-OFED on your system?
I’m working with a dual-port ConnectX-6 DX NIC and have DOCA-OFED version 2.9.1 installed (2.9.1-018000-24.10-ubuntu2404).
I can access and modify this file.

# echo 106 > /sys/class/infiniband/mlx5_0/tc/1/traffic_class  
# cat /sys/class/infiniband/mlx5_0/tc/1/traffic_class  
Global tclass=106  

Thanks,
Chen

Hi @chenh1,

I used the upstream RPM from https://linux.mellanox.com/public/repo/doca/2.9.0/rhel9.3/x86_64/

I installed with:

dnf install -y doca-ofed kmod-mlnx-nfsrdma