public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Wilfred Mallawa <wilfred.mallawa@wdc.com>,
	"kbusch@kernel.org" <kbusch@kernel.org>, hch <hch@lst.de>,
	"sagi@grimberg.me" <sagi@grimberg.me>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"kch@nvidia.com" <kch@nvidia.com>
Cc: Alistair Francis <Alistair.Francis@wdc.com>,
	"cassel@kernel.org" <cassel@kernel.org>
Subject: Re: [PATCH 2/5] nvmet: cq: prepare for completion queue sharing
Date: Wed, 7 May 2025 16:38:26 +0900	[thread overview]
Message-ID: <fe2c74cf-a53c-4c91-b078-8eeac0943229@kernel.org> (raw)
In-Reply-To: <00f483cee8a1ac6b076f62c4551b015867136050.camel@wdc.com>

On 5/7/25 4:34 PM, Wilfred Mallawa wrote:
>>> diff --git a/drivers/nvme/target/pci-epf.c
>>> b/drivers/nvme/target/pci-epf.c
>>> index 7fab7f3d79b7..7dda4156d86c 100644
>>> --- a/drivers/nvme/target/pci-epf.c
>>> +++ b/drivers/nvme/target/pci-epf.c
>>> @@ -1346,6 +1346,7 @@ static u16 nvmet_pci_epf_delete_cq(struct
>>> nvmet_ctrl *tctrl, u16 cqid)
>>>  	nvmet_pci_epf_drain_queue(cq);
>>>  	nvmet_pci_epf_remove_irq_vector(ctrl, cq->vector);
>>>  	nvmet_pci_epf_mem_unmap(ctrl->nvme_epf, &cq->pci_map);
>>> +	tctrl->cqs[cqid] = NULL;
>>
>> I do not think we need for this hunk in this patch as we are not yet
>> using the
>> cqs array, and patch 4 removes this line to change it with a call to
>> nvmet_cq_put().
>>
> Hey Damien,
> 
> This is added to undo the effects of `nvmet_cq_setup()`. If we don't,
> when a CQ is deleted and created (same id) it would incorrectly fail
> the `create && ctrl->cqs[cqid]` check in nvmet_check_cqid().

Oops. Yes, absolutely. Forgot that we already are calling nvmet_cq_setup().
Need more coffee :)

Sorry for the noise.

-- 
Damien Le Moal
Western Digital Research


  reply	other threads:[~2025-05-07  8:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24  5:13 [PATCH 0/5] pci: nvmet: support completion queue sharing by multiple submission queues Wilfred Mallawa
2025-04-24  5:13 ` [PATCH 1/5] nvmet: add a helper function for cqid checking Wilfred Mallawa
2025-05-07  7:20   ` Damien Le Moal
2025-04-24  5:13 ` [PATCH 2/5] nvmet: cq: prepare for completion queue sharing Wilfred Mallawa
2025-05-07  7:25   ` Damien Le Moal
2025-05-07  7:34     ` Wilfred Mallawa
2025-05-07  7:38       ` Damien Le Moal [this message]
2025-05-07  7:47         ` Wilfred Mallawa
2025-04-24  5:13 ` [PATCH 3/5] nvmet: fabrics: add CQ init and destroy Wilfred Mallawa
2025-05-07  7:27   ` Damien Le Moal
2025-04-24  5:13 ` [PATCH 4/5] nvmet: support completion queue sharing Wilfred Mallawa
2025-05-07  7:29   ` Damien Le Moal
2025-04-24  5:13 ` [PATCH 5/5] nvmet: Simplify nvmet_req_init() interface Wilfred Mallawa
2025-05-07  7:29   ` Damien Le Moal
2025-04-24 13:16 ` [PATCH 0/5] pci: nvmet: support completion queue sharing by multiple submission queues Niklas Cassel
2025-04-25  1:22   ` Damien Le Moal
2025-04-29 12:56   ` Christoph Hellwig
2025-05-07  7:32 ` Damien Le Moal
2025-05-09  5:05 ` Christoph Hellwig
2025-05-11 23:05 ` Chaitanya Kulkarni

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=fe2c74cf-a53c-4c91-b078-8eeac0943229@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=Alistair.Francis@wdc.com \
    --cc=cassel@kernel.org \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=wilfred.mallawa@wdc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox