[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b776fa07-de4b-44be-ae68-8bc8c362ea81@linux.dev>
Date: Tue, 6 May 2025 13:24:26 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Jiayuan Chen <jiayuan.chen@...ux.dev>,
Jakub Sitnicki <jakub@...udflare.com>,
John Fastabend <john.fastabend@...il.com>
Cc: Cong Wang <xiyou.wangcong@...il.com>, Steven Rostedt
<rostedt@...dmis.org>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>,
Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>, KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>, Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>, Jesper Dangaard Brouer <hawk@...nel.org>,
linux-kernel@...r.kernel.org, bpf@...r.kernel.org, netdev@...r.kernel.org,
linux-trace-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH bpf-next v4 1/2] bpf, sockmap: Introduce tracing
capability for sockmap
On 5/5/25 7:51 PM, Jiayuan Chen wrote:
> 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}.
There were advancements in bpf tracing since the trace_xdp_xxx additions.
Have you considered the fexit bpf prog and why it is not sufficient ?
>
> 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
> '''
>
> Reviewed-by: Cong Wang <xiyou.wangcong@...il.com>
> Suggested-by: Jakub Sitnicki <jakub@...udflare.com>
> Suggested-by: Cong Wang <xiyou.wangcong@...il.com>
> Suggested-by: Steven Rostedt <rostedt@...dmis.org>
> Signed-off-by: Jiayuan Chen <jiayuan.chen@...ux.dev>
>
> ---
> v3 -> v4: Resending this patch as v3 was incorrectly closed by Patchwork.
> Additionally, carrying the Reviewed-by tag.
John and JakubS, please take a look.
Powered by blists - more mailing lists