]> 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)
commit771baec442c708fefd249b2eb80f4d6df2aaf55c
treeaad14f71489a05ab49f4e42c4bcd3e85eb4a64f5
parent70fad84bbd0d030254989b40bf4133d1ef4815ba
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