On 7/23/2015 9:51 PM, Jason Gunthorpe wrote:
On Thu, Jul 23, 2015 at 07:47:14PM +0300, Sagi Grimberg wrote:
So we force ULPs to think about what they are doing properly, and we
get a chance to actually force lkey to be local use only for IB.
The lkey/rkey decision is passed in the fastreg post_send().
That is too late to check the access flags.
Why? the access permissions are kept in the mr context?
Sure, one could do if (key == mr->lkey) .. check lkey flags in the
post, but that seems silly considering we want the post inlined..
Why should we check the lkey/rkey access flags in the post?
I can move it to the post interface if it makes more sense.
the access is kind of out of place in the mapping routine anyway...
All the dma routines have an access equivalent during map, I don't
think it is out of place..
To my mind, the map is the point where the MR should crystallize into
an rkey or lkey MR, not at the post.
I'm not sure I understand why the lkey/rkey should be set at the map
routine. To me, it seems more natural to map_mr_sg and then either
register the lkey or the rkey.
It's easy enough to move the key arg to ib_map_mr_sg, but I don't see a
good reason why at the moment.
--
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