smb3_smbd_connect_done and smb3_smbd_connect_err To improve debugging of RDMA issues add those two new tracepoints. We already had dynamic tracepoints for the non-RDMA connect done and error cases, but didn't for the smbdirect cases. See attached patch -- Thanks, Steve
From fb2697a561f72b28023697968face1ec25da8575 Mon Sep 17 00:00:00 2001 From: Steve French <stfrench@xxxxxxxxxxxxx> Date: Tue, 19 Sep 2023 01:14:39 -0500 Subject: [PATCH] Add dynamic trace points for RDMA (smbdirect) reconnect smb3_smbd_connect_done and smb3_smbd_connect_err To improve debugging of RDMA issues add those two. We already had dynamic tracepoints for non-RDMA connect done and error cases. Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> --- fs/smb/client/smbdirect.c | 5 ++++- fs/smb/client/trace.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index 2a2aec8c6112..2a9f064ccc6a 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -1401,8 +1401,11 @@ int smbd_reconnect(struct TCP_Server_Info *server) server->smbd_conn = smbd_get_connection( server, (struct sockaddr *) &server->dstaddr); - if (server->smbd_conn) + if (server->smbd_conn) { cifs_dbg(VFS, "RDMA transport re-established\n"); + trace_smb3_smbd_connect_done(server->hostname, server->conn_id, &server->dstaddr); + } else + trace_smb3_smbd_connect_err(server->hostname, server->conn_id, &server->dstaddr); return server->smbd_conn ? 0 : -ENOENT; } diff --git a/fs/smb/client/trace.h b/fs/smb/client/trace.h index a7e4755bed0f..de199ec9f726 100644 --- a/fs/smb/client/trace.h +++ b/fs/smb/client/trace.h @@ -935,6 +935,8 @@ DEFINE_EVENT(smb3_connect_class, smb3_##name, \ TP_ARGS(hostname, conn_id, addr)) DEFINE_SMB3_CONNECT_EVENT(connect_done); +DEFINE_SMB3_CONNECT_EVENT(smbd_connect_done); +DEFINE_SMB3_CONNECT_EVENT(smbd_connect_err); DECLARE_EVENT_CLASS(smb3_connect_err_class, TP_PROTO(char *hostname, __u64 conn_id, -- 2.39.2