Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types: Add NVME_CMIC definitions #817

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/nvme/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,25 @@ struct nvme_id_ctrl {
__u8 vs[1024];
};

enum nvme_cmic {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to add documentation to all the new types you are adding. IIRC, I forgot to ask for this in the last few PRs. It's not a real blocker, though please consider to provide the documentation update in future. Thanks.

Copy link
Contributor Author

@ikegami-t ikegami-t Apr 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure of course will to do it later. Thank you.

NVME_CMIC_MULTI_PORT_SHIFT = 0,
NVME_CMIC_MULTI_CTRL_SHIFT = 1,
NVME_CMIC_MULTI_SRIOV_SHIFT = 2,
NVME_CMIC_MULTI_ANA_SHIFT = 3,
NVME_CMIC_MULTI_RSVD_SHIFT = 4,
NVME_CMIC_MULTI_PORT_MASK = 0x1,
NVME_CMIC_MULTI_CTRL_MASK = 0x1,
NVME_CMIC_MULTI_SRIOV_MASK = 0x1,
NVME_CMIC_MULTI_ANA_MASK = 0x1,
NVME_CMIC_MULTI_RSVD_MASK = 0xf,
};

#define NVME_CMIC_MULTI_PORT(cmic) NVME_GET(cmic, CMIC_MULTI_PORT)
#define NVME_CMIC_MULTI_CTRL(cmic) NVME_GET(cmic, CMIC_MULTI_CTRL)
#define NVME_CMIC_MULTI_SRIOV(cmic) NVME_GET(cmic, CMIC_MULTI_SRIOV)
#define NVME_CMIC_MULTI_ANA(cmic) NVME_GET(cmic, CMIC_MULTI_ANA)
#define NVME_CMIC_MULTI_RSVD(cmic) NVME_GET(cmic, CMIC_MULTI_RSVD)

/**
* enum nvme_id_ctrl_cmic - Controller Multipath IO and Namespace Sharing
* Capabilities of the controller and NVM subsystem.
Expand Down