Skip to content

What is the expected behavior of the --skip-rx-copy flag for UDP and TCP? #1904

Answered by davidBar-On
manedurphy asked this question in Q&A
Discussion options

You must be logged in to vote

--skip-rx-copy uses MSG_TRUNC socket option, to skip copying the received data from the TCP/UDP stack buffer into the user's buffer. For iperf3 this is used for not including the overhead of data copy between the buffers.

For TCP, MSG_TRUNC does not copy any data, regardless of the size parameter value. For UDP, the size parameters specify how much data from the received datagram (packet) should be copied. iperf3 uses the first bytes of the UDP datagram for the time the packet was sent (sec, usec) and for the packet count (pcount) - total 16 bytes. Therefore iperf3 needs to read the header of the received UDP datagram and cannot ignore all of it.

The result is that with --skip-rx-copy, TC…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@manedurphy
Comment options

Answer selected by manedurphy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants