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>