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)
commit248f346ffe9508dee0039db4ac839cb31ba3bdec
treea7fb34eb8268d73edcbcb257c679f8e98afec568
parent928631e05495fa1f0e9775f555b94dbcbb4e2fb5
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