diff options
author | Jeremy Kerr <jk@codeconstruct.com.au> | 2021-09-29 15:26:10 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-09-29 11:00:11 +0100 |
commit | 4f9e1ba6de45aa8797a83f1fe5b82ec4bac16899 (patch) | |
tree | 5af27668529ef6500809810eef7c4d2c374c68d3 /net/mctp/af_mctp.c | |
parent | 7b14e15ae6f4850392800482efb54d5cf4ae300c (diff) | |
download | linux-4f9e1ba6de45aa8797a83f1fe5b82ec4bac16899.tar.gz linux-4f9e1ba6de45aa8797a83f1fe5b82ec4bac16899.tar.bz2 linux-4f9e1ba6de45aa8797a83f1fe5b82ec4bac16899.zip |
mctp: Add tracepoints for tag/key handling
The tag allocation, release and bind events are somewhat opaque outside
the kernel; this change adds a few tracepoints to assist in
instrumentation and debugging.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mctp/af_mctp.c')
-rw-r--r-- | net/mctp/af_mctp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c index 46e5ede385cb..28cb1633bed6 100644 --- a/net/mctp/af_mctp.c +++ b/net/mctp/af_mctp.c @@ -16,6 +16,9 @@ #include <net/mctpdevice.h> #include <net/sock.h> +#define CREATE_TRACE_POINTS +#include <trace/events/mctp.h> + /* socket implementation */ static int mctp_release(struct socket *sock) @@ -239,6 +242,7 @@ static void mctp_sk_expire_keys(struct timer_list *timer) spin_lock(&key->lock); if (!time_after_eq(key->expiry, jiffies)) { + trace_mctp_key_release(key, MCTP_TRACE_KEY_TIMEOUT); key->valid = false; hlist_del_rcu(&key->hlist); hlist_del_rcu(&key->sklist); @@ -310,6 +314,8 @@ static void mctp_sk_unhash(struct sock *sk) hlist_del(&key->sklist); hlist_del(&key->hlist); + trace_mctp_key_release(key, MCTP_TRACE_KEY_CLOSED); + spin_lock(&key->lock); if (key->reasm_head) kfree_skb(key->reasm_head); |