Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752671AbdHNVCg (ORCPT ); Mon, 14 Aug 2017 17:02:36 -0400 Received: from mail-cys01nam02on0093.outbound.protection.outlook.com ([104.47.37.93]:47776 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752297AbdHNVCe (ORCPT ); Mon, 14 Aug 2017 17:02:34 -0400 From: Tom Talpey To: Long Li , Steve French , "linux-cifs@vger.kernel.org" , "samba-technical@lists.samba.org" , "linux-kernel@vger.kernel.org" Subject: RE: [[PATCH v1] 23/37] [CIFS] SMBD: Implement API for upper layer to reconnect transport Thread-Topic: [[PATCH v1] 23/37] [CIFS] SMBD: Implement API for upper layer to reconnect transport Thread-Index: AQHTC8wtKPTqRd5dGkWesZvw/VjbMaKEaRLg Date: Mon, 14 Aug 2017 21:02:31 +0000 Message-ID: References: <1501704648-20159-1-git-send-email-longli@exchange.microsoft.com> <1501704648-20159-24-git-send-email-longli@exchange.microsoft.com> In-Reply-To: <1501704648-20159-24-git-send-email-longli@exchange.microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [24.218.182.144] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR21MB0632;6:+z0BhskyXUq2Cp0tIuy0SCo4Ns3EaaGe6jNgPIeh9ty3ZWoQ+MhsBbqcaoWj8fBh4/qmoE6l/TZPIHG2Eu2fSIcEMgXGDsSaBnua495TyzpQBKQzeuM2Retx5geWLUrFYblNZis1aY2/6UN34Yy/5LVW+V3gk5OiskduAFmj0GTNVhN3LpmGxa2NUw2thGqVlaVqsOh+EDHL5RZScHaBAos85bYZBawZwOhYpHYBd437woVPmSuZ9+Am+f3xphAQV5Ovl7+aNtHUzz86YOCngT7iJZacDgRkwiH6EIlKU0YjwRc9R7US56hsBU/P/OV2hZs9klkCn1ojR1i8Hkyg5g==;5:DHAAkQ1JZYMB9zL3uHMuJ8fyjbK4KAv1SwcnBLjIprNkjCC3TrsmXJGhygiSM0a2qZWzYWEGvbAA2g1OFE0gfz9yxL9lGjIzeOYrruBejdZ74QTKjK16YNE43aPokvF882ac8Oq5Ug5Jbo0X6WnYMA==;24:23LWtFL2Ajm49/0K1lAHqbqcomGulq/wpP+iHdCN/QQj644uJaZFOFe1IKm76FQLymfY/kYb/wx7W8tIXTLAIWR+jlSZRiPjZfPqFxhY3GY=;7:qBQu8eJhAxGbOaY8L7XCx2aVys4qCqzrWee0BLqe80sv5HtCyB5NgOW2JYJsIe+WeMj7v6L51gXbUSrMu0b0Sn3mB1OA37zx1jfNCzBp7Fooe//QmvecaxigF6FPi/XanMweoguHO1lQaQHko4of1ls739OdZZ5WAlq4SU2WMTTvDdCny5s7fT356k6UqtBz2nIX89cGh0wOftAze/CtaPHEACedFIrxLcuthPx76gM= x-ms-office365-filtering-correlation-id: 19e77cb7-66b5-4f7b-3e45-08d4e357c7bb x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(2017052603142)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR21MB0632; x-ms-traffictypediagnostic: CY4PR21MB0632: x-exchange-antispam-report-test: UriScan:(89211679590171)(9452136761055); 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)(100000703101)(100105400095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041248)(20161123564025)(20161123555025)(20161123560025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR21MB0632;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR21MB0632; x-forefront-prvs: 039975700A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(979002)(6009001)(39860400002)(47760400005)(13464003)(199003)(377454003)(189002)(7736002)(6436002)(305945005)(86362001)(86612001)(101416001)(10090500001)(8676002)(8936002)(81156014)(2201001)(81166006)(5660300001)(50986999)(76176999)(54356999)(14454004)(7696004)(2900100001)(478600001)(55016002)(2950100002)(1511001)(53546010)(66066001)(2906002)(10290500003)(74316002)(189998001)(3660700001)(5005710100001)(3280700002)(3846002)(102836003)(6116002)(8990500004)(68736007)(53936002)(77096006)(9686003)(99286003)(6506006)(97736004)(25786009)(2501003)(33656002)(229853002)(106356001)(6246003)(105586002)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0632;H:CY4PR21MB0182.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; authentication-results: spf=none (sender IP is ) smtp.mailfrom=ttalpey@microsoft.com; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Aug 2017 21:02:31.6648 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0632 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 quoted-printable to 8bit by nfs id v7EL2fMZ003012 Content-Length: 1098 Lines: 29 > -----Original Message----- > From: linux-cifs-owner@vger.kernel.org [mailto:linux-cifs- > owner@vger.kernel.org] On Behalf Of Long Li > Sent: Wednesday, August 2, 2017 4:11 PM > To: Steve French ; linux-cifs@vger.kernel.org; samba- > technical@lists.samba.org; linux-kernel@vger.kernel.org > Cc: Long Li > Subject: [[PATCH v1] 23/37] [CIFS] SMBD: Implement API for upper layer to > reconnect transport > > +int cifs_reconnect_rdma_session(struct TCP_Server_Info *server) > +{ > + log_rdma_event("reconnecting rdma session\n"); > + > + // why reconnect while it is still connected? > + if (server->rdma_ses->transport_status == CIFS_RDMA_CONNECTED) { > + log_rdma_event("still connected, not reconnecting\n"); > + return -EINVAL; > + } Why is this check needed? > + > + // wait until the transport is destroyed > + while (server->rdma_ses->transport_status != CIFS_RDMA_DESTROYED) > + msleep(1); Polling!? Please plan to implement a proper handshake for connection logic.