]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: offload: make bpf_offload_dev_match() reject host+host case
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 16 Jan 2018 23:51:45 +0000 (15:51 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 17 Jan 2018 00:15:05 +0000 (01:15 +0100)
commitbe87a621e2fe72e8e804c1f1cb23bf6b6f2b8c6b
tree65ee7b65a852fcc14ed31d3b11bf88abc17ef296
parent9274ebda851f43f0c2dfda0d174db02053ed7729
bpf: offload: make bpf_offload_dev_match() reject host+host case

Daniel suggests it would be more logical for bpf_offload_dev_match()
to return false is either the program or the map are not offloaded,
rather than treating the both not offloaded case as a "matching
CPU/host device".

This makes no functional difference today, since verifier only calls
bpf_offload_dev_match() when one of the objects is offloaded.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/offload.c