]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gro: flushing when CWR is set negatively affects AccECN
authorIlpo Järvinen <ij@kernel.org>
Sat, 31 Jan 2026 22:25:02 +0000 (23:25 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 3 Feb 2026 14:13:24 +0000 (15:13 +0100)
As AccECN may keep CWR bit asserted due to different
interpretation of the bit, flushing with GRO because of
CWR may effectively disable GRO until AccECN counter
field changes such that CWR-bit becomes 0.

There is no harm done from not immediately forwarding the
CWR'ed segment with RFC3168 ECN.

Signed-off-by: Ilpo Järvinen <ij@kernel.org>
Signed-off-by: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260131222515.8485-3-chia-yu.chang@nokia-bell-labs.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ipv4/tcp_offload.c

index 942a948f1a3109666ef66d7517e22f9e73122065..3b1fdcd3cb29b3758ecfd06488390a29a919df8e 100644 (file)
@@ -304,8 +304,7 @@ struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb,
                goto out_check_final;
 
        th2 = tcp_hdr(p);
-       flush = (__force int)(flags & TCP_FLAG_CWR);
-       flush |= (__force int)((flags ^ tcp_flag_word(th2)) &
+       flush = (__force int)((flags ^ tcp_flag_word(th2)) &
                  ~(TCP_FLAG_FIN | TCP_FLAG_PSH));
        flush |= (__force int)(th->ack_seq ^ th2->ack_seq);
        for (i = sizeof(*th); i < thlen; i += 4)