linux-stable/drivers/net/netdevsim
Jakub Kicinski 05296620f6 xdp: factor out common program/flags handling from drivers
Basic operations drivers perform during xdp setup and query can
be moved to helpers in the core.  Encapsulate program and flags
into a structure and add helpers.  Note that the structure is
intended as the "main" program information source in the driver.
Most drivers will additionally place the program pointer in their
fast path or ring structures.

The helpers don't have a huge impact now, but they will
decrease the code duplication when programs can be installed
in HW and driver at the same time.  Encapsulating the basic
operations in helpers will hopefully also reduce the number
of changes to drivers which adopt them.

Helpers could really be static inline, but they depend on
definition of struct netdev_bpf which means they'd have
to be placed in netdevice.h, an already 4500 line header.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-07-13 20:26:35 +02:00
..
bpf.c xdp: factor out common program/flags handling from drivers 2018-07-13 20:26:35 +02:00
devlink.c netdevsim: Add extack error message for devlink reload 2018-06-05 12:32:37 -04:00
fib.c netdevsim: Add extack error message for devlink reload 2018-06-05 12:32:37 -04:00
ipsec.c netdevsim: fix sa_idx out of bounds check 2018-07-02 20:35:33 +09:00
Makefile netdevsim: add ipsec offload testing 2018-06-28 16:10:08 +09:00
netdev.c netdevsim: add ipsec offload testing 2018-06-28 16:10:08 +09:00
netdevsim.h xdp: factor out common program/flags handling from drivers 2018-07-13 20:26:35 +02:00