1libnvme(9)                        API Manual                        libnvme(9)
2
3
4

NAME

6       enum nvme_status_type - type encoding for NVMe return values, when rep‐
7       resented as an int.
8

SYNOPSIS

10       enum nvme_status_type {
11           NVME_STATUS_TYPE_SHIFT ,
12           NVME_STATUS_TYPE_MASK ,
13           NVME_STATUS_TYPE_NVME ,
14           NVME_STATUS_TYPE_MI
15
16       };
17

Constants

19       NVME_STATUS_TYPE_SHIFT
20                   shift value for status bits
21
22       NVME_STATUS_TYPE_MASK
23                   mask value for status bits
24
25       NVME_STATUS_TYPE_NVME
26                   NVMe command status value, typically from CDW3
27
28       NVME_STATUS_TYPE_MI
29                   NVMe-MI header status
30

Description

32       The nvme_* api returns an int, with negative values indicating  an  in‐
33       ternal  or syscall error, zero signifying success, positive values rep‐
34       resenting the NVMe status.
35
36       That latter case (the NVMe status) may  represent  status  values  from
37       different  parts  of  the  transport/controller/etc, and are at most 16
38       bits of data. So, we use the most-significant 3 bits of the signed  int
39       to indicate which type of status this is.
40
41
42
43October 2023                 enum nvme_status_type                  libnvme(9)
Impressum