BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: bpf@vger.kernel.org, ast@kernel.org, andrii@kernel.org,
	daniel@iogearbox.net, kernel-team@fb.com
Cc: Eduard Zingerman <eddyz87@gmail.com>
Subject: [PATCH bpf-next 0/2] bpftool: fix newline for struct with padding only fields
Date: Fri, 30 Sep 2022 19:49:16 +0300	[thread overview]
Message-ID: <20220930164918.342310-1-eddyz87@gmail.com> (raw)

Hi Everyone,

a small fix for bpftool, copying commit message from the first patch
as it explains the modification.

An update for `bpftool btf dump file ... format c`.
Add a missing newline print for structures that consist of
anonymous-only padding fields. E.g. here is struct bpf_timer from
vmlinux.h before this patch:

 struct bpf_timer {
 	long: 64;
	long: 64;};

And after this patch:

 struct bpf_dynptr {
 	long: 64;
	long: 64;
 };

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>

Eduard Zingerman (2):
  bpftool: fix newline for struct with padding only fields
  selftests/bpf: verify newline for struct with padding only fields

 tools/lib/bpf/btf_dump.c                         | 15 +++++++++------
 .../bpf/progs/btf_dump_test_case_padding.c       | 16 ++++++++++++++++
 2 files changed, 25 insertions(+), 6 deletions(-)

-- 
2.37.3


             reply	other threads:[~2022-09-30 16:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 16:49 Eduard Zingerman [this message]
2022-09-30 16:49 ` [PATCH bpf-next 1/2] bpftool: fix newline for struct with padding only fields Eduard Zingerman
2022-09-30 23:01   ` Andrii Nakryiko
2022-09-30 16:49 ` [PATCH bpf-next 2/2] selftests/bpf: verify " Eduard Zingerman
2022-09-30 23:03   ` Andrii Nakryiko
2022-09-30 22:59 ` [PATCH bpf-next 0/2] bpftool: fix " Andrii Nakryiko

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=20220930164918.342310-1-eddyz87@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    /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