kek
This commit is contained in:
@@ -0,0 +1,32 @@
|
|||||||
|
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)
|
||||||
@@ -95,7 +95,14 @@ let
|
|||||||
++ schedPatches
|
++ schedPatches
|
||||||
++ lib.optional (
|
++ lib.optional (
|
||||||
cachyConfig.cpuSched == "hardened"
|
cachyConfig.cpuSched == "hardened"
|
||||||
) "${patches-src}/${majorMinor}/misc/0001-hardened.patch";
|
) "${patches-src}/${majorMinor}/misc/0001-hardened.patch"
|
||||||
|
# The Asahi tree occupies BIT(2)–BIT(4) in TCP_CONG_MASK with AccECN flags,
|
||||||
|
# so the CachyOS hunk defining TCP_CONG_WANTS_CE_EVENTS at BIT(2) fails to
|
||||||
|
# apply while later hunks that use it succeed — causing a compile error.
|
||||||
|
# This patch places the symbol at BIT(5) and adds it to TCP_CONG_MASK.
|
||||||
|
++ lib.optional (
|
||||||
|
cachyConfig.taste == "linux-cachyos-asahi"
|
||||||
|
) ./patches/asahi-tcp-cong-wants-ce-events.patch;
|
||||||
|
|
||||||
# There are some configurations set by the PKGBUILD
|
# There are some configurations set by the PKGBUILD
|
||||||
pkgbuildConfig =
|
pkgbuildConfig =
|
||||||
|
|||||||
Reference in New Issue
Block a user