nvme-cli: Huawei plug-in.
Subsystems (3)
PATCH 1/1 nvme-cli: Huawei plug-in.
This patch adds support for Vendor unique commands for Huawei devices. Following commands are supported in current version of this extension:
1.list List addition info (such as namespace name and array name) for Huawei devices
--- Documentation/nvme-huawei-list.1 | 54 +++ Documentation/nvme-huawei-list.html | 806 ++++++++++++++++++++++++++++++++++++ Documentation/nvme-huawei-list.txt | 31 ++ Makefile | 2 +- huawei-nvme.c | 382 +++++++++++++++++ huawei-nvme.h | 17 + 6 files changed, 1291 insertions(+), 1 deletion(-) create mode 100644 Documentation/nvme-huawei-list.1 create mode 100644 Documentation/nvme-huawei-list.html create mode 100644 Documentation/nvme-huawei-list.txt create mode 100644 huawei-nvme.c create mode 100644 huawei-nvme.h
Documentation/nvme-huawei-list.1 new file +54 -0
@@ -0,0 +1,54 @@ +'\" t +.\" Title: nvme-huawei-list +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> +.\" Date: 04/25/2017 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "NVME\-HUAWEI\-LIST" "1" "04/25/2017" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-huawei-list \- List all recognized Huawei NVMe devices +.SH "SYNOPSIS" +.sp +.nf +\fInvme list\fR [\-o <fmt> | \-\-output\-format=<fmt>] +.fi +.SH "DESCRIPTION" +.sp +Scan the sysfs tree for NVM Express devices and return the /dev node for those Huawei devices as well as some pertinent information about them\&. +.SH "OPTIONS" +.PP +\-o <format>, \-\-output\-format=<format> +.RS 4 +Set the reporting format to +\fInormal\fR +or +\fIjson\fR\&. Only one output format can be used at a time\&. +.RE +.SH "EXAMPLES" +.sp +No examples yet\&. +.SH "NVME" +.sp +Part of the nvme\-user suite
Documentation/nvme-huawei-list.html new file +806 -0
806 lines not on this page · raw message
Documentation/nvme-huawei-list.txt new file +31 -0
@@ -0,0 +1,31 @@ +nvme-list(1) +============ + +NAME +---- +nvme-huawei-list - List all recognized Huawei NVMe devices + +SYNOPSIS +-------- +[verse] +'nvme huawei list' [-o <fmt> | --output-format=<fmt>] + +DESCRIPTION +----------- +Scan the sysfs tree for NVM Express devices and return the /dev node +for those Huawei devices as well as some pertinent information about them. + +OPTIONS +------- +-o <format>:: +--output-format=<format>:: + Set the reporting format to 'normal' or 'json'. Only one output + format can be used at a time. + +EXAMPLES +-------- +No examples yet. + +NVME +---- +Part of the nvme-user suite
Makefile +1 -1
@@ -33,7 +33,7 @@ NVME_DPKG_VERSION=1~`lsb_release -sc` OBJS := argconfig.o suffix.o parser.o nvme-print.o nvme-ioctl.o \ nvme-lightnvm.o fabrics.o json.o plugin.o intel-nvme.o \ - lnvm-nvme.o memblaze-nvme.o wdc-nvme.o nvme-models.o + lnvm-nvme.o memblaze-nvme.o wdc-nvme.o nvme-models.o huawei-nvme.o nvme: nvme.c nvme.h $(OBJS) NVME-VERSION-FILE $(CC) $(CPPFLAGS) $(CFLAGS) nvme.c -o $(NVME) $(OBJS) $(LDFLAGS)
huawei-nvme.c new file +382 -0
382 lines not on this page · raw message
huawei-nvme.h new file +17 -0
@@ -0,0 +1,17 @@ +#undef CMD_INC_FILE +#define CMD_INC_FILE huawei-nvme + +#if !defined(HUAWEI_NVME ) || defined(CMD_HEADER_MULTI_READ ) +#define HUAWEI_NVME + +#include "cmd.h" + +PLUGIN (NAME ("huawei" ,"Huawei vendor specific extensions" ), +COMMAND_LIST ( +ENTRY ("list" ,"List all Huawei NVMe devices and namespaces on machine" , huawei_list) + ) +); + +#endif + +#include "define_cmd.h"
Signature · 1 line
2.6.4.windows.1
PATCH 1/1 nvme-cli: Huawei plug-in.
Quoted 4 lines · Zou Ming
This patch adds support for Vendor unique commands for Huawei devices. Following commands are supported in current version of this extension:
1.list List addition info (such as namespace name and array name) for Huawei devices
Looks fine. You may want to add a vendor specific id-ns and id-ctrl to decode those VS bits for individual namespaces and controllers beyond the full list, but this is a start.
I fixed up some of the formatting and applied. Thanks!
hi,Keith
Thanks a lot for your reivew.
We will continue to enhance the Huawei plug-in.
Best wishes,
Zou Ming, Philip Yang
-----????-----
???: Keith Busch [mailto:keith.busch at intel.com]
????: 2017?4?27? 23:35
???: Zouming (IT) <zouming.zouming at huawei.com>
??: linux-nvme at lists.infradead.org; guanjunxiong <guanjunxiong at huawei.com>; Yangfeng (B) <philip.yang at huawei.com>; Shenhong (C) <shenhong09 at huawei.com>; Hege (A) <hege09 at huawei.com>; Qiuxin (robert) <qiuxin at huawei.com> ??: Re: [PATCH] nvme-cli: Huawei plug-in.
Quoted 5 lines · Zou Ming
This patch adds support for Vendor unique commands for Huawei devices. Following commands are supported in current version of this extension:
1.list List addition info (such as namespace name and array name) for Huawei devices
Looks fine. You may want to add a vendor specific id-ns and id-ctrl to decode those VS bits for individual namespaces and controllers beyond the full list, but this is a start.
I fixed up some of the formatting and applied. Thanks!