]> www.infradead.org Git - users/hch/nvme-cli.git/log
users/hch/nvme-cli.git
7 years agoRelease v1.5 v1.5
Keith Busch [Wed, 3 Jan 2018 15:37:02 +0000 (08:37 -0700)]
Release v1.5

It's been a while since the previous release, and we've accumulated
enough updates to warrant a new tag. Shortlog below.

There are printing fixes and improvements to output, documentation
updates, enhancements to vendor plugins, updates for the NVMe 1.3
Specification, a new command for listing subsystems, a new way to alias
sub-commands in case old ones need to be deprecated, fabrics fixes,
and resource leak fixes. Thank you to everyone who contributed!

Andrew Maier (2):
      Nitpicked a printing alignment issue with the id-ns vendor specific field
      Updated the human readable printing for the SGLS field in the id-ctrl command to be compliant with NVMe 1.3

David Manouchehri (1):
      Avoid unnecessary abbreviation.

Guan Junxiong (2):
      nvme-cli: add support to get properties for NVMe over Fabric
      nvme-cli: support to set the property for NVMe over Fabric

James Smart (2):
      nvme-cli: add duplicate_connect parameter support
      nvme-cli: add duplicate_connect parameter support

Jeff Lien (2):
      NVMe-CLI : WDC-Plugin Updated Smart Log Command
      NVMe-CLI : WDC-Plugin Documentation for Updated Smart Log Command

Johannes Thumshirn (2):
      fabrics: also set queue_size and nr_io_queues on connect-all connects
      nvme: Introduce new 'list-subsys' command

Keith Busch (28):
      Add AEN decoder helper to get-log
      Regen documentation
      Merge pull request #228 from primeos/nixos
      intel-nvme: Fix compiler errors and warnings
      Merge pull request #229 from steve-gh/master
      Add command effects log page
      Increase default format timeout
      Revert "nvme-cli: add duplicate_connect parameter support"
      Merge pull request #230 from liangxiao1/upstream
      Fix typo in previous commit
      Fix long suffix parse on 32-bit machines
      Merge pull request #232 from Manouchehri/verbose
      nvme/flush: explicitely close file descriptor
      Merge pull request #233 from cleandever/master
      Add 'DEAC' support to write-zeroes command
      Rebuild documentation
      Regenerate documentation
      Update get-feature help text
      Improve code alignment on intel plugin
      Update intel internal log man page.
      nvme-cli/intel: Return if arg parsing returns error
      nvme: add options for write command directives
      Update documentation
      Merge pull request #238 from Eideticom/andrew-dev
      Reorder command list
      Documentation fixes
      Update documentation to use aliases
      Merge pull request #243 from ScottyBauer/fix_mem_leak

Michael Weiss (2):
      Add Nix(OS) install instructions to the README
      Fix the Markdown code for the Alpine install instructions

Minwoo Im (11):
      nvme-cli: make address print format more human-readable
      nvme-cli: fix wrong bitmask in number of rpmb units.
      nvme-cli: make command description const
      nvme-cli: resync nvme.h with the kernel's
      nvme-cli: update show_registers_cc() to use nvme.h
      nvme-cli: replace values of all namespaces with NVME_NSID_ALL
      nvme-cli: add prints for new HMB identify fields of TP 4002
      nvme-cli: add support alias command with Firmware Activate
      nvme-cli: update Firmware Commit with boot partition feature
      nvme-cli: add command specific status of Firmware Commit
      nvme-cli: add prints of boot partition feature to show-regs

Scott Bauer (1):
      nvme-cli: Fix small mem leak.

Steve (2):
      Include sizing data in json output that's already included in the non-json results.
      Cleanup variable definitions

Xiao Liang (1):
      nvme/id-ns: do not try to get namespace id from non-block device.

cleandever (1):
      Fix memory leak

jeffreyalien (1):
      nvme-cli : wdc-plugin Add support for WDC SN100 and SN200 devices.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #243 from ScottyBauer/fix_mem_leak
Keith Busch [Thu, 21 Dec 2017 21:53:58 +0000 (14:53 -0700)]
Merge pull request #243 from ScottyBauer/fix_mem_leak

nvme-cli: Fix small mem leak.

7 years agonvme-cli: Fix small mem leak.
Scott Bauer [Thu, 21 Dec 2017 21:21:59 +0000 (14:21 -0700)]
nvme-cli: Fix small mem leak.

Internally some people are building with asan which complains
that we're leaking that memory. So we'll fix it for them.

Signed-off-by: Scott Bauer <scott.bauer@intel.com>
7 years agonvme-cli: add prints of boot partition feature to show-regs
Minwoo Im [Fri, 15 Dec 2017 15:17:59 +0000 (00:17 +0900)]
nvme-cli: add prints of boot partition feature to show-regs

Add prints of Boot Partition feature.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoUpdate documentation to use aliases
Keith Busch [Tue, 19 Dec 2017 20:33:49 +0000 (13:33 -0700)]
Update documentation to use aliases

Firmware activate is now called 'fw-commit', so this patch updates the
documentation, documents the options, and renames the man page. The firmware
activate will alias to the new man page if requested.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: add command specific status of Firmware Commit
Minwoo Im [Sun, 17 Dec 2017 09:58:53 +0000 (18:58 +0900)]
nvme-cli: add command specific status of Firmware Commit

