netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: dsahern@gmail.com
Cc: jakub.kicinski@netronome.com, alexei.starovoitov@gmail.com,
	netdev@vger.kernel.org, Daniel Borkmann <daniel@iogearbox.net>
Subject: [PATCH iproute2 2/5] bpf: move bpf_elf_map fixup notification under verbose
Date: Wed, 18 Jul 2018 01:31:19 +0200	[thread overview]
Message-ID: <20180717233122.29390-3-daniel@iogearbox.net> (raw)
In-Reply-To: <20180717233122.29390-1-daniel@iogearbox.net>

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 <daniel@iogearbox.net>
---
 lib/bpf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/bpf.c b/lib/bpf.c
index 4e26c0d..42093db 100644
--- a/lib/bpf.c
+++ b/lib/bpf.c
@@ -1893,9 +1893,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.9.5

  parent reply	other threads:[~2018-07-18  0:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17 23:31 [PATCH iproute2 0/5] Various BPF improvements Daniel Borkmann
2018-07-17 23:31 ` [PATCH iproute2 1/5] bpf: import btf uapi kernel header Daniel Borkmann
2018-07-17 23:31 ` Daniel Borkmann [this message]
2018-07-18  0:24   ` [PATCH iproute2 2/5] bpf: move bpf_elf_map fixup notification under verbose Jakub Kicinski
2018-07-17 23:31 ` [PATCH iproute2 3/5] bpf: remove strict dependency on af_alg Daniel Borkmann
2018-07-17 23:31 ` [PATCH iproute2 4/5] bpf: implement bpf to bpf calls support Daniel Borkmann
2018-07-17 23:31 ` [PATCH iproute2 5/5] bpf: implement btf handling and map annotation Daniel Borkmann
2018-07-18  0:27   ` Jakub Kicinski
2018-07-18  8:42     ` Daniel Borkmann
2018-07-18  9:33       ` Daniel Borkmann
2018-07-18 18:13         ` Jakub Kicinski
2018-07-19  0:11           ` Martin KaFai Lau
2018-07-19 15:43             ` Daniel Borkmann
2018-07-19 16:37               ` Martin KaFai Lau
2018-07-18 23:52     ` Martin KaFai Lau
2018-07-19  1:01       ` Jakub Kicinski
2018-07-18  2:43 ` [PATCH iproute2 0/5] Various BPF improvements David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180717233122.29390-3-daniel@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).