Re: AF_XDP metadata/hints

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

 



From: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>
Date: Sun, 23 May 2021 13:54:47 +0200

> Saeed Mahameed <saeed@xxxxxxxxxx> writes:
> 
> > On Fri, 2021-05-21 at 15:31 +0200, Jesper Dangaard Brouer wrote:
> >> On Fri, 21 May 2021 10:53:40 +0000
> >> "Lobakin, Alexandr" <alexandr.lobakin@xxxxxxxxx> wrote:
> >>
> >> > I've opened two discussions at https://github.com/alobakin/linux,
> >> > feel free to join them and/or create new ones to share your thoughts
> >> > and concerns.
> >>
> >> Thanks Alexandr for keeping the thread/subject alive.
> >>
> >> I guess this is a new GitHub features "Discussions".  I've never used
> >> that in a project before, lets see how this goes.  The usual approach
> >> is discussions over email on netdev (Cc. netdev@xxxxxxxxxxxxxxx).
> >
> > I agree we need full visibility and transparency, i actually recommend:
> > bpf@xxxxxxxxxxxxxxx
> 
> +1, please keep this on the list :)

Sure, let's keep it the classic way.
I removed the netdev ML from the CCs and added bpf there.

Regarding the comments from GitHub discussions:

alobakin:

> Since 5.11, it's now possible to obtain a BTF not only for vmlinux,
> but also for modules.
> This will eliminate a need for manually composing and registering a
> BTF inside the driver code, which is 100+ locs for ice for example.
> 
> That's obviously not the most straightforward and trivial way, but
> could help a lot.

saeedtx:

> the point of registering BTF directly from the driver is to allow
> "Flex metadata" meaning that meta data format can be constructed on
> the fly according to user demand.
> BTF for modules is constructed only at compilation time and
> registered only on module load. so there is no way to implement flex
> metadata with vmlinux BTF. we still need a dynamic registration API
> for current and future HW where the HW will provide the BTF
> dynamically.
> 
> I am sure we can find mutliple ways to reduce the 100+ LOC, but the
> goal is to have the dynamic btf_register/unregister API

We initially planned to register just one (or several) predefined
BTF(s) per module/netdevice that would provide a full list of
supported fields. The flexibility of metadata then is in that BPF
core calls for netdevice's ndo_bpf() on BPF program setup and
provides a metadata layout requested by that BPF prog to the driver,
so it could configure its hotpath (current NICs) or a hardware
(future NICs) to build metadata accordingly.
Driver can declare several BTFs (e.g. a "generic" one with things
like hashes and csums one and a custom one) and it would work either
through dynamic registering or through /sys approach.

This is all discussable anyways, we're happy to hear different
opinions and thoughts to collectively choose the optimal way.

> -Toke

Thanks,
Al



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux