Skip to contentSkip to conversation

svc: Restore rq_xprt_hlen in svc_deferred_recv

RFC PATCH In review Tom Tucker 2 participants 2 messages Oct 12, 2007 – Oct 15, 2007

Subsystems (3)
lore
Share & tools
lore

Tom Tucker

author
#0 lore raw

RFC PATCH 1/1 svc: Restore rq_xprt_hlen in svc_deferred_recv

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.

---

 net/sunrpc/svc_xprt.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
net/sunrpc/svc_xprt.c +9 -4
index c823e66..b56bf05 100644
@@ -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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#1 lore raw
Quoted 5 lines · Tom Tucker

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:

Quoted 7 lines

- 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.

Signature · 12 lines
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  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs