[openib-general] common userspace support

Sean Hefty mshefty at ichips.intel.com
Wed Nov 2 13:48:11 PST 2005


I'm implementing the userspace CMA and noticed that there are a couple of areas 
where userspace support overlaps.

For example, both the CMA and IB CM need to copy path records between userspace 
and the kernel.  They also copy QP attributes, which would also be needed by 
verbs at some point to support query QP.  In these cases, the data structures 
passed between userspace and the kernel are the same, as is the code to copy them.

Does anyone have a preference for how to deal with this issue on both the kernel 
and userspace sides?

My thinking is that for the kernel, the kernel structures would be defined in a 
common header, with functions exported to copy to/from them.  This results in 
additional dependencies between modules.  (E.g. rdma_ucm would require ib_uverbs 
and ib_usa modules.  ib_user_verbs.h would define the QP attribute structure and 
uverbs_?.c would export copy routines.)

For userspace, we can do something similar, which would build dependencies 
between the different libraries.

- Sean



More information about the general mailing list