summaryrefslogtreecommitdiffstats
path: root/doc/man/nvme_status_type.2
blob: 238cf6ec4cb8c03ae537e68e1feb82b34d1c9988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.TH "libnvme" 9 "enum nvme_status_type" "February 2024" "API Manual" LINUX
.SH NAME
enum nvme_status_type \- type encoding for NVMe return values, when represented as an int.
.SH SYNOPSIS
enum nvme_status_type {
.br
.BI "    NVME_STATUS_TYPE_SHIFT"
, 
.br
.br
.BI "    NVME_STATUS_TYPE_MASK"
, 
.br
.br
.BI "    NVME_STATUS_TYPE_NVME"
, 
.br
.br
.BI "    NVME_STATUS_TYPE_MI"

};
.SH Constants
.IP "NVME_STATUS_TYPE_SHIFT" 12
shift value for status bits
.IP "NVME_STATUS_TYPE_MASK" 12
mask value for status bits
.IP "NVME_STATUS_TYPE_NVME" 12
NVMe command status value, typically from CDW3
.IP "NVME_STATUS_TYPE_MI" 12
NVMe-MI header status
.SH "Description"

The nvme_* api returns an int, with negative values indicating an internal
or syscall error, zero signifying success, positive values representing
the NVMe status.

That latter case (the NVMe status) may represent status values from
different parts of the transport/controller/etc, and are at most 16 bits of
data. So, we use the most-significant 3 bits of the signed int to indicate
which type of status this is.