naccyde / rpms / iproute

Forked from rpms/iproute 6 months ago
Clone

Blame SOURCES/0056-bpf-move-bpf_elf_map-fixup-notification-under-verbos.patch

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