kernel: add option for BPF_STREAM_PARSER and XDP_SOCKETS_DIAG

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2023-05-23 15:43:14 +08:00
parent 264fbe1d8c
commit 90719e02f0
6 changed files with 44 additions and 4 deletions

View File

@ -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

View File

@ -1418,6 +1418,23 @@ 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

View File

@ -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

View File

@ -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

View File

@ -160,3 +160,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
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.

View File

@ -162,3 +162,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
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.