* [RFC,PATCH] svc: Restore rq_xprt_hlen in svc_deferred_recv
@ 2007-10-12 19:21 Tom Tucker
2007-10-15 1:22 ` [RFC, PATCH] " Greg Banks
0 siblings, 1 reply; 2+ messages in thread
From: Tom Tucker @ 2007-10-12 19:21 UTC (permalink / raw)
To: nfs; +Cc: bfields, neilb, gnb
Fixed a couple bugs in the deferral processing. This won't see significant
testing until I complete the rdma driver mods because tcp/udp always
set the xprt_hlen to zero. The changes are as follows:
- Restore the length of the transport header in the rqstp structure
in case the request gets deferred again.
- Update the iov_head and arg.len with xprt_hlen.
- Add comments that describe how xprt_hlen is used.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
---
net/sunrpc/svc_xprt.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index c823e66..b56bf05 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -925,16 +925,21 @@ static int svc_deferred_recv(struct svc_
{
struct svc_deferred_req *dr = rqstp->rq_deferred;
- rqstp->rq_arg.head[0].iov_base = dr->args;
- rqstp->rq_arg.head[0].iov_len = dr->argslen<<2;
+ /* setup iov_base to point past the transport header */
+ rqstp->rq_arg.head[0].iov_base = dr->args + (dr->xprt_hlen>>2);
+ /* The iov_len doesn't include the transport header bytes */
+ rqstp->rq_arg.head[0].iov_len = (dr->argslen<<2) - dr->xprt_hlen;
rqstp->rq_arg.page_len = 0;
- rqstp->rq_arg.len = dr->argslen<<2;
+ /* The rq_arg len does not include the transport header bytes */
+ rqstp->rq_arg.len = (dr->argslen<<2) - dr->xprt_hlen;
rqstp->rq_prot = dr->prot;
memcpy(&rqstp->rq_addr, &dr->addr, dr->addrlen);
rqstp->rq_addrlen = dr->addrlen;
+ /* Save off transport header len in case we get deferred again */
+ rqstp->rq_xprt_hlen = dr->xprt_hlen;
rqstp->rq_daddr = dr->daddr;
rqstp->rq_respages = rqstp->rq_pages;
- return dr->argslen<<2;
+ return (dr->argslen<<2) - dr->xprt_hlen;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC, PATCH] svc: Restore rq_xprt_hlen in svc_deferred_recv
2007-10-12 19:21 [RFC,PATCH] svc: Restore rq_xprt_hlen in svc_deferred_recv Tom Tucker
@ 2007-10-15 1:22 ` Greg Banks
0 siblings, 0 replies; 2+ messages in thread
From: Greg Banks @ 2007-10-15 1:22 UTC (permalink / raw)
To: Tom Tucker; +Cc: bfields, neilb, nfs
On Fri, Oct 12, 2007 at 02:21:10PM -0500, Tom Tucker wrote:
>
> Fixed a couple bugs in the deferral processing. This won't see significant
> testing until I complete the rdma driver mods because tcp/udp always
> set the xprt_hlen to zero. The changes are as follows:
>
> - Restore the length of the transport header in the rqstp structure
> in case the request gets deferred again.
>
> - Update the iov_head and arg.len with xprt_hlen.
>
> - Add comments that describe how xprt_hlen is used.
>
ok.
Greg.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
Apparently, I'm Bedevere. Which MPHG character are you?
I don't speak for SGI.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-15 1:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-12 19:21 [RFC,PATCH] svc: Restore rq_xprt_hlen in svc_deferred_recv Tom Tucker
2007-10-15 1:22 ` [RFC, PATCH] " Greg Banks
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.