aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2017-06-21 18:25:09 -0700
committerDavid S. Miller <davem@davemloft.net>2017-06-23 13:42:20 -0400
commitce158e580a5bdc93286a3b630638bdd47d4ec663 (patch)
tree7273eafe12b38183b57db46abcf7da7dc6139c3c /include/uapi
parentnfp: bpf: add support for XDP_FLAGS_HW_MODE (diff)
downloadlinux-dev-ce158e580a5bdc93286a3b630638bdd47d4ec663.tar.xz
linux-dev-ce158e580a5bdc93286a3b630638bdd47d4ec663.zip
xdp: add reporting of offload mode
Extend the XDP_ATTACHED_* values to include offloaded mode. Let drivers report whether program is installed in the driver or the HW by changing the prog_attached field from bool to u8 (type of the netlink attribute). Exploit the fact that the value of XDP_ATTACHED_DRV is 1, therefore since all drivers currently assign the mode with double negation: mode = !!xdp_prog; no drivers have to be modified. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/if_link.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index ce777ec88e1e..8d062c58d5cb 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -903,6 +903,7 @@ enum {
XDP_ATTACHED_NONE = 0,
XDP_ATTACHED_DRV,
XDP_ATTACHED_SKB,
+ XDP_ATTACHED_HW,
};
enum {