iperf icon indicating copy to clipboard operation
iperf copied to clipboard

Add UDP GSO/GRO support

Open marcosfsch opened this issue 1 year ago • 3 comments

  • Version of iperf3 (or development branch, such as master or 3.1-STABLE) to which this pull request applies: master

  • Issues fixed (if any): Rebase of PR 1309 including missing declarations on "iperf.h" and exception when using without "-l"

  • Brief description of code changes (suitable for use as a commit message): Add UDP GSO/GRO support

marcosfsch avatar Dec 07 '23 17:12 marcosfsch

What's the status on this? My team and I are very interested in using this feature! Thx!

gegles avatar Feb 20 '24 04:02 gegles

Just FYI, after spending a little bit of time on this and an easy rebase on master, I tried running it and got the following core dumped:

./src/iperf3 -c localhost -u -b 20G --gsro
Floating point exception (core dumped)

I will see if I can debug... anybody else has seen this?

Has anybody got this feature working correctly?

gegles avatar Feb 20 '24 08:02 gegles

The exception happens in iperf_api.c/iperf_parse_arguments():

        test->settings->gso_dg_size = blksize;
        /* use the multiple of datagram size for the best efficiency. */
        test->settings->gso_bf_size = (test->settings->gso_bf_size / test->settings->gso_dg_size) * test->settings->gso_dg_size;

The problem is that for UDP tests, when -l is not set, blksize is 0. (As stated some lines above these lines: blksize = 0; /* try to dynamically determine from MSS */).

Two more comments:

  1. When -l is set to less than 1008 bytes, net.c/udp_sendmsg_gso() prints something like msg: 4294967295 != 65390 (iperf3 continues to run but I am not sure if this is not existing iperf3 bug).

  2. I got the following compilation warning:

net.c: In function ‘udp_sendmsg_gso’:
net.c:569:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  569 |  iov.iov_base = data;

davidBar-On avatar Feb 23 '24 11:02 davidBar-On