Hi list, When i try to compile examples/bpf/t3.c with command annotated in that source file, got this error: [root@server bpf]# clang -O2 -U __GNUC__ -target bpf -Wno-int-to-void-pointer-cast -c t3.c In file included from t3.c:27: In file included from /usr/local/include/rte_mbuf_core.h:22: /usr/local/include/rte_byteorder.h:30:16: error: invalid output constraint '=Q' in asm : [x1] "=Q" (x) ^ 1 error generated. [root@server bpf]#
I think this should be the root cause as noted linux kernel Documentation/bpf/bpf_devel_QA.txt BPF programs may recursively include header file(s) with file scope inline assembly codes. The default target can handle this well, while bpf target may fail if bpf backend assembler does not understand these assembly codes, which is true in most cases.