NVMe 1.3 spec introduced Boot Partition feature with Boot Partition
Write Prohibited status code for Firmware Commit command.

Add this status code and print statement when parsing error code.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: update Firmware Commit with boot partition feature
Minwoo Im [Sun, 17 Dec 2017 09:58:41 +0000 (18:58 +0900)]
nvme-cli: update Firmware Commit with boot partition feature

NVMe 1.3 spec introduced boot partition feature to Firmware Commit
command.

Make it support boot partition feature in Firmware Commit command.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: add support alias command with Firmware Activate
Minwoo Im [Sun, 17 Dec 2017 09:58:28 +0000 (18:58 +0900)]
nvme-cli: add support alias command with Firmware Activate

Firmware Activate command were known as "Firmware Activate" in NVMe 1.0
and 1.1. It has been changed to "Firmware Commit" since 1.2.

This patch will make it support a single alias for every subcommands.
Also make "fw-activate" command to be registered in "fw-commit" as an
alias for backward compatibility.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoDocumentation fixes
Keith Busch [Wed, 13 Dec 2017 15:32:49 +0000 (08:32 -0700)]
Documentation fixes

Fixed asciidoc errors in set-properties, regenerated remaining documentation
files for latest updates.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoReorder command list
Keith Busch [Wed, 13 Dec 2017 15:29:38 +0000 (08:29 -0700)]
Reorder command list

Puts list commands at the top.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: support to set the property for NVMe over Fabric
Guan Junxiong [Wed, 13 Dec 2017 02:11:31 +0000 (10:11 +0800)]
nvme-cli: support to set the property for NVMe over Fabric

Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com>
7 years agonvme-cli: add support to get properties for NVMe over Fabric
Guan Junxiong [Wed, 13 Dec 2017 02:11:30 +0000 (10:11 +0800)]
nvme-cli: add support to get properties for NVMe over Fabric

Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com>
7 years agonvme: Introduce new 'list-subsys' command
Johannes Thumshirn [Wed, 13 Dec 2017 14:34:17 +0000 (15:34 +0100)]
nvme: Introduce new 'list-subsys' command

Introduce a 'nvme list-subsys' command to give basic information about
connected NVMe subsystems.

Here's an example output of a host connected to two subsystems on the
target with two paths to each subsystem:
root@host# nvme list-subsys
nvme-subsys0 - NQN=nvmf-test
\
 +- nvme0 rdma traddr=1.1.1.3 trsvcid=4420 host_traddr=1.1.1.1
 +- nvme1 rdma traddr=1.1.1.3 trsvcid=4420 host_traddr=1.1.1.2
nvme-subsys1 - NQN=nvmf-test2
\
 +- nvme2 rdma traddr=1.1.1.3 trsvcid=4420 host_traddr=1.1.1.2
 +- nvme3 rdma traddr=1.1.1.3 trsvcid=4420 host_traddr=1.1.1.1

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
7 years agoMerge pull request #238 from Eideticom/andrew-dev
Keith Busch [Tue, 12 Dec 2017 23:53:22 +0000 (16:53 -0700)]
Merge pull request #238 from Eideticom/andrew-dev

Update human readable for SGLS field in identify controller to NVMe 1.3

7 years agoUpdated the human readable printing for the SGLS field in the id-ctrl command to...
Andrew Maier [Tue, 12 Dec 2017 23:14:39 +0000 (16:14 -0700)]
Updated the human readable printing for the SGLS field in the id-ctrl command to be compliant with NVMe 1.3

7 years agoUpdate documentation
Keith Busch [Sun, 10 Dec 2017 16:46:15 +0000 (09:46 -0700)]
Update documentation

Spinning docs to include the nvme write directives.

Signed-off-by: Keith Busch <keith.busch@gmail.com>
7 years agonvme: add options for write command directives
Keith Busch [Sun, 10 Dec 2017 16:42:09 +0000 (09:42 -0700)]
nvme: add options for write command directives

This patch includes options to specify the directive type and directive
specific. The field is meant to be used for write commands, but since
the code reuse for read, write, and compare currently exists, the options
will appear available to commands other than write.

Since the directive specific is part of the larger DSM field, this patch
also incorporates an option for the non-directive specific portion of
the DSM field.

https://github.com/linux-nvme/nvme-cli/issues/235

Signed-off-by: Keith Busch <keith.busch@gmail.com>
7 years agonvme-cli/intel: Return if arg parsing returns error
Keith Busch [Thu, 7 Dec 2017 18:03:39 +0000 (11:03 -0700)]
nvme-cli/intel: Return if arg parsing returns error

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoUpdate intel internal log man page.
Keith Busch [Thu, 30 Nov 2017 22:58:21 +0000 (15:58 -0700)]
Update intel internal log man page.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoImprove code alignment on intel plugin
Keith Busch [Thu, 30 Nov 2017 22:48:07 +0000 (15:48 -0700)]
Improve code alignment on intel plugin

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoUpdate get-feature help text
Keith Busch [Thu, 30 Nov 2017 21:57:42 +0000 (14:57 -0700)]
Update get-feature help text

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: add prints for new HMB identify fields of TP 4002
Minwoo Im [Thu, 30 Nov 2017 14:20:01 +0000 (23:20 +0900)]
nvme-cli: add prints for new HMB identify fields of TP 4002

