mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Long Li <longli@microsoft.com>
To: Matthew Wilcox <mawilcox@microsoft.com>,
	Pavel Shilovsky <piastryyy@gmail.com>
Cc: linux-cifs <linux-cifs@vger.kernel.org>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Steve French <sfrench@samba.org>
Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to SMB Direct session
Date: Mon, 6 Nov 2017 18:59:56 +0000	[thread overview]
Message-ID: <MWHPR21MB0846AFBFCA9D6CDC97060C5DCE500@MWHPR21MB0846.namprd21.prod.outlook.com> (raw)
In-Reply-To: <DM5PR21MB08439FAD284B66941BD4E1A3CB500@DM5PR21MB0843.namprd21.prod.outlook.com>

> -----Original Message-----
> From: Matthew Wilcox
> Sent: Monday, November 6, 2017 10:10 AM
> To: Long Li <longli@microsoft.com>; Pavel Shilovsky <piastryyy@gmail.com>
> Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger
> <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; Kernel Mailing
> List <linux-kernel@vger.kernel.org>; Steve French <sfrench@samba.org>
> Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to SMB
> Direct session
> 
> Oh, I hadn't noticed that.  Then I amend my suggestion to be:
> 
> #ifdef CONFIG_CIFS_SMB_DIRECT
> #define cifs_rdma_enabled(server)	((server)->rdma)
> #else
> #define cifs_rdma_enabled(server)	0
> static inline void cifs_reconnect(struct TCP_Server_Info *server) { } #endif

I will address those and update patch.

