linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Alexandros Batsakis <alexandros-4GNroTWusrE@public.gmane.org>
Cc: Benny Halevy <bhalevy@panasas.com>,
	linux-nfs@vger.kernel.org, pnfs@linux-nfs.org
Subject: Re: [pnfs] [PATCH v3 03/12] nfsd41: sunrpc: add new xprt class for nfsv4.1 backchannel
Date: Sun, 13 Sep 2009 16:28:21 -0400	[thread overview]
Message-ID: <20090913202821.GD13109@fieldses.org> (raw)
In-Reply-To: <5e24e8930909111412r2c7bdc58u119767517154d6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Fri, Sep 11, 2009 at 02:12:35PM -0700, Alexandros Batsakis wrote:
> On Fri, Sep 11, 2009 at 1:58 PM, J. Bruce Fields <bfields-uC3wQj2KruMpug/h7KTFAQ@public.gmane.org=
g> wrote:
> > On Thu, Sep 10, 2009 at 05:33:30PM +0300, Benny Halevy wrote:
> >> diff --git a/include/linux/sunrpc/xprtrdma.h b/include/linux/sunrp=
c/xprtrdma.h
> >> index 54a379c..c2f04e1 100644
> >> --- a/include/linux/sunrpc/xprtrdma.h
> >> +++ b/include/linux/sunrpc/xprtrdma.h
> >> @@ -41,11 +41,6 @@
> >> =C2=A0#define _LINUX_SUNRPC_XPRTRDMA_H
> >>
> >> =C2=A0/*
> >> - * RPC transport identifier for RDMA
> >> - */
> >> -#define XPRT_TRANSPORT_RDMA =C2=A0256
> >> -
> >> -/*
> >> =C2=A0 * rpcbind (v3+) RDMA netid.
> >> =C2=A0 */
> >> =C2=A0#define RPCBIND_NETID_RDMA =C2=A0 "rdma"
> >> diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrp=
c/xprtsock.h
> >> index c2a46c4..d7c98d1 100644
> >> --- a/include/linux/sunrpc/xprtsock.h
> >> +++ b/include/linux/sunrpc/xprtsock.h
> >> @@ -20,8 +20,13 @@ void =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 cleanup_socket_xprt(void);
> >> =C2=A0 * values. No such restriction exists for new transports, ex=
cept that
> >> =C2=A0 * they may not collide with these values (17 and 6, respect=
ively).
> >> =C2=A0 */
> >> -#define XPRT_TRANSPORT_UDP =C2=A0 IPPROTO_UDP
> >> -#define XPRT_TRANSPORT_TCP =C2=A0 IPPROTO_TCP
> >> +#define XPRT_TRANSPORT_BC =C2=A0 =C2=A0(1 << 31)
> >> +enum xprt_transports {
> >> + =C2=A0 =C2=A0 XPRT_TRANSPORT_UDP =C2=A0 =C2=A0 =C2=A0=3D IPPROTO=
_UDP,
> >> + =C2=A0 =C2=A0 XPRT_TRANSPORT_TCP =C2=A0 =C2=A0 =C2=A0=3D IPPROTO=
_TCP,
> >> + =C2=A0 =C2=A0 XPRT_TRANSPORT_BC_TCP =C2=A0 =3D IPPROTO_TCP | XPR=
T_TRANSPORT_BC,
> >> + =C2=A0 =C2=A0 XPRT_TRANSPORT_RDMA =C2=A0 =C2=A0 =3D 256
> >> +};
> >
> > This fails to compile when CONFIG_SUNRPC_XPRT_RDMA is set.
> >
> > A minimal fix might be:
> >
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0--- a/net/sunrpc/xprtrdma/transport.c
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0+++ b/net/sunrpc/xprtrdma/transport.c
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0@@ -50,6 +50,8 @@
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 #include <linux/module.h>
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 #include <linux/init.h>
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 #include <linux/seq_file.h>
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0+#include <linux/in.h>
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0+#include <linux/sunrpc/xprtsock.h>
> >
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 #include "xprt_rdma.h"
> >
> > Or maybe just ditch the enum and leave these as they were before.
> >
>=20
> The incentive here was to have all the transports definitions togethe=
r
> so that nobody re-uses a number by mistake (not very likely of
> course), so I think the fix you suggested is appropriate.

OK.  Actually, rather than adding a socket-specific include to an
rdma-specific file, how about the below?  Applying with the following
change assuming no objections.

--b.

diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index 7cc42af..6f9457a 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -124,6 +124,23 @@ struct rpc_xprt_ops {
 	void		(*print_stats)(struct rpc_xprt *xprt, struct seq_file *seq);
 };
=20
+/*
+ * RPC transport identifiers
+ *
+ * To preserve compatibility with the historical use of raw IP protoco=
l
+ * id's for transport selection, UDP and TCP identifiers are specified
+ * with the previous values. No such restriction exists for new transp=
orts,
+ * except that they may not collide with these values (17 and 6,
+ * respectively).
+ */
+#define XPRT_TRANSPORT_BC       (1 << 31)
+enum xprt_transports {
+	XPRT_TRANSPORT_UDP	=3D IPPROTO_UDP,
+	XPRT_TRANSPORT_TCP	=3D IPPROTO_TCP,
+	XPRT_TRANSPORT_BC_TCP	=3D IPPROTO_TCP | XPRT_TRANSPORT_BC,
+	XPRT_TRANSPORT_RDMA	=3D 256
+};
+
 struct rpc_xprt {
 	struct kref		kref;		/* Reference count */
 	struct rpc_xprt_ops *	ops;		/* transport methods */
diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xpr=
tsock.h
index d7c98d1..3f14a02 100644
--- a/include/linux/sunrpc/xprtsock.h
+++ b/include/linux/sunrpc/xprtsock.h
@@ -13,22 +13,6 @@ int		init_socket_xprt(void);
 void		cleanup_socket_xprt(void);
=20
 /*
- * RPC transport identifiers for UDP, TCP
- *
- * To preserve compatibility with the historical use of raw IP protoco=
l
- * id's for transport selection, these are specified with the previous
- * values. No such restriction exists for new transports, except that
- * they may not collide with these values (17 and 6, respectively).
- */
-#define XPRT_TRANSPORT_BC	(1 << 31)
-enum xprt_transports {
-	XPRT_TRANSPORT_UDP 	=3D IPPROTO_UDP,
-	XPRT_TRANSPORT_TCP 	=3D IPPROTO_TCP,
-	XPRT_TRANSPORT_BC_TCP 	=3D IPPROTO_TCP | XPRT_TRANSPORT_BC,
-	XPRT_TRANSPORT_RDMA	=3D 256
-};
-
-/*
  * RPC slot table sizes for UDP, TCP transports
  */
 extern unsigned int xprt_udp_slot_table_entries;

  parent reply	other threads:[~2009-09-13 20:28 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04 16:18 [PATCH 0/10] nfsd41 backchannel patches for 2.6.32 Benny Halevy
2009-09-04 16:31 ` [PATCH 01/10] nfsd41: sunrpc: move struct rpc_buffer def into sunrpc.h Benny Halevy
2009-09-04 16:31 ` [PATCH 02/10] nfsd41: sunrpc: Added rpc server-side backchannel handling Benny Halevy
2009-09-04 17:00   ` Trond Myklebust
2009-09-04 16:31 ` [PATCH 03/10] nfsd4: fix whitespace in NFSPROC4_CLNT_CB_NULL definition Benny Halevy
2009-09-04 16:32 ` [PATCH 04/10] nfsd41: Backchannel: callback infrastructure Benny Halevy
2009-09-04 16:32 ` [PATCH 05/10] nfsd41: Backchannel: Add sequence arguments to callback RPC arguments Benny Halevy
2009-09-04 16:32 ` [PATCH 06/10] nfsd41: Backchannel: Server backchannel RPC wait queue Benny Halevy
2009-09-04 16:32 ` [PATCH 07/10] nfsd41: Backchannel: Setup sequence information Benny Halevy
2009-09-04 16:32 ` [PATCH 08/10] nfsd41: Backchannel: cb_sequence callback Benny Halevy
2009-09-04 16:33 ` [PATCH 09/10] nfsd41: Backchannel: Implement cb_recall over NFSv4.1 Benny Halevy
2009-09-04 16:33 ` [PATCH 10/10] nfsd41: Refactor create_client() Benny Halevy
2009-09-10  9:23 ` [PATCH v2 0/12] nfsd41 backchannel patches for 2.6.32 Benny Halevy
2009-09-10  9:25   ` [PATCH v2 01/12] nfsd41: sunrpc: move struct rpc_buffer def into sunrpc.h Benny Halevy
2009-09-10 16:11     ` J. Bruce Fields
2009-09-10  9:25   ` [PATCH v2 02/12] nfsd41: sunrpc: Added rpc server-side backchannel handling Benny Halevy
2009-09-10 11:49     ` Trond Myklebust
     [not found]       ` <1252583366.8722.121.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-09-10 12:33         ` Benny Halevy
2009-09-10 13:19           ` [pnfs] " Alexandros Batsakis
2009-09-11 22:29           ` Build error of latest Linux-pnfs 2.6.31 Sun_Peixing
     [not found]             ` <44328C067A5E0945856BF1EF5BE23689A29888-1Zg0zMUlrbepizOVUD2tfjjd7nCn89gW@public.gmane.org>
2009-09-13  9:31               ` Benny Halevy
2009-09-10 14:32         ` [PATCH v3 02/12] nfsd41: sunrpc: Added rpc server-side backchannel handling Benny Halevy
2009-09-10  9:25   ` [PATCH v2 03/12] nfsd41: sunrpc: add new xprt class for nfsv4.1 backchannel Benny Halevy
2009-09-10 14:33     ` [PATCH v3 " Benny Halevy
2009-09-11 20:58       ` J. Bruce Fields
2009-09-11 21:12         ` [pnfs] " Alexandros Batsakis
     [not found]           ` <5e24e8930909111412r2c7bdc58u119767517154d6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-13 20:28             ` J. Bruce Fields [this message]
2009-09-14  8:17               ` Benny Halevy
2009-09-10  9:25   ` [PATCH v2 04/12] nfsd4: fix whitespace in NFSPROC4_CLNT_CB_NULL definition Benny Halevy
2009-09-10  9:25   ` [PATCH v2 05/12] nfsd41: Backchannel: callback infrastructure Benny Halevy
2009-09-14 16:35     ` J. Bruce Fields
2009-09-14 16:49       ` J. Bruce Fields
2009-09-14 17:23         ` Benny Halevy
2009-09-14 20:04           ` J. Bruce Fields
2009-09-14 20:17             ` Trond Myklebust
     [not found]               ` <1252959452.6866.92.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-09-14 20:39                 ` J. Bruce Fields
2009-09-14 20:47                   ` Trond Myklebust
     [not found]                     ` <1252961253.6866.98.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-09-14 20:56                       ` J. Bruce Fields
2009-09-14 21:09                         ` Trond Myklebust
     [not found]                           ` <1252962546.6866.102.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-09-14 21:16                             ` Trond Myklebust
     [not found]                               ` <1252962982.6866.104.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-09-15 15:10                                 ` J. Bruce Fields
2009-09-15 17:32                                   ` Trond Myklebust
     [not found]                                     ` <1253035933.4456.43.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-09-16  1:06                                       ` J. Bruce Fields
2009-09-16  1:07                                         ` [PATCH 1/4] nfsd4: fix null dereference creating nfsv4 callback client J. Bruce Fields
2009-09-16  1:07                                           ` [PATCH 2/4] SUNRPC: Defer the auth_gss upcall when the RPC call is asynchronous J. Bruce Fields
2009-09-16  1:07                                             ` [PATCH 3/4] nfsd4: allow nfs4 state startup to fail J. Bruce Fields
2009-09-16  1:07                                               ` [PATCH 4/4] nfsd4: use common rpc_cred for all callbacks J. Bruce Fields
2009-09-10  9:26   ` [PATCH v2 06/12] nfsd41: Backchannel: Add sequence arguments to callback RPC arguments Benny Halevy
2009-09-10  9:26   ` [PATCH v2 07/12] nfsd41: Backchannel: Server backchannel RPC wait queue Benny Halevy
2009-09-10  9:26   ` [PATCH v2 08/12] nfsd41: Backchannel: Setup sequence information Benny Halevy
2009-09-10  9:26   ` [PATCH v2 09/12] nfsd41: Backchannel: cb_sequence callback Benny Halevy
2009-09-13 20:27     ` J. Bruce Fields
2009-09-14  7:21       ` [pnfs] " Boaz Harrosh
2009-09-10  9:27   ` [PATCH v2 10/12] nfsd41: Backchannel: Implement cb_recall over NFSv4.1 Benny Halevy
2009-09-13 20:39     ` J. Bruce Fields
2009-09-14  8:28       ` Benny Halevy
2009-09-10  9:27   ` [PATCH v2 11/12] nfsd41: modify nfsd4.1 backchannel to use new xprt class Benny Halevy
2009-09-10  9:27   ` [PATCH v2 12/12] nfsd41: Refactor create_client() Benny Halevy
2009-09-10 14:37   ` [pnfs] [PATCH v2 0/12] nfsd41 backchannel patches for 2.6.32 Benny Halevy
2009-09-10 14:45     ` Benny Halevy
2009-09-10 16:28     ` J. Bruce Fields
2009-09-10 17:10       ` Trond Myklebust
2009-09-17 19:39   ` J. Bruce Fields
2009-09-17 19:47     ` Benny Halevy

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=20090913202821.GD13109@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=alexandros-4GNroTWusrE@public.gmane.org \
    --cc=bhalevy@panasas.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=pnfs@linux-nfs.org \
    /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;
as well as URLs for NNTP newsgroup(s).