Limit UDP GSO number of segments in a message to the allowed value#2033
Merged
bmah888 merged 1 commit intoMay 14, 2026
Conversation
|
Now it works fine even with the minimum UDP packet size :D |
Contributor
|
Thanks for the PR! This looks pretty reasonable (I haven't done any testing). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Version of iperf3 (or development branch, such as
masteror3.1-STABLE) to which this pull request applies:master 3.21+
Issues fixed (if any): GSO broken for a length value lower than 508 #2032
Brief description of code changes (suitable for use as a commit message):
Suggested fix to PR #1925 to limit the number of segments in UDP GSO message to 128, which is the maximum allowed. The problem was with messages length 507 or less, as 507 is the maximum length where
MAX_UDP_BLOCKSIZE/length >= 129.The limit
GSO_MAX_DG_IN_BFis defined as a constant as I didn't find a reliable way to determine it dynamically. From what I found, the value is defined in Linux asUDP_MAX_SEGMENTS. Although it seems that in some (newer?) Linux distributions it is defined inudp.h, as in here, at least in WSL Linux that I use it is not defined in a header file, and probably it is defined inudpgso.clike in here.