Add prints to __show_nvme_id_ctrl() for fields which were
added in TP 4002 which is "HMB Enhancements".

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: replace values of all namespaces with NVME_NSID_ALL
Minwoo Im [Thu, 30 Nov 2017 14:49:19 +0000 (23:49 +0900)]
nvme-cli: replace values of all namespaces with NVME_NSID_ALL

Replace all magic numbers(0xffffffff) which means all namespaces
with NVME_NSID_ALL applied by a commit
c5a1120("nvme-cli: resync nvme.h with the kernel's").

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: update show_registers_cc() to use nvme.h
Minwoo Im [Thu, 30 Nov 2017 15:49:17 +0000 (00:49 +0900)]
nvme-cli: update show_registers_cc() to use nvme.h

Replace constants for shift in show_register_cc() with macros defined.
Also clean up a small typo (IOSQES to IOCQES).

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agoRegenerate documentation
Keith Busch [Tue, 28 Nov 2017 15:45:10 +0000 (08:45 -0700)]
Regenerate documentation

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoNVMe-CLI : WDC-Plugin Documentation for Updated Smart Log Command
Jeff Lien [Tue, 28 Nov 2017 15:43:40 +0000 (08:43 -0700)]
NVMe-CLI : WDC-Plugin Documentation for Updated Smart Log Command

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
[Split html and man pages from txt]
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoNVMe-CLI : WDC-Plugin Updated Smart Log Command
Jeff Lien [Tue, 28 Nov 2017 14:28:56 +0000 (08:28 -0600)]
NVMe-CLI : WDC-Plugin Updated Smart Log Command

Added the capability to get the CA Log Page data for the WDC SN200
drive along with the C1 Log Page data. Only the C1 Log Page data will
be retrieve for the HGST SN100 drive.

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
[Fixed subject and whitespace]
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: resync nvme.h with the kernel's
Minwoo Im [Tue, 28 Nov 2017 14:41:17 +0000 (23:41 +0900)]
nvme-cli: resync nvme.h with the kernel's

Copy over nvme.h from for-4.15/block tree to a current one in nvme-cli
and fix a few build errors.

7 years agoRebuild documentation
Keith Busch [Mon, 27 Nov 2017 15:58:14 +0000 (08:58 -0700)]
Rebuild documentation

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoAdd 'DEAC' support to write-zeroes command
Keith Busch [Mon, 27 Nov 2017 15:55:58 +0000 (08:55 -0700)]
Add 'DEAC' support to write-zeroes command

https://github.com/linux-nvme/nvme-cli/issues/234

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #233 from cleandever/master
Keith Busch [Mon, 27 Nov 2017 15:06:55 +0000 (08:06 -0700)]
Merge pull request #233 from cleandever/master

Fix memory leak

7 years agoFix memory leak
cleandever [Thu, 23 Nov 2017 13:19:11 +0000 (22:19 +0900)]
Fix memory leak

7 years agonvme/flush: explicitely close file descriptor
Keith Busch [Mon, 20 Nov 2017 20:18:51 +0000 (13:18 -0700)]
nvme/flush: explicitely close file descriptor

Was alread closed implicitly immediately after this function returns,
but there's no reason to leave it open either.

Reported-by: Thomas Tai <thomas.tai@oracle.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #232 from Manouchehri/verbose
Keith Busch [Mon, 13 Nov 2017 15:09:00 +0000 (08:09 -0700)]
Merge pull request #232 from Manouchehri/verbose

Avoid unnecessary abbreviation

7 years agoAvoid unnecessary abbreviation.
David Manouchehri [Sat, 11 Nov 2017 23:29:58 +0000 (18:29 -0500)]
Avoid unnecessary abbreviation.

7 years agoNitpicked a printing alignment issue with the id-ns vendor specific field
Andrew Maier [Fri, 10 Nov 2017 16:58:03 +0000 (09:58 -0700)]
Nitpicked a printing alignment issue with the id-ns vendor specific field

7 years agoFix long suffix parse on 32-bit machines
Keith Busch [Mon, 6 Nov 2017 21:10:08 +0000 (14:10 -0700)]
Fix long suffix parse on 32-bit machines

https://github.com/linux-nvme/nvme-cli/issues/231

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoFix typo in previous commit
Keith Busch [Mon, 6 Nov 2017 21:09:14 +0000 (14:09 -0700)]
Fix typo in previous commit

A previous commit had a stray mark that was missed in review, and broke compiling.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #230 from liangxiao1/upstream
Keith Busch [Mon, 6 Nov 2017 21:01:42 +0000 (14:01 -0700)]
Merge pull request #230 from liangxiao1/upstream

nvme/id-ns: do not try to get namespace id from non-block device.

7 years agonvme/id-ns: do not try to get namespace id from non-block device.
Xiao Liang [Wed, 1 Nov 2017 14:49:32 +0000 (22:49 +0800)]
nvme/id-ns: do not try to get namespace id from non-block device.

namespace id's default value is 0 and changed to 15 by get_nsid()
when device is not a block device.

With this change:
# ./nvme id-ns /dev/nvme0 -n 0
Error: requesting namespace-id from non-block device
NVMe Status:INVALID_NS(b) NSID:0
                               ^^
