#
a6046f71 |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Change svc_sock_received to svc_xprt_received and export it
All fields touched by svc_sock_received are now transport independent. Change it to use svc_xprt directly. This function is called fr
svc: Change svc_sock_received to svc_xprt_received and export it
All fields touched by svc_sock_received are now transport independent. Change it to use svc_xprt directly. This function is called from transport dependent code, so export it.
Update the comment to clearly state the rules for calling this function.
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>
show more ...
|
#
a50fea26 |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Make svc_send transport neutral
Move the sk_mutex field to the transport independent svc_xprt structure. Now all the fields that svc_send touches are transport neutral. Change the svc_send func
svc: Make svc_send transport neutral
Move the sk_mutex field to the transport independent svc_xprt structure. Now all the fields that svc_send touches are transport neutral. Change the svc_send function to use the transport independent svc_xprt directly instead of the transport dependent svc_sock structure.
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>
show more ...
|
#
f6150c3c |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Make the enqueue service transport neutral and export it.
The svc_sock_enqueue function is now transport independent since all of the fields it touches have been moved to the transport independ
svc: Make the enqueue service transport neutral and export it.
The svc_sock_enqueue function is now transport independent since all of the fields it touches have been moved to the transport independent svc_xprt structure. Change the function to use the svc_xprt structure directly instead of the transport specific svc_sock structure.
Transport specific data-ready handlers need to call this function, so export it.
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>
show more ...
|
#
7a90e8cc |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Move sk_reserved to svc_xprt
This functionally trivial patch moves the sk_reserved field to the transport independent svc_xprt structure.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
svc: Move sk_reserved to svc_xprt
This functionally trivial patch moves the sk_reserved field to the transport independent svc_xprt structure.
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>
show more ...
|
#
7a182083 |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Make close transport independent
Move sk_list and sk_ready to svc_xprt. This involves close because these lists are walked by svcs when closing all their transports. So I combined the moving of
svc: Make close transport independent
Move sk_list and sk_ready to svc_xprt. This involves close because these lists are walked by svcs when closing all their transports. So I combined the moving of these lists to svc_xprt with making close transport independent.
The svc_force_sock_close has been changed to svc_close_all and takes a list as an argument. This removes some svc internals knowledge from the svcs.
This code races with module removal and transport addition.
Thanks to Simon Holm Thøgersen for a compile fix.
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> Cc: Simon Holm Thøgersen <odie@cs.aau.dk>
show more ...
|
#
bb5cf160 |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Move sk_server and sk_pool to svc_xprt
This is another incremental change that moves transport independent fields from svc_sock to the svc_xprt structure. The changes should be functionally nul
svc: Move sk_server and sk_pool to svc_xprt
This is another incremental change that moves transport independent fields from svc_sock to the svc_xprt structure. The changes should be functionally null.
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>
show more ...
|
#
02fc6c36 |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Move sk_flags to the svc_xprt structure
This functionally trivial change moves the transport independent sk_flags field to the transport independent svc_xprt structure.
Signed-off-by: Tom Tuck
svc: Move sk_flags to the svc_xprt structure
This functionally trivial change moves the transport independent sk_flags field to the transport independent svc_xprt structure.
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>
show more ...
|
#
e1b3157f |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Change sk_inuse to a kref
Change the atomic_t reference count to a kref and move it to the transport indepenent svc_xprt structure. Change the reference count wrapper names to be generic.
Sign
svc: Change sk_inuse to a kref
Change the atomic_t reference count to a kref and move it to the transport indepenent svc_xprt structure. Change the reference count wrapper names to be generic.
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>
show more ...
|
#
d7c9f1ed |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Change services to use new svc_create_xprt service
Modify the various kernel RPC svcs to use the svc_create_xprt service.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil B
svc: Change services to use new svc_create_xprt service
Modify the various kernel RPC svcs to use the svc_create_xprt service.
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>
show more ...
|
#
b700cbb1 |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Add a generic transport svc_create_xprt function
The svc_create_xprt function is a transport independent version of the svc_makesock function.
Since transport instance creation contains transp
svc: Add a generic transport svc_create_xprt function
The svc_create_xprt function is a transport independent version of the svc_makesock function.
Since transport instance creation contains transport dependent and independent components, add an xpo_create transport function. The transport implementation of this function allocates the memory for the endpoint, implements the transport dependent initialization logic, and calls svc_xprt_init to initialize the transport independent field (svc_xprt) in it's data structure.
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>
show more ...
|
#
f9f3cc4f |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Move connection limit checking to its own function
Move the code that poaches connections when the connection limit is hit to a subroutine to make the accept logic path easier to follow. Since
svc: Move connection limit checking to its own function
Move the code that poaches connections when the connection limit is hit to a subroutine to make the accept logic path easier to follow. Since this is in the new connection path, it should not be a performance issue.
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>
show more ...
|
#
44a6995b |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Remove unnecessary call to svc_sock_enqueue
The svc_tcp_accept function calls svc_sock_enqueue after setting the SK_CONN bit. This doesn't actually do anything because the SK_BUSY bit is still
svc: Remove unnecessary call to svc_sock_enqueue
The svc_tcp_accept function calls svc_sock_enqueue after setting the SK_CONN bit. This doesn't actually do anything because the SK_BUSY bit is still set. The call is unnecessary anyway because the generic code in svc_recv calls svc_sock_received after calling the accept function.
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>
show more ...
|
#
38a417cc |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
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
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>
show more ...
|
#
d7979ae4 |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Move close processing to a single place
Close handling was duplicated in the UDP and TCP recvfrom methods. This code has been moved to the transport independent svc_recv function.
Signed-off-b
svc: Move close processing to a single place
Close handling was duplicated in the UDP and TCP recvfrom methods. This code has been moved to the transport independent svc_recv function.
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>
show more ...
|
#
323bee32 |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Add a transport function that checks for write space
In order to avoid blocking a service thread, the receive side checks to see if there is sufficient write space to reply to the request. Each
svc: Add a transport function that checks for write space
In order to avoid blocking a service thread, the receive side checks to see if there is sufficient write space to reply to the request. Each transport has a different mechanism for determining if there is enough write space to reply.
The code that checked for write space was coupled with code that checked for CLOSE and CONN. These checks have been broken out into separate statements to make the code easier to read.
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>
show more ...
|
#
e831fe65 |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Add xpo_prep_reply_hdr
Some transports add fields to the RPC header for replies, e.g. the TCP record length. This function is called when preparing the reply header to allow each transport to a
svc: Add xpo_prep_reply_hdr
Some transports add fields to the RPC header for replies, e.g. the TCP record length. This function is called when preparing the reply header to allow each transport to add whatever fields it requires.
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>
show more ...
|
#
755cceab |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Add per-transport delete functions
Add transport specific xpo_detach and xpo_free functions. The xpo_detach function causes the transport to stop delivering data-ready events and enqueing the t
svc: Add per-transport delete functions
Add transport specific xpo_detach and xpo_free functions. The xpo_detach function causes the transport to stop delivering data-ready events and enqueing the transport for I/O.
The xpo_free function frees all resources associated with the particular transport instance.
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>
show more ...
|
#
5148bf4e |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Add transport specific xpo_release function
The svc_sock_release function releases pages allocated to a thread. For UDP this frees the receive skb. For RDMA it will post a receive WR and bump t
svc: Add transport specific xpo_release function
The svc_sock_release function releases pages allocated to a thread. For UDP this frees the receive skb. For RDMA it will post a receive WR and bump the client credit count.
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>
show more ...
|
#
5d137990 |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Move sk_sendto and sk_recvfrom to svc_xprt_class
The sk_sendto and sk_recvfrom are function pointers that allow svc_sock to be used for both UDP and TCP. Move these function pointers to the svc
svc: Move sk_sendto and sk_recvfrom to svc_xprt_class
The sk_sendto and sk_recvfrom are function pointers that allow svc_sock to be used for both UDP and TCP. Move these function pointers to the svc_xprt_ops structure.
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>
show more ...
|
#
49023155 |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Add a max payload value to the transport
The svc_max_payload function currently looks at the socket type to determine the max payload. Add a max payload value to svc_xprt_class so it can be ret
svc: Add a max payload value to the transport
The svc_max_payload function currently looks at the socket type to determine the max payload. Add a max payload value to svc_xprt_class so it can be returned directly.
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>
show more ...
|
#
360d8738 |
| 30-Dec-2007 |
Tom Tucker <tom@opengridcomputing.com> |
svc: Make svc_sock the tcp/udp transport
Make TCP and UDP svc_sock transports, and register them with the svc transport core.
A transport type (svc_sock) has an svc_xprt as its first member, and ca
svc: Make svc_sock the tcp/udp transport
Make TCP and UDP svc_sock transports, and register them with the svc transport core.
A transport type (svc_sock) has an svc_xprt as its first member, and calls svc_xprt_init to initialize this field.
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>
show more ...
|
Revision tags: v2.6.24-rc6, v2.6.24-rc5, v2.6.24-rc4, v2.6.24-rc3, v2.6.24-rc2, v2.6.24-rc1, v2.6.23, v2.6.23-rc9, v2.6.23-rc8, v2.6.23-rc7 |
|
#
02b3d346 |
| 12-Sep-2007 |
John Heffner <jheffner@psc.edu> |
[NET] Cleanup: Use sock_owned_by_user() macro
Changes asserts in sunrpc to use sock_owned_by_user() macro instead of referencing sock_lock.owner directly.
Signed-off-by: John Heffner <jheffner@psc.
[NET] Cleanup: Use sock_owned_by_user() macro
Changes asserts in sunrpc to use sock_owned_by_user() macro instead of referencing sock_lock.owner directly.
Signed-off-by: John Heffner <jheffner@psc.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v2.6.23-rc6, v2.6.23-rc5 |
|
#
172589cc |
| 28-Aug-2007 |
Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> |
[NET]: DIV_ROUND_UP cleanup (part two)
Hopefully captured all single statement cases under net/. I'm not too sure if there is some policy about #includes that are "guaranteed" (ie., in the current t
[NET]: DIV_ROUND_UP cleanup (part two)
Hopefully captured all single statement cases under net/. I'm not too sure if there is some policy about #includes that are "guaranteed" (ie., in the current tree) to be available through some other #included header, so I just added linux/kernel.h to each changed file that didn't #include it previously.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
9db619e6 |
| 20-Sep-2007 |
Wolfgang Walter <wolfgang.walter@studentenwerk.mhn.de> |
rpc: fix garbage in printk in svc_tcp_accept()
we upgraded the kernel of a nfs-server from 2.6.17.11 to 2.6.22.6. Since then we get the message
lockd: too many open TCP sockets, consider increasing
rpc: fix garbage in printk in svc_tcp_accept()
we upgraded the kernel of a nfs-server from 2.6.17.11 to 2.6.22.6. Since then we get the message
lockd: too many open TCP sockets, consider increasing the number of nfsd threads lockd: last TCP connect from ^\\236^\É^D
These random characters in the second line are caused by a bug in svc_tcp_accept.
(Note: there are two previous __svc_print_addr(sin, buf, sizeof(buf)) calls in this function, either of which would initialize buf correctly; but both are inside "if"'s and are not necessarily executed. This is less obvious in the second case, which is inside a dprintk(), which is a macro which expands to an if statement.)
Signed-off-by: Wolfgang Walter <wolfgang.walter@studentenwerk.mhn.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
#
7a1fa065 |
| 14-Sep-2007 |
Neil Brown <neilb@suse.de> |
Correctly close old nfsd/lockd sockets.
Commit aaf68cfbf2241d24d46583423f6bff5c47e088b3 added a bias to sk_inuse, so this test for an unused socket now fails. So no sockets get closed because they
Correctly close old nfsd/lockd sockets.
Commit aaf68cfbf2241d24d46583423f6bff5c47e088b3 added a bias to sk_inuse, so this test for an unused socket now fails. So no sockets get closed because they are old (they might get closed if the client closed them).
This bug has existed since 2.6.21-rc1.
Thanks to Wolfgang Walter for finding and reporting the bug.
Cc: Wolfgang Walter <wolfgang.walter@studentenwerk.mhn.de> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|