---
name: "nvme_init_cancel-libnvme3"
section: "2"
platform: "linux"
package: "nvme-cli"
version: "3.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/nvme_init_cancel-libnvme3"
---

# nvme\_init\_cancel-libnvme3(2)

Initialize passthru command for Cancel command

## NAME

nvme\_init\_cancel - Initialize passthru command for Cancel command

## SYNOPSIS

**void nvme\_init\_cancel** **(struct libnvme\_passthru\_cmd \*cmd** *,* **\_\_u32 nsid** *,* **\_\_u16 sqid** *,* **\_\_u16 cid** *,* **enum nvme\_cancel\_acode acode** *);*

## ARGUMENTS

- cmd

  Passthru command to use

- nsid

  Namespace identifier, or NVME\_NSID\_ALL

- sqid

  Submission Queue Identifier (SQID) that the Cancel command is associated with

- cid

  Command Identifier (CID) of the command to abort. Ignored if *acode* is NVME\_CANCEL\_ACODE\_MULTIPLE\_CMD.

- acode

  Action Code (ACODE), see *enum nvme\_cancel\_acode*

## DESCRIPTION

The Cancel command requests an abort for specified commands submitted on the same I/O Submission Queue to which the Cancel command is submitted. The number of commands eligible for a deferred abort and the number of commands aborted are returned in the CQE result, see *enum* *nvme\_cancel\_cqe\_dw0*.

Initializes the passthru command buffer for the Cancel command.
