From: Lorenzo Bianconi <lorenzo@kernel.org>
To: bpf@vger.kernel.org
Cc: pablo@netfilter.org, kadlec@netfilter.org, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netfilter-devel@vger.kernel.org, netdev@vger.kernel.org,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, eddyz87@gmail.com,
lorenzo.bianconi@redhat.com, toke@redhat.com, fw@strlen.de,
hawk@kernel.org, horms@kernel.org, donhunte@redhat.com,
memxor@gmail.com
Subject: Re: [PATCH v5 bpf-next 0/3] netfilter: Add the capability to offload flowtable in XDP layer
Date: Fri, 28 Jun 2024 21:56:26 +0200 [thread overview]
Message-ID: <Zn8VauqdzVbiw8mn@lore-desk> (raw)
In-Reply-To: <cover.1718379122.git.lorenzo@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 3287 bytes --]
> Introduce bpf_xdp_flow_lookup kfunc in order to perform the lookup of
> a given flowtable entry based on the fib tuple of incoming traffic.
> bpf_xdp_flow_lookup can be used as building block to offload in XDP
> the sw flowtable processing when the hw support is not available.
>
> This series has been tested running the xdp_flowtable_offload eBPF program
> on an ixgbe 10Gbps NIC (eno2) in order to XDP_REDIRECT the TCP traffic to
> a veth pair (veth0-veth1) based on the content of the nf_flowtable as soon
> as the TCP connection is in the established state:
>
> [tcp client] (eno1) == LAN == (eno2) xdp_flowtable_offload [XDP_REDIRECT] --> veth0 == veth1 [tcp server]
>
> table inet filter {
> flowtable ft {
> hook ingress priority filter
> devices = { eno2, veth0 }
> }
> chain forward {
> type filter hook forward priority filter
> meta l4proto { tcp, udp } flow add @ft
> }
> }
>
> - sw flowtable [1 TCP stream, T = 300s]: ~ 6.2 Gbps
> - xdp flowtable [1 TCP stream, T = 300s]: ~ 7.6 Gbps
>
> - sw flowtable [3 TCP stream, T = 300s]: ~ 7.7 Gbps
> - xdp flowtable [3 TCP stream, T = 300s]: ~ 8.8 Gbps
>
> Changes since v4:
> - add missing BPF_NO_KFUNC_PROTOTYPES macro to selftest
> Changes since v3:
> - move flowtable map utilities in nf_flow_table_xdp.c
> Changes since v2:
> - introduce bpf_flowtable_opts struct in bpf_xdp_flow_lookup signature
> - get rid of xdp_flowtable_offload bpf sample
> - get rid of test_xdp_flowtable.sh for selftest and rely on prog_tests instead
> - rename bpf_xdp_flow_offload_lookup in bpf_xdp_flow_lookup
> Changes since v1:
> - return NULL in bpf_xdp_flow_offload_lookup kfunc in case of error
> - take into account kfunc registration possible failures
> Changes since RFC:
> - fix compilation error if BTF is not enabled
Hi all,
Looking at patchwork this series is marked as 'Archived' even if the eBPF bits
have been acked by Alexei while netfilter ones have been acked by Pablo.
Am I missing something? Do I need to repost?
Regards,
Lorenzo
>
> Akced-by: Pablo Neira Ayuso <pablo@netfilter.org>
>
> Florian Westphal (1):
> netfilter: nf_tables: add flowtable map for xdp offload
>
> Lorenzo Bianconi (2):
> netfilter: add bpf_xdp_flow_lookup kfunc
> selftests/bpf: Add selftest for bpf_xdp_flow_lookup kfunc
>
> include/net/netfilter/nf_flow_table.h | 18 ++
> net/netfilter/Makefile | 7 +-
> net/netfilter/nf_flow_table_bpf.c | 117 ++++++++++++
> net/netfilter/nf_flow_table_inet.c | 2 +-
> net/netfilter/nf_flow_table_offload.c | 6 +-
> net/netfilter/nf_flow_table_xdp.c | 163 +++++++++++++++++
> tools/testing/selftests/bpf/config | 13 ++
> .../selftests/bpf/prog_tests/xdp_flowtable.c | 168 ++++++++++++++++++
> .../selftests/bpf/progs/xdp_flowtable.c | 146 +++++++++++++++
> 9 files changed, 636 insertions(+), 4 deletions(-)
> create mode 100644 net/netfilter/nf_flow_table_bpf.c
> create mode 100644 net/netfilter/nf_flow_table_xdp.c
> create mode 100644 tools/testing/selftests/bpf/prog_tests/xdp_flowtable.c
> create mode 100644 tools/testing/selftests/bpf/progs/xdp_flowtable.c
>
> --
> 2.45.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2024-06-28 19:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 15:40 [PATCH v5 bpf-next 0/3] netfilter: Add the capability to offload flowtable in XDP layer Lorenzo Bianconi
2024-06-14 15:40 ` [PATCH v5 bpf-next 1/3] netfilter: nf_tables: add flowtable map for xdp offload Lorenzo Bianconi
2024-06-28 21:19 ` Daniel Borkmann
2024-06-29 22:06 ` Lorenzo Bianconi
2024-06-14 15:40 ` [PATCH v5 bpf-next 2/3] netfilter: add bpf_xdp_flow_lookup kfunc Lorenzo Bianconi
2024-06-28 21:21 ` Daniel Borkmann
2024-06-29 19:57 ` Lorenzo Bianconi
2024-06-14 15:40 ` [PATCH v5 bpf-next 3/3] selftests/bpf: Add selftest for " Lorenzo Bianconi
2024-06-28 21:29 ` Daniel Borkmann
2024-06-29 20:11 ` Lorenzo Bianconi
2024-07-01 8:07 ` Daniel Borkmann
2024-06-28 19:56 ` Lorenzo Bianconi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zn8VauqdzVbiw8mn@lore-desk \
--to=lorenzo@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=donhunte@redhat.com \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=toke@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox