NVME_MI_MI_READ_MI_DATA_PORT(2)
π NAME π
nvme_mi_mi_read_mi_data_port β bestie, this one runs a Read MI Data Structure command and pulls the port data back for you β¨
Oh and hey, you're reading the libnvme API manual rn, welcome welcome π«Ά
πΈ SYNOPSIS πΈ
int nvme_mi_mi_read_mi_data_port (nvme_mi_ep_t ep , __u8 portid , struct nvme_mi_read_port_info *p );
π ARGUMENTS π
epβ the endpoint for MI communication, aka the whole reason we can talk at all πportidβ the id of the port data you wanna retrieve, like which port's tea are we spillingpβ port information to populate, i.e. where the answers get dropped off π¬
π¦ DESCRIPTION π¦
So basically it retrieves the Port information for the port ID you specify, no cap. π«Ά
And here's the little detail that matters: the subsystem data (the one from nvme_mi_mi_read_mi_data_subsys) has an nmp field, and that field is the thing holding the allowed range of port IDs. So that's your vibe check on which portid values are even legal to ask for π
Also, peep struct nvme_mi_read_port_info for the shape of what you're getting back β it's giving very much "read this struct, know your data" energy π
β RETURN β
- If a response came back: you get the nvme command status (go look at
enum nvme_status_fieldfor the deets π) - Otherwise:
-1witherrnoset. It's not you, it's the error. π
fr fr bestie, always check thaterrnowhen you see-1β the answer is right there π
That's the whole page, periodt. π Signed off from July 2026, live from the libnvme API manual β stay slaying, and may all your port IDs be in range π§ββοΈπΈ
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms