[openib-general] Using TopSpin CM in a VAPI application

Roland Dreier
Wed Apr 28 14:15:02 PDT 2004


Chanan -- thanks for the patch.  However, I don't like this approach:
I think it puts too much Mellanox HCA dependency in the core IB code.
It also creates a whole new operation for registering a VAPI kernel
handle; however, in the long run we want to move to a single cleaned
up verbs API, so I don't think it makes sense to do this.

What do you think of the attached patch (against the current svn tree
from https://openib.org/svn/gen1/trunk)?

The way to use it is to make a tTS_IB_TAVOR_QP_CREATE_PARAM_STRUCT
with is_user=0, vapi_handle set to the VAPI_qp_hndl_t, and qpn and
qp_state set correctly.  Then call ib_qp_create with the
device_specific pointer pointing at this structure.  This will give
you back a struct ib_qp * that you can pass to the CM, etc.  When you
are done with the QP, destroy it with ib_qp_destroy(); the VAPI
function on the underlying VAPI_qp_hndl_t will be called
automatically.

The code in core/useraccess_cm.c is a reasonable example, although it
is registering a userspace QP (so there are slight differences).

 - Roland

-------------- next part --------------
A non-text attachment was scrubbed...
Name: qp-register.diff
Type: text/x-patch
Size: 3020 bytes
Desc: not available
Url : https://openib.org/pipermail/openib-general/attachments/20040428/db2e1df1/qp-register.bin


More information about the openib-general mailing list