Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Tom Tucker <tom@opengridcomputing.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 02/05] svcrdma: Refactor RDMA_WRITE dma mapping logic
Date: Sun, 25 May 2008 15:05:36 -0400	[thread overview]
Message-ID: <20080525190536.GF8094@fieldses.org> (raw)
In-Reply-To: <20080521004608.GL8177@fieldses.org>

I'm also still curious about this:

On Tue, May 20, 2008 at 08:46:08PM -0400, bfields wrote:
> On Sun, May 18, 2008 at 07:13:18PM -0500, Tom Tucker wrote:
> > @@ -181,14 +170,20 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp,
> >  
> >  	/* Copy the remaining SGE */
> >  	while (bc != 0 && xdr_sge_no < sge_count) {
> > -		sge[sge_no].addr = xdr_sge[xdr_sge_no].addr + sge_off;
> >  		sge[sge_no].lkey = xdr_sge[xdr_sge_no].lkey;
> >  		sge_bytes = min((size_t)bc,
> >  				(size_t)(xdr_sge[xdr_sge_no].length-sge_off));
> >  		sge[sge_no].length = sge_bytes;
> > -
> > +		sge[sge_no].addr =
> > +			ib_dma_map_single(xprt->sc_cm_id->device,
> > +					  (void *)
> > +					  xdr_sge[xdr_sge_no].addr + sge_off,
> > +					  sge_bytes, DMA_TO_DEVICE);
> > +		if (dma_mapping_error(sge[sge_no].addr))
> > +			return -EINVAL;
> 
> And then here we're casting the u64 back to a void *.  Also, we're
> adding sge_off to the input, instead of to the result.  Is it true that
> that
> 
> 	ib_dma_map_single(., x + sge_off, ., .)
> 
> and
> 
> 	ib_dma_map_single(., x, ., .) + sge_off
> 
> always have the same result?
> 
> --b.

      parent reply	other threads:[~2008-05-25 19:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <12111560011694-git-send-email-tom@opengridcomputing.com>
     [not found] ` <12111560022506-git-send-email-tom@opengridcomputing.com>
2008-05-19 18:20   ` [PATCH 01/05] svcrdma: Verify read-list fits within RPCSVC_MAXPAGES J. Bruce Fields
2008-05-20  1:07     ` Tom Tucker
     [not found]     ` <1211245672.31725.111.camel-SMNkleLxa3ZimH42XvhXlA@public.gmane.org>
2008-05-20 13:27       ` Talpey, Thomas
     [not found]         ` <RTPCLUEXC1-PRDh133t00000127-rtwIt2gI0FxT+ZUat5FNkAK/GNPrWCqfQQ4Iyu8u01E@public.gmane.org>
2008-05-20 13:56           ` J. Bruce Fields
2008-05-20 14:14             ` Talpey, Thomas
     [not found]   ` <1211156002624-git-send-email-tom@opengridcomputing.com>
     [not found]     ` <12111560022695-git-send-email-tom@opengridcomputing.com>
     [not found]       ` <12111560022073-git-send-email-tom@opengridcomputing.com>
     [not found]         ` <12111560023250-git-send-email-tom@opengridcomputing.com>
2008-05-19 19:18           ` [PATCH 05/05] svcrdma: Add dma map count and WARN_ON J. Bruce Fields
2008-05-19 19:27             ` Tom Tucker
2008-05-21  0:46     ` [PATCH 02/05] svcrdma: Refactor RDMA_WRITE dma mapping logic J. Bruce Fields
2008-05-21  2:52       ` J. Bruce Fields
2008-05-21 10:33         ` Tom Tucker
2008-05-25 19:05       ` J. Bruce Fields [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080525190536.GF8094@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tom@opengridcomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox