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