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]
Date: Mon, 5 Jun 2023 15:15:05 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Wei Hu <weh@...rosoft.com>
Cc: netdev@...r.kernel.org, linux-hyperv@...r.kernel.org,
	linux-rdma@...r.kernel.org, longli@...rosoft.com,
	sharmaajay@...rosoft.com, jgg@...pe.ca, leon@...nel.org,
	kys@...rosoft.com, haiyangz@...rosoft.com, wei.liu@...nel.org,
	decui@...rosoft.com, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, vkuznets@...hat.com,
	ssengar@...ux.microsoft.com, shradhagupta@...ux.microsoft.com
Subject: Re: [PATCH 1/1] RDMA/mana_ib: Add EQ interrupt support to mana ib
 driver.

On Mon, Jun 05, 2023 at 11:43:13AM +0000, Wei Hu wrote:
> Add EQ interrupt support for mana ib driver. Allocate EQs per ucontext
> to receive interrupt. Attach EQ when CQ is created. Call CQ interrupt
> handler when completion interrupt happens. EQs are destroyed when
> ucontext is deallocated.
> 
> The change calls some public APIs in mana ethernet driver to
> allocate EQs and other resources. Ehe EQ process routine is also shared
> by mana ethernet and mana ib drivers.
> 
> Co-developed-by: Ajay Sharma <sharmaajay@...rosoft.com>
> Signed-off-by: Ajay Sharma <sharmaajay@...rosoft.com>
> Signed-off-by: Wei Hu <weh@...rosoft.com>

...

> @@ -368,6 +420,24 @@ static int mana_ib_create_qp_raw(struct ib_qp *ibqp, struct ib_pd *ibpd,
>  	qp->sq_id = wq_spec.queue_index;
>  	send_cq->id = cq_spec.queue_index;
>  
> +	if (gd->gdma_context->cq_table[send_cq->id] == NULL) {
> +
> +		gdma_cq = kzalloc(sizeof(*gdma_cq), GFP_KERNEL);
> +		if (!gdma_cq) {
> +			pr_err("failed to allocate gdma_cq\n");

Hi wei Hu,

I think 'err = -ENOMEM' is needed here.

> +			goto err_destroy_wqobj_and_cq;
> +		}
> +
> +		pr_debug("gdma cq allocated %p\n", gdma_cq);
> +		gdma_cq->cq.context = send_cq;
> +		gdma_cq->type = GDMA_CQ;
> +		gdma_cq->cq.callback = mana_ib_cq_handler;
> +		gdma_cq->id = send_cq->id;
> +		gd->gdma_context->cq_table[send_cq->id] = gdma_cq;
> +	} else {
> +		gdma_cq = gd->gdma_context->cq_table[send_cq->id];
> +	}
> +
>  	ibdev_dbg(&mdev->ib_dev,
>  		  "ret %d qp->tx_object 0x%llx sq id %llu cq id %llu\n", err,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