XDP-hints: how to inform driver about hints

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

 



Hi

I have just stareted working on generic hints implementation that was
discussed on netdev workshop. I wondering how we should tell driver that
hints is supported on XDP program.

I prepared 3 implementation of this approach. In 1 and 3 solution I
wanted to automatically search for hints usage in XDP program, but it
doesn't look good because of comparing lines of XDP program in libbpf
(3) or in bpf core (1).

For me solution 2 with reusing XDP flags looks good, but I don't
know if XDP flags can be used for storing information about hints.
What do you guys think about that?

Please take a look at code samples:

(1)
https://github.com/alobakin/linux/commit/a4f32ba74e5d3eefe607789547e9d5529ed775b0
don't know how to send flag to driver. Searching for metadata happens
in load program path, but communication with driver
(by ndo_bpf call happens in creating link)

(2)
https://github.com/alobakin/linux/commit/72a5d930bea330f5f4827fdf098b723f96acff0c
simplest solution. Add another flag, everything are there, driver will
check this flag in ndo_bpf

(3)
https://github.com/alobakin/linux/commit/92de1e0e3523317c5749f3c87173dc90b1e8011b
I haven't tested it yet. I think it is doable to do this search in creating
link path, but only when user uses syscall instead of netlink API
(I am pretty sure that this is used in auto generated code by libbpf).
If we will decide that this solution can be correct I will write a suitable
sample and chec if this works



[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