Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f300baba authored by Alexandros Batsakis's avatar Alexandros Batsakis Committed by J. Bruce Fields
Browse files

nfsd41: sunrpc: add new xprt class for nfsv4.1 backchannel



[sunrpc: change idle timeout value for the backchannel]
Signed-off-by: default avatarAlexandros Batsakis <batsakis@netapp.com>
Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
Acked-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 908329f2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ struct rpc_create_args {
	rpc_authflavor_t	authflavor;
	unsigned long		flags;
	char			*client_name;
	struct svc_xprt		*bc_xprt;	/* NFSv4.1 backchannel */
};

/* Values for "flags" field */
+18 −0
Original line number Diff line number Diff line
@@ -124,6 +124,23 @@ struct rpc_xprt_ops {
	void		(*print_stats)(struct rpc_xprt *xprt, struct seq_file *seq);
};

/*
 * RPC transport identifiers
 *
 * To preserve compatibility with the historical use of raw IP protocol
 * id's for transport selection, UDP and TCP identifiers 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	= IPPROTO_UDP,
	XPRT_TRANSPORT_TCP	= IPPROTO_TCP,
	XPRT_TRANSPORT_BC_TCP	= IPPROTO_TCP | XPRT_TRANSPORT_BC,
	XPRT_TRANSPORT_RDMA	= 256
};

struct rpc_xprt {
	struct kref		kref;		/* Reference count */
	struct rpc_xprt_ops *	ops;		/* transport methods */
@@ -232,6 +249,7 @@ struct xprt_create {
	struct sockaddr *	srcaddr;	/* optional local address */
	struct sockaddr *	dstaddr;	/* remote peer address */
	size_t			addrlen;
	struct svc_xprt		*bc_xprt;	/* NFSv4.1 backchannel */
};

struct xprt_class {
+0 −5
Original line number Diff line number Diff line
@@ -40,11 +40,6 @@
#ifndef _LINUX_SUNRPC_XPRTRDMA_H
#define _LINUX_SUNRPC_XPRTRDMA_H

/*
 * RPC transport identifier for RDMA
 */
#define XPRT_TRANSPORT_RDMA	256

/*
 * rpcbind (v3+) RDMA netid.
 */
+0 −11
Original line number Diff line number Diff line
@@ -12,17 +12,6 @@
int		init_socket_xprt(void);
void		cleanup_socket_xprt(void);

/*
 * RPC transport identifiers for UDP, TCP
 *
 * To preserve compatibility with the historical use of raw IP protocol
 * 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_UDP	IPPROTO_UDP
#define XPRT_TRANSPORT_TCP	IPPROTO_TCP

/*
 * RPC slot table sizes for UDP, TCP transports
 */
+1 −0
Original line number Diff line number Diff line
@@ -288,6 +288,7 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args)
		.srcaddr = args->saddress,
		.dstaddr = args->address,
		.addrlen = args->addrsize,
		.bc_xprt = args->bc_xprt,
	};
	char servername[48];

Loading