Skip to content

Commit f877f5c

Browse files
ikegami-tigaw
authored andcommitted
types: Add NVME_CMIC definitions
The existing NVME_CTRL_CMIC definitions are complex values. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent 963fed9 commit f877f5c

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/nvme/types.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,25 @@ struct nvme_id_ctrl {
11141114
__u8 vs[1024];
11151115
};
11161116

1117+
enum nvme_cmic {
1118+
NVME_CMIC_MULTI_PORT_SHIFT = 0,
1119+
NVME_CMIC_MULTI_CTRL_SHIFT = 1,
1120+
NVME_CMIC_MULTI_SRIOV_SHIFT = 2,
1121+
NVME_CMIC_MULTI_ANA_SHIFT = 3,
1122+
NVME_CMIC_MULTI_RSVD_SHIFT = 4,
1123+
NVME_CMIC_MULTI_PORT_MASK = 0x1,
1124+
NVME_CMIC_MULTI_CTRL_MASK = 0x1,
1125+
NVME_CMIC_MULTI_SRIOV_MASK = 0x1,
1126+
NVME_CMIC_MULTI_ANA_MASK = 0x1,
1127+
NVME_CMIC_MULTI_RSVD_MASK = 0xf,
1128+
};
1129+
1130+
#define NVME_CMIC_MULTI_PORT(cmic) NVME_GET(cmic, CMIC_MULTI_PORT)
1131+
#define NVME_CMIC_MULTI_CTRL(cmic) NVME_GET(cmic, CMIC_MULTI_CTRL)
1132+
#define NVME_CMIC_MULTI_SRIOV(cmic) NVME_GET(cmic, CMIC_MULTI_SRIOV)
1133+
#define NVME_CMIC_MULTI_ANA(cmic) NVME_GET(cmic, CMIC_MULTI_ANA)
1134+
#define NVME_CMIC_MULTI_RSVD(cmic) NVME_GET(cmic, CMIC_MULTI_RSVD)
1135+
11171136
/**
11181137
* enum nvme_id_ctrl_cmic - Controller Multipath IO and Namespace Sharing
11191138
* Capabilities of the controller and NVM subsystem.

0 commit comments

Comments
 (0)