We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While trying to run the bpf_tail_call_ function I'm facing the following error:
bpf_tail_call_
pegasus@pegasus:~/Documents/eBPF/learning-ebpf/chapter2$ sudo ./hello-tail.py [sudo] password for pegasus: /virtual/main.c:18:20: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'u64' (aka 'unsigned long long') [-Wint-conversion] bpf_tail_call_((void *)bpf_pseudo_fd(1, -1), ctx, opcode); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /virtual/include/bcc/helpers.h:552:25: note: passing argument to parameter 'map_fd' here void bpf_tail_call_(u64 map_fd, void *ctx, int index) { ^ 1 error generated. Traceback (most recent call last): File "/home/pegasus/Documents/eBPF/learning-ebpf/chapter2/./hello-tail.py", line 41, in <module> b = BPF(text=program) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 479, in __init__ raise Exception("Failed to compile BPF module %s" % (src_file or "<text>")) Exception: Failed to compile BPF module <text>
Inside bcc/src/cc/export/helpers.h I've the following code:
void bpf_tail_call_(void *map_fd, void *ctx, int index) { ((void (*)(void *, u64, int))BPF_FUNC_tail_call)(ctx, (u64)map_fd, index); }
I tried to install BCC using the following commands:
git clone https://github.com/iovisor/bcc.git mkdir bcc/build; cd bcc/build cmake .. make sudo make install cmake -DPYTHON_CMD=python3 .. # build python3 binding pushd src/python/ make sudo make install popd
Can anyone provide any suggestions, why am I still facing the same error? Although it's solved in the src My clang version:
pegasus@pegasus:~/Documents/eBPF/learning-ebpf/chapter2$ clang --version Homebrew clang version 17.0.6 Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/linuxbrew/.linuxbrew/bin
The text was updated successfully, but these errors were encountered:
No branches or pull requests
While trying to run the
bpf_tail_call_
function I'm facing the following error:Inside bcc/src/cc/export/helpers.h I've the following code:
I tried to install BCC using the following commands:
Can anyone provide any suggestions, why am I still facing the same error? Although it's solved in the src
My clang version:
The text was updated successfully, but these errors were encountered: