[Fwd: Re: [ofa-general] librdmacm use problem -- multi qps per cq or a qp per cq?]

Roland Dreier rdreier at cisco.com
Fri Nov 2 10:56:04 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);
 > 	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:
 > 	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);
 > 	...

Right, that won't work.  If you want to use librdmacm, then you have
to use the librdmacm-provided verbs context for everything.  So rather
than using ibv_open_device(), just use cm_id->verbs for everything.

 - R.



More information about the general mailing list