diff options
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/auth.h | 2 | ||||
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 13 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc.h | 11 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 18 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprtsock.h | 3 | 
5 files changed, 39 insertions, 8 deletions
| diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 3e6ce288a7fc..61e58327b1aa 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h @@ -120,6 +120,7 @@ struct rpc_authops {  						struct rpcsec_gss_info *);  	int			(*key_timeout)(struct rpc_auth *,  						struct rpc_cred *); +	int			(*ping)(struct rpc_clnt *clnt);  };  struct rpc_credops { @@ -144,6 +145,7 @@ struct rpc_credops {  extern const struct rpc_authops	authunix_ops;  extern const struct rpc_authops	authnull_ops; +extern const struct rpc_authops	authtls_ops;  int __init		rpc_init_authunix(void);  int __init		rpcauth_init_module(void); diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 770ef2cb5775..4f41d839face 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h @@ -30,7 +30,13 @@  #include <linux/sunrpc/xprtmultipath.h>  struct rpc_inode; -struct rpc_sysfs_client; +struct rpc_sysfs_client { +	struct kobject kobject; +	struct net *net; +	struct rpc_clnt *clnt; +	struct rpc_xprt_switch *xprt_switch; +}; +  /*   * The high-level client handle @@ -57,7 +63,9 @@ struct rpc_clnt {  				cl_discrtry : 1,/* disconnect before retry */  				cl_noretranstimeo: 1,/* No retransmit timeouts */  				cl_autobind : 1,/* use getport() */ -				cl_chatty   : 1;/* be verbose */ +				cl_chatty   : 1,/* be verbose */ +				cl_shutdown : 1;/* rpc immediate -EIO */ +	struct xprtsec_parms	cl_xprtsec;	/* transport security policy */  	struct rpc_rtt *	cl_rtt;		/* RTO estimator data */  	const struct rpc_timeout *cl_timeout;	/* Timeout strategy */ @@ -139,6 +147,7 @@ struct rpc_create_args {  	struct svc_xprt		*bc_xprt;	/* NFSv4.1 backchannel */  	const struct cred	*cred;  	unsigned int		max_connect; +	struct xprtsec_parms	xprtsec;  };  struct rpc_add_xprt_test { diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index b4903b87362a..f8751118c122 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -161,16 +161,15 @@ static inline bool svc_put_not_last(struct svc_serv *serv)  extern u32 svc_max_payload(const struct svc_rqst *rqstp);  /* - * RPC Requsts and replies are stored in one or more pages. + * RPC Requests and replies are stored in one or more pages.   * We maintain an array of pages for each server thread.   * Requests are copied into these pages as they arrive.  Remaining   * pages are available to write the reply into.   * - * Pages are sent using ->sendpage so each server thread needs to - * allocate more to replace those used in sending.  To help keep track - * of these pages we have a receive list where all pages initialy live, - * and a send list where pages are moved to when there are to be part - * of a reply. + * Pages are sent using ->sendmsg with MSG_SPLICE_PAGES so each server thread + * needs to allocate more to replace those used in sending.  To help keep track + * of these pages we have a receive list where all pages initialy live, and a + * send list where pages are moved to when there are to be part of a reply.   *   * We use xdr_buf for holding responses as it fits well with NFS   * read responses (that have a header, and some data pages, and possibly diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index b9f59aabee53..b52411bcfe4e 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -129,6 +129,21 @@ struct rpc_rqst {  #define rq_svec			rq_snd_buf.head  #define rq_slen			rq_snd_buf.len +/* RPC transport layer security policies */ +enum xprtsec_policies { +	RPC_XPRTSEC_NONE = 0, +	RPC_XPRTSEC_TLS_ANON, +	RPC_XPRTSEC_TLS_X509, +}; + +struct xprtsec_parms { +	enum xprtsec_policies	policy; + +	/* authentication material */ +	key_serial_t		cert_serial; +	key_serial_t		privkey_serial; +}; +  struct rpc_xprt_ops {  	void		(*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize);  	int		(*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); @@ -185,6 +200,7 @@ enum xprt_transports {  	XPRT_TRANSPORT_RDMA	= 256,  	XPRT_TRANSPORT_BC_RDMA	= XPRT_TRANSPORT_RDMA | XPRT_TRANSPORT_BC,  	XPRT_TRANSPORT_LOCAL	= 257, +	XPRT_TRANSPORT_TCP_TLS	= 258,  };  struct rpc_sysfs_xprt; @@ -229,6 +245,7 @@ struct rpc_xprt {  	 */  	unsigned long		bind_timeout,  				reestablish_timeout; +	struct xprtsec_parms	xprtsec;  	unsigned int		connect_cookie;	/* A cookie that gets bumped  						   every time the transport  						   is reconnected */ @@ -333,6 +350,7 @@ struct xprt_create {  	struct svc_xprt		*bc_xprt;	/* NFSv4.1 backchannel */  	struct rpc_xprt_switch	*bc_xps;  	unsigned int		flags; +	struct xprtsec_parms	xprtsec;  };  struct xprt_class { diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h index 38284f25eddf..700a1e6c047c 100644 --- a/include/linux/sunrpc/xprtsock.h +++ b/include/linux/sunrpc/xprtsock.h @@ -57,9 +57,11 @@ struct sock_xprt {  	struct work_struct	error_worker;  	struct work_struct	recv_worker;  	struct mutex		recv_mutex; +	struct completion	handshake_done;  	struct sockaddr_storage	srcaddr;  	unsigned short		srcport;  	int			xprt_err; +	struct rpc_clnt		*clnt;  	/*  	 * UDP socket buffer size parameters @@ -90,5 +92,6 @@ struct sock_xprt {  #define XPRT_SOCK_WAKE_DISCONNECT	(7)  #define XPRT_SOCK_CONNECT_SENT	(8)  #define XPRT_SOCK_NOSPACE	(9) +#define XPRT_SOCK_IGNORE_RECV	(10)  #endif /* _LINUX_SUNRPC_XPRTSOCK_H */ |