Without this change:
Missleading output when user passed 0 or 15 as namespace id.
# nvme id-ns /dev/nvme0
Error: requesting namespace-id from non-block device
NVMe Status:INVALID_NS(b) NSID:15
                               ^^
# nvme id-ns /dev/nvme0 -n 0
Error: requesting namespace-id from non-block device
NVMe Status:INVALID_NS(b) NSID:15
                               ^^
# nvme id-ns /dev/nvme0 -n 15
NVMe Status:INVALID_NS(b) NSID:15

Signed-off-by: Xiao Liang <xiliang@redhat.com>
7 years agonvme-cli: make command description const
Minwoo Im [Sat, 28 Oct 2017 18:26:33 +0000 (03:26 +0900)]
nvme-cli: make command description const

Make desc in sanitize_log() const.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: fix wrong bitmask in number of rpmb units.
Minwoo Im [Sat, 28 Oct 2017 18:01:52 +0000 (03:01 +0900)]
nvme-cli: fix wrong bitmask in number of rpmb units.

Number of RPMB Units is a 3-bit field[02:00].
Bitmask should be 0111b(7h) to get this field.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
7 years agonvme-cli: add duplicate_connect parameter support
James Smart [Fri, 20 Oct 2017 23:18:15 +0000 (16:18 -0700)]
nvme-cli: add duplicate_connect parameter support

Add support for the duplicate_connect parameter for the fabrics
device.

Rather than add yet another 6-line code block, created a small helper
routine invoked for each argument option.

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoRevert "nvme-cli: add duplicate_connect parameter support"
Keith Busch [Fri, 27 Oct 2017 16:37:55 +0000 (10:37 -0600)]
Revert "nvme-cli: add duplicate_connect parameter support"

This reverts commit 6d0325499981b3418624b6ff9c2d43285c711d3c.

7 years agoIncrease default format timeout
Keith Busch [Fri, 27 Oct 2017 16:35:51 +0000 (10:35 -0600)]
Increase default format timeout

Some formats take a while, and that's okay. Don't make users remember
to increase the timeout size for it.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoAdd command effects log page
Keith Busch [Fri, 27 Oct 2017 16:09:52 +0000 (10:09 -0600)]
Add command effects log page

This prints out the nvme command effects log page for all commands the
log reports to be supported.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #229 from steve-gh/master
Keith Busch [Mon, 23 Oct 2017 20:57:31 +0000 (14:57 -0600)]
Merge pull request #229 from steve-gh/master

Include sizing data in json output that's included in the non-json results

7 years agoCleanup variable definitions
Steve [Mon, 23 Oct 2017 20:55:33 +0000 (16:55 -0400)]
Cleanup variable definitions

7 years agoInclude sizing data in json output that's already included in the non-json results.
Steve [Mon, 23 Oct 2017 20:46:32 +0000 (16:46 -0400)]
Include sizing data in json output that's already included in the non-json results.

7 years agointel-nvme: Fix compiler errors and warnings
Keith Busch [Mon, 23 Oct 2017 19:13:01 +0000 (13:13 -0600)]
intel-nvme: Fix compiler errors and warnings

This initializes the intel log specific structures to offsets from
dynamically allocated structure to avoid gcc casting errors.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #228 from primeos/nixos
Keith Busch [Mon, 23 Oct 2017 14:58:09 +0000 (08:58 -0600)]
Merge pull request #228 from primeos/nixos

README: Add Nix(OS) install instructions and fix some minor Markdown mistakes

7 years agonvme-cli: make address print format more human-readable
Minwoo Im [Sat, 21 Oct 2017 04:23:16 +0000 (13:23 +0900)]
nvme-cli: make address print format more human-readable

Memory address would be great in hexadecimal format to be read easily.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoFix the Markdown code for the Alpine install instructions
Michael Weiss [Sat, 21 Oct 2017 20:23:38 +0000 (22:23 +0200)]
Fix the Markdown code for the Alpine install instructions

And remove some trailing whitespaces.

7 years agoAdd Nix(OS) install instructions to the README
Michael Weiss [Sat, 21 Oct 2017 20:14:14 +0000 (22:14 +0200)]
Add Nix(OS) install instructions to the README

7 years agoRegen documentation
Keith Busch [Fri, 20 Oct 2017 21:12:19 +0000 (15:12 -0600)]
Regen documentation

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoAdd AEN decoder helper to get-log
Keith Busch [Fri, 20 Oct 2017 21:11:18 +0000 (15:11 -0600)]
Add AEN decoder helper to get-log

This is a convenience helper for retreiving logs from an AEN result.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli : wdc-plugin Add support for WDC SN100 and SN200 devices.
jeffreyalien [Tue, 17 Oct 2017 16:56:43 +0000 (11:56 -0500)]
nvme-cli : wdc-plugin Add support for WDC SN100 and SN200 devices.

Update the checking for the wdc-plugin commands so that a
"Device not supported" message will be displayed for non-WDC
devices.

Signed-off-by: jeffreyalien <jeff.lien@wdc.com>
7 years agonvme-cli: add duplicate_connect parameter support
James Smart [Wed, 11 Oct 2017 00:35:36 +0000 (17:35 -0700)]
nvme-cli: add duplicate_connect parameter support

Add support for the duplicate_connect parameter for the fabrics
device.

Rather than add yet another 6-line code block, created a small helper
routine invoked for each argument option.

