Re: Facing an error while compiling for bpf using clang

Prashanth Fernando

Thank You, I updated clang and now I am able to compile the code in CentOS-7.

I am facing another issue while loading the ebpf code in tc. I am able to run this in Ubuntu-18.04, but the usecase is to run it in CentOS. Can someone please help me out in resolving it. 
replicator.o is my objext file and classifier/action are the classifier/action code.

# sudo tc filter add dev enp0s8 parent ffff: bpf obj replicator.o sec classifier flowid ffff:1 \
        action bpf obj replicator.o sec action ok
What is "obj"?
Usage: ... bpf ...
 [inline]:     run bytecode BPF_BYTECODE
 [from file]:  run bytecode-file FILE
               [ police POLICE_SPEC ] [ action ACTION_SPEC ]
               [ classid CLASSID ]
Where BPF_BYTECODE := 's,c t f k,c t f k,c t f k,...'
      c,t,f,k and s are decimals; s denotes number of 4-tuples
Where FILE points to a file containing the BPF_BYTECODE string


Join to automatically receive all group messages.