lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260112075233.GB14378@unreal>
Date: Mon, 12 Jan 2026 09:52:33 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Konstantin Taranov <kotaranov@...ux.microsoft.com>
Cc: kotaranov@...rosoft.com, shirazsaleem@...rosoft.com,
	longli@...rosoft.com, jgg@...pe.ca, linux-rdma@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH rdma-next 1/1] RDMA/mana_ib: take CQ type from the device
 type

On Fri, Jan 09, 2026 at 04:37:30AM -0800, Konstantin Taranov wrote:
> From: Konstantin Taranov <kotaranov@...rosoft.com>
> 
> Get CQ type from the used gdma device. The MANA_IB_CREATE_RNIC_CQ
> flag is ignored. It was used in older kernel versions where
> the mana_ib was shared between ethernet and rnic.
> 
> Fixes: d4293f96ce0b ("RDMA/mana_ib: unify mana_ib functions to support any gdma device")
> Signed-off-by: Konstantin Taranov <kotaranov@...rosoft.com>
> ---
>  drivers/infiniband/hw/mana/cq.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/mana/cq.c b/drivers/infiniband/hw/mana/cq.c
> index 1becc8779..2dce1b677 100644
> --- a/drivers/infiniband/hw/mana/cq.c
> +++ b/drivers/infiniband/hw/mana/cq.c
> @@ -24,6 +24,7 @@ int mana_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
>  
>  	cq->comp_vector = attr->comp_vector % ibdev->num_comp_vectors;
>  	cq->cq_handle = INVALID_MANA_HANDLE;
> +	is_rnic_cq = mana_ib_is_rnic(mdev);
>  
>  	if (udata) {
>  		if (udata->inlen < offsetof(struct mana_ib_create_cq, flags))
> @@ -35,8 +36,6 @@ int mana_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
>  			return err;
>  		}
>  
> -		is_rnic_cq = !!(ucmd.flags & MANA_IB_CREATE_RNIC_CQ);

You need to add code which prohibits future use of this BIT(0) in ucmd.flags for backward compatibility
and maybe delete MANA_IB_CREATE_RNIC_CQ from UAPI too.

Thanks

> -
>  		if ((!is_rnic_cq && attr->cqe > mdev->adapter_caps.max_qp_wr) ||
>  		    attr->cqe > U32_MAX / COMP_ENTRY_SIZE) {
>  			ibdev_dbg(ibdev, "CQE %d exceeding limit\n", attr->cqe);
> @@ -55,7 +54,6 @@ int mana_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
>  							  ibucontext);
>  		doorbell = mana_ucontext->doorbell;
>  	} else {
> -		is_rnic_cq = true;
>  		buf_size = MANA_PAGE_ALIGN(roundup_pow_of_two(attr->cqe * COMP_ENTRY_SIZE));
>  		cq->cqe = buf_size / COMP_ENTRY_SIZE;
>  		err = mana_ib_create_kernel_queue(mdev, buf_size, GDMA_CQ, &cq->queue);
> -- 
> 2.43.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