nvme_mi_admin_xfer(2)

✨ nvme_mi_admin_xfer(2) ✨

okay bestie, welcome to the libnvme API manual πŸ’– this one is nvme_mi_admin_xfer(2), and it's the raw admin transfer interface β€” like, no filter, no vibes, straight to the metal πŸ¦‹


🌸 NAME 🌸

nvme_mi_admin_xfer β€” Raw admin transfer interface.

πŸŽ€ SYNOPSIS πŸŽ€

int nvme_mi_admin_xfer (nvme_mi_ctrl_t ctrl , struct
nvme_mi_admin_req_hdr *admin_req , size_t req_data_size , struct
nvme_mi_admin_resp_hdr *admin_resp , off_t resp_data_offset , size_t
*resp_data_size );

πŸ’… ARGUMENTS πŸ’…

  • ctrl β€” the controller we're sending the admin command to πŸ‘‘ like, this is the whole destination of the operation
  • admin_req β€” request data πŸ“¨ that's the request payload we're handing over
  • req_data_size β€” size of request data payload πŸ“ exactly how much request payload there is
  • admin_resp β€” buffer for response data πŸ«™ where the answer is gonna land
  • resp_data_offset β€” offset into request data to retrieve from controller πŸ” we're saying "start grabbing from here"
  • resp_data_size β€” size of response data buffer, updated to received size πŸ”„ it goes in as the size of the buffer and comes back as the size actually received, miss thing is doing double duty

🌈 DESCRIPTION 🌈

Performs an arbitrary NVMe Admin command, using the provided request data, in admin_req. The size of the request data payload is specified in req_data_size β€” and no, this does not include the standard header length. so a header-only request would have a size of 0 🫢 zero means "no payload", periodt.

On success, response data is stored in admin_resp, which has an optional appended payload buffer of resp_data_size bytes. The actual payload transferred will be stored in resp_data_size. These sizes do not include the Admin request header, so 0 represents no payload πŸ’€ same rule, different direction.

As with all Admin commands, we can request partial data from the Admin Response payload, offset by resp_data_offset 🎯 so you don't have to take the whole thing if you only want a slice.

See: struct nvme_mi_admin_req_hdr and struct nvme_mi_admin_resp_hdr. πŸ“š

⭐ RETURN ⭐

The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise..

okay wait, that trailing double period is literally in the original, I'm not being messy, I'm being faithful πŸ’–

and that's the whole page bestie, you ate it πŸ’…πŸ‘‘

this was nvme_mi_admin_xfer(2) from the libnvme API manual, dated July 2026 β€” mwah, go slay some admin commands πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from