---
name: "nvme_mi_admin_admin_passthru"
section: "2"
platform: "linux"
package: "libnvme-dev"
version: "1.13-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nvme_mi_admin_admin_passthru"
---

# nvme\_mi\_admin\_admin\_passthru(2)

Submit an nvme admin passthrough command

## NAME

nvme\_mi\_admin\_admin\_passthru - Submit an nvme admin passthrough command

## SYNOPSIS

**int nvme\_mi\_admin\_admin\_passthru** **(nvme\_mi\_ctrl\_t ctrl** *,* **\_\_u8 opcode** *,* **\_\_u8 flags** *,* **\_\_u16 rsvd** *,* **\_\_u32 nsid** *,* **\_\_u32 cdw2** *,* **\_\_u32 cdw3** *,* **\_\_u32 cdw10** *,* **\_\_u32 cdw11** *,* **\_\_u32 cdw12** *,* **\_\_u32 cdw13** *,* **\_\_u32 cdw14** *,* **\_\_u32 cdw15** *,* **\_\_u32 data\_len** *,* **void \*data** *,* **\_\_u32 metadata\_len** *,* **void \*metadata** *,* **\_\_u32 timeout\_ms** *,* **\_\_u32 \*result** *);*

## ARGUMENTS

- ctrl

  Controller to send command to

- opcode

  The nvme admin command to send

- flags

  NVMe command flags (not used)

- rsvd

  Reserved for future use

- nsid

  Namespace identifier

- cdw2

  Command dword 2

- cdw3

  Command dword 3

- cdw10

  Command dword 10

- cdw11

  Command dword 11

- cdw12

  Command dword 12

- cdw13

  Command dword 13

- cdw14

  Command dword 14

- cdw15

  Command dword 15

- data\_len

  Length of the data transferred in this command in bytes

- data

  Pointer to user address of the data buffer

- metadata\_len

  Length of metadata transferred in this command(not used)

- metadata

  Pointer to user address of the metadata buffer(not used)

- timeout\_ms

  How long to wait for the command to complete

- result

  Optional field to return the result from the CQE dword 0

## DESCRIPTION

Send a customized NVMe Admin command request message and get the corresponding response message.

This interface supports no data, host to controller and controller to host but it doesn't support bidirectional data transfer. Also this interface only supports data transfer size range \[0, 4096\] (bytes) so the & data\_len parameter must be less than 4097.

## RETURN

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