diff options
| author | Jeremy Kerr <[email protected]> | 2021-09-29 07:26:10 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2021-09-29 10:00:11 +0000 |
| commit | 4f9e1ba6de45aa8797a83f1fe5b82ec4bac16899 (patch) | |
| tree | 5af27668529ef6500809810eef7c4d2c374c68d3 /net/mctp/af_mctp.c | |
| parent | mctp: Implement a timeout for tags (diff) | |
| download | kernel-4f9e1ba6de45aa8797a83f1fe5b82ec4bac16899.tar.gz kernel-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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
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); |
