Skip to content

Commit

Permalink
4053 Add NVME Driver Support to Illumos
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans Rosenfeld authored and Dan McDonald committed Sep 15, 2015
1 parent b08923d commit 3c9168f
Show file tree
Hide file tree
Showing 11 changed files with 4,019 additions and 4 deletions.
3 changes: 2 additions & 1 deletion usr/src/man/man7d/Makefile
Expand Up @@ -11,7 +11,7 @@

#
# Copyright 2011, Richard Lowe
# Copyright 2013 Nexenta Systems, Inc. All rights reserved.
# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
#

Expand Down Expand Up @@ -219,6 +219,7 @@ i386_MANFILES= ahci.7d \
npe.7d \
ntxn.7d \
nv_sata.7d \
nvme.7d \
pcn.7d \
radeon.7d \
ral.7d \
Expand Down
95 changes: 95 additions & 0 deletions usr/src/man/man7d/nvme.7d
@@ -0,0 +1,95 @@
.\"
.\" 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 2015 Nexenta Systems, Inc. All rights reserved.
.\"
.Dd July 20, 2015
.Dt NVME 7D
.Os
.Sh NAME
.Nm nvme
.Nd Intel NVMe compliant storage driver
.Sh DESCRIPTION
The
.Nm
driver uses the
.Xr blkdev 7D
framework to provide access to
.Tn Intel
NVMe compliant solid-state storage devices.
.Lp
NVMe devices supporting multiple namespaces will present each
namespace as its own
.Xr blkdev 7D
instance in the system.
.
.Sh CONFIGURATION
The
.Nm
driver can be configured by defining properties in the \fBnvme.conf\fR
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 up to specification version 1.0.
.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-queue-len
This is the number of entries in each I/O command queue. Legal values
are between 16 and 65536, the default value is 1024.
.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 what 1/10th of the admin
queue length if it is less.
.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 corresponds to 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 7I .
.El
.
.Sh SEE ALSO
.Xr blkdev 7D
45 changes: 45 additions & 0 deletions usr/src/pkg/manifests/driver-storage-nvme.mf
@@ -0,0 +1,45 @@
#
# CDDL HEADER START
#
# 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.
#
# CDDL HEADER END
#

#
# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
#

#
# The default for payload-bearing actions in this package is to appear in the
# global zone only. See the include file for greater detail, as well as
# information about overriding the defaults.
#
<include global_zone_only_component>
set name=pkg.fmri value=pkg:/driver/storage/nvme@$(PKGVERS)
set name=pkg.description \
value="Driver for Intel NVMe 1.0e compliant storage devices"
set name=pkg.summary value="NVMe driver"
set name=info.classification \
value=org.opensolaris.category.2008:System/Hardware
set name=variant.arch value=i386
dir path=kernel group=sys
dir path=kernel/drv group=sys
dir path=kernel/drv/$(ARCH64) group=sys
dir path=usr group=sys
dir path=usr/share
dir path=usr/share/man
dir path=usr/share/man/man7d
driver name=nvme alias=pciex8086,953 class=disk perms="* 0600 root sys"
file path=kernel/drv/$(ARCH64)/nvme group=sys
file path=kernel/drv/nvme group=sys
file path=kernel/drv/nvme.conf group=sys
file path=usr/share/man/man7d/nvme.7d
license lic_CDDL license=lic_CDDL
4 changes: 3 additions & 1 deletion usr/src/uts/common/Makefile.files
Expand Up @@ -24,7 +24,7 @@
# Copyright (c) 2012 Joyent, Inc. All rights reserved.
# Copyright (c) 2011, 2014 by Delphix. All rights reserved.
# Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
# Copyright 2014 Nexenta Systems, Inc. All rights reserved.
# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
#

#
Expand Down Expand Up @@ -1863,6 +1863,8 @@ YGE_OBJS = yge.o

SKD_OBJS = skd.o

NVME_OBJS = nvme.o

#
# Build up defines and paths.
#
Expand Down
9 changes: 8 additions & 1 deletion usr/src/uts/common/Makefile.rules
Expand Up @@ -22,7 +22,7 @@
#
# Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2013 Garrett D'Amore <garrett@damore.org>
# Copyright 2014 Nexenta Systems, Inc. All rights reserved.
# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
#

#
Expand Down Expand Up @@ -990,6 +990,10 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/nge/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)

$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/nvme/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)

$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/nxge/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
Expand Down Expand Up @@ -2288,6 +2292,9 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/net80211/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/nge/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))

$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/nvme/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))

$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/nxge/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))

Expand Down

0 comments on commit 3c9168f

Please sign in to comment.