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: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2023-06-05 13:35:24
Also in: linux-hyperv, linux-rdma

On Mon, Jun 05, 2023 at 03:15:05PM +0200, Simon Horman wrote:
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,
 	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.

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