From patchwork Tue Sep 19 06:20:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 13390853 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8A05CD343F for ; Tue, 19 Sep 2023 06:21:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229690AbjISGVV (ORCPT ); Tue, 19 Sep 2023 02:21:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230330AbjISGVU (ORCPT ); Tue, 19 Sep 2023 02:21:20 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF16E191 for ; Mon, 18 Sep 2023 23:20:56 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-502984f5018so8818417e87.3 for ; Mon, 18 Sep 2023 23:20:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695104454; x=1695709254; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Vn/Ef8dEo50kPl9ZS7d92kvxbOdIpVpVXkjKTfy4vTY=; b=Ir0u0cj8Du0V3bZDSKzO0rXob7PymN2xdCJRORaVjOTovsIrBoVEfgcGP1uvHneN8n MjDWNzjI3LPQNuCM8lHeX/wxykdU+/JeTPvBfLXU+lcsYK2xnvqlD7RaZ3Pf8/YHmtOf R8hfOOlHxUCDgVpgjODijGz8fvicr+oFQuLYVT7jLq1AWuhiZov0GzuZCK4ypVhNIPId aY5MP+Wk6w/tNTC6Lzm0Z/hxF5sasAX1n/dNH0sEBbxd1RYEXyKRGimg6KKFjRDVinPp RHwLQDcluIfQyisDylVDbKOxxUlTuh3E+R9Hvr52e/ezN5nYDyR6zZbTp9/K8Um3BROk FxuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695104454; x=1695709254; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Vn/Ef8dEo50kPl9ZS7d92kvxbOdIpVpVXkjKTfy4vTY=; b=TopVeLDwLOiAMrztIRmB1rILdexM8MrPDyKKjrV0JX3XGa5SUMHZ9IuIB6ho2XmG2q UsboH4+q8hZF7Iq7R317Xjukc3FWPUvsPVmVnK+SE53fuj+YOx9c9xuFcsp3XzG+0smK nQ1MMT9Cj975ChBwHW7SOL8g37lJpwFCmC2FcdLCIQB7lYkV9k0VJieHgiFNfL7ux8Fb 1ymwHO/ZSKhWslmSAORlUERJqZpAM7ouRLNmKb8CIf19VyHImwcunqEcKR1eVelo/sUY 9FlWThUXRGZUDjm39fTn+vaxj5kWIpg5Gg1kfpQ6Ng9t8liRM1B9m0pkPTJxmKB+Yg9Y LUNw== X-Gm-Message-State: AOJu0YwQsbbCzHbH1nrsvjM1D6kzu8cr/6Sr71+18MtUz/oLgLpVTvsJ mQGU1lrJzJmVW53jC19xcnj+sEbQKgFBD6MHxZcAbQCL6h4= X-Google-Smtp-Source: AGHT+IH/4ib678LjeuzM8k5t4MmxPp5ujt4edKL/rgV0u70EpOaO5aAcm8kd6KzgySMzURPfXXRmazE8Vb9X1e5+Eic= X-Received: by 2002:a19:4f1a:0:b0:4ff:95c:e158 with SMTP id d26-20020a194f1a000000b004ff095ce158mr9132996lfb.64.1695104454039; Mon, 18 Sep 2023 23:20:54 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Tue, 19 Sep 2023 01:20:42 -0500 Message-ID: Subject: [PATCH][SMB3 client] add dynamic trace points for smbdirect (RDMA) connect To: CIFS Cc: Tom Talpey , samba-technical , Paulo Alcantara Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org 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 Acked-by: Tom Talpey From fb2697a561f72b28023697968face1ec25da8575 Mon Sep 17 00:00:00 2001 From: Steve French 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 --- 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