Re: [PATCH v3 bpf-next 1/3] netfilter: nf_tables: add flowtable map for xdp offload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hi Lorenzo,
> 
> On Thu, May 23, 2024 at 02:06:16PM +0200, Lorenzo Bianconi wrote:
> > From: Florian Westphal <fw@xxxxxxxxx>
> > 
> > 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?

ack, I will do in v4.

Regards,
Lorenzo

> 
> 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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux