diff options
| author | Selvin Xavier <[email protected]> | 2024-08-18 21:47:27 -0700 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2024-08-27 10:15:57 -0300 |
| commit | 10a104c0debbb19a1e45193d5670510216e339ff (patch) | |
| tree | 68e1ca7a0e0813b10ffa9d1f0f88d3f5927b12a3 | |
| parent | d8ea645d6984c84a87032063a0941f15a323831f (diff) | |
RDMA/bnxt_re: Enable variable size WQEs for user space applications
Add backward compatibility code to enable variable size WQEs only if the
user lib supports it.
Link: https://patch.msgid.link/r/[email protected]
Signed-off-by: Hongguang Gao <[email protected]>
Signed-off-by: Selvin Xavier <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
| -rw-r--r-- | drivers/infiniband/hw/bnxt_re/ib_verbs.c | 5 | ||||
| -rw-r--r-- | include/uapi/rdma/bnxt_re-abi.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index 2932db129958..82444fd748f1 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -4233,6 +4233,11 @@ int bnxt_re_alloc_ucontext(struct ib_ucontext *ctx, struct ib_udata *udata) resp.comp_mask |= BNXT_RE_UCNTX_CMASK_POW2_DISABLED; uctx->cmask |= BNXT_RE_UCNTX_CAP_POW2_DISABLED; } + if (ureq.comp_mask & BNXT_RE_COMP_MASK_REQ_UCNTX_VAR_WQE_SUPPORT) { + resp.comp_mask |= BNXT_RE_UCNTX_CMASK_HAVE_MODE; + resp.mode = rdev->chip_ctx->modes.wqe_mode; + uctx->cmask |= BNXT_RE_UCNTX_CAP_VAR_WQE_ENABLED; + } } rc = ib_copy_to_udata(udata, &resp, min(udata->outlen, sizeof(resp))); diff --git a/include/uapi/rdma/bnxt_re-abi.h b/include/uapi/rdma/bnxt_re-abi.h index 71140618700a..6821002931c8 100644 --- a/include/uapi/rdma/bnxt_re-abi.h +++ b/include/uapi/rdma/bnxt_re-abi.h @@ -66,6 +66,7 @@ enum bnxt_re_wqe_mode { enum { BNXT_RE_COMP_MASK_REQ_UCNTX_POW2_SUPPORT = 0x01, + BNXT_RE_COMP_MASK_REQ_UCNTX_VAR_WQE_SUPPORT = 0x02, }; struct bnxt_re_uctx_req { |