Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Matthieu Baerts
Tue, 17 Nov 2026 17:37
Re: [PATCH net v2 2/2] tcp: accecn: initialize AccECN fields in syncookie path
Author: Matthieu Baerts
Date: Tue, 17 Nov 2026 17:37
Date: Tue, 17 Nov 2026 17:37
33 lines
12719 bytes
12719 bytes
Hello,
On 16/11/2026 03:37, Thaison Phan wrote:
> cookie_tcp_reqsk_alloc() and bpf_sk_assign_tcp_reqsk() allocate struct
> request_sock without __GFP_ZERO, leaving saw_accecn_opt,
> accecn_fail_mode, syn_ect_rcv, and syn_ect_snt uninitialized. When
> accecn_ok is negotiated in cookie_{v4,v6}_check(),
> tcp_ecn_openreq_child() reads all four fields to initialize the child
> socket's AccECN state.
>
> In addition, because the temporary request_sock used to send a cookie
> SYN-ACK is immediately freed, treq->syn_ect_snt is lost. If the listener
> marks ECT (e.g. DCTCP), failing to record syn_ect_snt causes
> tcp_accecn_third_ack() to flag TCP_ACCECN_ACE_FAIL_RECV when the peer
> reflects ECT, disabling ECT for the rest of the connection.
>
> Initialize saw_accecn_opt, accecn_fail_mode, and syn_ect_rcv in
> cookie_tcp_reqsk_init() to match tcp_openreq_init(), and set syn_ect_snt
> from the listener's TOS/tclass in cookie_{v4,v6}_check() to match
> tcp_{v4,v6}_send_synack().
I got a review from Sashiko [1] asking me to fix the same issue, and I
was going to send the same patch. So this v2 looks good to me:
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
[1] https://lore.kernel.org/sashiko-outbox-213944@kernel.org
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads