how to get the num of cpus for xdpfilt_prog.h files?
kolinfluence opened this issue · comments
Kol Influence commented
can u pls help with this last issue? how do i get total number of cpu threads working inside xdpfilt_prog.h?
libbpf_num_possible_cpus()
i cant get the num of cpus through the above.
https://pastebin.com/raw/WN25JNPu
root@test:/usr/local/src/temp/xdp-tools# make
lib
libxdp
util
make[2]: Nothing to be done for 'all'.
testing
make[2]: Nothing to be done for 'all'.
xdp-filter
CLANG xdpfilt_dny_udp.o
In file included from xdpfilt_dny_udp.c:10:
./xdpfilt_prog.h:253:18: error: implicit declaration of function 'libbpf_num_possible_cpus' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
nr_cpus = libbpf_num_possible_cpus();
^
1 error generated.
make[1]: *** [../lib/common.mk:110: xdpfilt_dny_udp.o] Error 1
make: *** [Makefile:34: xdp-filter] Error 2
Toke Høiland-Jørgensen commented
I have told you repeatedly to not use this issue tracker as a support forum for writing BTF code. Since you're apparently not listening, unfortunately I see no other solution than blocking you :(