Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tcp: accecn: retransmit downgraded SYN in AccECN negotiation

Based on AccECN spec (RFC9768) Section 3.1.4.1, if the sender of an
AccECN SYN (the TCP Client) times out before receiving the SYN/ACK, it
SHOULD attempt to negotiate the use of AccECN at least one more time
by continuing to set all three TCP ECN flags (AE,CWR,ECE) = (1,1,1) on
the first retransmitted SYN (using the usual retransmission time-outs).

If this first retransmission also fails to be acknowledged, in
deployment scenarios where AccECN path traversal might be problematic,
the TCP Client SHOULD send subsequent retransmissions of the SYN with
the three TCP-ECN flags cleared (AE,CWR,ECE) = (0,0,0).

Signed-off-by: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260131222515.8485-8-chia-yu.chang@nokia-bell-labs.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Chia-Yu Chang and committed by
Paolo Abeni
3ae62b8b c5ff6b83

+9 -6
+9 -6
net/ipv4/tcp_output.c
··· 3606 3606 tcp_retrans_try_collapse(sk, skb, avail_wnd); 3607 3607 } 3608 3608 3609 - /* RFC3168, section 6.1.1.1. ECN fallback 3610 - * As AccECN uses the same SYN flags (+ AE), this check covers both 3611 - * cases. 3612 - */ 3613 - if ((TCP_SKB_CB(skb)->tcp_flags & TCPHDR_SYN_ECN) == TCPHDR_SYN_ECN) 3614 - tcp_ecn_clear_syn(sk, skb); 3609 + if (!tcp_ecn_mode_pending(tp) || icsk->icsk_retransmits > 1) { 3610 + /* RFC3168, section 6.1.1.1. ECN fallback 3611 + * As AccECN uses the same SYN flags (+ AE), this check 3612 + * covers both cases. 3613 + */ 3614 + if ((TCP_SKB_CB(skb)->tcp_flags & TCPHDR_SYN_ECN) == 3615 + TCPHDR_SYN_ECN) 3616 + tcp_ecn_clear_syn(sk, skb); 3617 + } 3615 3618 3616 3619 /* Update global and local TCP statistics. */ 3617 3620 segs = tcp_skb_pcount(skb);