Signed-off-by: James Smart <james.smart@broadcom.com>
7 years agofabrics: also set queue_size and nr_io_queues on connect-all connects
Johannes Thumshirn [Tue, 17 Oct 2017 08:48:38 +0000 (10:48 +0200)]
fabrics: also set queue_size and nr_io_queues on connect-all connects

Although nvme connect-all -Q does set the queue_size parameter for the initial
discovery connection, it does not set it for the subsequent connections to the
discovered targets.

An
yields the following:

write(3, "nqn=nqn.2014-08.org.nvmexpress.d"..., 180) = 180
 | 00000  6e 71 6e 3d 6e 71 6e 2e  32 30 31 34 2d 30 38 2e  nqn=nqn.2014-08. |
 | 00010  6f 72 67 2e 6e 76 6d 65  78 70 72 65 73 73 2e 64  org.nvmexpress.d |
 | 00020  69 73 63 6f 76 65 72 79  2c 74 72 61 6e 73 70 6f  iscovery,transpo |
 | 00030  72 74 3d 72 64 6d 61 2c  74 72 61 64 64 72 3d 31  rt=rdma,traddr=1 |
 | 00040  2e 31 2e 31 2e 33 2c 74  72 73 76 63 69 64 3d 34  .1.1.3,trsvcid=4 |
 | 00050  34 32 30 2c 68 6f 73 74  6e 71 6e 3d 6e 71 6e 2e  420,hostnqn=nqn. |
 | 00060  32 30 31 34 2d 30 38 2e  6f 72 67 2e 6e 76 6d 65  2014-08.org.nvme |
 | 00070  78 70 72 65 73 73 3a 4e  56 4d 66 3a 75 75 69 64  xpress:NVMf:uuid |
 | 00080  3a 64 34 35 32 39 37 64  34 2d 38 38 62 31 2d 34  :d45297d4-88b1-4 |
 | 00090  34 65 63 2d 61 37 36 33  2d 61 61 30 37 32 39 35  4ec-a763-aa07295 |
 | 000a0  36 34 32 37 33 0a 2c 71  75 65 75 65 5f 73 69 7a  64273.,queue_siz |
 | 000b0  65 3d 36 34                                       e=64             |
write(3, "1", 1)                        = 1
 | 00000  31                                                1                |
write(3, "nqn=nvmf-test,hostnqn=nqn.2014-0"..., 139) = 139
 | 00000  6e 71 6e 3d 6e 76 6d 66  2d 74 65 73 74 2c 68 6f  nqn=nvmf-test,ho |
 | 00010  73 74 6e 71 6e 3d 6e 71  6e 2e 32 30 31 34 2d 30  stnqn=nqn.2014-0 |
 | 00020  38 2e 6f 72 67 2e 6e 76  6d 65 78 70 72 65 73 73  8.org.nvmexpress |
 | 00030  3a 4e 56 4d 66 3a 75 75  69 64 3a 64 34 35 32 39  :NVMf:uuid:d4529 |
 | 00040  37 64 34 2d 38 38 62 31  2d 34 34 65 63 2d 61 37  7d4-88b1-44ec-a7 |
 | 00050  36 33 2d 61 61 30 37 32  39 35 36 34 32 37 33 0a  63-aa0729564273. |
 | 00060  2c 74 72 61 6e 73 70 6f  72 74 3d 72 64 6d 61 2c  ,transport=rdma, |
 | 00070  74 72 61 64 64 72 3d 31  2e 31 2e 31 2e 33 2c 74  traddr=1.1.1.3,t |
 | 00080  72 73 76 63 69 64 3d 34  34 32 30                 rsvcid=4420      |
+++ exited with 0 +++

So set the size parameter requested needed as well and while we're add it also
propagate the nr_io_queues down.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimber.me>
7 years agoVersion 1.4 Release v1.4
Keith Busch [Fri, 22 Sep 2017 22:11:02 +0000 (18:11 -0400)]
Version 1.4 Release

Some new features from the NVMe 1.3 Specification are starting to be
incorporated with this release with new field decoding and commands,
including sanitize and directives. Lots of other bug fixes, documentation
updates, and output format. Thank you to everyone who contributed. More
updates from the latest specifcation will be incorporated in the next
release.

Shortlog:

Aaron Miller (1):
      fix use-after-free in pci.ids parsing

Baruch Siach (1):
      Makefile: allow linker override for cross uuid test

Chaitanya Kulkarni (7):
      nvme-cli: add error message for nvme list.
      nvme-cli : add support for sanitize command.
      nvme-cli : add sanitize command documentation.
      nvme-cli : add support for retrieving sanitize log.
      nvme-cli : add sanitize-log command documentation.
      nvme-cli : wdc-plug-in : return on invalid input device.
      nvme-cli : only print help text and return for nvme list -h option.

Charlesworth, Thomas J (1):
      nvme-cli: Fix nvme ns desc

Christoph Hellwig (2):
      resync nvme.h with the kernel nvme.h
      fix build without libuuid

Daniel Verkamp (1):
      nvme-cli: generate spec-compliant UUID NQNs

