Thread (20 messages) flat view 20 messages, 6 authors, 2022-11-10

Re: [PATCH net-next v3] net/sock: Introduce trace_sk_data_ready()

From: Peilin Ye <hidden>
Date: 2022-10-12 17:57:29
Also in: lkml

On Wed, Oct 12, 2022 at 08:58:32AM +0300, Leon Romanovsky wrote:
quoted
+	trace_sk_data_ready(sk, __func__);
 	pr_debug("Entering iscsi_target_sk_data_ready: conn: %p\n", conn);
This can go.
<...>
__func__ repetitive pattern hints that it is not best API interface.

quoted
+TRACE_EVENT(sk_data_ready,
+
+	TP_PROTO(const struct sock *sk, const char *func),
+
+	TP_ARGS(sk, func),
+
+	TP_STRUCT__entry(
+		__field(const void *, skaddr)
+		__field(__u16, family)
+		__field(__u16, protocol)
+		__string(func, func)
TRACE_EVENT() is macro defined in .h file, you can safely put __func__
instead.
Thanks for the suggestions!  I will update in v4.

Peilin Ye
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help