Merge branch 'sysfs-devel'
[sfrench/cifs-2.6.git] / net / sunrpc / xprtsock.c
index 3228b7a1836aa37f91beb4e1632716d6310edf5c..7319c19f4504c5c7edbce8e2fa5ee60430add8c0 100644 (file)
@@ -91,6 +91,11 @@ static unsigned int xprt_max_resvport_limit = RPC_MAX_RESVPORT;
 
 static struct ctl_table_header *sunrpc_table_header;
 
+static struct xprt_class xs_local_transport;
+static struct xprt_class xs_udp_transport;
+static struct xprt_class xs_tcp_transport;
+static struct xprt_class xs_bc_tcp_transport;
+
 /*
  * FIXME: changing the UDP slot table size should also resize the UDP
  *        socket buffers for existing UDP transports
@@ -2780,6 +2785,7 @@ static struct rpc_xprt *xs_setup_local(struct xprt_create *args)
        transport = container_of(xprt, struct sock_xprt, xprt);
 
        xprt->prot = 0;
+       xprt->xprt_class = &xs_local_transport;
        xprt->max_payload = RPC_MAX_FRAGMENT_SIZE;
 
        xprt->bind_timeout = XS_BIND_TO;
@@ -2849,6 +2855,7 @@ static struct rpc_xprt *xs_setup_udp(struct xprt_create *args)
        transport = container_of(xprt, struct sock_xprt, xprt);
 
        xprt->prot = IPPROTO_UDP;
+       xprt->xprt_class = &xs_udp_transport;
        /* XXX: header size can vary due to auth type, IPv6, etc. */
        xprt->max_payload = (1U << 16) - (MAX_HEADER << 3);
 
@@ -2929,6 +2936,7 @@ static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args)
        transport = container_of(xprt, struct sock_xprt, xprt);
 
        xprt->prot = IPPROTO_TCP;
+       xprt->xprt_class = &xs_tcp_transport;
        xprt->max_payload = RPC_MAX_FRAGMENT_SIZE;
 
        xprt->bind_timeout = XS_BIND_TO;
@@ -3002,6 +3010,7 @@ static struct rpc_xprt *xs_setup_bc_tcp(struct xprt_create *args)
        transport = container_of(xprt, struct sock_xprt, xprt);
 
        xprt->prot = IPPROTO_TCP;
+       xprt->xprt_class = &xs_bc_tcp_transport;
        xprt->max_payload = RPC_MAX_FRAGMENT_SIZE;
        xprt->timeout = &xs_tcp_default_timeout;