• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/ofed/librdmacm/

Lines Matching refs:cma_dev

93 	struct cma_device	*cma_dev;
264 static int ucma_init_device(struct cma_device *cma_dev)
270 if (cma_dev->verbs)
273 cma_dev->verbs = ucma_open_device(cma_dev->guid);
274 if (!cma_dev->verbs)
277 ret = ibv_query_device(cma_dev->verbs, &attr);
283 cma_dev->port = malloc(sizeof(*cma_dev->port) * attr.phys_port_cnt);
284 if (!cma_dev->port) {
290 if (ibv_query_port(cma_dev->verbs, i, &port_attr))
291 cma_dev->port[i - 1].link_layer = IBV_LINK_LAYER_UNSPECIFIED;
293 cma_dev->port[i - 1].link_layer = port_attr.link_layer;
296 cma_dev->port_cnt = attr.phys_port_cnt;
297 cma_dev->max_qpsize = attr.max_qp_wr;
298 cma_dev->max_initiator_depth = (uint8_t) attr.max_qp_init_rd_atom;
299 cma_dev->max_responder_resources = (uint8_t) attr.max_qp_rd_atom;
304 ibv_close_device(cma_dev->verbs);
305 cma_dev->verbs = NULL;
387 struct cma_device *cma_dev;
391 cma_dev = &cma_dev_array[i];
392 if (cma_dev->guid == guid)
399 if ((ret = ucma_init_device(cma_dev)))
402 if (!cma_dev->refcnt++) {
403 cma_dev->pd = ibv_alloc_pd(cma_dev->verbs);
404 if (!cma_dev->pd) {
405 cma_dev->refcnt--;
410 id_priv->cma_dev = cma_dev;
411 id_priv->id.verbs = cma_dev->verbs;
412 id_priv->id.pd = cma_dev->pd;
418 static void ucma_put_device(struct cma_device *cma_dev)
421 if (!--cma_dev->refcnt) {
422 ibv_dealloc_pd(cma_dev->pd);
423 if (cma_dev->xrcd)
424 ibv_close_xrcd(cma_dev->xrcd);
429 static struct ibv_xrcd *ucma_get_xrcd(struct cma_device *cma_dev)
434 if (!cma_dev->xrcd) {
439 cma_dev->xrcd = ibv_open_xrcd(cma_dev->verbs, &attr);
442 return cma_dev->xrcd;
466 if (id_priv->cma_dev)
467 ucma_put_device(id_priv->cma_dev);
641 if (!id_priv->cma_dev && resp.node_guid) {
785 if (!id_priv->cma_dev && resp.node_guid) {
1043 link_layer = id_priv->cma_dev->port[id->port_num - 1].link_layer;
1090 static int ucma_find_pkey(struct cma_device *cma_dev, uint8_t port_num,
1097 ret = ibv_query_pkey(cma_dev->verbs, port_num, i, &chk_pkey);
1111 ret = ucma_find_pkey(id_priv->cma_dev, id_priv->id.port_num,
1147 ret = ucma_find_pkey(id_priv->cma_dev, id_priv->id.port_num,
1272 attr->xrcd = ucma_get_xrcd(id_priv->cma_dev);
1349 attr->xrcd = ucma_get_xrcd(id_priv->cma_dev);
1424 (param->responder_resources > id_priv->cma_dev->max_responder_resources))
1428 (param->initiator_depth > id_priv->cma_dev->max_initiator_depth))
1482 id_priv->initiator_depth = id_priv->cma_dev->max_initiator_depth;
1486 id_priv->responder_resources = id_priv->cma_dev->max_responder_resources;
1596 id_priv->cma_dev->max_initiator_depth);
1602 id_priv->cma_dev->max_responder_resources);
2425 if (id && id_priv->cma_dev) {
2426 max_size = id_priv->cma_dev->max_qpsize;