Skip to content

Commit 3c9168f

Browse files
Hans RosenfeldDan McDonald
authored andcommitted
4053 Add NVME Driver Support to Illumos
Reviewed by: Dan Fields <dan.fields@nexenta.com> Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Dan McDonald <danmcd@omniti.com>
1 parent b08923d commit 3c9168f

File tree

11 files changed

+4019
-4
lines changed

11 files changed

+4019
-4
lines changed

‎usr/src/man/man7d/Makefile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#
1313
# Copyright 2011, Richard Lowe
14-
# Copyright 2013 Nexenta Systems, Inc. All rights reserved.
14+
# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
1515
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
1616
#
1717

@@ -219,6 +219,7 @@ i386_MANFILES= ahci.7d \
219219
npe.7d \
220220
ntxn.7d \
221221
nv_sata.7d \
222+
nvme.7d \
222223
pcn.7d \
223224
radeon.7d \
224225
ral.7d \

‎usr/src/man/man7d/nvme.7d‎

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
.\"
2+
.\" This file and its contents are supplied under the terms of the
3+
.\" Common Development and Distribution License ("CDDL"), version 1.0.
4+
.\" You may only use this file in accordance with the terms of version
5+
.\" 1.0 of the CDDL.
6+
.\"
7+
.\" A full copy of the text of the CDDL should have accompanied this
8+
.\" source. A copy of the CDDL is also available via the Internet at
9+
.\" http://www.illumos.org/license/CDDL.
10+
.\"
11+
.\"
12+
.\" Copyright 2015 Nexenta Systems, Inc. All rights reserved.
13+
.\"
14+
.Dd July 20, 2015
15+
.Dt NVME 7D
16+
.Os
17+
.Sh NAME
18+
.Nm nvme
19+
.Nd Intel NVMe compliant storage driver
20+
.Sh DESCRIPTION
21+
The
22+
.Nm
23+
driver uses the
24+
.Xr blkdev 7D
25+
framework to provide access to
26+
.Tn Intel
27+
NVMe compliant solid-state storage devices.
28+
.Lp
29+
NVMe devices supporting multiple namespaces will present each
30+
namespace as its own
31+
.Xr blkdev 7D
32+
instance in the system.
33+
.
34+
.Sh CONFIGURATION
35+
The
36+
.Nm
37+
driver can be configured by defining properties in the \fBnvme.conf\fR
38+
file. The parameters are considered an unstable interface, subject to
39+
change without notice. The following properties are currently
40+
supported:
41+
.Bl -tag -width Va
42+
.It Va strict-version
43+
This can be set to 0 to allow
44+
.Nm
45+
to attach to devices supporting newer version of the NVMe
46+
specification. The default value is 1, limiting
47+
.Nm
48+
to work with devices up to specification version 1.0.
49+
.It Va ignore-unknown-vendor-status
50+
This can be set to 1 to allow
51+
.Nm
52+
to continue operating even if it receives an unknown vendor command
53+
status.
54+
.It Va admin-queue-len
55+
This is the number of entries in the admin command queue. Legal values
56+
are between 16 and 4096, the default value is 256.
57+
.It Va io-queue-len
58+
This is the number of entries in each I/O command queue. Legal values
59+
are between 16 and 65536, the default value is 1024.
60+
.It Va async-event-limit
61+
This is the maximum number of asynchronous event requests issued by
62+
the driver. Asynchronous events are used to report error conditions.
63+
The driver will never use more asynchronous events than this value, or
64+
what the hardware supports if it is less, or what 1/10th of the admin
65+
queue length if it is less.
66+
.El
67+
.
68+
.Sh FILES
69+
.Bl -tag -compact -width Pa
70+
.It Pa /dev/dsk/cntnd0sn
71+
Block device minor nodes.
72+
.It Pa /dev/rdsk/cntnd0sn
73+
Raw block device minor nodes.
74+
.El
75+
.Lp
76+
In the device minor nodes, the following substitutions may occur:
77+
.Bl -tag -offset indent -width Va
78+
.It Va cn
79+
A controller number, typically one for each
80+
.Nm
81+
device found. Controller numbers are dynamically assigned by the
82+
system.
83+
.It Va tn
84+
The target number, this corresponds to the namespace ID used by the
85+
hardware. Namespace ID 0 is reserved, hence target numbers start with
86+
1.
87+
.It Va sn
88+
This is the
89+
.Em slice
90+
number, representing a subset of the disk. See
91+
.Xr dkio 7I .
92+
.El
93+
.
94+
.Sh SEE ALSO
95+
.Xr blkdev 7D
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#
2+
# CDDL HEADER START
3+
#
4+
# This file and its contents are supplied under the terms of the
5+
# Common Development and Distribution License ("CDDL"), version 1.0.
6+
# You may only use this file in accordance with the terms of version
7+
# 1.0 of the CDDL.
8+
#
9+
# A full copy of the text of the CDDL should have accompanied this
10+
# source. A copy of the CDDL is also available via the Internet at
11+
# http://www.illumos.org/license/CDDL.
12+
#
13+
# CDDL HEADER END
14+
#
15+
16+
#
17+
# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
18+
#
19+
20+
#
21+
# The default for payload-bearing actions in this package is to appear in the
22+
# global zone only. See the include file for greater detail, as well as
23+
# information about overriding the defaults.
24+
#
25+
<include global_zone_only_component>
26+
set name=pkg.fmri value=pkg:/driver/storage/nvme@$(PKGVERS)
27+
set name=pkg.description \
28+
value="Driver for Intel NVMe 1.0e compliant storage devices"
29+
set name=pkg.summary value="NVMe driver"
30+
set name=info.classification \
31+
value=org.opensolaris.category.2008:System/Hardware
32+
set name=variant.arch value=i386
33+
dir path=kernel group=sys
34+
dir path=kernel/drv group=sys
35+
dir path=kernel/drv/$(ARCH64) group=sys
36+
dir path=usr group=sys
37+
dir path=usr/share
38+
dir path=usr/share/man
39+
dir path=usr/share/man/man7d
40+
driver name=nvme alias=pciex8086,953 class=disk perms="* 0600 root sys"
41+
file path=kernel/drv/$(ARCH64)/nvme group=sys
42+
file path=kernel/drv/nvme group=sys
43+
file path=kernel/drv/nvme.conf group=sys
44+
file path=usr/share/man/man7d/nvme.7d
45+
license lic_CDDL license=lic_CDDL

