Commit cee65b79 authored by Liu Jian's avatar Liu Jian
Browse files

net: add bpf_is_local_ipaddr bpf helper function



hulk inclusion
category: feature
bugzilla: NA
CVE: N/A

----------------------------------------------------

Some network acceleration solutions, such as sockmap, are valid only for
internal packets of the local host. The bpf_is_local_ipaddr() bpf helper
function is added so that the ebpf program can determine whether a packet
is an internal packet of the local host.

Signed-off-by: default avatarLiu Jian <liujian56@huawei.com>
parent 9fb0c016
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3139,6 +3139,7 @@ CONFIG_DLCI_MAX=8
CONFIG_USB4_NET=m
# CONFIG_NETDEVSIM is not set
CONFIG_NET_FAILOVER=m
CONFIG_NET_LOCALIP_LST=m
# CONFIG_ISDN is not set

#
+1 −0
Original line number Diff line number Diff line
@@ -3216,6 +3216,7 @@ CONFIG_USB4_NET=m
CONFIG_HYPERV_NET=m
CONFIG_NETDEVSIM=m
CONFIG_NET_FAILOVER=m
CONFIG_NET_LOCALIP_LST=m
CONFIG_ISDN=y
CONFIG_ISDN_CAPI=y
CONFIG_CAPI_TRACE=y
+8 −0
Original line number Diff line number Diff line
@@ -592,4 +592,12 @@ config NET_FAILOVER
	  a VM with direct attached VF by failing over to the paravirtual
	  datapath when the VF is unplugged.

config NET_LOCALIP_LST
	tristate "Collect local ipv4 address"
	depends on INET
	default n
	help
	  Similar to inet_addr_lst, only the IP address is recorded, and
	  net_namespace is not concerned.

endif # NETDEVICES
+1 −0
Original line number Diff line number Diff line
@@ -84,3 +84,4 @@ thunderbolt-net-y += thunderbolt.o
obj-$(CONFIG_USB4_NET) += thunderbolt-net.o
obj-$(CONFIG_NETDEVSIM) += netdevsim/
obj-$(CONFIG_NET_FAILOVER) += net_failover.o
obj-$(CONFIG_NET_LOCALIP_LST) += localip/
+8 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
#
# Makefile for the linux kernel.
#

# Object file lists.

obj-$(CONFIG_NET_LOCALIP_LST) += localip.o
Loading