From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: bpf@vger.kernel.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 v3 bpf-next 1/3] netfilter: nf_tables: add flowtable map for xdp offload
Date: Thu, 23 May 2024 17:51:36 +0200 [thread overview]
Message-ID: <Zk9mCJIqMoWopQaA@calendula> (raw)
In-Reply-To: <1925643414ddbea91659007826fd829f8aa56864.1716465377.git.lorenzo@kernel.org>
Hi Lorenzo,
On Thu, May 23, 2024 at 02:06:16PM +0200, Lorenzo Bianconi wrote:
> From: Florian Westphal <fw@strlen.de>
>
> This adds a small internal mapping table so that a new bpf (xdp) kfunc
> can perform lookups in a flowtable.
>
> As-is, xdp program has access to the device pointer, but no way to do a
> lookup in a flowtable -- there is no way to obtain the needed struct
> without questionable stunts.
>
> This allows to obtain an nf_flowtable pointer given a net_device
> structure.
>
> In order to keep backward compatibility, the infrastructure allows the
> user to add a given device to multiple flowtables, but it will always
> return the first added mapping performing the lookup since it assumes
> the right configuration is 1:1 mapping between flowtables and net_devices.
Would it be possible to move this new code in _offload.c to
nf_flow_table_xdp.c?
The flowtable offload code is already a bit convoluted, the hardware
offload API for payload matching results in chatty with many sparse
warnings (unless I adds casting everywhere), but I remember I failed
to provide a convincing improvements on that front without requiring
changes to drivers at the time. This is of course no related to this
series.
next prev parent reply other threads:[~2024-05-23 15:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-23 12:06 [PATCH v3 bpf-next 0/3] netfilter: Add the capability to offload flowtable in XDP layer Lorenzo Bianconi
2024-05-23 12:06 ` [PATCH v3 bpf-next 1/3] netfilter: nf_tables: add flowtable map for xdp offload Lorenzo Bianconi
2024-05-23 15:51 ` Pablo Neira Ayuso [this message]
2024-05-23 17:06 ` Lorenzo Bianconi
2024-05-23 12:06 ` [PATCH v3 bpf-next 2/3] netfilter: add bpf_xdp_flow_lookup kfunc Lorenzo Bianconi
2024-05-23 12:06 ` [PATCH v3 bpf-next 3/3] selftests/bpf: Add selftest for " Lorenzo Bianconi
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=Zk9mCJIqMoWopQaA@calendula \
--to=pablo@netfilter.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=lorenzo@kernel.org \
--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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.