diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 322f68724f..419d81264c 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -476,6 +476,11 @@ config KERNEL_BPF_KPROBE_OVERRIDE depends on KERNEL_KPROBES default n +config KERNEL_BPF_STREAM_PARSER + bool "Allow a TCP stream parser to be used with BPF_MAP_TYPE_SOCKMAP" + depends on KERNEL_CGROUP_BPF + default y if KERNEL_DEBUG_INFO_BTF + config KERNEL_AIO bool "Compile the kernel with asynchronous IO support" default y if !SMALL_FLASH diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index dcc2799c79..62f73dcaa6 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -1411,13 +1411,30 @@ define KernelPackage/inet-diag endef define KernelPackage/inet-diag/description -Support for INET (TCP, DCCP, etc) socket monitoring interface used by -native Linux tools such as ss. + Support for INET (TCP, DCCP, etc) socket monitoring interface used by + native Linux tools such as ss. endef $(eval $(call KernelPackage,inet-diag)) +define KernelPackage/xdp-sockets-diag + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=PF_XDP sockets monitoring interface support for ss utility + KCONFIG:= \ + CONFIG_XDP_SOCKETS=y \ + CONFIG_XDP_SOCKETS_DIAG + FILES:=$(LINUX_DIR)/net/xdp/xsk_diag.ko + AUTOLOAD:=$(call AutoLoad,31,xsk_diag) +endef + +define KernelPackage/xdp-sockets-diag/description + Support for PF_XDP sockets monitoring interface used by the ss tool +endef + +$(eval $(call KernelPackage,xdp-sockets-diag)) + + define KernelPackage/wireguard SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=WireGuard secure network tunnel diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index 69ab52cec7..ee8ef10e08 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -725,7 +725,6 @@ CONFIG_BPF_JIT=y # CONFIG_BPF_JIT_ALWAYS_ON is not set CONFIG_BPF_JIT_DEFAULT_ON=y # CONFIG_BPF_PRELOAD is not set -# CONFIG_BPF_STREAM_PARSER is not set CONFIG_BPF_SYSCALL=y CONFIG_BPF_UNPRIV_DEFAULT_OFF=y # CONFIG_BPQETHER is not set diff --git a/target/linux/generic/config-6.1 b/target/linux/generic/config-6.1 index aee806969c..3d235e67f3 100644 --- a/target/linux/generic/config-6.1 +++ b/target/linux/generic/config-6.1 @@ -757,7 +757,6 @@ CONFIG_BPF_JIT=y # CONFIG_BPF_JIT_ALWAYS_ON is not set CONFIG_BPF_JIT_DEFAULT_ON=y # CONFIG_BPF_PRELOAD is not set -# CONFIG_BPF_STREAM_PARSER is not set CONFIG_BPF_SYSCALL=y CONFIG_BPF_UNPRIV_DEFAULT_OFF=y # CONFIG_BPQETHER is not set diff --git a/target/linux/generic/hack-5.15/901-debloat_sock_diag.patch b/target/linux/generic/hack-5.15/901-debloat_sock_diag.patch index ac502bdd16..1f3802aa5b 100644 --- a/target/linux/generic/hack-5.15/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-5.15/901-debloat_sock_diag.patch @@ -160,3 +160,13 @@ Signed-off-by: Felix Fietkau default n help Support for UNIX socket monitoring interface used by the ss tool. +--- a/net/xdp/Kconfig ++++ b/net/xdp/Kconfig +@@ -10,6 +10,7 @@ config XDP_SOCKETS + config XDP_SOCKETS_DIAG + tristate "XDP sockets: monitoring interface" + depends on XDP_SOCKETS ++ select SOCK_DIAG + default n + help + Support for PF_XDP sockets monitoring interface used by the ss tool. diff --git a/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch b/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch index 582a48cb18..88e2edd289 100644 --- a/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch +++ b/target/linux/generic/hack-6.1/901-debloat_sock_diag.patch @@ -162,3 +162,13 @@ Signed-off-by: Felix Fietkau default n help Support for UNIX socket monitoring interface used by the ss tool. +--- a/net/xdp/Kconfig ++++ b/net/xdp/Kconfig +@@ -10,6 +10,7 @@ config XDP_SOCKETS + config XDP_SOCKETS_DIAG + tristate "XDP sockets: monitoring interface" + depends on XDP_SOCKETS ++ select SOCK_DIAG + default n + help + Support for PF_XDP sockets monitoring interface used by the ss tool.