Guan Junxiong (8):
      nvme-cli: add fields into identify controller data structure
      nvme-cli: show more fields for id-ctrl
      nvme-cli: add thermal management fields for smart-log
      nvme-cli: add temperature sensor fields in json_smart_log
      nvme-cli: add output-format discription for smart-log
      nvme-cli/list-ns: fix identifying active or allocated namespaces list
      nvme-cli/list: fix when nvme device can not be open
      nvme-cli: fix connecting failure due to invalid uuid format of hostid

Guilherme G. Piccoli (1):
      nvme-cli: Fix typo in Intel plugin and improve generic help text

Gwendal Grignou (1):
      nvme-cli: Describe action 3 of nvme activate

Jeff Lien (2):
      NVMe-CLI Fix Sanitize Command Parameter Types
      NVMe-CLI Fixed Status Code check for reset type on fw-activate.

Johannes Thumshirn (2):
      fabrics: add hostid option to connect command
      nvme-cli: add ns-descs subcommand

Jon Derrick (2):
      Show help when no or an invalid device is given
      Show help for nvme reset and subsystem-reset

Keith Busch (7):
      nvme-print: Free only top-level json objects
      Formatting update
      Regenerate documentation
      Show help for get-ns-id
      Update docs
      Fix app tag and mask setting
      Fix app tag field sizes

Kwan (Hingkwan) Huen-SSI (2):
      nvme-cli: add nvme directive command support
      nvme-cli: add documentation for directive commands

Mandar Thorat (1):
      Update nvme.c

Mete Balci (3):
      fix for issue 219, show-regs reports AQA.ACQS and AQA.ASQS as bytes
      new bit fields (6, 7, and 8) for OACS from NVMe rev 1.3
      added new bit field (6) to ONCS from NVMe rev 1.3

Michael Davis (1):
      Fixed get_internal_log to parse the entire nlog and allow selection of specific regions to be parsed.

Narasimhan V (1):
      Fix typo of flbas in nvme_create_max_ns_test

Nitzan Carmi (1):
      nvme-cli/fabrics: Add ctrl-loss-tmo param to connect cmd

Rodrigo R. Galvão (1):
      Fix spelling errors

Schremmer, Steven (3):
      nvme-cli: id-ctrl: display additional fields
      nvme-cli: Get Feature support for Extended Host Id
      nvme-cli: Extended Data Structure in resv-report

Scott Bauer (1):
      Implement Intel Vendor specific logs

Xiao Liang (1):
      nvme-cli/list: change fd returned by open operation from unsigned to signed.

Zou (1):
      nvme-cli: add id-ctrl for nvme-huawei plug-in.

jeffreyalien (2):
      nvme-cli : Add Namespace Rescan Command
      nvme-cli : Add man documentation files for ns-rescan command.

mandarcthorat (2):
      Fixing macro definitions to avoid issues when these are used in expressions
      Added handling for temperature threshold values below 0C(273K) and removed buffer check for human readable output as Temperature threshold feature does not use Memory Buffer for Attributes

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli : Add man documentation files for ns-rescan command.
jeffreyalien [Fri, 22 Sep 2017 21:52:27 +0000 (16:52 -0500)]
nvme-cli : Add man documentation files for ns-rescan command.

Signed-off-by: jeffreyalien <jeff.lien@wdc.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli : Add Namespace Rescan Command
jeffreyalien [Fri, 22 Sep 2017 21:51:45 +0000 (16:51 -0500)]
nvme-cli : Add Namespace Rescan Command

Signed-off-by: jeffreyalien <jeff.lien@wdc.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #224 from mandarcthorat/master
Keith Busch [Thu, 14 Sep 2017 16:08:24 +0000 (10:08 -0600)]
Merge pull request #224 from mandarcthorat/master

Added handling for temperature threshold values below 0C(273K)

7 years agoUpdate nvme.c
Mandar Thorat [Wed, 13 Sep 2017 20:34:38 +0000 (02:04 +0530)]
Update nvme.c

Reverting the cdw11 bit masking with cdw0 result as per review discussion

7 years agoAdded handling for temperature threshold values below 0C(273K) and removed buffer...
mandarcthorat [Wed, 13 Sep 2017 19:00:51 +0000 (00:30 +0530)]
Added handling for temperature threshold values below 0C(273K) and removed buffer check for human readable output as Temperature threshold feature does not use Memory Buffer for Attributes

 Changes to be committed:
modified:   nvme-print.c
modified:   nvme.c

7 years agoNVMe-CLI Fixed Status Code check for reset type on fw-activate.
Jeff Lien [Tue, 12 Sep 2017 17:37:05 +0000 (12:37 -0500)]
NVMe-CLI Fixed Status Code check for reset type on fw-activate.

If a device returns a fw-activate status with the More or DNR bit
set, the CLI code will return a message indicating an Admin command
error instead of succesful status.  With this patch, the More and
DNR bits will be masked off and not affect the returned message.

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: generate spec-compliant UUID NQNs
Daniel Verkamp [Wed, 30 Aug 2017 22:25:16 +0000 (15:25 -0700)]
nvme-cli: generate spec-compliant UUID NQNs

The gen-hostnqn command previously generated UUID NQNs in a format that
does not match the NVMe specification.

Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: Describe action 3 of nvme activate
Gwendal Grignou [Sun, 27 Aug 2017 01:25:40 +0000 (18:25 -0700)]
nvme-cli: Describe action 3 of nvme activate

