Lines Matching defs:uctx
628 bnxt_re_mmap_entry_insert(struct bnxt_re_ucontext *uctx, u64 mem_offset,
640 entry->uctx = uctx;
644 ret = rdma_user_mmap_entry_insert_exact(&uctx->ib_uctx,
652 ret = rdma_user_mmap_entry_insert(&uctx->ib_uctx,
855 struct bnxt_re_ucontext *uctx = rdma_udata_to_drv_context(
860 spin_lock_irqsave(&uctx->sh_lock, flag);
861 wrptr = (u32 *)(uctx->shpg + BNXT_RE_AVID_OFFT);
864 spin_unlock_irqrestore(&uctx->sh_lock, flag);
1268 struct bnxt_re_ucontext *uctx)
1297 entries = bnxt_re_init_depth(init_attr->cap.max_recv_wr + 1, uctx);
1328 struct bnxt_re_ucontext *uctx,
1346 if (uctx && qplqp->wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE) {
1363 entries = bnxt_re_init_depth(entries + diff + 1, uctx);
1386 struct bnxt_re_ucontext *uctx)
1398 entries = bnxt_re_init_depth(init_attr->cap.max_send_wr + 1, uctx);
1433 struct bnxt_re_ucontext *uctx,
1458 qplqp->wqe_mode = bnxt_re_is_var_size_supported(rdev, uctx);
1486 rc = bnxt_re_init_rq_attr(qp, init_attr, uctx);
1493 rc = bnxt_re_init_sq_attr(qp, init_attr, uctx, ureq);
1497 bnxt_re_adjust_gsi_sq_attr(qp, init_attr, uctx);
1499 if (uctx) /* This will update DPI and qp_handle */
1500 rc = bnxt_re_init_user_qp(rdev, pd, qp, uctx, ureq);
1602 struct bnxt_re_ucontext *uctx;
1617 uctx = rdma_udata_to_drv_context(udata, struct bnxt_re_ucontext, ib_uctx);
1629 rc = bnxt_re_init_qp_attr(qp, pd, qp_init_attr, uctx, &ureq);
1825 struct bnxt_re_ucontext *uctx;
1850 uctx = rdma_udata_to_drv_context(udata, struct bnxt_re_ucontext, ib_uctx);
1857 entries = bnxt_re_init_depth(srq_init_attr->attr.max_wr + 1, uctx);
2222 struct bnxt_re_ucontext *uctx =
2241 entries = bnxt_re_init_depth(qp_attr->cap.max_send_wr, uctx);
2254 entries = bnxt_re_init_depth(qp_attr->cap.max_recv_wr, uctx);
3083 struct bnxt_re_ucontext *uctx =
3104 entries = bnxt_re_init_depth(cqe + 1, uctx);
3125 cq->qplib_cq.dpi = &uctx->dpi;
3212 struct bnxt_re_ucontext *uctx = NULL;
3239 uctx = rdma_udata_to_drv_context(udata, struct bnxt_re_ucontext, ib_uctx);
3240 entries = bnxt_re_init_depth(cqe + 1, uctx);
3267 cq->qplib_cq.dpi = &uctx->dpi;
4290 struct bnxt_re_ucontext *uctx =
4308 uctx->rdev = rdev;
4310 uctx->shpg = (void *)__get_free_page(GFP_KERNEL);
4311 if (!uctx->shpg) {
4315 spin_lock_init(&uctx->sh_lock);
4334 entry = bnxt_re_mmap_entry_insert(uctx, 0, BNXT_RE_MMAP_SH_PAGE, NULL);
4339 uctx->shpage_mmap = &entry->rdma_entry;
4352 uctx->cmask |= BNXT_RE_UCNTX_CAP_POW2_DISABLED;
4358 uctx->cmask |= BNXT_RE_UCNTX_CAP_VAR_WQE_ENABLED;
4371 free_page((unsigned long)uctx->shpg);
4372 uctx->shpg = NULL;
4379 struct bnxt_re_ucontext *uctx = container_of(ib_uctx,
4383 struct bnxt_re_dev *rdev = uctx->rdev;
4385 rdma_user_mmap_entry_remove(uctx->shpage_mmap);
4386 uctx->shpage_mmap = NULL;
4387 if (uctx->shpg)
4388 free_page((unsigned long)uctx->shpg);
4390 if (uctx->dpi.dbr) {
4394 bnxt_qplib_dealloc_dpi(&rdev->qplib_res, &uctx->dpi);
4395 uctx->dpi.dbr = NULL;
4428 struct bnxt_re_ucontext *uctx = container_of(ib_uctx,
4436 rdma_entry = rdma_user_mmap_entry_get(&uctx->ib_uctx, vma);
4457 ret = vm_insert_page(vma, vma->vm_start, virt_to_page(uctx->shpg));
4530 struct bnxt_re_ucontext *uctx;
4532 uctx = container_of(ib_uverbs_get_ucontext(attrs), struct bnxt_re_ucontext, ib_uctx);
4533 bnxt_re_pacing_alert(uctx->rdev);
4544 struct bnxt_re_ucontext *uctx;
4552 uctx = container_of(ib_uverbs_get_ucontext(attrs), struct bnxt_re_ucontext, ib_uctx);
4553 if (IS_ERR(uctx))
4554 return PTR_ERR(uctx);
4560 rdev = uctx->rdev;
4566 if (bnxt_qplib_alloc_dpi(&rdev->qplib_res, &uctx->wcdpi,
4567 uctx, BNXT_QPLIB_DPI_TYPE_WC))
4570 dpi = uctx->wcdpi.dpi;
4571 addr = (u64)uctx->wcdpi.umdbr;
4594 entry = bnxt_re_mmap_entry_insert(uctx, addr, mmap_flag, &mmap_offset);
4623 struct bnxt_re_ucontext *uctx = entry->uctx;
4627 if (uctx && uctx->wcdpi.dbr) {
4628 struct bnxt_re_dev *rdev = uctx->rdev;
4630 bnxt_qplib_dealloc_dpi(&rdev->qplib_res, &uctx->wcdpi);
4631 uctx->wcdpi.dbr = NULL;
4686 struct bnxt_re_ucontext *uctx;
4706 uctx = container_of(ib_uctx, struct bnxt_re_ucontext, ib_uctx);
4707 rdev = uctx->rdev;
4732 entry = bnxt_re_mmap_entry_insert(uctx, addr, mmap_flag, &mem_offset);