All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Wise <swise@opengridcomputing.com>
To: Roland Dreier <rdreier@cisco.com>
Cc: randy.dunlap@oracle.com, linux-next@vger.kernel.org,
	linux-kernel@vger.kernel.org, general@lists.openfabrics.org
Subject: Re: [ofa-general] [PATCH 2.6.30] RDMA/cxgb3: Remove modulo math.
Date: Wed, 11 Feb 2009 12:44:45 -0600	[thread overview]
Message-ID: <49931C9D.2090604@opengridcomputing.com> (raw)
In-Reply-To: <adak57w95ym.fsf@cisco.com>

Roland Dreier wrote:
>  > > Is it possible for the page to be bigger than 4GB?  If so then yes you
>  > > might be chopping off high-order bits or something.
>
>  > Yes it is possible.
>  > 
>  > A MR can be created with an iov_base of say 0xffffffff00000000.
>  > 
>  > Then any sge.addr entries would be the iob_base + any offset.
>
> But the code we're talking about is:
>
> 		/* to in the WQE == the offset into the page */
> 		wqe->recv.sgl[i].to = cpu_to_be64(((u32) wr->sg_list[i].addr) %
> 				(1UL << (12 + page_size[i])));
>
> so it seems the top address bits don't matter unless page_size[i] is at
> least 20 -- in which case using 1UL to shift overflows on 32 bits anyway...
>
>   

Yes yes...you're right.   This code is really just saving the offset in 
a page.

I'll send a new patch.

      reply	other threads:[~2009-02-11 18:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10 18:44 [ofa-general] [PATCH 2.6.30] RDMA/cxgb3: Remove modulo math Steve Wise
2009-02-10 18:44 ` Steve Wise
2009-02-10 19:04 ` [ofa-general] " Randy Dunlap
2009-02-10 19:04   ` Randy Dunlap
2009-02-10 19:10   ` [ofa-general] " Steve Wise
2009-02-10 19:10     ` Steve Wise
2009-02-10 19:12     ` Randy Dunlap
2009-02-11  0:38 ` [ofa-general] " Roland Dreier
2009-02-11  1:03   ` Steve Wise
2009-02-11  1:07     ` David Miller
2009-02-11  1:18       ` Roland Dreier
2009-02-11  1:18         ` Roland Dreier
2009-02-11  1:23         ` David Miller
2009-02-11  1:23           ` David Miller
2009-02-11  7:20           ` Roland Dreier
2009-02-11  7:20             ` Roland Dreier
2009-02-11  8:00             ` David Miller
2009-02-11  1:03   ` Steve Wise
2009-02-11 15:44   ` Steve Wise
2009-02-11 18:12     ` Roland Dreier
2009-02-11 18:32       ` Steve Wise
2009-02-11 18:36         ` Roland Dreier
2009-02-11 18:44           ` Steve Wise [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=49931C9D.2090604@opengridcomputing.com \
    --to=swise@opengridcomputing.com \
    --cc=general@lists.openfabrics.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=rdreier@cisco.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 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.