Action 3 is not reserved, it is allowed by NVMe 1.3 to upgrade firmware
without reset.

Check it works on a NVMe device.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
7 years agoMerge pull request #222 from metebalci/improvement_for_1.3_oncs_fields
Keith Busch [Wed, 23 Aug 2017 18:12:34 +0000 (12:12 -0600)]
Merge pull request #222 from metebalci/improvement_for_1.3_oncs_fields

new bit field (6) to ONCS from NVMe rev 1.3

7 years agoMerge pull request #221 from metebalci/improvement_for_1.3_oacs_fields
Keith Busch [Wed, 23 Aug 2017 18:12:13 +0000 (12:12 -0600)]
Merge pull request #221 from metebalci/improvement_for_1.3_oacs_fields

new bit fields (6, 7, and 8) for OACS from NVMe rev 1.3

7 years agoadded new bit field (6) to ONCS from NVMe rev 1.3
Mete Balci [Wed, 23 Aug 2017 07:21:58 +0000 (09:21 +0200)]
added new bit field (6) to ONCS from NVMe rev 1.3

7 years agonew bit fields (6, 7, and 8) for OACS from NVMe rev 1.3
Mete Balci [Wed, 23 Aug 2017 07:05:11 +0000 (09:05 +0200)]
new bit fields (6, 7, and 8) for OACS from NVMe rev 1.3

7 years agonvme-cli: Fix nvme ns desc
Charlesworth, Thomas J [Tue, 22 Aug 2017 13:26:14 +0000 (09:26 -0400)]
nvme-cli: Fix nvme ns desc

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #220 from metebalci/fix-reporting-of-AQA-as-bytes
Keith Busch [Tue, 22 Aug 2017 13:00:09 +0000 (07:00 -0600)]
Merge pull request #220 from metebalci/fix-reporting-of-AQA-as-bytes

fix for issue 219, show-regs reports AQA.ACQS and AQA.ASQS as bytes

7 years agofix for issue 219, show-regs reports AQA.ACQS and AQA.ASQS as bytes
Mete Balci [Tue, 22 Aug 2017 08:07:03 +0000 (10:07 +0200)]
fix for issue 219, show-regs reports AQA.ACQS and AQA.ASQS as bytes

7 years agonvme-cli: add documentation for directive commands
Kwan (Hingkwan) Huen-SSI [Fri, 11 Aug 2017 02:54:11 +0000 (19:54 -0700)]
nvme-cli: add documentation for directive commands

Signed-off-by: Kwan (Hingkwan) Huen-SSI <kwan.huen@samsung.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli: add nvme directive command support
Kwan (Hingkwan) Huen-SSI [Fri, 11 Aug 2017 02:54:10 +0000 (19:54 -0700)]
nvme-cli: add nvme directive command support

Signed-off-by: Kwan (Hingkwan) Huen-SSI <kwan.huen@samsung.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #218 from mandarcthorat/master
Keith Busch [Tue, 15 Aug 2017 16:08:38 +0000 (10:08 -0600)]
Merge pull request #218 from mandarcthorat/master

Fixing macro definitions to avoid issues when these are used in expression

7 years agoFixing macro definitions to avoid issues when these are used in expressions
mandarcthorat [Tue, 15 Aug 2017 15:44:11 +0000 (21:14 +0530)]
Fixing macro definitions to avoid issues when these are used in expressions

7 years agonvme-cli/fabrics: Add ctrl-loss-tmo param to connect cmd
Nitzan Carmi [Sun, 13 Aug 2017 15:45:04 +0000 (18:45 +0300)]
nvme-cli/fabrics: Add ctrl-loss-tmo param to connect cmd

Added 'ctrl-loss-tmo' to 'connect' command so users can specify the
controller lost timeout period.

usage examples:
nvme connect --ctrl-loss-tmo=0 --transport=rdma --traddr=10.0.1.1 --nqn=test-nvme
nvme connect -l 0 -t rdma -a 10.0.1.1 -n test_nvme

Signed-off-by: Nitzan Carmi <nitzanc@mellanox.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #207 from mdavis36/master
Keith Busch [Thu, 10 Aug 2017 18:01:00 +0000 (12:01 -0600)]
Merge pull request #207 from mdavis36/master

Fixed get_internal_log

7 years agoMerge pull request #215 from liangxiao1/master
Keith Busch [Thu, 10 Aug 2017 18:00:26 +0000 (12:00 -0600)]
Merge pull request #215 from liangxiao1/master

nvme-cli/list: change fd returned by open operation from unsigned to signed.

7 years agonvme-cli: fix connecting failure due to invalid uuid format of hostid
Guan Junxiong [Thu, 3 Aug 2017 13:38:16 +0000 (21:38 +0800)]
nvme-cli: fix connecting failure due to invalid uuid format of hostid

When we connect or discover a target with --hostid option via the
/etc/nvme/hostid file, we fails this operation because the hostid
is only 35 not 36 bytes which doesn't pass the uuid checking in the
kernel.The last character is overridden with null bytes because fgets
reads at most one less than sizeof of buffer characters.

Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #216 from baruchsiach/fix-cross-compile-uuid-test
Keith Busch [Thu, 10 Aug 2017 16:56:43 +0000 (10:56 -0600)]
Merge pull request #216 from baruchsiach/fix-cross-compile-uuid-test

