[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230611181857.GK12152@unreal>
Date: Sun, 11 Jun 2023 21:18:57 +0300
From: Leon Romanovsky <leon@...nel.org>
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, 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 v2 1/1] RDMA/mana_ib: Add EQ interrupt support to mana ib
driver.
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@...rosoft.com>
> Signed-off-by: Ajay Sharma <sharmaajay@...rosoft.com>
> Signed-off-by: Wei Hu <weh@...rosoft.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
Powered by blists - more mailing lists