On Tue, Nov 10, 2015 at 11:36:27AM -0700, Jason Gunthorpe wrote:
> >     n = ib_map_mr_sg(desc->mr, state->sg, state->sg_nents,
> > -                    dev->mr_page_size);
> > +                    dev->mr_page_size,
> > +                    /*
> > +                     * XXX: add a bool write argument to this function,
> > +                     * so that we only need to open up the required
> > +                     * permissions.
> > +                     */
> > +                    IB_MR_REMOTE | IB_MR_RDMA_READ |
> > IB_MR_RDMA_WRITE);
> 
> I would call it IB_RDMA_LKEY and IB_RDMA_RKEY. We have other places in
> the API where lkey/rkey is used and it makes a lot more sense to think
> about a MR as being either a lkey or rkey usable MR - since this is
> effectively what we are doing here with these ops.

Hmm, I really hate these suport short names, but if there is consensus I
can fix it up.

> > +enum ib_mr_flags {
> > +   /* scope: either remote or local */
> > +   IB_MR_REMOTE,
> > +   IB_MR_LOCAL,
> > +
> > +   /* direction: one or both can be ORed into the scope above */
> > +   IB_MR_RDMA_READ         = (1 << 10),
> > +   IB_MR_RDMA_WRITE        = (1 << 11)
> 
> Don't forget SEND too.

I don't think we're ever using that in the kernel, but it's an easy
addition for completeless.  Especially once we start exposing these
flags to the drivers.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to