mbox series

[v2,bpf-next,0/4] Build BPF selftests and its libbpf, bpftool in debug mode

Message ID 20210313210920.1959628-1-andrii@kernel.org (mailing list archive)
Headers show
Series Build BPF selftests and its libbpf, bpftool in debug mode | expand

Message

Andrii Nakryiko March 13, 2021, 9:09 p.m. UTC
Build BPF selftests and libbpf and bpftool, that are used as part of
selftests, in debug mode (specifically, -Og). This makes it much simpler and
nicer to do development and/or bug fixing. See patch #4 for some unscientific
measurements.

This patch set fixes new maybe-unitialized warnings produced in -Og build
mode. Patch #1 fixes the blocker which was causing some XDP selftests failures
due to non-zero padding in bpf_xdp_set_link_opts, which only happened in debug
mode.

Andrii Nakryiko (4):
  libbpf: add explicit padding to bpf_xdp_set_link_opts
  bpftool: fix maybe-uninitialized warnings
  selftests/bpf: fix maybe-uninitialized warning in xdpxceiver test
  selftests/bpf: build everything in debug mode

 tools/bpf/bpftool/btf.c                  | 3 +++
 tools/bpf/bpftool/main.c                 | 3 +--
 tools/bpf/bpftool/map.c                  | 2 +-
 tools/lib/bpf/libbpf.h                   | 1 +
 tools/testing/selftests/bpf/Makefile     | 7 +++++--
 tools/testing/selftests/bpf/xdpxceiver.c | 4 ++--
 6 files changed, 13 insertions(+), 7 deletions(-)

Comments

Alexei Starovoitov March 16, 2021, 9:01 p.m. UTC | #1
On 3/13/21 1:09 PM, Andrii Nakryiko wrote:
> Build BPF selftests and libbpf and bpftool, that are used as part of
> selftests, in debug mode (specifically, -Og). This makes it much simpler and
> nicer to do development and/or bug fixing. See patch #4 for some unscientific
> measurements.
> 
> This patch set fixes new maybe-unitialized warnings produced in -Og build
> mode. Patch #1 fixes the blocker which was causing some XDP selftests failures
> due to non-zero padding in bpf_xdp_set_link_opts, which only happened in debug
> mode.

It was applied. gitbot doesn't seem to auto-reply anymore. hmm.
Andrii Nakryiko March 16, 2021, 9:36 p.m. UTC | #2
On Tue, Mar 16, 2021 at 2:02 PM Alexei Starovoitov <ast@fb.com> wrote:
>
> On 3/13/21 1:09 PM, Andrii Nakryiko wrote:
> > Build BPF selftests and libbpf and bpftool, that are used as part of
> > selftests, in debug mode (specifically, -Og). This makes it much simpler and
> > nicer to do development and/or bug fixing. See patch #4 for some unscientific
> > measurements.
> >
> > This patch set fixes new maybe-unitialized warnings produced in -Og build
> > mode. Patch #1 fixes the blocker which was causing some XDP selftests failures
> > due to non-zero padding in bpf_xdp_set_link_opts, which only happened in debug
> > mode.
>
> It was applied. gitbot doesn't seem to auto-reply anymore. hmm.

Thanks! Yeah, it seems to be unreliable lately. I think it sent some
notifications yesterday, but not all.