diff options
author | Brenden Blanco <bblanco@plumgrid.com> | 2016-07-19 12:16:49 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-19 21:46:32 -0700 |
commit | d1fdd9138682e0f272beee0cb08b6328c5478b26 (patch) | |
tree | aad14f71489a05ab49f4e42c4bcd3e85eb4a64f5 /include/uapi/linux/if_link.h | |
parent | a7862b45849fe2f8610a2bec89235580f55d337f (diff) | |
download | linux-d1fdd9138682e0f272beee0cb08b6328c5478b26.tar.gz linux-d1fdd9138682e0f272beee0cb08b6328c5478b26.tar.bz2 linux-d1fdd9138682e0f272beee0cb08b6328c5478b26.zip |
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/if_link.h')
-rw-r--r-- | include/uapi/linux/if_link.h | 12 |
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 { IFLA_GSO_MAX_SEGS, IFLA_GSO_MAX_SIZE, IFLA_PAD, + IFLA_XDP, __IFLA_MAX }; @@ -843,4 +844,15 @@ enum { }; #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1) +/* XDP section */ + +enum { + IFLA_XDP_UNSPEC, + IFLA_XDP_FD, + IFLA_XDP_ATTACHED, + __IFLA_XDP_MAX, +}; + +#define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1) + #endif /* _UAPI_LINUX_IF_LINK_H */ |