Skip to content

Add SKIP-RX-COPY support - using MSG_TRUNC socket option#1717

Merged
swlars merged 4 commits intoesnet:masterfrom
davidBar-On:issue-1678-SKIP_RX_COPY-MSG_TRUNC
Apr 25, 2025
Merged

Add SKIP-RX-COPY support - using MSG_TRUNC socket option#1717
swlars merged 4 commits intoesnet:masterfrom
davidBar-On:issue-1678-SKIP_RX_COPY-MSG_TRUNC

Conversation

@davidBar-On
Copy link
Contributor

@davidBar-On davidBar-On commented Jun 16, 2024

Add SKIP-RX-COPY support - using MSG_TRUNC socket option to UDP and TCP. This is a subset of the original PR #1690 that originally supported both skip-rx-copy and zerocopy for UDP. Because of UDP related issues found by @MattCatz, I split the handling of the two solutions into two PRs.

The added option is --skip-rx-copy: for both TCP and UDP, recv(..., MSG_TRUNC) is used instead of read().

After the changes suggested by @MattCatz the PR code is mature enough.
(Note that running bootstrap.sh; configure is required before make to support the new features.)

Note that whether the feature enhance performance seems to depend on the test environment. However, th e support for the feature also allows to test its impact in the specific environment.

@swlars
Copy link
Contributor

swlars commented Apr 25, 2025

Thanks for the pull request! We saw some improvements using this flag!


/********************************************************************/
/* reads 'count' bytes from a socket - but without using select() */
/* Nreads 'count' bytes from a socket - but without using select() */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was my add for testing, we're probably going to re-evaluate how this all works in the near future, this was not the optimal solution but it seems to work for now.

Copy link
Contributor

@swlars swlars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for the pull request!

@swlars swlars merged commit 0481860 into esnet:master Apr 25, 2025
6 checks passed
bmah888 added a commit that referenced this pull request May 2, 2025
* Add an entry in the manual page for --skip-rx-copy

* Re-sort command-line flag constants in src/iperf_api.h
bmah888 added a commit that referenced this pull request May 5, 2025
coolshou pushed a commit to coolshou/iperf that referenced this pull request Jun 6, 2025
* Add an entry in the manual page for --skip-rx-copy

* Re-sort command-line flag constants in src/iperf_api.h
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.

2 participants