summaryrefslogtreecommitdiff
path: root/net/smc/af_smc.c
diff options
context:
space:
mode:
authorTony Lu <tonylu@linux.alibaba.com>2021-11-01 10:39:12 +0300
committerDavid S. Miller <davem@davemloft.net>2021-11-01 16:39:14 +0300
commit4826260868202246a4dba1c682491d7f4b90d747 (patch)
tree4870743d784827044bf115bb0f6ec2ba19484d20 /net/smc/af_smc.c
parent6008889121c0463f51e604426031646d7f0a23ce (diff)
downloadlinux-4826260868202246a4dba1c682491d7f4b90d747.tar.xz
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.c2
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;