From: Joel Granados <joel.granados@kernel.org>
To: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <chaitanyak@nvidia.com>,
Jason Gunthorpe <jgg@ziepe.ca>
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
Joel Granados <joel.granados@kernel.org>
Subject: [PATCH RFC 1/5] nvme: Add CDQ data structures to nvme spec header
Date: Fri, 24 Apr 2026 13:37:51 +0200 [thread overview]
Message-ID: <20260424-jag-cdq-lkml-v1-1-d773343a717c@kernel.org> (raw)
In-Reply-To: <20260424-jag-cdq-lkml-v1-0-d773343a717c@kernel.org>
Add Controller Data Queue (CDQ) related data structures and definitions
to include/linux/nvme.h. These are just the data structures. No
functional implementation yet.
Signed-off-by: Joel Granados <joel.granados@kernel.org>
---
include/linux/nvme.h | 45 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 655d194f8e722c3400ac00f76841e1af0281f38f..4a42f1614de962b9d448193193f68fe1968dfb6f 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -1314,6 +1314,7 @@ enum nvme_admin_opcode {
nvme_admin_virtual_mgmt = 0x1c,
nvme_admin_nvme_mi_send = 0x1d,
nvme_admin_nvme_mi_recv = 0x1e,
+ nvme_admin_cdq = 0x45,
nvme_admin_dbbuf = 0x7C,
nvme_admin_format_nvm = 0x80,
nvme_admin_security_send = 0x81,
@@ -1352,7 +1353,8 @@ enum nvme_admin_opcode {
nvme_admin_opcode_name(nvme_admin_security_send), \
nvme_admin_opcode_name(nvme_admin_security_recv), \
nvme_admin_opcode_name(nvme_admin_sanitize_nvm), \
- nvme_admin_opcode_name(nvme_admin_get_lba_status))
+ nvme_admin_opcode_name(nvme_admin_get_lba_status), \
+ nvme_admin_opcode_name(nvme_admin_cdq))
enum {
NVME_QUEUE_PHYS_CONTIG = (1 << 0),
@@ -1412,6 +1414,10 @@ enum {
NVME_FWACT_ACTV = (2 << 3),
};
+enum {
+ NVME_FEAT_CDQ_ID_MASK = GENMASK(15, 0),
+};
+
struct nvme_supported_log {
__le32 lids[256];
};
@@ -1590,6 +1596,42 @@ struct nvme_directive_cmd {
__u32 rsvd16[3];
};
+enum {
+ NVME_CDQ_SEL_CREATE_CDQ = 0x0,
+ NVME_CDQ_SEL_DELETE_CDQ = 0x1
+};
+
+enum {
+ NVME_CDQ_CFG_PC_DISCONT = 0x0,
+ NVME_CDQ_CFG_PC_CONT = 0x1
+};
+
+union nvme_cdq_dw11 {
+ struct {
+ __le16 flags;
+ __le16 cqs;
+ };
+ struct {
+ __le16 cdqid;
+ __le16 rsvd;
+ };
+};
+
+struct nvme_cdq {
+ __u8 opcode;
+ __u8 flags;
+ __u16 command_id;
+ __u32 rsvd1[5];
+ __le64 prp1;
+ __le32 rsvd8[2];
+ __u8 sel;
+ __u8 rsvd10;
+ __le16 mos;
+ union nvme_cdq_dw11 dw11;
+ __le32 cdqsize;
+ __u32 rsvd13[3];
+};
+
/*
* Fabrics subcommands.
*/
@@ -2000,6 +2042,7 @@ struct nvme_command {
struct nvme_dbbuf dbbuf;
struct nvme_directive_cmd directive;
struct nvme_io_mgmt_recv_cmd imr;
+ struct nvme_cdq cdq;
};
};
--
2.50.1
next prev parent reply other threads:[~2026-04-24 11:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 11:37 [PATCH RFC 0/5] nvme: Controller Data Queue (CDQ) support Joel Granados
2026-04-24 11:37 ` Joel Granados [this message]
2026-04-24 11:37 ` [PATCH RFC 2/5] nvme: Add CDQ data structures to host driver Joel Granados
2026-04-24 11:37 ` [PATCH RFC 3/5] nvme: Add NVME_AER_ONE_SHOT callback handler Joel Granados
2026-04-24 11:37 ` [PATCH RFC 4/5] nvme: Implement CDQ core functionality Joel Granados
2026-04-24 11:37 ` [PATCH RFC 5/5] nvme: Add CDQ ioctl interface Joel Granados
2026-04-24 13:06 ` [PATCH RFC 0/5] nvme: Controller Data Queue (CDQ) support Jason Gunthorpe
2026-04-24 13:24 ` Christoph Hellwig
2026-04-27 18:24 ` Joel Granados
2026-04-27 18:59 ` Joel Granados
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=20260424-jag-cdq-lkml-v1-1-d773343a717c@kernel.org \
--to=joel.granados@kernel.org \
--cc=axboe@kernel.dk \
--cc=chaitanyak@nvidia.com \
--cc=hch@lst.de \
--cc=jgg@ziepe.ca \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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
all inboxes | Powered by JetHome®