> 
> > -----Original Message-----
> > From: Long Li
> > Sent: Sunday, November 5, 2017 2:20 PM
> > To: Long Li <longli@microsoft.com>; Matthew Wilcox
> > <mawilcox@microsoft.com>; Pavel Shilovsky <piastryyy@gmail.com>
> > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger
> > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; Kernel Mailing
> > List <linux-kernel@vger.kernel.org>; Steve French <sfrench@samba.org>
> > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to
> > SMB Direct session
> >
> >
> >
> > > -----Original Message-----
> > > From: samba-technical
> > > [mailto:samba-technical-bounces@lists.samba.org]
> > > On Behalf Of Long Li via samba-technical
> > > Sent: Sunday, November 5, 2017 10:37 AM
> > > To: Matthew Wilcox <mawilcox@microsoft.com>; Pavel Shilovsky
> > > <piastryyy@gmail.com>
> > > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger
> > > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org;
> > > samba-technical <samba-technical@lists.samba.org>; Kernel Mailing
> > > List <linux- kernel@vger.kernel.org>; Steve French
> > > <sfrench@samba.org>
> > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to
> > > SMB Direct session
> > >
> > > > -----Original Message-----
> > > > From: Matthew Wilcox
> > > > Sent: Wednesday, November 1, 2017 12:45 PM
> > > > To: Pavel Shilovsky <piastryyy@gmail.com>; Long Li
> > > > <longli@microsoft.com>
> > > > Cc: Steve French <sfrench@samba.org>; linux-cifs <linux-
> > > > cifs@vger.kernel.org>; samba-technical
> > > > <samba-technical@lists.samba.org>;
> > > > Kernel Mailing List <linux-kernel@vger.kernel.org>; linux-
> > > > rdma@vger.kernel.org; Tom Talpey <ttalpey@microsoft.com>;
> Stephen
> > > > Hemminger <sthemmin@microsoft.com>; Long Li
> <longli@microsoft.com>
> > > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects
> > > > to SMB Direct session
> > > >
> > > > From: Pavel Shilovsky [mailto:piastryyy@gmail.com]
> > > > > 2017-10-18 16:09 GMT-07:00 Long Li
> <longli@exchange.microsoft.com>:
> > > > > > From: Long Li <longli@microsoft.com>
> > > > > >
> > > > > > Do a reconnect on SMB Direct when it is used as the connection.
> > > > > > Reconnect
> > > > > can
> > > > > > happen for many reasons and it's mostly the decision of SMB2
> > > > > > upper
> > > > layer.
> > > > > >
> > > > > > Signed-off-by: Long Li <longli@microsoft.com>
> > > > > > ---
> > > > > >  fs/cifs/connect.c | 7 +++++++
> > > > > >  1 file changed, 7 insertions(+)
> > > > > >
> > > > > > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index
> > > > > > 2c0b34a..8ca3c13 100644
> > > > > > --- a/fs/cifs/connect.c
> > > > > > +++ b/fs/cifs/connect.c
> > > > > > @@ -406,7 +406,14 @@ cifs_reconnect(struct TCP_Server_Info
> > > > > > *server)
> > > > > >
> > > > > >                 /* we should try only the port we connected to before */
> > > > > >                 mutex_lock(&server->srv_mutex);
> > > > > > +#ifdef CONFIG_CIFS_SMB_DIRECT
> > > > > > +               if (server->rdma)
> > > > > > +                       rc = smbd_reconnect(server);
> > > > > > +               else
> > > > > > +                       rc = generic_ip_connect(server);
> > > > >
> > > > > Minor: here and in other similar places we can remove #else part
> > > > > below and put #endif before else block above.
> > > > >
> > > > > > +#else
> > > > > >                 rc = generic_ip_connect(server);
> > > > > > +#endif
> > > >
> > > > I'd suggest rather:
> > > >
> > > > #ifdef CONFIG_CIFS_SMB_DIRECT
> > > > #define cifs_rdma_enabled(server)	((server)->rdma)
> > > > #else
> > > > #define cifs_rdma_enabled(server)	0
> > > > #endif
> > > >
> > > > Then we don't need an ifdef in the users, just:
> > > >
> > > > 	if (cifs_rdma_enabled(server))
> > > > 		rc = smbd_reconnect(server);
> > > > 	else
> > > > 		rc = generic_ip_connect(server);
> >
> > It doesn't work well, because smbd_reconnect is defined when
> > CONFIG_CIFS_SMB_DIRECT is set. Now the compiler is complaining it
> > can't find this function. Maybe compiler is not smart enough :)
> >
> > I have sent v6 for all the other comments.

  reply	other threads:[~2017-11-06 19:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18 23:08 [Patch v5 00/21] CIFS: Implement SMB Direct protocol Long Li
2017-10-18 23:09 ` [Patch v5 01/21] CIFS: SMBD: Add SMB Direct protocol initial values and constants Long Li
2017-10-18 23:09 ` [Patch v5 02/21] CIFS: SMBD: Establish SMB Direct connection Long Li
2017-11-01 17:19   ` Pavel Shilovsky
2017-11-01 18:48     ` Long Li
2017-10-18 23:09 ` [Patch v5 03/21] CIFS: SMBD: export protocol initial values Long Li
2017-10-18 23:09 ` [Patch v5 04/21] CIFS: SMBD: Add rdma mount option Long Li
2017-10-18 23:09 ` [Patch v5 05/21] CIFS: SMBD: Implement function to create a SMB Direct connection Long Li
2017-10-18 23:09 ` [Patch v5 06/21] CIFS: SMBD: Upper layer connects to SMBDirect session Long Li
2017-10-18 23:09 ` [Patch v5 07/21] CIFS: SMBD: Implement function to reconnect to a SMB Direct transport Long Li
2017-10-18 23:09 ` [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to SMB Direct session Long Li
2017-11-01 18:04   ` Pavel Shilovsky
2017-11-01 19:44     ` Matthew Wilcox
2017-11-05 18:37       ` Long Li
2017-11-05 19:19         ` Long Li
2017-11-06 18:10           ` Matthew Wilcox
2017-11-06 18:59             ` Long Li [this message]
2017-11-06 20:25               ` Tom Talpey
2017-11-06 20:46                 ` Long Li
2017-10-18 23:09 ` [Patch v5 09/21] CIFS: SMBD: Implement function to destroy a SMB Direct connection Long Li
2017-10-18 23:09 ` [Patch v5 10/21] CIFS: SMBD: Upper layer destroys SMB Direct session on shutdown or umount Long Li
2017-10-18 23:09 ` [Patch v5 11/21] CIFS: SMBD: Set SMB Direct maximum read or write size for I/O Long Li
2017-10-18 23:09 ` [Patch v5 12/21] CIFS: SMBD: Implement function to receive data via RDMA receive Long Li
2017-10-18 23:09 ` [Patch v5 13/21] CIFS: SMBD: Upper layer receives " Long Li
2017-10-18 23:09 ` [Patch v5 14/21] CIFS: SMBD: Implement function to send data via RDMA send Long Li
2017-10-18 23:09 ` [Patch v5 15/21] CIFS: SMBD: Upper layer sends " Long Li
2017-10-18 23:09 ` [Patch v5 16/21] CIFS: SMBD: Implement RDMA memory registration Long Li
2017-10-18 23:09 ` [Patch v5 17/21] CIFS: SMBD: Upper layer performs SMB write via RDMA read through " Long Li
2017-10-18 23:09 ` [Patch v5 18/21] CIFS: SMBD: Add parameter rdata to smb2_new_read_req Long Li
2017-10-18 23:09 ` [Patch v5 19/21] CIFS: SMBD: Read correct returned data length for RDMA write (SMB read) I/O Long Li
2017-11-01 16:50   ` Pavel Shilovsky
2017-11-01 18:48     ` Long Li
2017-10-18 23:09 ` [Patch v5 20/21] CIFS: SMBD: Upper layer performs SMB read via RDMA write through memory registration Long Li
2017-10-18 23:09 ` [Patch v5 21/21] CIFS: SMBD: Add SMB Direct debug counters Long Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MWHPR21MB0846AFBFCA9D6CDC97060C5DCE500@MWHPR21MB0846.namprd21.prod.outlook.com \
    --to=longli@microsoft.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mawilcox@microsoft.com \
    --cc=piastryyy@gmail.com \
    --cc=sfrench@samba.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®