Skip to content

Provide NULL and KERNEL_VERSION macros in bpf_helpers.h

Andrii Nakryiko bpf netdev 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest2 patches 1 replyApplied

Changes in v3 from the cover letter

- instead of vmlinux.h, do this in bpf_helpers.h;
- added KERNEL_VERSION, which comes up periodically as well;
- I dropped strict compilation patches for now, because we run into new warnings (e.g., not checking read() result) in kernel-patches CI, which I can't even reproduce locally. Also -Wdiscarded-qualifiers pragma for jit_disasm.c is not supported by Clang, it needs to be -Wincompatible-pointer-types-discards-qualifiers for Clang; we don't have to deal with that in this patch set;

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2libbpf: provide NULL and KERNEL_VERSION macros in bpf_helpers.htools/lib/bpf/bpf_helpers.h+15 -10 replies
2/2selftests/bpf: drop custom NULL #define in skb_pkt_end selftesttools/testing/selftests/bpf/progs/skb_pkt_end.c+0 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 bpf-next 0/2] Provide NULL and KERNEL_VERSION macros in bpf_helpers.h

Provide NULL and KERNEL_VERSION macros in bpf_helpers.h. Patch #2 removes such custom NULL definition from one of the selftests.

v2->v3:
- instead of vmlinux.h, do this in bpf_helpers.h;
- added KERNEL_VERSION, which comes up periodically as well;
- I dropped strict compilation patches for now, because we run into new warnings (e.g., not checking read() result) in kernel-patches CI, which I can't even reproduce locally. Also -Wdiscarded-qualifiers pragma for jit_disasm.c is not supported by Clang, it needs to be -Wincompatible-pointer-types-discards-qualifiers for Clang; we don't have to deal with that in this patch set;
v1->v2:
- fix few typos and wrong copy/paste;
- fix #pragma push -> pop.

Andrii Nakryiko (2):
libbpf: provide NULL and KERNEL_VERSION macros in bpf_helpers.h selftests/bpf: drop custom NULL #define in skb_pkt_end selftest

 tools/lib/bpf/bpf_helpers.h                     | 16 +++++++++++++++-
 tools/testing/selftests/bpf/progs/skb_pkt_end.c |  1 -
 2 files changed, 15 insertions(+), 2 deletions(-)
Signature · 1 line
2.30.2