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

Roland Dreier rdreier at cisco.com
Fri May 23 11:56:15 PDT 2008


 > 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.

 - R.



More information about the general mailing list