User`s guide

Chapter XI. UDP Segmentation Offload and Pacing
Chelsio T5/T4 Unified Wire For Linux Page 179
4.2. Configuring UDP Pacing
Now that the application has been modified to associate the application’s UDP socket to a
particular UDP traffic class, the pacing of that socket’s traffic can be set using the cxgbtool
utility. The command and its parameters are explained below:
[root@host]# cxgbtool <ethX> sched-class params type packet level cl-rl
mode flow rate-unit bits rate-mode absolute channel <Channel No.> class
<scheduler-class-index> max-rate <maximum-rate> pkt-size <Packet size>
Here,
ethX is the Chelsio interface
Channel No. is the port on which data is flowing (0-3)
scheduler-class-index is the UDP traffic class (0-14) set in the SOL_SCHEDCLASS socket
option in the application in section 4.1.
maximum-rate is the bit rate (Kbps) for this UDP stream. This value should be in the range
of 50 Kbps to 50 Mbps.
Packet size is the UDP packet payload size in bytes; it should be equal to the value set in
the SO_FRAMESIZE socket option in the application in section 4.1.
Example:
The user wants to transfer UDP data on port 0 of the adapter using the USO engine. The
application has been modified as shown in section 4.1. In order to set a bit rate of 10Mbps for
traffic class 1 with payload size of 1316 on port 0, the following invocation of cxgbtool is used:
[root@host]# cxgbtool ethX sched-class params type packet level cl-rl
mode flow rate-unit bits rate-mode absolute channel 0 class 1 max-rate
10000 pkt-size 1316
To get an accurate bit rate per class, data sent by the application to the
sockets should be a multiple of the value set for the pkt-size parameter.
In above example, IO size sent by application should be a multiple of 1316.
Linux Unified Wire currently supports 10240 offload UDP connections. If the
application needs to establish more than 10240 UDP connections, it can
check the return code of ENOSPC from a send() or sendto() call and close
this socket and open a new one that uses the kernel UDP stack.
Note
Note