Message ID | 20210117225427.29658-1-bluca@debian.org (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Stephen Hemminger |
Headers | show |
Series | [iproute2,1/2] vrf: print BPF log buffer if bpf_program_load fails | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
On 1/17/21 3:54 PM, Luca Boccassi wrote: > Necessary to understand what is going on when bpf_program_load fails > > Signed-off-by: Luca Boccassi <bluca@debian.org> > --- > ip/ipvrf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: David Ahern <dsahern@kernel.org>
diff --git a/ip/ipvrf.c b/ip/ipvrf.c index 42779e5c..91578031 100644 --- a/ip/ipvrf.c +++ b/ip/ipvrf.c @@ -278,8 +278,8 @@ static int vrf_configure_cgroup(const char *path, int ifindex) */ prog_fd = prog_load(ifindex); if (prog_fd < 0) { - fprintf(stderr, "Failed to load BPF prog: '%s'\n", - strerror(errno)); + fprintf(stderr, "Failed to load BPF prog: '%s'\n%s", + strerror(errno), bpf_log_buf); if (errno != EPERM) { fprintf(stderr,
Necessary to understand what is going on when bpf_program_load fails Signed-off-by: Luca Boccassi <bluca@debian.org> --- ip/ipvrf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)