Re: Facing an error while compiling for bpf using clang
Daniel Borkmann
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 [0] or some more recent tarball, then it should work provided you have a proper kernel with it. Perhaps also [1] 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. [0] https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/ [1] https://cilium.readthedocs.io/en/latest/bpf/#iproute2 [inline]: run bytecode BPF_BYTECODE |
|