Nick Reilly
|
Re: sendmmsg to saturate 1 GBit link
|
Nick Reilly
09/15/2022 10:17 AM
post121921
|
Re: sendmmsg to saturate 1 GBit link
There's an interface send queue which is where the data is placed and sendmmsg() will return. Once that is full then
sendmmsg() will return ENOBUFS. The driver will be reading from the other end of the interface send queue and setting up
the DMA descriptors. You have no indication of when the packet is actually transmitted. This makes it very tricky to
saturate an interface with UDP traffic - if you write too fast you get ENOBUFS and you are just wasting CPU that's
probably needed to deal with transmitting, write too slowly and you aren't keeping the interface busy enough. TCP is a
lot easier to saturate an interface in that there will be a TCP socket buffer that a blocking write() will not return
from until there is space in that buffer.
Drivers can set their interface queue lengths, but most will default to 256 packets. I suspect you are also suffering
from fragmentation increasing the number of packets, unless you have adjusted the interface MTU.
|
|
|