From: Leon Romanovsky <leon@kernel.org>
To: Wei Hu <weh@microsoft.com>
Cc: netdev@vger.kernel.org, linux-hyperv@vger.kernel.org,
linux-rdma@vger.kernel.org, longli@microsoft.com,
sharmaajay@microsoft.com, jgg@ziepe.ca, kys@microsoft.com,
haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com,
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 v2 1/1] RDMA/mana_ib: Add EQ interrupt support to mana ib driver.
Date: Sun, 11 Jun 2023 21:18:57 +0300 [thread overview]
Message-ID: <20230611181857.GK12152@unreal> (raw)
In-Reply-To: <20230606151747.1649305-1-weh@microsoft.com>
On Tue, Jun 06, 2023 at 03:17:47PM +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@microsoft.com>
> Signed-off-by: Ajay Sharma <sharmaajay@microsoft.com>
> Signed-off-by: Wei Hu <weh@microsoft.com>
> ---
>
> v2: Use ibdev_dbg to print error messages and return -ENOMEN
> when kzalloc fails.
<...>
> + if (atomic_read(&ibcq->usecnt) == 0) {
What exactly are you checking here? And in all places where you access ibcq->usecnt?
> + mana_ib_gd_destroy_dma_region(mdev, cq->gdma_region);
> + ibdev_dbg(ibdev, "freeing gdma cq %p\n", gc->cq_table[cq->id]);
> + kfree(gc->cq_table[cq->id]);
> + gc->cq_table[cq->id] = NULL;
> + ib_umem_release(cq->umem);
> + }
>
> return 0;
> }
> +
> +void mana_ib_cq_handler(void *ctx, struct gdma_queue *gdma_cq)
> +{
> + struct mana_ib_cq *cq = ctx;
> + struct ib_device *ibdev = cq->ibcq.device;
> +
> + ibdev_dbg(ibdev, "Enter %s %d\n", __func__, __LINE__);
This patch has two many debug prints, most if not all should go.
Thanks
next prev parent reply other threads:[~2023-06-11 18:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 15:17 [PATCH v2 1/1] RDMA/mana_ib: Add EQ interrupt support to mana ib driver Wei Hu
2023-06-07 21:03 ` Long Li
2023-06-08 11:17 ` Wei Hu
2023-06-08 17:47 ` Long Li
2023-06-09 1:15 ` Wei Hu
2023-06-08 4:39 ` Jakub Kicinski
2023-06-12 4:44 ` Wei Hu
2023-06-12 6:13 ` Leon Romanovsky
2023-06-12 17:22 ` Jakub Kicinski
2023-06-12 18:16 ` Jason Gunthorpe
2023-06-13 7:29 ` Leon Romanovsky
2023-06-12 17:21 ` Jakub Kicinski
2023-06-11 18:18 ` Leon Romanovsky [this message]
2023-06-12 14:44 ` Wei Hu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230611181857.GK12152@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=edumazet@google.com \
--cc=haiyangz@microsoft.com \
--cc=jgg@ziepe.ca \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sharmaajay@microsoft.com \
--cc=shradhagupta@linux.microsoft.com \
--cc=ssengar@linux.microsoft.com \
--cc=vkuznets@redhat.com \
--cc=weh@microsoft.com \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).