[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zk9mCJIqMoWopQaA@calendula>
Date: Thu, 23 May 2024 17:51:36 +0200
From: Pablo Neira Ayuso <pablo@...filter.org>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: bpf@...r.kernel.org, kadlec@...filter.org, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netfilter-devel@...r.kernel.org, netdev@...r.kernel.org,
ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
martin.lau@...ux.dev, eddyz87@...il.com,
lorenzo.bianconi@...hat.com, toke@...hat.com, fw@...len.de,
hawk@...nel.org, horms@...nel.org, donhunte@...hat.com,
memxor@...il.com
Subject: Re: [PATCH v3 bpf-next 1/3] netfilter: nf_tables: add flowtable map
for xdp offload
Hi Lorenzo,
On Thu, May 23, 2024 at 02:06:16PM +0200, Lorenzo Bianconi wrote:
> From: Florian Westphal <fw@...len.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.
Powered by blists - more mailing lists