-
Notifications
You must be signed in to change notification settings - Fork 127
bpf, sockmap: Introduce tracing capability for sockmap #8763
New issue
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
Conversation
Upstream branch: c966139 |
ceae011
to
04fd073
Compare
Upstream branch: 527b33d |
7e0fa5a
to
2da51bb
Compare
04fd073
to
b8b90b2
Compare
Upstream branch: 967e8de |
2da51bb
to
89a78fc
Compare
b8b90b2
to
a530d65
Compare
Upstream branch: 690d43d |
89a78fc
to
edf54a2
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=951492 expired. Closing PR. |
Upstream branch: a27a97f |
edf54a2
to
a631b6e
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=952401 expired. Closing PR. |
Upstream branch: 6aca583 |
0b21d09
to
c2787a4
Compare
8b59228
to
9c93586
Compare
Upstream branch: b9c09fb |
c2787a4
to
d76be36
Compare
9c93586
to
ca1daab
Compare
Upstream branch: 60400cd |
d76be36
to
db98c85
Compare
ca1daab
to
cad9039
Compare
Upstream branch: 4cc2048 |
db98c85
to
20f1eca
Compare
cad9039
to
c7849f3
Compare
Upstream branch: 46eb012 |
20f1eca
to
bc77654
Compare
c7849f3
to
a041a61
Compare
Upstream branch: 91dbac4 |
bc77654
to
79a096a
Compare
a041a61
to
b2666a3
Compare
Sockmap has the same high-performance forwarding capability as XDP, but operates at Layer 7. Introduce tracing capability for sockmap, to trace the execution results of BPF programs without modifying the programs themselves, similar to the existing trace_xdp_redirect{_map}. It is crucial for debugging sockmap programs, especially in production environments. Additionally, the new header file has to be added to bpf_trace.h to automatically generate tracepoints. Test results: $ echo "1" > /sys/kernel/tracing/events/sockmap/enable msg/skb: ''' sockmap_redirect: sk=000000000ec02a93, netns=4026531840, inode=318, \ family=2, protocol=6, prog_id=59, len=8192, type=msg, action=REDIRECT, \ redirect_type=ingress sockmap_redirect: sk=00000000d5d9c931, netns=4026531840, inode=64731, \ family=2, protocol=6, prog_id=91, len=8221, type=skb, action=REDIRECT, \ redirect_type=egress sockmap_redirect: sk=00000000106fc281, netns=4026531840, inode=64729, \ family=2, protocol=6, prog_id=94, len=8192, type=msg, action=PASS, \ redirect_type=none ''' strparser: ''' sockmap_strparser: sk=00000000f15fc1c8, netns=4026531840, inode=52396, \ family=2, protocol=6, prog_id=143, in_len=1000, full_len=10 ''' Suggested-by: Jakub Sitnicki <[email protected]> Suggested-by: Cong Wang <[email protected]> Suggested-by: Steven Rostedt <[email protected]> Signed-off-by: Jiayuan Chen <[email protected]> Reviewed-by: Cong Wang <[email protected]>
This commit relocates the BPF tracepoint definitions for XDP and sockmap from the kernel directory to net/bpf. This ensures that these tracepoints are controlled by the CONFIG_NET, avoiding unnecessary function definitions when the CONFIG_NET is disabled. Additionally, it prevents build failures caused by the use of net module functions when CONFIG_NET is not enabled. Signed-off-by: Jiayuan Chen <[email protected]>
Upstream branch: 224ee86 |
79a096a
to
61bde7d
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=952401 irrelevant now. Closing PR. |
Pull request for series with
subject: bpf, sockmap: Introduce tracing capability for sockmap
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=951492