Skip to content

[pull] master from esnet:master#141

Open
pull[bot] wants to merge 374 commits intokubestone:masterfrom
esnet:master
Open

[pull] master from esnet:master#141
pull[bot] wants to merge 374 commits intokubestone:masterfrom
esnet:master

Conversation

@pull
Copy link

@pull pull bot commented May 10, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label May 10, 2023
bmah888 and others added 29 commits May 13, 2024 14:29
Fix clang compilation failure on Android
iperf_api: memset entire malloc
Add error handling for close socket
`congestion_used` is set each iteration of the loop. For tests running parallel streams, the previous malloc-ed string (from `strdup`) is leaked.
%c potentially prints a 2 digit year. Just use a normal format.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
time_t is 64-bit, even under 32-bit musl. Cast to 64-bit to make it
compatible everywhere.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This change provides consistent behavior relative to more routine
(non-error) timestamped output.
…estener

Do not listen to old UDP prot_listener
Fix indentation and add brackets in iperf_server_api for clarity
* Add SCTP information to --json output

* Fix compile error when SCTP is not supported
Changed fqrate from uint to uint64 to allow pacing above 32G. Not yet tested on big-endian systems
fix crash under big endian musl
…mance-improve

iperf_time_add() optimization
gegles and others added 30 commits February 10, 2026 05:01
Add documentation for the --gsro flag in the manual page,
describing UDP GSO/GRO functionality and its benefits.
Refactor iperf_udp_send() and iperf_udp_recv() to use unified loops
that handle both GSO/GRO-enabled and disabled cases in a single code
path, eliminating code duplication.

Key changes:
- Configure loop parameters (dgram_sz, buf_sz) upfront based on
  GSO/GRO availability
- Use single unified loop for packet processing regardless of
  GSO/GRO state
- Restore loss counter increments and jitter computation outside
  #ifdef guards so they work when GSO/GRO is disabled
- Gate diagnostic output in iperf_udp_gso() and iperf_udp_gro()
  behind test->debug checks to prevent unwanted verbosity

This addresses maintainer feedback to eliminate separate code branches
and ensure counters work correctly in all configurations.

Tested:
- Normal UDP mode: jitter and loss counters working correctly
- --gsro mode: jitter and loss counters working correctly
- Debug output properly gated behind -d flag
Reject --gsro when used with -s (server mode) by returning
IECLIENTONLY, matching the pattern used by other client-only flags.
The server already receives GSO/GRO settings from the client via the
JSON parameter exchange, so passing --gsro on the server command line
has no effect. Update help text and man page accordingly.
Address PR feedback to allow clients without GSO/GRO support to request
server-side enablement. Key changes:

- Remove conditional compilation guards around --gsro option
- Always define gso/gro fields in iperf_settings structure
- Always send/receive GSO/GRO parameters in JSON protocol
- Add warnings when --gsro requested but not supported locally
- Socket options only applied when HAVE_UDP_SEGMENT/HAVE_UDP_GRO defined

This allows a client compiled without GSO/GRO support to still use --gsro
to enable these features on a capable server, improving flexibility for
heterogeneous deployments.
Remove HAVE_UDP_SEGMENT/HAVE_UDP_GRO guards around:
- GSO parameter initialization in iperf_parse_arguments
- Buffer sizing logic in iperf_new_stream

These fields are now always defined, allowing client/server negotiation
regardless of local support. Guards remain only around actual socket
operations.

Also restore MAP_SHARED for mmap (was accidentally changed to MAP_PRIVATE
during GSO/GRO merge in b56475e), fixing zerocopy functionality that was
broken since PR #1949.
- Remove conditional guards around --gsro help text to match option
  availability (option is always available regardless of local support)
- Remove debug printf statements from net.c (net layer doesn't log to
  console; returns error codes silently per existing pattern)
- Remove duplicate iperf.h include in net.c

This ensures --gsro appears in help on all systems and eliminates
console spam from GSO/GRO error paths.
Replace compile-time feature guards in headers with stub implementations
that return errors when features are unavailable:

- Remove #ifdef guards from net.h function declarations
- Reorganize net.h to group Nread_gro with read functions and
  Nwrite_gso with write functions
- Add stub implementations in net.c and iperf_udp.c that return errors
  and set gso/gro flags to 0 when features not supported
- Remove guards around ALL function calls (including in iperf_udp_connect)
  to ensure stubs run on platforms without GSO/GRO support
- Keep guards only around setsockopt calls using platform constants

Also fix:
- Unused variable warning: remove cnt from iperf_udp_recv
- Warning ordering: show platform support warnings only after
  client-only check passes (prevents confusing output with -s --gsro)

This fixes the critical bug where --gsro on macOS caused zero traffic
because ifdef guards prevented stubs from running, leaving gso=1 and
triggering the unsupported GSO path.

Benefits:
- Cleaner API (no preprocessor clutter in headers)
- Runtime feature detection via stubs
- Code works correctly on all platforms
- Better code organization and error messages
Add UDP GSO/GRO support (Linux) and --gsro switch
* improve message to client when server bit rate is exceeded

* improve handing of bit rate max violation

* typo

* remove IETOTALREQUESTEDRATE in favor of existing IETOTALRATE

* validating fq-rate; move logic to get_parameters; temporarily borrow get_parameters server error handling

* address merge conflicts

* Update error code value

* Remove unused constant

---------

Co-authored-by: Bruce A. Mah <bmah@es.net>
Restore comments and debug logging in iperf_udp_recv().

Make some debug output in iperf_udp_send() conditional on
DEBUG_LEVEL_DEBUG.

Suggested by:  @davidBar-On
Minor follow-up commits to GSO/GRO feature
Do ldconfig after make install if applicable
…-when-possible

Send SERVER_ERROR to client with error info in more cases
…te-non-zero-loss

Fix backward compatibility issue of client incorrectly print 0 UDP packets loss
* Fix iperf3 client hangs

* Support android
* adding tcp_info support for MacOS

* Update tcp_info.c cleanup spaces remove printf

* Update iperf.h removed incorrect __APPLE__ and __MACH__ checks for tcp_info

* fixed missing '('
Fix UBSan with `-i0`: avoid division by zero
Add frequently asked questions link to README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.