aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorBrenden Blanco <bblanco@plumgrid.com>2016-07-19 15:16:49 -0400
committerDavid S. Miller <davem@davemloft.net>2016-07-20 00:46:32 -0400
commitd1fdd9138682e0f272beee0cb08b6328c5478b26 (patch)
treeaad14f71489a05ab49f4e42c4bcd3e85eb4a64f5 /include/uapi/linux
parenta7862b45849fe2f8610a2bec89235580f55d337f (diff)
rtnl: add option for setting link xdp prog
Sets the bpf program represented by fd as an early filter in the rx path of the netdev. The fd must have been created as BPF_PROG_TYPE_XDP. Providing a negative value as fd clears the program. Getting the fd back via rtnl is not possible, therefore reading of this value merely provides a bool whether the program is valid on the link or not. Signed-off-by: Brenden Blanco <bblanco@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/if_link.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 4285ac31e865..a1b5202c5f6b 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -156,6 +156,7 @@ enum {
156 IFLA_GSO_MAX_SEGS, 156 IFLA_GSO_MAX_SEGS,
157 IFLA_GSO_MAX_SIZE, 157 IFLA_GSO_MAX_SIZE,
158 IFLA_PAD, 158 IFLA_PAD,
159 IFLA_XDP,
159 __IFLA_MAX 160 __IFLA_MAX
160}; 161};
161 162
@@ -843,4 +844,15 @@ enum {
843}; 844};
844#define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1) 845#define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1)
845 846
847/* XDP section */
848
849enum {
850 IFLA_XDP_UNSPEC,
851 IFLA_XDP_FD,
852 IFLA_XDP_ATTACHED,
853 __IFLA_XDP_MAX,
854};
855
856#define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1)
857
846#endif /* _UAPI_LINUX_IF_LINK_H */ 858#endif /* _UAPI_LINUX_IF_LINK_H */