susan wrote:
the problem that i am running into is that the ib_send_cm_req
api fails with errorno 22. i'm using local id to make the
connection on port 1. ib_send_cm_req() api calls function
cm_init_av_by_path(), which calls ib_find_cached_gid().
function ib_find_cached_gid() fails because it can't locate
cached gid in device's cache table. below is full control
flow from both primary & secondary node.
You may want to look at using the rdma_cm interface in place of the lower-level
ib_cm interface.
priamry node secondary node
-------------- -----------------
ib_register_client()
using active port = 1
ib_create_cm_id()
ib_cm_listen()
listening .... (waiting)
ib_register_client()
using active port = 1
ib_create_cm_id()
ib_alloc_pd()
ib_create_cq()
ib_req_notify_cq()
ib_get_dma_mr()
ib_create_qp()
ib_query_gid()
source.lid = 0x1
dest.lid = 0x2
ib_sa_path_rec_get()
sa_path_rec handler returned success
ib_send_cm_req()
ib_send_cm_req() failed with error -22
-22 (EINVAL) indicates that one of the parameters is invalid. The initial
checks done by the ib_cm are:
/* peer-to-peer not supported */
if (param->peer_to_peer)
return -EINVAL;
if (!param->primary_path)
return -EINVAL;
if (param->qp_type != IB_QPT_RC && param->qp_type != IB_QPT_UC)
return -EINVAL;
if (param->private_data &&
param->private_data_len > IB_CM_REQ_PRIVATE_DATA_SIZE)
return -EINVAL;
if (param->alternate_path &&
(param->alternate_path->pkey != param->primary_path->pkey ||
param->alternate_path->mtu != param->primary_path->mtu))
return -EINVAL;
Can you verify that the input parameter would pass these tests? There are some
more tests further down in the code that could also return this same error if
these all pass. Posting the actual code that calls ib_send_cm_req() may also
help debug the problem.
- Sean
_______________________________________________
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general