@@ -91,6 +91,11 @@ static unsigned int xprt_max_resvport_limit = RPC_MAX_RESVPORT;
9191
9292static struct ctl_table_header * sunrpc_table_header ;
9393
94+ static struct xprt_class xs_local_transport ;
95+ static struct xprt_class xs_udp_transport ;
96+ static struct xprt_class xs_tcp_transport ;
97+ static struct xprt_class xs_bc_tcp_transport ;
98+
9499/*
95100 * FIXME: changing the UDP slot table size should also resize the UDP
96101 * socket buffers for existing UDP transports
@@ -2779,6 +2784,7 @@ static struct rpc_xprt *xs_setup_local(struct xprt_create *args)
27792784 transport = container_of (xprt , struct sock_xprt , xprt );
27802785
27812786 xprt -> prot = 0 ;
2787+ xprt -> xprt_class = & xs_local_transport ;
27822788 xprt -> max_payload = RPC_MAX_FRAGMENT_SIZE ;
27832789
27842790 xprt -> bind_timeout = XS_BIND_TO ;
@@ -2848,6 +2854,7 @@ static struct rpc_xprt *xs_setup_udp(struct xprt_create *args)
28482854 transport = container_of (xprt , struct sock_xprt , xprt );
28492855
28502856 xprt -> prot = IPPROTO_UDP ;
2857+ xprt -> xprt_class = & xs_udp_transport ;
28512858 /* XXX: header size can vary due to auth type, IPv6, etc. */
28522859 xprt -> max_payload = (1U << 16 ) - (MAX_HEADER << 3 );
28532860
@@ -2928,6 +2935,7 @@ static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args)
29282935 transport = container_of (xprt , struct sock_xprt , xprt );
29292936
29302937 xprt -> prot = IPPROTO_TCP ;
2938+ xprt -> xprt_class = & xs_tcp_transport ;
29312939 xprt -> max_payload = RPC_MAX_FRAGMENT_SIZE ;
29322940
29332941 xprt -> bind_timeout = XS_BIND_TO ;
@@ -3001,6 +3009,7 @@ static struct rpc_xprt *xs_setup_bc_tcp(struct xprt_create *args)
30013009 transport = container_of (xprt , struct sock_xprt , xprt );
30023010
30033011 xprt -> prot = IPPROTO_TCP ;
3012+ xprt -> xprt_class = & xs_bc_tcp_transport ;
30043013 xprt -> max_payload = RPC_MAX_FRAGMENT_SIZE ;
30053014 xprt -> timeout = & xs_tcp_default_timeout ;
30063015
0 commit comments