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

Bryan S Rosenburg rosnbrg at us.ibm.com
Wed Jan 30 09:00:21 PST 2008


Roland Dreier <rdreier at cisco.com> wrote on 01/30/2008 11:47:55 AM:
> 
>  > -       /* First check that we have enough alignment */
>  > -       if ((*iova_start & ~PAGE_MASK) != (buffer_list[0].addr & 
~PAGE_MASK))
>  > -               return ERR_PTR(-EINVAL);
> 
> I don't think we want to remove this check.  It prevents someone from
> trying to register a region with a virtual address that the hardware
> can't handle.

This initial check is redundant, given:

        mask = buffer_list[0].addr ^ *iova_start;

and subsequent:

        if (mask & ~PAGE_MASK)
                return ERR_PTR(-EINVAL);

- Bryan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20080130/07edbb52/attachment.html>


More information about the general mailing list