|
|
7e752c |
From f6fa6c4f178d2bbd3f33cfd4c32265692b91fe5d Mon Sep 17 00:00:00 2001
|
|
|
7e752c |
From: Andrea Claudi <aclaudi@redhat.com>
|
|
|
7e752c |
Date: Thu, 13 Jun 2019 14:37:56 +0200
|
|
|
7e752c |
Subject: [PATCH] bpf: move bpf_elf_map fixup notification under verbose
|
|
|
7e752c |
|
|
|
7e752c |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1716361
|
|
|
7e752c |
Upstream Status: iproute2.git commit 282a1fe1f8fc8
|
|
|
7e752c |
|
|
|
7e752c |
commit 282a1fe1f8fc87b1ebca4ca6f4440d2e69cf4b8f
|
|
|
7e752c |
Author: Daniel Borkmann <daniel@iogearbox.net>
|
|
|
7e752c |
Date: Wed Jul 18 01:31:19 2018 +0200
|
|
|
7e752c |
|
|
|
7e752c |
bpf: move bpf_elf_map fixup notification under verbose
|
|
|
7e752c |
|
|
|
7e752c |
No need to spam the user with this if it can be fixed gracefully
|
|
|
7e752c |
anyway. Therefore, move it under verbose option.
|
|
|
7e752c |
|
|
|
7e752c |
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
|
|
|
7e752c |
Signed-off-by: David Ahern <dsahern@gmail.com>
|
|
|
7e752c |
---
|
|
|
7e752c |
lib/bpf.c | 6 +++---
|
|
|
7e752c |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
7e752c |
|
|
|
7e752c |
diff --git a/lib/bpf.c b/lib/bpf.c
|
|
|
7e752c |
index 65e26989a1f30..9dc37c787d907 100644
|
|
|
7e752c |
--- a/lib/bpf.c
|
|
|
7e752c |
+++ b/lib/bpf.c
|
|
|
7e752c |
@@ -1898,9 +1898,9 @@ static int bpf_fetch_maps_end(struct bpf_elf_ctx *ctx)
|
|
|
7e752c |
}
|
|
|
7e752c |
|
|
|
7e752c |
memcpy(ctx->maps, fixup, sizeof(fixup));
|
|
|
7e752c |
-
|
|
|
7e752c |
- printf("Note: %zu bytes struct bpf_elf_map fixup performed due to size mismatch!\n",
|
|
|
7e752c |
- sizeof(struct bpf_elf_map) - ctx->map_len);
|
|
|
7e752c |
+ if (ctx->verbose)
|
|
|
7e752c |
+ printf("%zu bytes struct bpf_elf_map fixup performed due to size mismatch!\n",
|
|
|
7e752c |
+ sizeof(struct bpf_elf_map) - ctx->map_len);
|
|
|
7e752c |
return 0;
|
|
|
7e752c |
}
|
|
|
7e752c |
|
|
|
7e752c |
--
|
|
|
7e752c |
2.20.1
|
|
|
7e752c |
|