]> www.infradead.org Git - users/hch/misc.git/commit
nvmet: support completion queue sharing
authorWilfred Mallawa <wilfred.mallawa@wdc.com>
Thu, 24 Apr 2025 05:13:52 +0000 (15:13 +1000)
committerChristoph Hellwig <hch@lst.de>
Mon, 12 May 2025 13:56:58 +0000 (15:56 +0200)
commit7f700939b26f5bfae1533e0b4eaf50bc14ed3789
tree5131ca0586da1f9efbd082d8a6d0c47369d9ea9a
parentc1a19fd560537ab2143768d6b196808ed27bba10
nvmet: support completion queue sharing

The NVMe PCI transport specification allows for completion queues to be
shared by different submission queues.

This patch allows a submission queue to keep track of the completion queue
it is using with reference counting. As such, it can be ensured that a
completion queue is not deleted while a submission queue is actively
using it.

This patch enables completion queue sharing in the pci-epf target driver.
For fabrics drivers, completion queue sharing is not enabled as it is
not possible as per the fabrics specification. However, this patch
modifies the fabrics drivers to correctly integrate the new API that
supports completion queue sharing.

Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/core.c
drivers/nvme/target/fc.c
drivers/nvme/target/loop.c
drivers/nvme/target/nvmet.h
drivers/nvme/target/pci-epf.c
drivers/nvme/target/rdma.c
drivers/nvme/target/tcp.c