[ofa-general] librdmacm use problem -- multi qps per cq or aqp per cq?

Sean Hefty sean.hefty at intel.com
Fri Nov 2 10:59:53 PDT 2007


>Ok, first i see a context, i cannot create a cm_id ,and i directly create a
>cm_channel, a comp_channel and a cq:
>	nic_handle = get_nic_handle();
>	ib_ctx = ibv_open_device(nic_handle);

Try using rdma_get_devices() here to get the same device list that's used by the
rdma cm.

>	ctx_pd = ibv_alloc_pd(ib_ctx);
>	cm_channel = rdma_create_event_channel();
>	comp_chan = ibv_create_comp_channel(ctx_pd);
>	cq = ibv_create_cq(pd, 2, NULL, comp_chan, 0);
>
>   then i create a id and do that for every connection in context:

This process will only work if you have a single device in the system.
Otherwise, you will want to follow the steps that Roland gave.

>	rdma_create_id(cm_channel, &cm_id, NULL, RDMA_PS_TCP);
>	rdma_resolve_addr(cm_id, NULL, addr, <timeout>);
>	rdma_resolve_route(cm_id, <timeout>);
>	pd = ibv_alloc_pd(cm_id->verbs);
>	qp_attr.send_cq		 = cq;
>	qp_attr.recv_cq		 = cq;
>	rdma_create_qp(cm_id, pd, &qp_attr);

Does using ctx_pd here work instead?

- Sean



More information about the general mailing list