Makefile: allow linker override for cross uuid test

7 years agoMakefile: allow linker override for cross uuid test
Baruch Siach [Wed, 9 Aug 2017 06:43:12 +0000 (09:43 +0300)]
Makefile: allow linker override for cross uuid test

The test to determine whether libuuid is installed uses the host 'ld' utility.
This breaks when cross compiling, since target libraries are often different
than host libraries.

Use $(LD) instead. This allows to easily use the cross compiler linker.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
7 years agonvme-cli/list: change fd returned by open operation from unsigned to signed.
Xiao Liang [Tue, 8 Aug 2017 15:55:23 +0000 (23:55 +0800)]
nvme-cli/list: change fd returned by open operation from unsigned to signed.

In case it is a negative value when user has no permisson to open file.

Signed-off-by: Xiao Liang <xiliang@redhat.com>
7 years agonvme-cli/list: fix when nvme device can not be open
Guan Junxiong [Wed, 2 Aug 2017 07:51:09 +0000 (15:51 +0800)]
nvme-cli/list: fix when nvme device can not be open

This patch checks the validity of fd returned by open operation on
the nvme divices. For example, when a user who doesn't have the
permission to open the device trys to use nvme list command to list
nvme devices, the fd is returned as -1 and errno indicates permission
denied.
In addition,this patch closes the current open device before
processing the next device.

Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoFix app tag field sizes
Keith Busch [Tue, 1 Aug 2017 01:30:02 +0000 (21:30 -0400)]
Fix app tag field sizes

These are all 16-bit values.

https://github.com/linux-nvme/nvme-cli/issues/213

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoFix app tag and mask setting
Keith Busch [Tue, 1 Aug 2017 01:24:57 +0000 (21:24 -0400)]
Fix app tag and mask setting

These were being set to each other's value.

https://github.com/linux-nvme/nvme-cli/issues/212

Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #208 from jeffreyalien/master
Keith Busch [Fri, 21 Jul 2017 22:25:33 +0000 (16:25 -0600)]
Merge pull request #208 from jeffreyalien/master

NVMe-CLI Fix Sanitize Command Parameter Types

7 years agoNVMe-CLI Fix Sanitize Command Parameter Types
Jeff Lien [Fri, 21 Jul 2017 20:43:56 +0000 (15:43 -0500)]
NVMe-CLI Fix Sanitize Command Parameter Types

The current parameter types will cause the sanitize action value to
be set to 0 and "Invalid Sanitize Action" errors.  Setting them to
the correct types resolves the issues.

7 years agoFixed get_internal_log to parse the entire nlog and allow selection of specific regio...
Michael Davis [Thu, 20 Jul 2017 02:32:21 +0000 (19:32 -0700)]
Fixed get_internal_log to parse the entire nlog and allow selection of specific regions to be parsed.

7 years agonvme-cli/list-ns: fix identifying active or allocated namespaces list
Guan Junxiong [Mon, 10 Jul 2017 07:56:07 +0000 (15:56 +0800)]
nvme-cli/list-ns: fix identifying active or allocated namespaces list

The logic of the CNS field of identify namespace list is wrong.
For example, nvme list-ns /dev/nvme0 -n 0  should return active
namespaces list starting with id 1 (including), but currently this
script command returns INVALID_OPCODE if the target doesn't support
listing allocated namespaces or all the allocated attached namespaces
id. So fix it by swaping the CNS flags of active and allocated list.

Signed-off-by: Guan Junxiong <guanjunxiong@huawei.com>
Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agoMerge pull request #189 from ScottyBauer/intel-cd-patch
Keith Busch [Thu, 6 Jul 2017 21:11:05 +0000 (15:11 -0600)]
Merge pull request #189 from ScottyBauer/intel-cd-patch

Implement Intel Vendor specific logs

7 years agonvme-cli : only print help text and return for nvme list -h option.
Chaitanya Kulkarni [Tue, 4 Jul 2017 18:58:46 +0000 (11:58 -0700)]
nvme-cli : only print help text and return for nvme list -h option.

For " nvme list -h " don't print list after help text,
only print help text and return.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli : wdc-plug-in : return on invalid input device.
Chaitanya Kulkarni [Tue, 4 Jul 2017 16:56:46 +0000 (09:56 -0700)]
nvme-cli : wdc-plug-in : return on invalid input device.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agofix build without libuuid
Christoph Hellwig [Wed, 28 Jun 2017 23:09:12 +0000 (16:09 -0700)]
fix build without libuuid

Signed-off-by: Christoph Hellwig <hch@lst.de>
7 years agonvme-cli : add sanitize-log command documentation.
Chaitanya Kulkarni [Thu, 29 Jun 2017 02:19:28 +0000 (19:19 -0700)]
nvme-cli : add sanitize-log command documentation.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli : add support for retrieving sanitize log.
Chaitanya Kulkarni [Thu, 29 Jun 2017 02:19:27 +0000 (19:19 -0700)]
nvme-cli : add support for retrieving sanitize log.

This adds support for retrieving and printing NVMe sanitize log
page. For more details please look into NVM Express 1.3
specification.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
7 years agonvme-cli : add sanitize command documentation.
Chaitanya Kulkarni [Thu, 29 Jun 2017 02:19:26 +0000 (19:19 -0700)]
nvme-cli : add sanitize command documentation.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>