]> git.baikalelectronics.ru Git - kernel.git/commit
xdp: allow attaching programs loaded for specific device
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 3 Nov 2017 20:56:20 +0000 (13:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Nov 2017 13:26:19 +0000 (22:26 +0900)
commite730902fff10eeb5fc197d1f5ae66a0943aa40f5
treea7fb34eb8268d73edcbcb257c679f8e98afec568
parent5b2aee823a3e64ceac3ab705b491a8164028d6a9
xdp: allow attaching programs loaded for specific device

Pass the netdev pointer to bpf_prog_get_type().  This way
BPF code can decide whether the device matches what the
code was loaded/translated for.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/bpf.h
kernel/bpf/syscall.c
net/core/dev.c