diff options
author | Tony Lu <tonylu@linux.alibaba.com> | 2021-11-01 08:39:12 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-01 14:39:14 +0100 |
commit | 4826260868202246a4dba1c682491d7f4b90d747 (patch) | |
tree | 4870743d784827044bf115bb0f6ec2ba19484d20 /net/smc/af_smc.c | |
parent | Merge branch 'amt-driver' (diff) | |
download | linux-4826260868202246a4dba1c682491d7f4b90d747.tar.xz linux-4826260868202246a4dba1c682491d7f4b90d747.zip |
net/smc: Introduce tracepoint for fallback
This introduces tracepoint for smc fallback to TCP, so that we can track
which connection and why it fallbacks, and map the clcsocks' pointer with
/proc/net/tcp to find more details about TCP connections. Compared with
kprobe or other dynamic tracing, tracepoints are stable and easy to use.
Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
Reviewed-by: Wen Gu <guwen@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/af_smc.c')
-rw-r--r-- | net/smc/af_smc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 8dc34388b2c1..0cf7ed2f5d41 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -50,6 +50,7 @@ #include "smc_rx.h" #include "smc_close.h" #include "smc_stats.h" +#include "smc_tracepoint.h" static DEFINE_MUTEX(smc_server_lgr_pending); /* serialize link group * creation on server @@ -564,6 +565,7 @@ static void smc_switch_to_fallback(struct smc_sock *smc, int reason_code) smc->use_fallback = true; smc->fallback_rsn = reason_code; smc_stat_fallback(smc); + trace_smc_switch_to_fallback(smc, reason_code); if (smc->sk.sk_socket && smc->sk.sk_socket->file) { smc->clcsock->file = smc->sk.sk_socket->file; smc->clcsock->file->private_data = smc->clcsock; |