Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752747AbdH3SYu (ORCPT ); Wed, 30 Aug 2017 14:24:50 -0400 Received: from mail-by2nam03on0104.outbound.protection.outlook.com ([104.47.42.104]:45458 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751409AbdH3SYs (ORCPT ); Wed, 30 Aug 2017 14:24:48 -0400 From: Long Li To: Pavel Shilovsky CC: Steve French , linux-cifs , samba-technical , Kernel Mailing List , "linux-rdma@vger.kernel.org" , Christoph Hellwig , "Tom Talpey" , Matthew Wilcox Subject: RE: [Patch v3 02/19] CIFS: SMBD: Add SMBDirect protocol and transport constants Thread-Topic: [Patch v3 02/19] CIFS: SMBD: Add SMBDirect protocol and transport constants Thread-Index: AQHTIP1QFsiLue4xdECU8T7UMl1K9aKb7uiAgAADaFCAAUSwgIAAAGuw Date: Wed, 30 Aug 2017 18:24:45 +0000 Message-ID: References: <20170829192915.26251-1-longli@exchange.microsoft.com> <20170829192915.26251-3-longli@exchange.microsoft.com> In-Reply-To: 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_Ref=https://api.informationprotection.azure.com/api/72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=longli@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2017-08-30T11:24:43.8603291-07:00; 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:c::735] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR21MB0782;6:cHgt0Z6fdFtSk6VM9WYJ2NAwcBM3PszpZ68Mtt7PIi+dQ8F3hWz0EudKdzpuCL2zyoU/PTFIH4v113jz7kQ1k0IYfYgrXjoY4yUlJ3qQ/Mp9FaR6SZ5AhpmWi/7ks6Dm7p4q7YG953qndKzL15DQEsyCpITRURppk5mMiqmiCkRKkgNIzOdYxSGu9lX9E045SLokSWlfrLcPmaAYIncGqhTHOrfWG8QzbQ4gEcGn0ZDP6DUIRTJIQrudSVpabe/v/iY5IXyCoxKbkMIAAUz+bA/v1nJusnUMETw4Ii6dNsnl2WQtF6++bYXHTZhD3O12J8OGYsSE0GCG15BqTUrNFw==;5:VGcuf1cE45OTyX0pO7ig2EG1yTHJrFWCKJnUvvbAwxQtvinRlhqWxIcuaKHZlaIQKic8aZJlA48q52pblQm91KN4QKM7YzZ3/3V2/vCbkS36vxu3odR8n3DFUaNWIyNooE/T1zRP/0JSiuwMWGLT0g==;24:r6spigcs++dcwZFg52VJhMe1UEg6mBpwcADLPai9YbHLwpAO9H2uYPbMdq/t4PbuaJeXqhcKOEwaUoYJ8g01pXIdlzMhE64iufzxW9Uotd8=;7:Z96TMoIkPIwn1rHMig/qsEONpkBxQLfOYtsTsZdIwrWbws368osKAJ8bgzmwdNGioBP04XGmu0AxaOgYnFsS4yg3xRjyAMlsFmOPPonbNEiVvOFK5oOy8Ue1pb4kbqj4mm5AOmbGHtTDfnbG0+ByZxT/tCArDTBVZ75Dg1GqO2q350ieaouGG8n7M1daH0qCZdbPDnWO7U/5Yok7trYloxlAuwRpY0NFHZVApoRtAUo= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: cb790376-c76b-4a1d-7b8d-08d4efd463fc x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:MWHPR21MB0782; x-ms-traffictypediagnostic: MWHPR21MB0782: authentication-results: spf=none (sender IP is ) smtp.mailfrom=longli@microsoft.com; x-exchange-antispam-report-test: UriScan:(89211679590171)(9452136761055)(140211028294663)(17755550239193); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(61426038)(61427038)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(20161123560025)(20161123555025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR21MB0782;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR21MB0782; x-forefront-prvs: 041517DFAB x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(47760400005)(377454003)(199003)(13464003)(377424004)(189002)(105586002)(106356001)(81166006)(189998001)(6246003)(54906002)(9686003)(2950100002)(3280700002)(6916009)(8990500004)(99286003)(5005710100001)(7696004)(53546010)(7736002)(53936002)(10090500001)(39060400002)(6116002)(102836003)(74316002)(305945005)(86362001)(86612001)(25786009)(8936002)(107886003)(81156014)(110136004)(8676002)(2906002)(5660300001)(101416001)(50986999)(10290500003)(68736007)(14454004)(1411001)(6506006)(478600001)(6436002)(54356999)(93886005)(2900100001)(33656002)(3660700001)(76176999)(4326008)(97736004)(229853002)(77096006)(55016002)(2004002);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR21MB0782;H:MWHPR21MB0190.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2017 18:24:45.4897 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR21MB0782 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v7UIOu1f028200 Content-Length: 5021 Lines: 127 > -----Original Message----- > From: Pavel Shilovsky [mailto:piastryyy@gmail.com] > Sent: Wednesday, August 30, 2017 11:19 AM > To: Long Li > Cc: Steve French ; linux-cifs cifs@vger.kernel.org>; samba-technical ; > Kernel Mailing List ; linux- > rdma@vger.kernel.org; Christoph Hellwig ; Tom Talpey > ; Matthew Wilcox > Subject: Re: [Patch v3 02/19] CIFS: SMBD: Add SMBDirect protocol and > transport constants > > 2017-08-29 16:00 GMT-07:00 Long Li : > >> -----Original Message----- > >> From: Pavel Shilovsky [mailto:piastryyy@gmail.com] > >> Sent: Tuesday, August 29, 2017 3:45 PM > >> To: Long Li > >> Cc: Steve French ; linux-cifs >> cifs@vger.kernel.org>; samba-technical > >> ; > >> Kernel Mailing List ; linux- > >> rdma@vger.kernel.org; Christoph Hellwig ; Tom > >> Talpey ; Matthew Wilcox > >> ; Long Li > >> Subject: Re: [Patch v3 02/19] CIFS: SMBD: Add SMBDirect protocol and > >> transport constants > >> > >> 2017-08-29 12:28 GMT-07:00 Long Li : > >> > From: Long Li > >> > > >> > To prepare for protocol implementation, add constants and > >> > user-configurable values in the SMBDirect protocol. > >> > > >> > Signed-off-by: Long Li > >> > --- > >> > fs/cifs/smbdirect.c | 78 > >> > +++++++++++++++++++++++++++++++++++++++++++++++++++++ > >> > fs/cifs/smbdirect.h | 20 ++++++++++++++ > >> > 2 files changed, 98 insertions(+) > >> > create mode 100644 fs/cifs/smbdirect.c create mode 100644 > >> > fs/cifs/smbdirect.h > >> > > >> > diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c new file > >> > mode > >> > 100644 index 0000000..d785bc1 > >> > --- /dev/null > >> > +++ b/fs/cifs/smbdirect.c > >> > @@ -0,0 +1,78 @@ > >> > +/* > >> > + * Copyright (C) 2017, Microsoft Corporation. > >> > + * > >> > + * Author(s): Long Li > >> > + * > >> > + * This program is free software; you can redistribute it and/or modify > >> > + * it under the terms of the GNU General Public License as published > by > >> > + * the Free Software Foundation; either version 2 of the License, or > >> > + * (at your option) any later version. > >> > + * > >> > + * This program is distributed in the hope that it will be useful, > >> > + * but WITHOUT ANY WARRANTY; without even the implied warranty > of > >> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See > >> > + * the GNU General Public License for more details. > >> > + */ > >> > +#include > >> > +#include "smbdirect.h" > >> > +#include "cifs_debug.h" > >> > + > >> > +/* SMBD version number */ > >> > +#define SMBD_V1 0x0100 > >> > + > >> > +/* Port numbers for SMBD transport */ > >> > +#define SMB_PORT 445 > >> > +#define SMBD_PORT 5445 > >> > + > >> > +/* Address lookup and resolve timeout in ms */ > >> > +#define RDMA_RESOLVE_TIMEOUT 5000 > >> > + > >> > +/* SMBD negotiation timeout in seconds */ #define > >> > +SMBD_NEGOTIATE_TIMEOUT 120 > >> > + > >> > +/* SMBD minimum receive size and fragmented sized defined in [MS- > >> SMBD] */ > >> > +#define SMBD_MIN_RECEIVE_SIZE 128 > >> > +#define SMBD_MIN_FRAGMENTED_SIZE 131072 > >> > + > >> > +/* > >> > + * Default maximum number of RDMA read/write outstanding on this > >> > +connection > >> > + * This value is possibly decreased during QP creation on hardware > >> > +limit */ > >> > +#define SMBD_CM_RESPONDER_RESOURCES 32 > >> > + > >> > +/* Maximum number of retries on data transfer operations */ > >> > +#define SMBD_CM_RETRY 6 > >> > +/* No need to retry on Receiver Not Ready since SMBD manages > >> > +credits > >> */ > >> > +#define SMBD_CM_RNR_RETRY 0 > >> > + > >> > +/* > >> > + * User configurable initial values per SMBD transport connection > >> > + * as defined in [MS-SMBD] 3.1.1.1 > >> > + * Those may change after a SMBD negotiation */ > >> > >> Since these value are per transport connection, why they are global? > >> Shouldn't they be inside a some structure that is created for a > >> particular connection? Also the constants below should be defines. > > > > Those are configurable initial values (default values) for all connections. > > > > Each connection has its own values based on those initial values. But > connection-based values can change after negotiation is done, or after > RDMA hardware capabilities are probed. > > If these are configurable values, let's add a way to actually configure them. > Through /proc? You mean putting them in /proc/fs/cifs? Or how about module_param? > > -- > Best regards, > Pavel Shilovsky