‎usr/src/uts/common/Makefile.files‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# Copyright (c) 2012 Joyent, Inc. All rights reserved.
2525
# Copyright (c) 2011, 2014 by Delphix. All rights reserved.
2626
# Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
27-
# Copyright 2014 Nexenta Systems, Inc. All rights reserved.
27+
# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
2828
#
2929

3030
#
@@ -1863,6 +1863,8 @@ YGE_OBJS = yge.o
18631863

18641864
SKD_OBJS = skd.o
18651865

1866+
NVME_OBJS = nvme.o
1867+
18661868
#
18671869
# Build up defines and paths.
18681870
#

‎usr/src/uts/common/Makefile.rules‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#
2323
# Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
2424
# Copyright 2013 Garrett D'Amore <garrett@damore.org>
25-
# Copyright 2014 Nexenta Systems, Inc. All rights reserved.
25+
# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
2626
#
2727

2828
#
@@ -990,6 +990,10 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/nge/%.c
990990
$(COMPILE.c) -o $@ $<
991991
$(CTFCONVERT_O)
992992

993+
$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/nvme/%.c
994+
$(COMPILE.c) -o $@ $<
995+
$(CTFCONVERT_O)
996+
993997
$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/nxge/%.c
994998
$(COMPILE.c) -o $@ $<
995999
$(CTFCONVERT_O)
@@ -2288,6 +2292,9 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/net80211/%.c
22882292
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/nge/%.c
22892293
@($(LHEAD) $(LINT.c) $< $(LTAIL))
22902294

2295+
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/nvme/%.c
2296+
@($(LHEAD) $(LINT.c) $< $(LTAIL))
2297+
22912298
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/nxge/%.c
22922299
@($(LHEAD) $(LINT.c) $< $(LTAIL))
22932300

0 commit comments

Comments
 (0)