forked from cilium/pwru
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It fails to run with --filter-trace-tc: ```bash 2024/09/24 12:59:02 Attaching tc-bpf progs... 2024/09/24 12:59:02 failed to trace TC progs: failed to trace bpf progs: failed to find address for function entry2 of bpf prog SchedCLS(entry2)cilium#28 ``` Then, I fix it by extracting bpf prog name from /proc/kallsyms correctly, and avoid `addr - 1` for tracing XDP and tc-bpf. ```bash 2024/09/24 13:00:49 Attaching tc-bpf progs... 2024/09/24 13:00:49 Attaching xdp progs... 2024/09/24 13:00:49 Attaching kprobes (via kprobe-multi)... 49 / 49 [--------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/s 2024/09/24 13:00:49 Attached (ignored 0) 2024/09/24 13:00:49 Listening for events.. SKB CPU PROCESS NETNS MARK/x IFACE PROTO MTU LEN TUPLE FUNC 0xffff8e151d39b500 6 <empty>:0 4026531840 0 ens33:2 0x0800 1500 98 192.168.241.1:0->192.168.241.133:0(icmp) entry1(tc) 0xffff8e151d39ab00 6 ~wru/pwru:437091 4026531840 0 ens33:2 0x0800 1500 98 192.168.241.1:0->192.168.241.133:0(icmp) entry1(tc) 0xffff8e151d39a200 6 <empty>:0 4026531840 0 ens33:2 0x0800 1500 98 192.168.241.1:0->192.168.241.133:0(icmp) entry1(tc) 0xffff8e151d39b100 6 <empty>:0 4026531840 0 ens33:2 0x0800 1500 98 192.168.241.1:0->192.168.241.133:0(icmp) entry1(tc) ^C2024/09/24 13:01:04 Received signal, exiting program.. 2024/09/24 13:01:04 Detaching kprobes... 3 / 3 [---------------------------------------------------------------------------------------------------------------------------------------] 100.00% 52 p/s ``` Signed-off-by: Leon Hwang <[email protected]>
- Loading branch information
Showing
4 changed files
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters