summaryrefslogtreecommitdiff
path: root/drivers/net/hyperv/netvsc_bpf.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2021-11-30 13:08:07 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2021-12-14 00:28:27 +0300
commitc8064e5b4adac5e1255cf4f3b374e75b5376e7ca (patch)
treecf13a1529985dd7b541322e17aa4260258c53116 /drivers/net/hyperv/netvsc_bpf.c
parent2cbad989033bff0256675c38f96f5faab852af4b (diff)
downloadlinux-c8064e5b4adac5e1255cf4f3b374e75b5376e7ca.tar.xz
bpf: Let bpf_warn_invalid_xdp_action() report more info
In non trivial scenarios, the action id alone is not sufficient to identify the program causing the warning. Before the previous patch, the generated stack-trace pointed out at least the involved device driver. Let's additionally include the program name and id, and the relevant device name. If the user needs additional infos, he can fetch them via a kernel probe, leveraging the arguments added here. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://lore.kernel.org/bpf/ddb96bb975cbfddb1546cf5da60e77d5100b533c.1638189075.git.pabeni@redhat.com
Diffstat (limited to 'drivers/net/hyperv/netvsc_bpf.c')
-rw-r--r--drivers/net/hyperv/netvsc_bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc_bpf.c b/drivers/net/hyperv/netvsc_bpf.c
index aa877da113f8..7856905414eb 100644
--- a/drivers/net/hyperv/netvsc_bpf.c
+++ b/drivers/net/hyperv/netvsc_bpf.c
@@ -68,7 +68,7 @@ u32 netvsc_run_xdp(struct net_device *ndev, struct netvsc_channel *nvchan,
break;
default:
- bpf_warn_invalid_xdp_action(act);
+ bpf_warn_invalid_xdp_action(ndev, prog, act);
}
out: