]> git.baikalelectronics.ru Git - kernel.git/commit
rtnl: add option for setting link xdp prog
authorBrenden Blanco <bblanco@plumgrid.com>
Tue, 19 Jul 2016 19:16:49 +0000 (12:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jul 2016 04:46:32 +0000 (21:46 -0700)
commit0711229837566346b53633af6ffc08fe93618ce3
treeaad14f71489a05ab49f4e42c4bcd3e85eb4a64f5
parent10538628acee7cf446a6a89954ad1ba434d62abe
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>
include/uapi/linux/if_link.h
net/core/rtnetlink.c