[Ecn-sane] net-next dctcp mod question

Dave Taht dave.taht at gmail.com
Mon Aug 5 14:21:09 EDT 2019


The SCE tree had two key looking modifications to it that seem to have
been superceded by net-next.

My reading of the remaining differences seem to be resolved in the
state machine where setting the last portion
of the SCE patch appears to do a decrease on multiple losses. ? Can I
not forward port these?

--- a/net/ipv4/tcp_dctcp.c
+++ b/net/ipv4/tcp_dctcp.c
@@ -110,7 +110,7 @@ static u32 dctcp_ssthresh(struct sock *sk)

 static void dctcp_update_alpha(struct sock *sk, u32 flags)
 {
-       const struct tcp_sock *tp = tcp_sk(sk);
+       struct tcp_sock *tp = tcp_sk(sk);
        struct dctcp *ca = inet_csk_ca(sk);

        /* Expired RTT */
@@ -138,6 +138,7 @@ static void dctcp_update_alpha(struct sock *sk, u32 flags)
                 */
                WRITE_ONCE(ca->dctcp_alpha, alpha);
                dctcp_reset(tp, ca);
+               tp->snd_cwnd = dctcp_ssthresh(sk);
        }
 }

@@ -147,6 +148,7 @@ static void dctcp_react_to_loss(struct sock *sk)
        struct tcp_sock *tp = tcp_sk(sk);

        ca->loss_cwnd = tp->snd_cwnd;
+       tp->snd_cwnd = max(tp->snd_cwnd >> 1U, 2U);
        tp->snd_ssthresh = max(tp->snd_cwnd >> 1U, 2U);
 }



-- 

Dave Täht
CTO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-831-205-9740


More information about the Ecn-sane mailing list