[ofa-general] [PATCH RFC v3 1/2] RDMA/Core: MEM_MGT_EXTENSIONS support

Steve Wise swise at opengridcomputing.com
Fri May 23 11:58:19 PDT 2008


Roland Dreier wrote:
>  > How should I add this to the API?
>  > 
>  > Perhaps we just document the format of an rkey in the struct ib_mr.
>  > Thus the app would do this to change the key before posting the
>  > fast_reg_mr wr (coded to be explicit, not efficient):
>  > 
>  > u8 newkey;
>  > u32 newrkey;
>  > 
>  > newkey = 0xaa;
>  > newrkey = (mr->rkey & 0xffffff00) | newkey;
>  > mr->rkey = newrkey
>  > wr.wr.fast_reg.mr = mr;
>
> Don't like it -- too easy for the consumer to screw up the data
> structures.
>
> Seems simpler to just add a u8 "key" field (or maybe there's a better
> name) to the work request.
>
>   

And then the provider updates the mr->rkey field as part of WR processing?

Steve.



More information about the general mailing list