[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210117225427.29658-1-bluca@debian.org>
Date: Sun, 17 Jan 2021 22:54:26 +0000
From: Luca Boccassi <bluca@...ian.org>
To: netdev@...r.kernel.org
Cc: stephen@...workplumber.org
Subject: [PATCH iproute2 1/2] vrf: print BPF log buffer if bpf_program_load fails
Necessary to understand what is going on when bpf_program_load fails
Signed-off-by: Luca Boccassi <bluca@...ian.org>
---
ip/ipvrf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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,
--
2.29.2
Powered by blists - more mailing lists