All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Gal Pressman <galpress@amazon.com>
Cc: Doug Ledford <dledford@redhat.com>,
	linux-rdma@vger.kernel.org,
	Alexander Matushevsky <matua@amazon.com>,
	Firas JahJah <firasj@amazon.com>,
	Yossi Leybovich <sleybo@amazon.com>
Subject: Re: [PATCH for-next v2] RDMA/efa: CQ notifications
Date: Mon, 27 Sep 2021 20:04:11 -0300	[thread overview]
Message-ID: <20210927230411.GA1590967@nvidia.com> (raw)
In-Reply-To: <20210913120406.61745-1-galpress@amazon.com>

On Mon, Sep 13, 2021 at 03:04:04PM +0300, Gal Pressman wrote:

> @@ -993,15 +1002,24 @@ int efa_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata)
>  		  "Destroy cq[%d] virt[0x%p] freed: size[%lu], dma[%pad]\n",
>  		  cq->cq_idx, cq->cpu_addr, cq->size, &cq->dma_addr);
>  
> -	rdma_user_mmap_entry_remove(cq->mmap_entry);
> +	efa_cq_user_mmap_entries_remove(cq);
>  	efa_destroy_cq_idx(dev, cq->cq_idx);
> +	xa_erase(&dev->cqs_xa, cq->cq_idx);
> +	if (cq->eq)
> +		synchronize_irq(cq->eq->irq.irqn);

Why is this conditional? The whole thing should be conditional,
including putting it in the XA in the first place if that is the
intention

A comment on the xa_load would also be good to explain that it is safe
because this must be a irq and snychronize_irq() manages lifetime

JAson

  reply	other threads:[~2021-09-27 23:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 12:04 [PATCH for-next v2] RDMA/efa: CQ notifications Gal Pressman
2021-09-27 23:04 ` Jason Gunthorpe [this message]
2021-09-30  6:36   ` Gal Pressman

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=20210927230411.GA1590967@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=dledford@redhat.com \
    --cc=firasj@amazon.com \
    --cc=galpress@amazon.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=matua@amazon.com \
    --cc=sleybo@amazon.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.