How to reload ebpf program via python-bcc?
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
When I modify the ebpf code in "networking/http_filter/http-parse-complete.c", and exit the python program via Ctrl-C again and again to debug my program, the old ebpf code is not unloaded and removed.
I have added a version code to verify if the code is the newest. But the version does not change no matter how I change the ebpf code.
bpf_trace_printk("tcp: %d %d\n", version, payload_offset);
Is there a function such as "remove_xdp" to remove the existing ebpf SOCKET_FILTER program immediately?
How to update the SOCKET_FILTER ebpf program successfully? Currently, I need to reboot the system.
Keyword: reload, clean, remove, remove func , unload func
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with networking/http_filter/http-parse-complete.c and the Python-BCC program that loads its SOCKET_FILTER program. Reproduce repeated Ctrl-C exits, then inspect how the existing program is unloaded and replaced. Done means the modified eBPF code is loaded successfully without rebooting and the changed version is observable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux, python
- Domain
- networking, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100