netfilter: Add bpf_xdp_flow_lookup kfunc
authorLorenzo Bianconi <lorenzo@kernel.org>
Sat, 29 Jun 2024 22:26:49 +0000 (00:26 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 1 Jul 2024 15:03:01 +0000 (17:03 +0200)
commit391bb6594fd3a567efb1cd3efc8136c78c4c9e31
tree39c9c0cacd23ea033ac3a003657abd91bc95d4c8
parent89cc8f1c5f22568142b7ad118c738204708e4207
netfilter: Add bpf_xdp_flow_lookup kfunc

Introduce bpf_xdp_flow_lookup kfunc in order to perform the lookup
of a given flowtable entry based on a fib tuple of incoming traffic.
bpf_xdp_flow_lookup can be used as building block to offload in xdp
the processing of sw flowtable when hw flowtable is not available.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Link: https://lore.kernel.org/bpf/55d38a4e5856f6d1509d823ff4e98aaa6d356097.1719698275.git.lorenzo@kernel.org
include/net/netfilter/nf_flow_table.h
net/netfilter/Makefile
net/netfilter/nf_flow_table_bpf.c [new file with mode: 0644]
net/netfilter/nf_flow_table_inet.c