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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
|
.\"
.\" This file and its contents are supplied under the terms of the
.\" Common Development and Distribution License ("CDDL"), version 1.0.
.\" You may only use this file in accordance with the terms of version
.\" 1.0 of the CDDL.
.\"
.\" A full copy of the text of the CDDL should have accompanied this
.\" source. A copy of the CDDL is also available via the Internet at
.\" http://www.illumos.org/license/CDDL.
.\"
.\"
.\" Copyright (c) 2018, Joyent, Inc.
.\" Copyright 2022 Tintri by DDN, Inc. All rights reserved.
.\"
.Dd May 11, 2022
.Dt NVME 4D
.Os
.Sh NAME
.Nm nvme
.Nd Intel NVMe compliant storage driver
.Sh DESCRIPTION
The
.Nm
driver uses the
.Xr blkdev 4D
framework to provide access to
NVMe compliant solid-state storage devices.
All NVMe version 1.x devices are supported.
.Lp
NVMe devices supporting multiple namespaces will present each
namespace as its own
.Xr blkdev 4D
instance in the system.
.
.Sh CONFIGURATION
The
.Nm
driver can be configured by defining properties in the
.Pa nvme.conf
file.
The parameters are considered an unstable interface, subject to
change without notice.
The following properties are currently supported:
.Bl -tag -width Va
.It Va strict-version
This can be set to 0 to allow
.Nm
to attach to devices supporting newer version of the NVMe
specification.
The default value is 1, limiting
.Nm
to work with devices that support major version 1.
.It Va ignore-unknown-vendor-status
This can be set to 1 to allow
.Nm
to continue operating even if it receives an unknown vendor command
status.
.It Va admin-queue-len
This is the number of entries in the admin command queue.
Legal values are between 16 and 4096, the default value is 256.
.It Va io-squeue-len
This is the number of entries in each I/O submission queue.
Legal values are between 16 and 65536, the default value is 1024.
.It Va io-cqueue-len
This is the number of entries in each I/O completion queue.
Legal values are between 16 and 65536, the default value is 2048.
When the number of submission and completion queues are the same,
the queue lengths will be both set to the lesser of
.Va io-squeue-len
and
.Va io-cqueue-len .
.It Va async-event-limit
This is the maximum number of asynchronous event requests issued by
the driver.
Asynchronous events are used to report error conditions.
The driver will never use more asynchronous events than this value, or
what the hardware supports if it is less, or 1/10th of the admin queue
length if it is less.
.It Va volatile-write-cache-enable
This property can be set to 0 to disable the volatile write cache, if
the hardware supports it.
The default setting is 1, which enables the volatile write cache.
.It Va min-phys-block-size
This is the minimum physical block size that is reported to
.Xr blkdev 4D .
This value must be a power of 2 greater than or equal to 512.
If the device reports a best block size larger than what is
specified here the driver will ignore the value specified here.
.It Va max-submission-queues
This is the maximum number of submission queues the driver will create per
device.
Legal values are between 1 and 65535, the default is to
match the number for
.Em max-completion-queues .
The number of queues created will not be allowed to exceed the
drive's hardware limitation.
If the number of submission queues is larger than
.Em max-completion-queues
the completion queues will be shared across the submission
queues.
.It Va max-completion-queues
This is the maximum number of completion queues the driver will create per
device.
Legal values are between 1 and 65535, the default is to match
the number of interrupt vectors allocated to the drive.
The number of queues created will not exceed the number of interrupt vectors,
.Em max-submission-queues ,
or the drive's hardware limitation.
.El
.Pp
In addition to the above properties, some device-specific tunables can be
configured in
.Pa nvme.conf
using the
.Va nvme-config-list
global property.
The value of this property is a list of triplets.
The formal syntax is:
.Bl -column "nvme-config-list" -offset indent
.It nvme-config-list ::= <triplet>
.Op \&, <triplet> Ns
*
;
.It <triplet> ::=
.Qq <model>
\&,
.Qq <rev-list>
\&,
.Qq <tuple-list>
.It <rev-list> ::=
.Op <fwrev> Oo \&, <fwrev> Oc Ns *
.It <tuple-list> ::=
<tunable>
.Op \&, <tunable> Ns
*
.It <tunable> ::=
.Qq <name>
\&:
.Qq <value>
.El
.Pp
The
.Va <model>
and
.Va <fwrev>
are the strings that are returned in the
.Qq Model Number
and
.Qq Firmware Revision
fields, respectively, in the
.Qq Identify Controller
data structure as returned by the
.Qq IDENTIFY
command.
Specifying a
.Va <rev-list>
is optional, an empty string
.Po Qo Qc Pc
may be used instead.
.Pp
The
.Va <tuple-list>
contains one or more tunables to apply to all controllers that match the
specified model number and optional firmware revisions.
Each
.Va <tunable>
is a
.Va <name>
:
.Va <value>
pair.
Supported tunable names are:
.Bl -tag -width Va
.It Va ignore-unknown-vendor-status
Similar to the global property, this property accepts a boolean value specified
as either
.Qq on ,
.Qq off ,
.Qq true ,
or
.Qq false
to enable or disable the driver continuing operation even if it receives an
unknown vendor command status from a controller.
.It Va min-phys-block-size
Same as the global property, this is the minimum physical block size that is
reported to
.Xr blkdev 4D .
This value must be a power of 2 greater than or equal to 512.
If the device reports a best block size larger than what is
specified here the driver will ignore the value specified here.
.It Va volatile-write-cache
Similar to the global property
.Va volatile-write-cache-enable ,
this property accepts a boolean value specified as either
.Qq on ,
.Qq off ,
.Qq true ,
or
.Qq false
to enable or disable the volatile write cache, if the hardware supports it.
By default the volatile write cache is enabled.
.El
.Sh FILES
.Bl -tag -compact -width Pa
.It Pa /dev/dsk/cntnd0sn
Block device minor nodes.
.It Pa /dev/rdsk/cntnd0sn
Raw block device minor nodes.
.El
.Lp
In the device minor nodes, the following substitutions may occur:
.Bl -tag -offset indent -width Va
.It Va cn
A controller number, typically one for each
.Nm
device found.
Controller numbers are dynamically assigned by the system.
.It Va tn
The target number.
This is the namespace EUI64 if available, or the namespace ID used by
the hardware.
Namespace ID 0 is reserved, hence target numbers start with 1.
.It Va sn
This is the
.Em slice
number, representing a subset of the disk.
See
.Xr dkio 4I .
.El
.
.Sh SEE ALSO
.Xr blkdev 4D
|