From: CachyOS/NixOS-CachyOS Subject: [PATCH] net/tcp: add TCP_CONG_WANTS_CE_EVENTS for Asahi tree compat The CachyOS 6.18 base patch adds TCP_CONG_WANTS_CE_EVENTS at BIT(2) and a tcp_ca_wants_ce_events() helper in include/net/tcp.h, and updates tcp_bbr.c and tcp_input.c to use them. The Asahi linux tree already occupies BIT(2)–BIT(4) with AccECN flags (TCP_CONG_NEEDS_ACCECN, TCP_CONG_ECT_1_NEGOTIATION, TCP_CONG_NO_FALLBACK_RFC3168), so the CachyOS hunk that defines TCP_CONG_WANTS_CE_EVENTS fails to apply, while the later hunks that *use* it (tcp_ca_wants_ce_events(), tcp_bbr.c .flags) succeed, leaving a dangling undefined-identifier compile error. Fix: define TCP_CONG_WANTS_CE_EVENTS at BIT(5) (the next free bit after the AccECN flags) and add it to TCP_CONG_MASK. The tcp_ca_wants_ce_events() helper and tcp_bbr.c / tcp_input.c callers are already in place from the CachyOS patch, so this is sufficient to resolve the build error. --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1198,6 +1198,10 @@ enum tcp_ca_ack_event_flags { /* Cannot fallback to RFC3168 during AccECN negotiation */ #define TCP_CONG_NO_FALLBACK_RFC3168 BIT(4) +/* Wants notification of CE events (CA_EVENT_ECN_IS_CE, CA_EVENT_ECN_NO_CE). + * BIT(2)–BIT(4) are taken by AccECN flags in the Asahi tree. */ +#define TCP_CONG_WANTS_CE_EVENTS BIT(5) #define TCP_CONG_MASK (TCP_CONG_NON_RESTRICTED | TCP_CONG_NEEDS_ECN | \ - TCP_CONG_NEEDS_ACCECN | TCP_CONG_ECT_1_NEGOTIATION | \ - TCP_CONG_NO_FALLBACK_RFC3168) + TCP_CONG_NEEDS_ACCECN | TCP_CONG_ECT_1_NEGOTIATION | \ + TCP_CONG_NO_FALLBACK_RFC3168 | TCP_CONG_WANTS_CE_EVENTS)