Page MenuHomeFreeBSD

tcp cc: move the cc relevant part of cc_post_recovery() into cc modules.
AbandonedPublic

Authored by cc on Tue, Sep 1, 1:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 23, 12:55 PM
Unknown Object (File)
Wed, Sep 23, 7:32 AM
Unknown Object (File)
Tue, Sep 22, 3:39 AM
Unknown Object (File)
Sat, Sep 19, 9:09 PM
Unknown Object (File)
Sat, Sep 19, 9:09 PM
Unknown Object (File)
Fri, Sep 18, 4:25 PM
Unknown Object (File)
Thu, Sep 17, 11:36 AM
Unknown Object (File)
Wed, Sep 16, 8:24 PM

Details

Reviewers
rscheff
tuexen
Group Reviewers
transport
Summary

No functional change intended.
Improves each individual cc's responsibility for congestion control.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 76381
Build 73264: arc lint + arc unit

Event Timeline

cc requested review of this revision.Tue, Sep 1, 1:54 PM
sys/netinet/cc/cc.c
392

Many other cc modules' post_recovery() actually calls this newreno_cc_post_recovery(), except for cubic and htcp.

sys/netinet/cc/cc_htcp.c
393

Could you double check the indentation? It looks strange in this tool.

fix the indentation issue

cc marked an inline comment as done.Tue, Sep 1, 2:25 PM
cc added inline comments.
sys/netinet/cc/cc_htcp.c
393

Thanks for catching this. fixed

This revision is now accepted and ready to land.Tue, Sep 1, 6:52 PM

What about the RACK and BBR stack?

cc marked an inline comment as done.Tue, Sep 1, 7:22 PM

What about the RACK and BBR stack?

They don't seem to be impacted or relevant.

static void rack_post_recovery(struct tcpcb *tp, uint32_t th_ack);

static void bbr_post_recovery(struct tcpcb *tp);
In D59305#1360809, @cc wrote:

What about the RACK and BBR stack?

They don't seem to be impacted or relevant.

static void rack_post_recovery(struct tcpcb *tp, uint32_t th_ack);

static void bbr_post_recovery(struct tcpcb *tp);

I guess BBR is fine, but rack_post_recovery() calls CC_ALGO(tp)->post_recovery(), which you are changing. Doesn't it needs the corresponding changes?

In D59305#1360809, @cc wrote:

What about the RACK and BBR stack?

They don't seem to be impacted or relevant.

static void rack_post_recovery(struct tcpcb *tp, uint32_t th_ack);

static void bbr_post_recovery(struct tcpcb *tp);

I guess BBR is fine, but rack_post_recovery() calls CC_ALGO(tp)->post_recovery(), which you are changing. Doesn't it needs the corresponding changes?

I think rack_post_recovery() also calls rack_exit_recovery() at the end, which is a dup after this patch. The only concern, in rack_post_recovery(), will be can snd_cwnd be larger than snd_ssthresh after calling CC_ALGO(tp)->post_recovery() before this patch? If so, then it seems like a bug introduced by commit 506e3e30a43cc04a21aa65a423bbd1cc4e0543f8. Or as commit 506e3e30a43cc04a21aa65a423bbd1cc4e0543f8 indicates, "Set cwnd to ssthresh post recovery. (RFC 9937 4)" is more necessary. Then, "cwnd shall be set to ssthresh post recovery" for all seems like a simple ruling.

In D59305#1360844, @cc wrote:
In D59305#1360809, @cc wrote:

What about the RACK and BBR stack?

They don't seem to be impacted or relevant.

static void rack_post_recovery(struct tcpcb *tp, uint32_t th_ack);

static void bbr_post_recovery(struct tcpcb *tp);

I guess BBR is fine, but rack_post_recovery() calls CC_ALGO(tp)->post_recovery(), which you are changing. Doesn't it needs the corresponding changes?

I think rack_post_recovery() also calls rack_exit_recovery() at the end, which is a dup after this patch. The only concern, in rack_post_recovery(), will be can snd_cwnd be larger than snd_ssthresh after calling CC_ALGO(tp)->post_recovery() before this patch? If so, then it seems like a bug introduced by commit 506e3e30a43cc04a21aa65a423bbd1cc4e0543f8. Or as commit 506e3e30a43cc04a21aa65a423bbd1cc4e0543f8 indicates, "Set cwnd to ssthresh post recovery. (RFC 9937 4)" is more necessary. Then, "cwnd shall be set to ssthresh post recovery" for all seems like a simple ruling.

To be clear, my current concern is if the check condition if (tp->snd_cwnd < tp->snd_ssthresh) below can be safely removed.

static void
rack_post_recovery(struct tcpcb *tp, uint32_t th_ack)
{
	struct tcp_rack *rack;
	uint32_t orig_cwnd;

	orig_cwnd = tp->snd_cwnd;
	INP_WLOCK_ASSERT(tptoinpcb(tp));
	rack = (struct tcp_rack *)tp->t_fb_ptr;
	/* only alert CC if we alerted when we entered */
	if (CC_ALGO(tp)->post_recovery != NULL) {
		tp->t_ccv.curack = th_ack;
		CC_ALGO(tp)->post_recovery(&tp->t_ccv);
		if (tp->snd_cwnd < tp->snd_ssthresh) {           << check condition redundant?
			/*
			 * Rack has burst control and pacing
			 * so lets not set this any lower than
			 * snd_ssthresh per RFC-6582 (option 2).
			 */
			tp->snd_cwnd = tp->snd_ssthresh;
		}
	}
...

After a second thought, I created D59357 for better elaborating.

I am in favor of D59357, therefore, drop this change.