summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2017-12-01 15:08:56 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2017-12-03 00:27:57 +0100
commit92f0292b35a09bb5f12a4184ac86668599bc233b (patch)
treeba2f522f4278a783f808b4516e328963cb75a3c7 /include/linux
parent118b4aa25d90d0930611b71dd28a749c67309ccb (diff)
downloadlinux-stable-92f0292b35a09bb5f12a4184ac86668599bc233b.tar.gz
linux-stable-92f0292b35a09bb5f12a4184ac86668599bc233b.tar.bz2
linux-stable-92f0292b35a09bb5f12a4184ac86668599bc233b.zip
net: xdp: report flags program was installed with on query
Some drivers enforce that flags on program replacement and removal must match the flags passed on install. This leaves the possibility open to enable simultaneous loading of XDP programs both to HW and DRV. Allow such drivers to report the flags back to the stack. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 667bdd3ad33e..cc4ce7456e38 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -820,6 +820,8 @@ struct netdev_bpf {
struct {
u8 prog_attached;
u32 prog_id;
+ /* flags with which program was installed */
+ u32 prog_flags;
};
/* BPF_OFFLOAD_VERIFIER_PREP */
struct {