Skip to content

Add UDP GSO/GRO support.#1309

Closed
nathan565656 wants to merge 1 commit intoesnet:masterfrom
nathan565656:nathan
Closed

Add UDP GSO/GRO support.#1309
nathan565656 wants to merge 1 commit intoesnet:masterfrom
nathan565656:nathan

Conversation

@nathan565656
Copy link
Copy Markdown

  • Version of iperf3: master

  • Issues fixed (if any): N/A

  • Brief description of code changes: Add UDP GSO/GRO support.

@nathan565656
Copy link
Copy Markdown
Author

Some discussion related to this pull request is at #1281 in case someone is interested in the details.

Please kindly let me know if anything is missing or it's better to add something more, ex. implementation details or any explanation. Please also feel free to let me know if any question. I will update and get back soon. Thanks!

@bprodoehl
Copy link
Copy Markdown

@nathan565656 I'm seeing these compilation errors. Am I missing a step?

iperf_api.c: In function 'iperf_defaults':
iperf_api.c:2805:28: error: 'GSO_DEF' undeclared (first use in this function)
 2805 |     testp->settings->gso = GSO_DEF;
      |                            ^~~~~~~
iperf_api.c:2805:28: note: each undeclared identifier is reported only once for each function it appears in
iperf_api.c:2807:36: error: 'GSO_BF_MAX_SIZE' undeclared (first use in this function)
 2807 |     testp->settings->gso_bf_size = GSO_BF_MAX_SIZE;
      |                                    ^~~~~~~~~~~~~~~
iperf_api.c:2810:28: error: 'GRO_DEF' undeclared (first use in this function)
 2810 |     testp->settings->gro = GRO_DEF;
      |                            ^~~~~~~
iperf_api.c:2811:36: error: 'GRO_BF_MAX_SIZE' undeclared (first use in this function)
 2811 |     testp->settings->gro_bf_size = GRO_BF_MAX_SIZE;
      |                                    ^~~~~~~~~~~~~~~
iperf_api.c: In function 'iperf_reset_test':
iperf_api.c:3108:35: error: 'GSO_BF_MAX_SIZE' undeclared (first use in this function)
 3108 |     test->settings->gso_bf_size = GSO_BF_MAX_SIZE;
      |                                   ^~~~~~~~~~~~~~~
iperf_api.c:3111:35: error: 'GRO_BF_MAX_SIZE' undeclared (first use in this function)
 3111 |     test->settings->gro_bf_size = GRO_BF_MAX_SIZE;
      |                                   ^~~~~~~~~~~~~~~

@davidBar-On
Copy link
Copy Markdown
Contributor

I'm seeing these compilation errors. Am I missing a step?

@bprodoehl,, did you re-run configure (and maybe bootstrap.sh)? This should be done as these are probably new declarations in configure.ac.

@bprodoehl
Copy link
Copy Markdown

I'm seeing these compilation errors. Am I missing a step?

@bprodoehl,, did you re-run configure (and maybe bootstrap.sh)? This should be done as these are probably new declarations in configure.ac.

I did run bootstrap.sh and configure before posting. I don't see them defined anywhere in the PR, so my guess is they were meant to be added to iperf_api.h but forgotten. I added them locally, defaulting GSO and GRO to 0 and defaulting the max buffer sizes to 128K, and it seems ok.

@nathan565656
Copy link
Copy Markdown
Author

@bprodoehl Sorry that somehow that part was missing. Please add the following in "iperf.h".
Please feel free to let me know if there is any other question. Thanks.

#define GSO_BF_MAX_SIZE 64000
#define GSO_DEF 0
#ifndef UDP_SEGMENT
#define UDP_SEGMENT 103
#endif
#define GRO_DEF 0
#define GRO_BF_MAX_SIZE 65535
#ifndef UDP_GRO
#define UDP_GRO 104
#endif

@feiqin-corigine
Copy link
Copy Markdown

Hi, @bprodoehl @nathan565656. Hope you have a nice day.
We are also interested in the UDP GSO which looks highly benefit improving UDP performance.
May i ask if there's any plan to merge the support for UDP GSO?

@FirstLoveLife
Copy link
Copy Markdown

Hi, @bprodoehl @nathan565656. Hope you have a nice day. We are also interested in the UDP GSO which looks highly benefit improving UDP performance. May i ask if there's any plan to merge the support for UDP GSO?

Maybe @nathan565656 can rebase his commit to fix the compile issue first.

@FirstLoveLife
Copy link
Copy Markdown

Hi @nathan565656 ,

I hit SIGFPE when run with your patch:

(gdb) r
Starting program: /usr/local/bin/iperf3 -c 10.4.8.129 -u --gsro -b 0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGFPE, Arithmetic exception.
iperf_parse_arguments (test=test@entry=0x5555555592a0, argc=argc@entry=7, argv=argv@entry=0x7fffffffdc68) at iperf_api.c:1673
1673            test->settings->gso_bf_size = (test->settings->gso_bf_size / test->settings->gso_dg_size) * test->settings->gso_dg_size;

Could you kindly please take a look?

@gbhardwaja
Copy link
Copy Markdown

Hi, when this feature will be merged and avilable on iperf3 ?

@gegles
Copy link
Copy Markdown
Contributor

gegles commented Aug 8, 2025

Please, take a look at #1925, hopefully this can become the definitive PR for this feature

@bmah888
Copy link
Copy Markdown
Contributor

bmah888 commented Feb 18, 2026

Thanks for the PR! This has been superceded by PR #1925, which was just merged.

@bmah888 bmah888 closed this Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants