Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8e51886
ioctl: nvme_identify use nvme_passthru_cmd directly
igaw Jul 31, 2025
022e829
ioctl: reorder nvme_get_log and nvme_get_log_page
igaw Jul 30, 2025
15ea942
ioctl: nvme_get_log use nvme_passthru_cmd directly
igaw Jul 29, 2025
cf2e15d
test: fix rae and lsp handling in log page tests
igaw Aug 8, 2025
01874aa
ioctl: nvme_format_nvm use nvme_passthru_cmd directly
igaw Aug 1, 2025
ade5b0f
ioctl: nvme_ns_mgmt use nvme_passthru_cmd directly
igaw Aug 1, 2025
47bb9b3
ioctl: nvme_ns_attach use nvme_passthru_cmd directly
igaw Aug 1, 2025
ec7c660
ioctl: nvme_ns_download use nvme_passthru_cmd directly
igaw Aug 1, 2025
d4341b0
ioctl: nvme_fw_commit use nvme_passthru_cmd directly
igaw Aug 1, 2025
2d0a029
ioctl: nvme_security_send use nvme_passthru_cmd directly
igaw Aug 1, 2025
9b698ce
ioctl: nvme_set_features use nvme_passthru_cmd directly
MaisenbacherD Jul 30, 2025
f5510ec
ioctl: nvme_dsm use nvme_passthru_cmd directly
ikegami-t Aug 2, 2025
e3bad75
ioctl: nvme_io use nvme_passthru_cmd directly
ikegami-t Aug 2, 2025
72f86b5
ioctl: add dsm and io commands dword fields
ikegami-t Aug 3, 2025
c89b359
ioctl: nvme_copy use nvme_passthru_cmd directly
ikegami-t Aug 4, 2025
74f8505
ioctl: nvme_resv_acquire use nvme_passthru_cmd directly
ikegami-t Aug 10, 2025
dce4c3c
ioctl: nvme_resv_register use nvme_passthru_cmd directly
ikegami-t Aug 10, 2025
98b64d8
ioctl: nvme_resv_release use nvme_passthru_cmd directly
ikegami-t Aug 10, 2025
7d15d0a
ioctl: nvme_resv_report use nvme_passthru_cmd directly
ikegami-t Aug 10, 2025
d2e070e
ioctl: nvme_io_mgmt_recv use nvme_passthru_cmd directly
ikegami-t Aug 11, 2025
1e759f3
ioctl: nvme_io_mgmt_send use nvme_passthru_cmd directly
ikegami-t Aug 11, 2025
d6f2a3f
ioctl: nvme_zns_mgmt_send use nvme_passthru_cmd directly
ikegami-t Aug 11, 2025
d7590f2
ioctl: nvme_zns_mgmt_recv use nvme_passthru_cmd directly
ikegami-t Aug 11, 2025
dd099d4
ioctl: nvme_zns_append use nvme_passthru_cmd directly
ikegami-t Aug 11, 2025
a71ec94
ioctl: nvme_dim_send use nvme_passthru_cmd directly
ikegami-t Aug 11, 2025
8cbb92b
fabrics: fix nvme_get_adrfam function description parameter ctrl as c
ikegami-t Aug 11, 2025
f401f49
ioctl: nvme_get_features use nvme_passthru_cmd directly
MaisenbacherD Aug 11, 2025
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
20 changes: 10 additions & 10 deletions examples/mi-mctp-csi-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void hexdump(const unsigned char *buf, int len)

int do_get_log_page(nvme_mi_ep_t ep, int argc, char **argv)
{
struct nvme_get_log_args args = { 0 };
enum nvme_cmd_get_log_lid lid;
struct nvme_link *link;
uint8_t buf[4096];
uint16_t ctrl_id;
Expand All @@ -75,15 +75,11 @@ int do_get_log_page(nvme_mi_ep_t ep, int argc, char **argv)

ctrl_id = tmp & 0xffff;

args.args_size = sizeof(args);
args.log = buf;
args.len = sizeof(buf);

if (argc > 2) {
tmp = atoi(argv[2]);
args.lid = tmp & 0xff;
lid = tmp & 0xff;
} else {
args.lid = 0x1;
lid = 0x1;
}

link = nvme_mi_init_link(ep, ctrl_id);
Expand All @@ -92,14 +88,18 @@ int do_get_log_page(nvme_mi_ep_t ep, int argc, char **argv)
return -1;
}

rc = nvme_get_log(link, &args);
rc = nvme_get_log(link, NVME_NSID_NONE, false, NVME_LOG_LSP_NONE,
lid, NVME_LOG_LSI_NONE, NVME_CSI_NVM,
false, NVME_UUID_NONE,
0, buf, sizeof(buf),
sizeof(buf), NULL);
if (rc) {
warn("can't perform Get Log page command");
return -1;
}

printf("Get log page (log id = 0x%02x) data:\n", args.lid);
hexdump(buf, args.len);
printf("Get log page (log id = 0x%02x) data:\n", lid);
hexdump(buf, sizeof(buf));

return 0;
}
Expand Down
38 changes: 17 additions & 21 deletions examples/mi-mctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ static const char *__copy_id_str(const void *field, size_t size,

int do_identify(nvme_mi_ep_t ep, int argc, char **argv)
{
struct nvme_identify_args id_args = { 0 };
struct nvme_link *link;
struct nvme_id_ctrl id;
uint16_t ctrl_id;
Expand Down Expand Up @@ -207,23 +206,20 @@ int do_identify(nvme_mi_ep_t ep, int argc, char **argv)
return -1;
}

id_args.data = &id;
id_args.args_size = sizeof(id_args);
id_args.cns = NVME_IDENTIFY_CNS_CTRL;
id_args.nsid = NVME_NSID_NONE;
id_args.cntid = 0;
id_args.csi = NVME_CSI_NVM;

/* for this example code, we can either do a full or partial identify;
* since we're only printing the fields before the 'rab' member,
* these will be equivalent, aside from the size of the MI
* response.
*/
if (partial) {
rc = nvme_identify_partial(link, offsetof(struct nvme_id_ctrl, rab),
&id_args);
rc = nvme_identify_partial(link, NVME_NSID_NONE, 0, NVME_IDENTIFY_CNS_CTRL,
NVME_CSI_NVM, 0, 0, &id,
offsetof(struct nvme_id_ctrl, rab),
NULL);
} else {
rc = nvme_identify(link, &id_args);
rc = nvme_identify(link, 0, NVME_IDENTIFY_CNS_CTRL,
NVME_CSI_NVM, 0, 0, NVME_NSID_NONE,
&id, NULL);
}

if (rc) {
Expand Down Expand Up @@ -373,7 +369,7 @@ void hexdump(const unsigned char *buf, int len)

int do_get_log_page(nvme_mi_ep_t ep, int argc, char **argv)
{
struct nvme_get_log_args args = { 0 };
enum nvme_cmd_get_log_lid lid;
struct nvme_link *link;
uint8_t buf[512];
uint16_t ctrl_id;
Expand All @@ -392,15 +388,11 @@ int do_get_log_page(nvme_mi_ep_t ep, int argc, char **argv)

ctrl_id = tmp & 0xffff;

args.args_size = sizeof(args);
args.log = buf;
args.len = sizeof(buf);

if (argc > 2) {
tmp = atoi(argv[2]);
args.lid = tmp & 0xff;
lid = tmp & 0xff;
} else {
args.lid = 0x1;
lid = 0x1;
}

link = nvme_mi_init_link(ep, ctrl_id);
Expand All @@ -409,14 +401,18 @@ int do_get_log_page(nvme_mi_ep_t ep, int argc, char **argv)
return -1;
}

rc = nvme_get_log(link, &args);
rc = nvme_get_log(link, NVME_NSID_NONE, false, NVME_LOG_LSP_NONE,
lid, NVME_LOG_LSI_NONE, NVME_CSI_NVM,
false, NVME_UUID_NONE,
0, buf, sizeof(buf),
sizeof(buf),NULL);
if (rc) {
warn("can't perform Get Log page command");
return -1;
}

printf("Get log page (log id = 0x%02x) data:\n", args.lid);
hexdump(buf, args.len);
printf("Get log page (log id = 0x%02x) data:\n", lid);
hexdump(buf, sizeof(buf));

return 0;
}
Expand Down
22 changes: 1 addition & 21 deletions src/libnvme.map
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ LIBNVME_2_0 {
nvme_admin_passthru;
nvme_capacity_mgmt;
nvme_close;
nvme_copy;
nvme_create_ctrl;
nvme_create_root;
nvme_ctrl_config_match;
Expand Down Expand Up @@ -62,28 +61,23 @@ LIBNVME_2_0 {
nvme_default_host;
nvme_describe_key_serial;
nvme_dev_self_test;
nvme_dim_send;
nvme_directive_recv;
nvme_directive_send;
nvme_directive_send_id_endir;
nvme_disconnect_ctrl;
nvme_dsm;
nvme_dump_config;
nvme_dump_tree;
nvme_errno_to_string;
nvme_export_tls_key;
nvme_export_tls_key_versioned;
nvme_first_host;
nvme_first_subsystem;
nvme_format_nvm;
nvme_free_ctrl;
nvme_free_host;
nvme_free_ns;
nvme_free_root;
nvme_free_subsystem;
nvme_free_uri;
nvme_fw_commit;
nvme_fw_download;
nvme_fw_download_seq;
nvme_gen_dhchap_key;
nvme_generate_tls_key_identity;
Expand Down Expand Up @@ -129,8 +123,7 @@ LIBNVME_2_0 {
nvme_get_features_write_protect;
nvme_get_host_telemetry;
nvme_get_lba_status;
nvme_get_log;
nvme_get_log_page;
nvme_get_log_partial;
nvme_get_logging_level;
nvme_get_logical_block_size;
nvme_get_new_host_telemetry;
Expand All @@ -153,8 +146,6 @@ LIBNVME_2_0 {
nvme_host_set_dhchap_key;
nvme_host_set_hostsymname;
nvme_host_set_pdc_enabled;
nvme_identify;
nvme_identify_partial;
nvme_import_tls_key;
nvme_import_tls_key_versioned;
nvme_init_copy_range;
Expand All @@ -168,9 +159,6 @@ LIBNVME_2_0 {
nvme_init_logging;
nvme_insert_tls_key;
nvme_insert_tls_key_versioned;
nvme_io;
nvme_io_mgmt_recv;
nvme_io_mgmt_send;
nvme_io_passthru64;
nvme_io_passthru;
nvme_ipaddrs_eq;
Expand Down Expand Up @@ -261,7 +249,6 @@ LIBNVME_2_0 {
nvme_ns_get_sysfs_dir;
nvme_ns_get_uuid;
nvme_ns_identify;
nvme_ns_mgmt;
nvme_ns_read;
nvme_ns_release_link;
nvme_ns_rescan;
Expand All @@ -283,10 +270,6 @@ LIBNVME_2_0 {
nvme_read_key;
nvme_refresh_topology;
nvme_rescan_ctrl;
nvme_resv_acquire;
nvme_resv_register;
nvme_resv_release;
nvme_resv_report;
nvme_revoke_tls_key;
nvme_root_get_application;
nvme_root_release_fds;
Expand Down Expand Up @@ -372,9 +355,6 @@ LIBNVME_2_0 {
nvme_uuid_random;
nvme_uuid_to_string;
nvme_virtual_mgmt;
nvme_zns_append;
nvme_zns_mgmt_recv;
nvme_zns_mgmt_send;
nvmf_add_ctrl;
nvmf_adrfam_str;
nvmf_cms_str;
Expand Down
Loading