Page MenuHomeFreeBSD

tcp: Use segment size excluding any options for all cwnd calculations
ClosedPublic

Authored by rscheff on Nov 7 2024, 2:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 8, 8:51 PM
Unknown Object (File)
Mon, Dec 2, 9:07 AM
Unknown Object (File)
Thu, Nov 28, 5:38 AM
Unknown Object (File)
Wed, Nov 27, 1:23 PM
Unknown Object (File)
Nov 15 2024, 5:03 PM
Unknown Object (File)
Nov 14 2024, 6:45 PM
Unknown Object (File)
Nov 14 2024, 12:56 PM
Unknown Object (File)
Nov 8 2024, 12:45 AM
Subscribers

Details

Summary

Avoid sending small segments by making sure that cwnd is usually
calculated in full (data) segment sizes. Especially during loss
recovery and retransmission scenarios.

An alternative approach, and possibly more effective, could be to
ensure in tcp_output, that small segments are only sent, when ACKNOW
is set, or cwnd would allow sending the entire send buffer (but the
final segment being smaller than MSS).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Nov 14 2024, 3:24 PM
sys/netinet/cc/cc_newreno.c
218

This is fast path and re-calculate MSS for every input draws my efficiency concern. I remember Lawrence once discussed about this, if I remember correctly.

Why not cache the correct MSS in tcpcb?

Well, I had the same thought - the full MSS (including options) is less frequently used, that the mss without options...

So, it would certainly be more efficient to store the MSS exkluding options in tcpcb, and calculating the MSS inkl. option space only where that is needed...

But that should a different Diff IMHO, as this one is more in the break/fix category.

Well, I had the same thought - the full MSS (including options) is less frequently used, that the mss without options...

So, it would certainly be more efficient to store the MSS exkluding options in tcpcb, and calculating the MSS inkl. option space only where that is needed...

But that should a different Diff IMHO, as this one is more in the break/fix category.

I want to test this patch to see if any segmentation being improved during loss recovery, as I found in https://wiki.freebsd.org/chengcui/testD43470.

update:
Looks this patch has some significant reduction on fragment (data_size % MSS) > 0 out of TSO data chunks: testD47474
TSO not enabled:

versionfragment_cnt
before patch D4747431
after patch D474741

TSO enabled:

versionfragment counttotal TSO data chunksfragment ratio
before patch D4747421352107860.010
after patch D4747413132064740.006 (-40.0%)