libnvme\_get\_feature\_length(9) libnvme API manual libnvme\_get\_feature\_length(9)

# [NAME](#NAME)

libnvme\_get\_feature\_length - Retrieve the command payload length for a specific feature identifier

# [SYNOPSIS](#SYNOPSIS)

**int libnvme\_get\_feature\_length** **(int fid ,** **\_\_u32 cdw11 ,** **enum nvme\_data\_tfr dir ,** **\_\_u32 \*len );**

# [ARGUMENTS](#ARGUMENTS)

[fid](#fid)

Feature identifier, see *enum nvme\_features\_id*.

[cdw11](#cdw11)

The cdw11 value may affect the transfer (only known fid is NVME\_FEAT\_FID\_HOST\_ID)

[dir](#dir)

Data transfer direction: false - host to controller, true - controller to host may affect the transfer (only known fid is NVME\_FEAT\_FID\_HOST\_MEM\_BUF).

[len](#len)

On success, set to this features payload length in bytes.

# [RETURN](#RETURN)

0 on success, -1 with errno set to EINVAL if the function did not recognize *fid*.

libnvme\_get\_feature\_length September 2026

---

Document: libnvme_get_feature_length-libnvme3(2) from nvme-cli 3.1-r1 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
