• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/ofed/drivers/infiniband/core/

Lines Matching refs:pd

260 	struct ib_pd *pd;
263 pd = device->alloc_pd(device, NULL, NULL);
264 if (IS_ERR(pd))
265 return pd;
267 pd->device = device;
268 pd->uobject = NULL;
269 pd->__internal_mr = NULL;
270 atomic_set(&pd->usecnt, 0);
271 pd->flags = flags;
274 pd->local_dma_lkey = device->local_dma_lkey;
286 mr = pd->device->get_dma_mr(pd, mr_access_flags);
288 ib_dealloc_pd(pd);
292 mr->device = pd->device;
293 mr->pd = pd;
297 pd->__internal_mr = mr;
300 pd->local_dma_lkey = pd->__internal_mr->lkey;
303 pd->unsafe_global_rkey = pd->__internal_mr->rkey;
306 return pd;
312 * @pd: The protection domain to deallocate.
314 * It is an error to call this function while any resources in the pd still
318 void ib_dealloc_pd(struct ib_pd *pd)
322 if (pd->__internal_mr) {
323 ret = pd->device->dereg_mr(pd->__internal_mr);
325 pd->__internal_mr = NULL;
330 WARN_ON(atomic_read(&pd->usecnt));
334 ret = pd->device->dealloc_pd(pd);
341 struct ib_ah *ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr)
345 ah = pd->device->create_ah(pd, ah_attr, NULL);
348 ah->device = pd->device;
349 ah->pd = pd;
351 atomic_inc(&pd->usecnt);
574 struct ib_ah *ib_create_ah_from_wc(struct ib_pd *pd, const struct ib_wc *wc,
580 ret = ib_init_ah_from_wc(pd->device, port_num, wc, grh, &ah_attr);
584 return ib_create_ah(pd, &ah_attr);
606 struct ib_pd *pd;
609 pd = ah->pd;
612 atomic_dec(&pd->usecnt);
620 struct ib_srq *ib_create_srq(struct ib_pd *pd,
625 if (!pd->device->create_srq)
628 srq = pd->device->create_srq(pd, srq_init_attr, NULL);
631 srq->device = pd->device;
632 srq->pd = pd;
643 atomic_inc(&pd->usecnt);
671 struct ib_pd *pd;
680 pd = srq->pd;
689 atomic_dec(&pd->usecnt);
776 qp->pd = NULL;
792 struct ib_qp *ib_create_qp(struct ib_pd *pd,
795 struct ib_device *device = pd ? pd->device : qp_init_attr->xrcd->device;
804 qp = device->create_qp(pd, qp_init_attr, NULL);
834 qp->pd = pd;
838 atomic_inc(&pd->usecnt);
1319 struct ib_pd *pd;
1331 pd = qp->pd;
1339 if (pd)
1340 atomic_dec(&pd->usecnt);
1407 struct ib_pd *pd = mr->pd;
1412 atomic_dec(&pd->usecnt);
1420 * @pd: protection domain associated with the region
1430 struct ib_mr *ib_alloc_mr(struct ib_pd *pd,
1436 if (!pd->device->alloc_mr)
1439 mr = pd->device->alloc_mr(pd, mr_type, max_num_sg);
1441 mr->device = pd->device;
1442 mr->pd = pd;
1444 atomic_inc(&pd->usecnt);
1454 struct ib_fmr *ib_alloc_fmr(struct ib_pd *pd,
1460 if (!pd->device->alloc_fmr)
1463 fmr = pd->device->alloc_fmr(pd, mr_access_flags, fmr_attr);
1465 fmr->device = pd->device;
1466 fmr->pd = pd;
1467 atomic_inc(&pd->usecnt);
1488 struct ib_pd *pd;
1491 pd = fmr->pd;
1494 atomic_dec(&pd->usecnt);
1618 * @pd: The protection domain associated with the WQ.
1629 struct ib_wq *ib_create_wq(struct ib_pd *pd,
1634 if (!pd->device->create_wq)
1637 wq = pd->device->create_wq(pd, wq_attr, NULL);
1643 wq->device = pd->device;
1644 wq->pd = pd;
1646 atomic_inc(&pd->usecnt);
1662 struct ib_pd *pd = wq->pd;
1669 atomic_dec(&pd->usecnt);