linux/net/sunrpc
Tom Tucker 38a417cc99 svc: Add xpo_accept transport function
Previously, the accept logic looked into the socket state to determine
whether to call accept or recv when data-ready was indicated on an endpoint.
Since some transports don't use sockets, this logic now uses a flag
bit (SK_LISTENER) to identify listening endpoints. A transport function
(xpo_accept) allows each transport to define its own accept processing.
A transport's initialization logic is reponsible for setting the
SK_LISTENER bit. I didn't see any way to do this in transport independent
logic since the passive side of a UDP connection doesn't listen and
always recv's.

In the svc_recv function, if the SK_LISTENER bit is set, the transport
xpo_accept function is called to handle accept processing.

Note that all functions are defined even if they don't make sense
for a given transport. For example, accept doesn't mean anything for
UDP. The function is defined anyway and bug checks if called. The
UDP transport should never set the SK_LISTENER bit.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Acked-by: Neil Brown <neilb@suse.de>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Greg Banks <gnb@sgi.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01 16:42:08 -05:00
..
auth_gss svcrpc: ensure gss DESTROY tokens free contexts from cache 2008-02-01 16:42:07 -05:00
xprtrdma SUNRPC: Clean up functions that free address_strings array 2008-01-30 02:06:08 -05:00
auth_null.c
auth_unix.c
auth.c Merge branch 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-02-01 11:45:47 +11:00
cache.c knfsd: allow cache_register to return error on failure 2008-02-01 16:42:05 -05:00
clnt.c Merge branch 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-02-01 11:45:47 +11:00
Makefile svc: Add an svc transport class 2008-02-01 16:42:07 -05:00
rpc_pipe.c SUNRPC: Remove an unneeded implicit type cast when calling rpc_depopulate() 2008-01-30 02:05:43 -05:00
rpcb_clnt.c Merge branch 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-02-01 11:45:47 +11:00
sched.c Merge branch 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-02-01 11:45:47 +11:00
socklib.c SUNRPC: temp var should match return type of xdr_skb_read_actor 2008-01-30 02:05:43 -05:00
stats.c
sunrpc_syms.c svc: Make svc_sock the tcp/udp transport 2008-02-01 16:42:07 -05:00
svc_xprt.c svc: Add an svc transport class 2008-02-01 16:42:07 -05:00
svc.c svc: Add xpo_prep_reply_hdr 2008-02-01 16:42:08 -05:00
svcauth_unix.c
svcauth.c
svcsock.c svc: Add xpo_accept transport function 2008-02-01 16:42:08 -05:00
sysctl.c
timer.c
xdr.c SUNRPC: Use unsigned string lengths in xdr_decode_string_inplace 2008-02-01 16:42:02 -05:00
xprt.c SUNRPC: Add support for per-client timeout values 2008-01-30 02:05:59 -05:00
xprtsock.c SUNRPC: Clean up functions that free address_strings array 2008-01-30 02:06:08 -05:00