bpf: Disable bh in bpf_test_run for xdp and tc prog
authorMartin KaFai Lau <martin.lau@kernel.org>
Fri, 17 Feb 2023 00:41:47 +0000 (16:41 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 17 Feb 2023 15:19:23 +0000 (16:19 +0100)
commitaf2d0d09eabe98b01bf02b236e381edae4209778
tree3fd4af59d6648e671783a6f4430719bffaa9766a
parent1596dae2f17ec5c6e8c8f0e3fec78c5ae55c1e0b
bpf: Disable bh in bpf_test_run for xdp and tc prog

Some of the bpf helpers require bh disabled. eg. The bpf_fib_lookup
helper that will be used in a latter selftest. In particular, it
calls ___neigh_lookup_noref that expects the bh disabled.

This patch disables bh before calling bpf_prog_run[_xdp], so
the testing prog can also use those helpers.

Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230217004150.2980689-2-martin.lau@linux.dev
net/bpf/test_run.c