Skip to content

Commit 272aa09

Browse files
ikegami-tigaw
authored andcommitted
ioctl: add nvme_get_log_mgmt_addr_list()
Since added the NVMe 2.1 log page. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent b220e1e commit 272aa09

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

src/nvme/ioctl.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,6 +2153,21 @@ static inline int nvme_get_log_dispersed_ns_participating_nss(int fd, __u32 nsid
21532153
log);
21542154
}
21552155

2156+
/**
2157+
* nvme_get_log_mgmt_addr_list() - Retrieve Management Address List Log
2158+
* @fd: File descriptor of nvme device
2159+
* @len: The allocated length of the log page
2160+
* @log: User address to store the log page
2161+
*
2162+
* Return: The nvme command status if a response was received (see
2163+
* &enum nvme_status_field) or -1 with errno set otherwise
2164+
*/
2165+
static inline int nvme_get_log_mgmt_addr_list(int fd, __u32 len,
2166+
struct nvme_mgmt_addr_list_log *log)
2167+
{
2168+
return nvme_get_log_simple(fd, NVME_LOG_LID_MGMT_ADDR_LIST, len, log);
2169+
}
2170+
21562171
/**
21572172
* nvme_get_log_phy_rx_eom() - Retrieve Physical Interface Receiver Eye Opening Measurement Log
21582173
* @fd: File descriptor of nvme device

src/nvme/types.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4804,6 +4804,26 @@ struct nvme_dispersed_ns_participating_nss_log {
48044804
__u8 participating_nss[];
48054805
};
48064806

4807+
/**
4808+
* struct nvme_mgmt_addr_desc - Management Address Descriptor
4809+
* @mat: Management Address Type
4810+
* @rsvd1: Reserved
4811+
* @madrs: Management Address
4812+
*/
4813+
struct nvme_mgmt_addr_desc {
4814+
__u8 mat;
4815+
__u8 rsvd1[3];
4816+
__u8 madrs[508];
4817+
};
4818+
4819+
/**
4820+
* struct nvme_mgmt_addr_list_log - Management Address List Log
4821+
* @mad: Management Address Descriptor
4822+
*/
4823+
struct nvme_mgmt_addr_list_log {
4824+
struct nvme_mgmt_addr_desc mad[8];
4825+
};
4826+
48074827
/**
48084828
* struct nvme_eom_lane_desc - EOM Lane Descriptor
48094829
* @rsvd0: Reserved

0 commit comments

Comments
 (0)