Re: Facing an error while compiling for bpf using clang
On 05/22/2019 09:26 AM, Prashanth Fernando wrote:
Thank You, I updated clang and now I am able to compile the code in CentOS-7.Judging from above error and that it works on Ubuntu 18.04, then your iproute2
version in CentOS-7 is simply too old aka lacking eBPF support.
Try compiling one from recent Git  or some more recent tarball, then it
should work provided you have a proper kernel with it.
Perhaps also  might help you getting started, e.g. you can use cls_bpf in
direct action mode which is much more efficient than going through ac_bpf,
see the guide for more info.
[inline]: run bytecode BPF_BYTECODE