Commit d26a207
committed
udp gso/gro: replace hard-coded 1472 with DEFAULT_UDP_BLKSIZE fallback
Use the existing DEFAULT_UDP_BLKSIZE for GSO datagram-size fallback instead of the literal 1472.
Rationale: avoids a magic number and keeps a conservative, widely safe default across IPv4/IPv6 when the control socket MSS is unavailable. In normal operation UDP blksize is derived from the control TCP MSS; this constant fallback is only used when MSS cannot be determined or when the computed gso_dg_size ends up 0 (unlimited case).
Behavior notes:
- If the user sets -l/--length, that value drives both UDP block size and gso_dg_size.
- Otherwise, gso_dg_size tracks the chosen blksize; it falls back to DEFAULT_UDP_BLKSIZE only when the computed value is 0.
Files:
- src/iperf_api.c: update two fallback sites
- src/iperf_client_api.c: update fallback site1 parent 6445eee commit d26a207
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1931 | 1931 | | |
1932 | 1932 | | |
1933 | 1933 | | |
1934 | | - | |
| 1934 | + | |
1935 | 1935 | | |
1936 | 1936 | | |
1937 | 1937 | | |
| |||
2610 | 2610 | | |
2611 | 2611 | | |
2612 | 2612 | | |
2613 | | - | |
| 2613 | + | |
2614 | 2614 | | |
2615 | 2615 | | |
2616 | 2616 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
527 | | - | |
| 527 | + | |
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
| |||
0 commit comments