Re: [PATCH for-next 2/2] RDMA/bnxt_re: Expose the MSN table capability for user library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 03, 2024 at 09:10:19PM -0700, Selvin Xavier wrote:
> Expose the MSN table capability to the user space. Rename
> the current macro as the driver/library is allocating the
> table based on the MSN capability reported by FW.
> 
> Signed-off-by: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx>
> ---
>  drivers/infiniband/hw/bnxt_re/ib_verbs.c | 3 +++
>  include/uapi/rdma/bnxt_re-abi.h          | 2 +-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> index ce9c5ba..d261b09 100644
> --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> @@ -4201,6 +4201,9 @@ int bnxt_re_alloc_ucontext(struct ib_ucontext *ctx, struct ib_udata *udata)
>  	if (rdev->pacing.dbr_pacing)
>  		resp.comp_mask |= BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED;
>  
> +	if (_is_host_msn_table(rdev->qplib_res.dattr->dev_cap_flags2))
> +		resp.comp_mask |= BNXT_RE_UCNTX_CMASK_MSN_TABLE_ENABLED;
> +
>  	if (udata->inlen >= sizeof(ureq)) {
>  		rc = ib_copy_from_udata(&ureq, udata, min(udata->inlen, sizeof(ureq)));
>  		if (rc)
> diff --git a/include/uapi/rdma/bnxt_re-abi.h b/include/uapi/rdma/bnxt_re-abi.h
> index c0c34ac..e61104f 100644
> --- a/include/uapi/rdma/bnxt_re-abi.h
> +++ b/include/uapi/rdma/bnxt_re-abi.h
> @@ -55,7 +55,7 @@ enum {
>  	BNXT_RE_UCNTX_CMASK_WC_DPI_ENABLED = 0x04ULL,
>  	BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED = 0x08ULL,
>  	BNXT_RE_UCNTX_CMASK_POW2_DISABLED = 0x10ULL,
> -	BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED = 0x40,
> +	BNXT_RE_UCNTX_CMASK_MSN_TABLE_ENABLED = 0x40,

Wah? How can you rename this bit in the uapi?

Looks really strange, userspace is even using this constant.

Please explain in detail what is going on here in the commit message. :\

Jason




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux