summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2017-11-21 00:21:55 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2017-11-21 00:37:35 +0100
commit441a33031fe5a3e828fbc17a4f9a5bab9143243c (patch)
tree986f0a2ebdefe9efa4ba937f13706b5b5e8c3158 /kernel
parentbpf: offload: move offload device validation out to the drivers (diff)
downloadlinux-441a33031fe5a3e828fbc17a4f9a5bab9143243c.tar.xz
linux-441a33031fe5a3e828fbc17a4f9a5bab9143243c.zip
net: xdp: don't allow device-bound programs in driver mode
Currently device-bound programs are not able to run on the host to save resources (host JIT is not invoked). Don't allow XDP programs to be attached without the HW_MODE flag. In theory if program is already translated for device offload the driver should choose to offload it instead of loading it in the driver. However, offloading translated program may still fail resulting in device-bound program being run on the host. Prevent this by refusing to attach device bound programs if XDP_FLAGS_HW_MODE is not set. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions