Page MenuHomeFreeBSD

cc_cubic: sync to the new specification of RFC9438 for TCP CUBIC.
ClosedPublic

Authored by cc on Mar 27 2025, 5:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 20, 4:21 PM
Unknown Object (File)
Sun, Sep 14, 1:29 AM
Unknown Object (File)
Sep 12 2025, 2:37 PM
Unknown Object (File)
Sep 2 2025, 11:54 PM
Unknown Object (File)
Sep 2 2025, 10:55 AM
Unknown Object (File)
Sep 2 2025, 1:01 AM
Unknown Object (File)
Aug 30 2025, 11:24 PM
Unknown Object (File)
Aug 29 2025, 2:16 PM
Subscribers

Details

Summary

highlighted changes

  1. change the type of these CUBIC windows to uint32_t from uint64_t
  2. sync to the updated formulas in RFC9438 and carefully handles these units (segments or bytes)
  3. remove un-used function reno_cwnd()

change detail in cc_cubic.h

  1. Updated cubic_k with the new formula in the RFC. It additionally uses cwnd_epoch for calculating K.
  2. Also updated these theoretical formula functions in userland.

change detail in cc_cubic.c

  1. cubic_cong_signal() now just flag the event and let the epoch start/re-start at the beginning of the current congestion avoidance phase in cubic_ack_received().
  2. Increase the cwnd only by (target - cwnd) / cwnd with a restrictive target formula from the RFC. This shall further smooth the cwnd growth, as observed in the default stack.
  3. Remove the obsolete hack for probing W_max in early congestion avoidance phase if used an old ssthresh from hostcache.
  4. Also remove the obsolete hack that aligns the concave region after the first congestion event.

reference: https://reviews.freebsd.org/D41715

Test Plan

Tests coverage is in this wiki page: testD49540

I added additional tests in this second wiki page: second testD49540

And found a test case that shows +10% performance improvement of CUBIC in shallow buffered routing testbed with fat BDP (1Gbps x 80ms).
highlighted charts is this:
{F120278156}

Diff Detail

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

Event Timeline

cc requested review of this revision.Mar 27 2025, 5:20 PM
This revision is now accepted and ready to land.Jun 12 2025, 3:36 PM