[ofa-general] [PATCH 2/3] RDMA/cxgb3: fix page shift calculation in build_phys_page_list()

Steve Wise swise at opengridcomputing.com
Sat Jan 26 08:19:43 PST 2008


Roland Dreier wrote:
>  > Incidentally, I've been tracking down exactly the bug that Steve fixed, 
>  > but in mthca_reg_phys_mr() rather than in the cxgb3 
>  > build_phys_page_list().  I'll submit a patch for mthca, unless someone 
>  > else applies Steve's fix there soon.
> 
> Strange... is this causing problems in practice?  I do agree that the
> mthca code, when passed a list like
> 
>> 0: addr 0x10001000, size 0x1000
>> 1: addr 0x10002000, size 0x1000
> 
> will end up with a page list
> 
>> 0: 0x10000000
>> 1: 0x10002000
> 
> and a page size of 0x2000, but it seems to me that should work fine --
> the memory region will end up starting at an offset of 0x1000 and
> having size 0x2000, which gives the region precisely as intended (just
> not in the most obvious way).
> 
> But I'm probably missing something, and obviously theory is no good at
> all if there's a bug in practice...
>

As long as the first byte offset for the MR is 0x1000 and the MR length 
doesn't allow accesses >= 0x10003000.






More information about the general mailing list