Thread (4 messages) 4 messages, 3 authors, 2023-06-06

RE: [PATCH 1/1] RDMA/mana_ib: Add EQ interrupt support to mana ib driver.

From: Wei Hu <hidden>
Date: 2023-06-06 13:22:25
Also in: linux-hyperv, linux-rdma

-----Original Message-----
From: Jason Gunthorpe <jgg@ziepe.ca>
Sent: Monday, June 5, 2023 9:35 PM
To: Simon Horman <redacted>
Cc: Wei Hu <redacted>; netdev@vger.kernel.org; linux-
hyperv@vger.kernel.org; linux-rdma@vger.kernel.org; Long Li
[off-list ref]; Ajay Sharma [off-list ref];
leon@kernel.org; KY Srinivasan [off-list ref]; Haiyang Zhang
[off-list ref]; wei.liu@kernel.org; Dexuan Cui
[off-list ref]; davem@davemloft.net; edumazet@google.com;
kuba@kernel.org; pabeni@redhat.com; vkuznets@redhat.com;
ssengar@linux.microsoft.com; shradhagupta@linux.microsoft.com
Subject: Re: [PATCH 1/1] RDMA/mana_ib: Add EQ interrupt support to mana
ib driver.

On Mon, Jun 05, 2023 at 03:15:05PM +0200, Simon Horman wrote:
quoted
On Mon, Jun 05, 2023 at 11:43:13AM +0000, Wei Hu wrote:
quoted
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 <redacted>
Signed-off-by: Ajay Sharma <redacted>
Signed-off-by: Wei Hu <redacted>
...
quoted
@@ -368,6 +420,24 @@ static int mana_ib_create_qp_raw(struct ib_qp
*ibqp, struct ib_pd *ibpd,
quoted
quoted
 	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.
And no prints like that in drivers.
Thanks for your review, Simon and Jason. You are right. 
I have overlooked these. I will fix it and send a v2 shortly.

Wei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help