summaryrefslogtreecommitdiffstats
path: root/net/kcm
diff options
context:
space:
mode:
authorPeilin Ye <peilin.ye@bytedance.com>2023-01-19 16:45:16 -0800
committerDavid S. Miller <davem@davemloft.net>2023-01-23 11:26:50 +0000
commit40e0b09081420853542571c38875b48b60404ebb (patch)
treea0b4e5c2a78286d733182822265380551e5df51d /net/kcm
parenta7b87d2a31dcff04ed81ef63355080bdaffa93c3 (diff)
downloadlinux-40e0b09081420853542571c38875b48b60404ebb.tar.gz
linux-40e0b09081420853542571c38875b48b60404ebb.tar.bz2
linux-40e0b09081420853542571c38875b48b60404ebb.zip
net/sock: Introduce trace_sk_data_ready()
As suggested by Cong, introduce a tracepoint for all ->sk_data_ready() callback implementations. For example: <...> iperf-609 [002] ..... 70.660425: sk_data_ready: family=2 protocol=6 func=sock_def_readable iperf-609 [002] ..... 70.660436: sk_data_ready: family=2 protocol=6 func=sock_def_readable <...> Suggested-by: Cong Wang <cong.wang@bytedance.com> Signed-off-by: Peilin Ye <peilin.ye@bytedance.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/kcm')
-rw-r--r--net/kcm/kcmsock.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
index 890a2423f559..cfe828bd7fc6 100644
--- a/net/kcm/kcmsock.c
+++ b/net/kcm/kcmsock.c
@@ -28,6 +28,7 @@
#include <net/netns/generic.h>
#include <net/sock.h>
#include <uapi/linux/kcm.h>
+#include <trace/events/sock.h>
unsigned int kcm_net_id;
@@ -349,6 +350,8 @@ static void psock_data_ready(struct sock *sk)
{
struct kcm_psock *psock;
+ trace_sk_data_ready(sk);
+
read_lock_bh(&sk->sk_callback_lock);
psock = (struct kcm_psock *)sk->sk_user_data;