Received: by 10.223.164.202 with SMTP id h10csp282397wrb; Fri, 17 Nov 2017 00:05:53 -0800 (PST) X-Google-Smtp-Source: AGs4zMbG7H4s33W4j2Uk1imnDQixWGnVnr6RVB0+6dDNeBlQIXt9WLZRz8wZ4uoe5154FNHJM2VJ X-Received: by 10.84.212.136 with SMTP id e8mr4403682pli.205.1510905953840; Fri, 17 Nov 2017 00:05:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510905953; cv=none; d=google.com; s=arc-20160816; b=qfDdShkF1WqdohveeYiaFBw5MkqjkCTQ2a8mdizs5JShws8XayjESBrBa7QLJ+dr/x 5Tkeatzim4lmpYB2BoqZJ+iH+ms19OidSB5nET1AoFr3EeHaFALWWP9vox9vl4t1Bt2V +P4kVP3KBx/MbCR2dzT2P6FGvVzFDn5E5GeeGrDYm5klTOblkWw3Op+BWqqq+d8yPXxY VNdSXvtowLrDSQsCc0EkVH5I2CfyYwt0hOv2iVmnjJwtQHdNzkPeJ99t7lA2AVHAzMys EQU12uiOwmuaM6AGPYigaajEvyRnxUhf4Sajpf24KePozUSjXah/9HcHNnvXB/DENfq4 e2yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:msip_labels :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=kuK6jk/UCYmplYAgTCPdK/DnHNvi2eh5CXo2whw4yVU=; b=Hle9gjJcvWaAZFVSvg6+qbiV21QPP9FjRJd4I5IdZvFK6KVagAa2+fzcD6vJ+rqa+l 4/AHokJTwSX84HFtREY9hp0A1m+eK+2Lyppc67lp7Gx6hshR3RFfMSTHmXT5febWUam8 h6GBJobfnqFv+NgvoLYa4LALRE5qtEJ3MxchM+4B8nOjU8/whXjje6/Prg+Qduygst0s iz93TEN/RWt9+zR8yWCC0OtWiCSwlejkp0WjMlb+sVpQDDkuwcF3d9pIbDRP6RiCzGMc iHBWxGFrzobIRZeZVrzdSgt1TlP1yYENy9IOaHoKQfZ2Kz2ZemZVZ2vswPM0Y0RUoSi4 e8Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ErSOO08f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j73si882014pfj.127.2017.11.17.00.05.40; Fri, 17 Nov 2017 00:05:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ErSOO08f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936404AbdKPXSj (ORCPT + 92 others); Thu, 16 Nov 2017 18:18:39 -0500 Received: from mail-by2nam03on0095.outbound.protection.outlook.com ([104.47.42.95]:63808 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1759531AbdKPXS3 (ORCPT ); Thu, 16 Nov 2017 18:18:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kuK6jk/UCYmplYAgTCPdK/DnHNvi2eh5CXo2whw4yVU=; b=ErSOO08fBYLTHnEveOgTN6ZyNW1ZuzHDvdEy1ahSLpf6blnE4tDErk1nVO7Mi1yVzPEbxzp4O8MtJjDSeCxUe84gkHLXEegpwe8PSC2yVQ1Su0htWpRk3xaEhPznQvqTcR8N6WjBsqi919Y5vwuFJ3G2on0eS05FuACgyTDdcaU= Received: from CY4PR21MB0135.namprd21.prod.outlook.com (10.173.189.17) by CY4PR21MB0823.namprd21.prod.outlook.com (10.173.192.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.2; Thu, 16 Nov 2017 23:18:27 +0000 Received: from CY4PR21MB0135.namprd21.prod.outlook.com ([10.173.189.17]) by CY4PR21MB0135.namprd21.prod.outlook.com ([10.173.189.17]) with mapi id 15.20.0260.001; Thu, 16 Nov 2017 23:18:20 +0000 From: Pavel Shilovskiy To: Long Li , Steve French , "linux-cifs@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , Christoph Hellwig , Tom Talpey , Matthew Wilcox , Stephen Hemminger CC: Long Li Subject: RE: [Patch v7 03/22] CIFS: SMBD: Add rdma mount option Thread-Topic: [Patch v7 03/22] CIFS: SMBD: Add rdma mount option Thread-Index: AQHTV6d/YqeG/4AtCk2yunaNyWGGk6MXsuWQ Date: Thu, 16 Nov 2017 23:18:20 +0000 Message-ID: References: <20171107085514.12693-1-longli@exchange.microsoft.com> <20171107085514.12693-4-longli@exchange.microsoft.com> In-Reply-To: <20171107085514.12693-4-longli@exchange.microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=pshilov@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2017-11-16T23:18:19.3888167Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General x-originating-ip: [2001:4898:80e8:e::7a9] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR21MB0823;6:MmKS2klSCmQ1HT0wazcI5PycZSuGgeI14tflbJTD4Zw6UOAu1P5hoc3L1rWsdGEadRKTpyqiaYtIJ9oNI3k0e7lunUp4OrTaHRlJxfpsHqeNuFJpM5xHlVx710At4DD41ptWr49+BagvouLu/OQPTyjwl5KisRQbZzr4N5OSlKrGD1b1fZQZbLW7O0SiGXS8QctNPGBuZjsOTprHM0qSIm6cQz34X6H5ZvYdoqiJRtcxz7LCu2GGG7u1VbIIwdQEWrW1xBfZI+4Sa5A/puUvt7zBQGVfTvBw5emKdXWG535wods+www3bv8wqt8KidQa7eMHYXLKK7qjoNc9649lSddZ+N2U3V4nRtT6HgutzcM=;5:dP8F4dh+jED8TnQouy3btqnr60QsOqakbAylhpmNJZJLRczvBB2N4y5F10b38d9kGKRbhKyvOu1yaJFtM7KxRuwtKdbzUrDeL2AXHDr2azSDQDW3UBegs28oP/kvl2oUd1CiX/hxTKklQqD4CShdJ5kfrUH4F6BDkb/cDToF0Bw=;24:X3306XW7jjZYF9dp3dNIUGarMyretsDHeRfXMCxrA7zCqpYMzlqCSJbUE4oiiDtCGAsNzLJj5BnoK3HZeUh6LfSzgaYu+SjUl3O/NSWnUwo=;7:syC+pEFR+P+gZlDHp2AYkoO/oq9VI5puyC7VFKUn6z0rEunszNvpxm2VyJKj8UN4hyOGGk6//80nrCEr7PumIrUU6GKqEFl7kwFP6ZGklfrqbZM9W5ljDH2r0PMc+P5bbMS5QZb0H8I20yAyYPkOF+LJYuJU0T8IYqPlhEl4dyGYi09AayX4qR/qBrTE4CmBTNUf/Cd1dMllYDk1EWnmWKceBLvcPPELqEPatckY26nOcngqU1+Tk/g3AFgtk4Vw x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(376002)(346002)(47760400005)(189002)(199003)(3660700001)(53936002)(6246003)(3280700002)(2906002)(102836003)(229853002)(6116002)(966005)(50986999)(101416001)(54356999)(6306002)(25786009)(8936002)(9686003)(77096006)(107886003)(76176999)(14454004)(6636002)(7696004)(5660300001)(478600001)(10290500003)(2501003)(74316002)(2900100001)(2950100002)(4326008)(55016002)(8990500004)(8676002)(189998001)(110136005)(305945005)(10090500001)(99286004)(81156014)(81166006)(97736004)(22452003)(316002)(33656002)(2201001)(2561002)(105586002)(7736002)(1511001)(86612001)(2421001)(106356001)(6436002)(68736007)(6506006)(86362001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0823;H:CY4PR21MB0135.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-correlation-id: 10385e8b-2554-48f5-2311-08d52d4853d4 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603258);SRVR:CY4PR21MB0823; x-ms-traffictypediagnostic: CY4PR21MB0823: authentication-results: spf=none (sender IP is ) smtp.mailfrom=pshilov@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(89211679590171)(9452136761055)(140211028294663)(21532816269658); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231022)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123555025)(20161123560025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR21MB0823;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR21MB0823; x-forefront-prvs: 0493852DA9 received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10385e8b-2554-48f5-2311-08d52d4853d4 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Nov 2017 23:18:20.8381 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0823 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-11-07 0:54 GMT-08:00 Long Li : > From: Long Li > > Add "rdma" to CIFS mount options to connect to SMB Direct. > Add checks to validate this is used on SMB 3.X dialects. > > To connect to SMBDirect, use "mount.cifs -o rdma,vers=3D3.x". > At the time of this patch, 3.x can be 3.0, 3.02 or 3.1.1. > > Signed-off-by: Long Li > --- > fs/cifs/cifs_debug.c | 2 ++ > fs/cifs/cifsfs.c | 2 ++ > fs/cifs/cifsglob.h | 5 +++++ > fs/cifs/connect.c | 15 ++++++++++++++- > 4 files changed, 23 insertions(+), 1 deletion(-) > > diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c > index 9727e1d..ba0870d 100644 > --- a/fs/cifs/cifs_debug.c > +++ b/fs/cifs/cifs_debug.c > @@ -171,6 +171,8 @@ static int cifs_debug_data_proc_show(struct seq_file = *m, void *v) > ses->ses_count, ses->serverOS, ses->serve= rNOS, > ses->capabilities, ses->status); > } > + if (server->rdma) > + seq_printf(m, "RDMA\n\t"); > seq_printf(m, "TCP status: %d\n\tLocal Users To " > "Server: %d SecMode: 0x%x Req On Wire:= %d", > server->tcpStatus, server->srv_count, > diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c > index 180b335..e15fbf1 100644 > --- a/fs/cifs/cifsfs.c > +++ b/fs/cifs/cifsfs.c > @@ -327,6 +327,8 @@ cifs_show_address(struct seq_file *s, struct TCP_Serv= er_Info *server) > default: > seq_puts(s, "(unknown)"); > } > + if (server->rdma) > + seq_puts(s, ",rdma"); > } > > static void > diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h > index 808486c..5585516 100644 > --- a/fs/cifs/cifsglob.h > +++ b/fs/cifs/cifsglob.h > @@ -530,6 +530,7 @@ struct smb_vol { > bool nopersistent:1; > bool resilient:1; /* noresilient not required since not fored for= CA */ > bool domainauto:1; > + bool rdma:1; > unsigned int rsize; > unsigned int wsize; > bool sockopt_tcp_nodelay:1; > @@ -646,6 +647,10 @@ struct TCP_Server_Info { > bool sec_kerberos; /* supports plain Kerberos */ > bool sec_mskerberos; /* supports legacy MS Kerberos */ > bool large_buf; /* is current buffer large? */ > + /* use SMBD connection instead of socket */ > + bool rdma; > + /* point to the SMBD connection if RDMA is used instead of socket= */ > + struct smbd_connection *smbd_conn; > struct delayed_work echo; /* echo ping workqueue job */ > char *smallbuf; /* pointer to current "small" buffer */ > char *bigbuf; /* pointer to current "big" buffer */ > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c > index 59647eb..b5a575f 100644 > --- a/fs/cifs/connect.c > +++ b/fs/cifs/connect.c > @@ -92,7 +92,7 @@ enum { > Opt_multiuser, Opt_sloppy, Opt_nosharesock, > Opt_persistent, Opt_nopersistent, > Opt_resilient, Opt_noresilient, > - Opt_domainauto, > + Opt_domainauto, Opt_rdma, > > /* Mount options which take numeric value */ > Opt_backupuid, Opt_backupgid, Opt_uid, > @@ -183,6 +183,7 @@ static const match_table_t cifs_mount_option_tokens = =3D { > { Opt_resilient, "resilienthandles"}, > { Opt_noresilient, "noresilienthandles"}, > { Opt_domainauto, "domainauto"}, > + { Opt_rdma, "rdma"}, > > { Opt_backupuid, "backupuid=3D%s" }, > { Opt_backupgid, "backupgid=3D%s" }, > @@ -1538,6 +1539,9 @@ cifs_parse_mount_options(const char *mountdata, con= st char *devname, > case Opt_domainauto: > vol->domainauto =3D true; > break; > + case Opt_rdma: > + vol->rdma =3D true; > + break; > > /* Numeric Values */ > case Opt_backupuid: > @@ -1928,6 +1932,11 @@ cifs_parse_mount_options(const char *mountdata, co= nst char *devname, > goto cifs_parse_mount_err; > } > > + if (vol->rdma && vol->vals->protocol_id < SMB30_PROT_ID) { > + cifs_dbg(VFS, "SMB Direct requires Version >=3D3.0\n"); > + goto cifs_parse_mount_err; > + } > + > #ifndef CONFIG_KEYS > /* Muliuser mounts require CONFIG_KEYS support */ > if (vol->multiuser) { > @@ -2131,6 +2140,9 @@ static int match_server(struct TCP_Server_Info *ser= ver, struct smb_vol *vol) > if (server->echo_interval !=3D vol->echo_interval * HZ) > return 0; > > + if (server->rdma !=3D vol->rdma) > + return 0; > + > return 1; > } > > @@ -2229,6 +2241,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) > tcp_ses->noblocksnd =3D volume_info->noblocksnd; > tcp_ses->noautotune =3D volume_info->noautotune; > tcp_ses->tcp_nodelay =3D volume_info->sockopt_tcp_nodelay; > + tcp_ses->rdma =3D volume_info->rdma; > tcp_ses->in_flight =3D 0; > tcp_ses->credits =3D 1; > init_waitqueue_head(&tcp_ses->response_q); > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-cifs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Pavel Shilovsky -- Best regards, Pavel Shilovsky From 1583407117999202640@xxx Tue Nov 07 11:38:20 +0000 2017 X-GM-THRID: 1583407117999202640 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread