Page MenuHomeFreeBSD

Simplify cubic_ack_received
ClosedPublic

Authored by kmacy on Sep 21 2016, 2:19 AM.
Tags
Referenced Files
F132588229: D7986.diff
Sat, Oct 18, 5:17 AM
F132571363: D7986.diff
Sat, Oct 18, 1:58 AM
Unknown Object (File)
Sun, Oct 12, 12:16 PM
Unknown Object (File)
Fri, Oct 3, 7:30 AM
Unknown Object (File)
Tue, Sep 30, 1:00 AM
Unknown Object (File)
Sep 17 2025, 6:29 AM
Unknown Object (File)
Sep 16 2025, 5:23 AM
Unknown Object (File)
Sep 15 2025, 8:02 PM

Details

Reviewers
hiren
lstewart
gnn
Group Reviewers
transport
Summary

The logic remains unchanged (with one exception) but the branching is much easier to read.

The one exception is that - if it is possible to reach a state where min_rtt_ticks is zero but we are *not* in slowstart the ack will be processed whereas before it would have been ignored.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 5244
Build 5398: CI src buildJenkins

Event Timeline

kmacy retitled this revision from to Simplify cubic_ack_received.
kmacy updated this object.
kmacy edited the test plan for this revision. (Show Details)
kmacy added a reviewer: transport.
kmacy set the repository for this revision to rS FreeBSD src repository - subversion.
kmacy added a subscriber: lstewart.

@kmacy, about the exception you noted, I am a little puzzled.
a state where min_rtt_ticks is zero but we are *not* in slowstart - could still be processed in the old code if other rfc3465 conditions align as the guarding 'if' looks like this:

(!V_tcp_do_rfc3465 ||
CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh) || ​
(V_tcp_do_rfc3465 && ccv->flags & CCF_ABC_SENTAWND))

sys/netinet/cc/cc_cubic.c
147

Can we move this 'if' condition above the prev 'if' to keep the flow closer to that of the original file? or does it break the logic in a way I am not understanding?

@kmacy Can you please looks at my comments? I like the changes otherwise.

Anyone else want to weigh in?

With regards to:

The one exception is that - if it is possible to reach a state where min_rtt_ticks is zero but we are *not* in slowstart the ack will be processed whereas before it would have been ignored.

I think this change is actually a functional improvement.

sys/netinet/cc/cc_cubic.c
147

It breaks the logic. We would be skipping newreno slow start handling.

gnn edited edge metadata.

LGTM

This revision is now accepted and ready to land.Nov 28 2016, 5:32 PM

Is this diff still alive? With all the cubic fixes that went in recently, this patch may need to be rewritten to apply cleanly.

Breaking complex conditionals up to ease the understanding seems a good thing to me.

Tagging for srcmgr review... likely can just be closed though. This code has changed a lot and I'm not sure how to apply it.

kbowling added subscribers: cc, kbowling.

@imp if I recall this was something we were looking at on my team at LLNW, if it were in Bugzilla I'd say "Close - OBE" is appropriate.

@cc since you've been working on CUBIC lately, the only thing possibly still relevant here is turning the first level if into the early returns.. it removes one level of indention which might help justify a couple other nearby style(9) fixes but it's not worth holding this review open.

@imp if I recall this was something we were looking at on my team at LLNW, if it were in Bugzilla I'd say "Close - OBE" is appropriate.

@cc since you've been working on CUBIC lately, the only thing possibly still relevant here is turning the first level if into the early returns.. it removes one level of indention which might help justify a couple other nearby style(9) fixes but it's not worth holding this review open.

Agree. It's not worth holding this old review open. Close it looks appropriate.