Skip to content

tcp_prague.c: Prague CC and ECT1 enabled if RFC3168 signaling negotiated #10

@nealcardwell

Description

@nealcardwell

In the tcp_prague.c code, in prague_init() it disables Prague if no ECN support has been negotiated:

    if (!tcp_ecn_mode_any(tp) &&
        sk->sk_state != TCP_LISTEN && sk->sk_state != TCP_CLOSE) {
            prague_release(sk);
            LOG(sk, "Switching to pure reno [ecn_status=%u,sk_state=%u]",
                tcp_ecn_mode_any(tp), sk->sk_state);
            inet_csk(sk)->icsk_ca_ops = &prague_reno;
            return;
    }

    tp->ecn_flags |= TCP_ECN_ECT_1;
    ...

However, AFAICT that means if RFC3168 support is negotiated then Prague CC stays enabled and enables ECT1.

Probably this should be checking for AccECN support instead:

    if (!tcp_ecn_mode_accecn(tp) &&
      ....

That would match more closely the logic in Ilpo's patch for bbr2.c:

git show 4b75165
commit 4b75165
Author: Ilpo Järvinen ilpo.jarvinen@cs.helsinki.fi
Date: Mon Jun 28 11:07:23 2021 +0300

l4s: make BBR v2 want ECT(1)

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@cs.helsinki.fi>

diff --git a/net/ipv4/tcp_bbr2.c b/net/ipv4/tcp_bbr2.c
index 5510adc92bbb4..2b4fc9abb1dbc 100644
--- a/net/ipv4/tcp_bbr2.c
+++ b/net/ipv4/tcp_bbr2.c
@@ -2471,6 +2471,8 @@ static void bbr2_init(struct sock *sk)
bbr->alpha_last_delivered_ce = 0;

    tp->fast_ack_mode = min_t(u32, 0x2U, bbr_fast_ack_mode);
  •   if (tcp_ecn_mode_accecn(tp))
    
  •           tp->ecn_flags |= TCP_ECN_ECT_1;
    

}

/* Core TCP stack informs us that the given skb was just marked lost. */


This issue is in the current tcp_prague.c from:

3cc3851 (tag: testing-build, l4steam/testing, l4s/testing) github workflows

7d7c8a9 (l4steam/tcp_prague, l4s/tcp_prague) tcp: Optionally pace IW

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions