summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-10-28 08:35:02 -0600
committerJens Axboe <axboe@kernel.dk>2021-10-28 08:35:02 -0600
commitca7787973a8652651bf391a5be6bec236a367c9c (patch)
treec48d56c067bde50fa8a609760ff4e8b9303921c0 /include
parentd28e4dff085c5a87025c9a0a85fb798bd8e9ca17 (diff)
parentd156cfcafbd0eae4224ea007d95ebda467eb0c46 (diff)
downloadlinux-next-ca7787973a8652651bf391a5be6bec236a367c9c.tar.gz
linux-next-ca7787973a8652651bf391a5be6bec236a367c9c.zip
Merge tag 'nvme-5.16-2021-10-28' of git://git.infradead.org/nvme into for-5.16/drivers
Pull NVMe updates from Christoph: "nvme updates for Linux 5.16 - support the current discovery subsystem entry (Hannes Reinecke) - use flex_array_size and struct_size (Len Baker)" * tag 'nvme-5.16-2021-10-28' of git://git.infradead.org/nvme: nvmet: use flex_array_size and struct_size nvmet: register discovery subsystem as 'current' nvmet: switch check for subsystem type nvme: add new discovery log page entry definitions
Diffstat (limited to 'include')
-rw-r--r--include/linux/nvme.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 357482dedb59..855dd9b3e84b 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -27,8 +27,14 @@
#define NVME_NSID_ALL 0xffffffff
enum nvme_subsys_type {
- NVME_NQN_DISC = 1, /* Discovery type target subsystem */
- NVME_NQN_NVME = 2, /* NVME type target subsystem */
+ /* Referral to another discovery type target subsystem */
+ NVME_NQN_DISC = 1,
+
+ /* NVME type target subsystem */
+ NVME_NQN_NVME = 2,
+
+ /* Current discovery type target subsystem */
+ NVME_NQN_CURR = 3,
};
enum nvme_ctrl_type {
@@ -1312,6 +1318,12 @@ struct nvmf_common_command {
#define MAX_DISC_LOGS 255
+/* Discovery log page entry flags (EFLAGS): */
+enum {
+ NVME_DISC_EFLAGS_EPCSD = (1 << 1),
+ NVME_DISC_EFLAGS_DUPRETINFO = (1 << 0),
+};
+
/* Discovery log page entry */
struct nvmf_disc_rsp_page_entry {
__u8 trtype;
@@ -1321,7 +1333,8 @@ struct nvmf_disc_rsp_page_entry {
__le16 portid;
__le16 cntlid;
__le16 asqsz;
- __u8 resv8[22];
+ __le16 eflags;
+ __u8 resv10[20];
char trsvcid[NVMF_TRSVCID_SIZE];
__u8 resv64[192];
char subnqn[NVMF_NQN_FIELD_LEN];