The BPF-helper is now defined in bpf_helper_defs.h header:
lib/libbpf-install/usr/include/bpf/bpf_helper_defs.h
Update and keep comment as a help for people doing kernel
devel on BPF and want to test BPF-helpers not yet upstream.
Accepted in kernel v5.12
- commit 34b2021cc616 ("bpf: Add BPF-helper for MTU checking")
- https://git.kernel.org/torvalds/c/34b2021cc616
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Encode this statically via C/BPF-code switch statement, and
have global counter cycles through these.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Shot myself in the foot with stripping ELF obj file.
This was the reason I could not load BPF program with TC.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
This code only works because LLVM optimize it as a constant.
As soon at I try to use it as variable it breaks.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
It still works when loading, but results in a huge warning
which is really annoying.
Add a Makefile hack to strip the object file.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
This makes it easier to see/decode packets via tcpdump.
Borrowing part of ../encap-forward/encap.h.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>