]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
4 years agonvme-cli: fix typos in reservation actions
Jonathan Teh [Fri, 7 May 2021 17:35:55 +0000 (18:35 +0100)]
nvme-cli: fix typos in reservation actions

Fix typos in short option for reservation register action and the full
name of reservation acquire action.

4 years agocompletions: fix syntax typo in zsh completions
Ronan Pigott [Thu, 6 May 2021 21:11:33 +0000 (14:11 -0700)]
completions: fix syntax typo in zsh completions

4 years agonvme-print: print both kelvin and celsius temperature values
Tokunori Ikegami [Thu, 6 May 2021 16:21:19 +0000 (01:21 +0900)]
nvme-print: print both kelvin and celsius temperature values

Previously celsisu values were printed by smart-log and get-feature commands.
But kelvin values were printed by id-ctrl command.
For human readable format print both kelvin and celsisu temperature values.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
4 years agoAdd device id in JSON output
Martin Belanger [Fri, 23 Apr 2021 18:12:25 +0000 (14:12 -0400)]
Add device id in JSON output

4 years agoTag v1.14 v1.14
Keith Busch [Tue, 20 Apr 2021 19:51:14 +0000 (12:51 -0700)]
Tag v1.14

Shortlog below since v1.13: lots of fixes, cleanups, documentation
updates, and a few new features like replay protection.

Affe (4):
      Adding and updating some ns-id paramters to be inline with NVMe spec. rev. 1.4b
      Adding and updating some ns-id paramters to be inline with NVMe spec. rev. 1.4b
      Rebase and merge into HMT
      Rebased and removed empty printouts for reserved locations.

Akhilesh RN (1):
      ZN-350 changes

Alexandre Bouvier (1):
      Update 70-nvmf-autoconnect.conf.in

Brian King (1):
      nvme: Make gen-hostnqn use partition UUID on IBM POWER systems

Chaitanya Kulkarni (3):
      zns: NULL arg to free is perfectly acceptable
      zns: NULL arg to free is perfectly acceptable
      zns: for zra report zone make sure data len is set

Eric Curtin (5):
      Typo s/rtyep/rtype/g
      Trying to get a ppc64le build going
      Input expects device name without /dev
      Don't print error on failed to open in nvme-topology.c
      Man page update nvme discover

Erwan Velu (1):
      nvme-print: Adding enum nvme_feat

Eyal Ben-David (1):
      verify-no-dep : Fix makefile entry.

Francisco Munoz (2):
      Modify lat-stats cmd to cope with optane bucket format
      Fix return type for arconfig functions

Gollu Appalanaidu (67):
      nvme: add support for persistent event log page
      nvme: add support for predictable latency event aggregate log page
      nvme: add support for predictable latency per NVM set log page
      nvme: fix get lba status command nsid and data len fields
      nvme: fix device self test log
      nvme: device self test cdw10 specific fields
      nvme: add fix for sanitize OWPASS value and log page structure
      nvme: fix log-id data type and remove unnecessary log-id validtion
      nvme: fix get and set features feature-id data type
      nvme: add latest opcodes for command supported and effects log
      nvme: remove zns command set opcodes from the effects log
      nvme: print NSFEAT UIDREUSE bit in human readable format
      nvme: Round of the metadata size to fit into block count
      nvme: remove unused functions nvme_{read, write, compare}
      nvme-print: refactor sanitize log status string
      nvme-print: align switch-case with existing style
      nvme-status: add status to error no support for path related errors
      zns: fix namespace-id data type in multiple places
      nvme-print: add one space around the operators
      nvme-print: fix fetching status code type and status data type
      nvme: add identify controller nvm command set support
      zns: fix zone management receive command zra and zrasf data types
      nvme: remove unassigned variable "lbads" from format function
      nvme: add man page and completions of nvm command set id controller
      nvme-print: remove unused argument passing to json output format print
      nvme: add path related error status codes
      nvme-print: add status_to_string for IO command specific status codes
      nvme: add endurance group event configuration feature
      nvme-print: show feat fields for FID = {0x17,0x12} and refactoring
      nvme: fix printing set-feature FID and print cdw12, save fields
      nvme: fix status field masking and data type
      nvme: add support for endurance group event aggregate log
      nvme: add support for lba status log page
      nvme-cli: misc. fixes for memory allocation failure case
      nvme: fix identify controller structure fabrics identify fields
      nvme: change system error notification from fprintf to perror
      nvme-print: split pmrmsc into pmrmscl and pmrmscu
      nvme: fix security send & receive commands show status code
      nvme: fix securuty send and receive commands result field
      nvme-print: add NSSC field in directive receive show fields
      nvme-print: fix HMB get feature response in human readable format
      nvme-print: fix register size for raw format print
      nvme: use nvme_show_status when command status code is non-zero
      nvme: fix DPS description and improve the other fields descriptions
      nvme-print: improve command support and effects log json format
      nvme: add reservation notifacation log page
      nvme: refactor and improve the passthru function
      nvme: add namespace id config field for copy command
      nvme: fix dsm and copy commands free up buffers
      nvme: address 1.4 to 1.4b changes for Change NS event type
      nvme: remove trailing space
      nvme: add lba status information attributes feature support
      nvme: fix commenting style
      nvme: fix timestamp feature in set feature
      nvme: make else if and else statements uniform
      nvme: remove redundant structure of primary controller capabilities
      nvme: nvme get and set features buffer length clean up
      nvme: random fixes in primary controller capabilities
      nvme: fix human-readable format option in primary ctrl caps
      nvme: fix and refactor virt mgmt cdw10 and cdw11 arguments
      nvme: add rae field in sanitize-log
      nvme-print: print phase tag field separately in error-log fields
      zns: return response with status to errno conversion
      nvme-print: fix io-command set profile feature
      nvme: remove buf allocation check since NULL free is acceptable
      nvme: add space in persistent event log desc between words
      nvme: add one space around the operand and operator in d_raw

Hannes Reinecke (8):
      fabrics: ctrl_loss_tmo setting is invalid for 'loop'
      nvme-discover: add json output
      fabrics: correctly handle ctrl_loss_tmo settings for loop
      fabrics: fix infinite loop on invalid parameters
      nvme-discover: lookup existing persistent controllers
      util/json: unify struct json_object and struct json_array
      nvme: build against json-c library
      Read system UUID from DMI and merge hostnqn generation functions

Hanumanthu H (9):
      Add support for Replay Protection Memory Block (RPMB) commands
      Fix copyright typo
      Add support for Replay Protection Memory Block (RPMB) commands
      Fix copyright typo
      sync with latest repo
      Micron plugin changes - extended smart health info and others
      Micron plugin changes - version 1.0.4
      micron plugin version 1.0.5
      micron plugin version 1.0.5 - 51C2, 51C3 support

Jeff Lien (18):
      [nvme-cli] wdc plugin fix for vs-internal-log command for SN730 drive.
      [nvme-cli] Additional fixes to wdc plugin vs-internal-log command for SN730
      [NVMe-CLI] Review comment changes to wdc plugin vs-internal-log fix for SN730
      [nvme-cli] 2nd change to address review comments
      [nvme-cli] WDC Plugin fix to Fix clear-fw-activate-history command for SN640 Drives
      [nvme-cli] WDC plugin add support for cloud-SSD-plugin-version
      [nvme cli] Add WDC plugin command vs-pcie-stats [nvme cli] Fix vs-smart-add-log min/max user data erase counts
      [nvme cli] Fix drive capabilities to meet OCP Spec
      [nvme cli] Add Customer Serial Num to vs-drive-info command
      [NVME-CLI] WDC Plugin Fixes for SN-730   vs-nand-stats not printing json format   vs-nand-stats not printing raw format for several fields   vs-temperature-stats not printing json format   vs-drive-info not printing json format
      Fix build failure from incorrect indenting
      [nvme-cli] WDC plugin fixes for vs-fw-activate-history command   Change to use Power on Hours instead of Timestamp in certain cases   Fix Entry order so entries are displayed oldest to newest
      [nvme-cli] Add support for 0x2720 PCI Device ID
      [nvme-cli] Change to set default DA for SN730
      [nvme-cli] Add support for WDC Plugin cloud-SSD-plugin-version to SN355
      [nvme-cli] Fix Max/Min User data erase counts displayed in 0xC2 Log Page
      [NVMe-CLI] Add support for new customer ids to WDC plugin commmands
      [NVMe-CLI] SN730 Updates for FW Maintenance Release

Jonathan Teh (1):
      nvme-print: Show more async event config fields

Keith Busch (17):
      fix address print format
      provide value bounds check on numerical lists
      Merge branch 'ErwanAliasr1-evelu-feature'
      fix null string compiler warning
      fix 'list' verbose for controller namespaces
      Merge branch 'master' of https://github.com/hanumanthuh/nvme-cli into hanumanthuh-master
      Merge branch 'hanumanthuh-master'
      Merge branch 'master' into dst/fix
      Merge branch 'ganaidu707-dst/fix'
      fix 32-bit compile
      Merge branch 'HMT' of https://github.com/cgdeveloper1/nvme-cli into cgdeveloper1-HMT
      Merge branch 'cgdeveloper1-HMT'
      micron printf for 64-bit on 32-bit archs
      Squashed commit of the following:
      Merge branch 'fixes' of https://github.com/mwilck/nvme-cli into mwilck-fixes
      add timeout parameter to get-lba-status
      tag v1.14

Klaus Jensen (3):
      fix dsm and copy range setup
      zns: do not check metadata when pract is set
      zns: support piremap flag for zone append

Martin Belanger (1):
      print device name when creating a persistent device

Martin George (3):
      fabrics: permit kato int argument for discovery controllers
      fabrics: update discovery.conf error message
      fabrics: ensure zero kato for non-persistent controllers

Martin Wilck (9):
      do_discover: free cfg.device when resetting it
      nvme-connect-all(1): fix documentation for --quiet/-S
      nvme: add some simplifying macros for __attribute__((cleanup()))
      nvme-cli: add generic logging functionality
      nvme: convert some function arguments from "char *" to "const char *"
      fabrics: use "const char *" in struct config
      fabrics: fix some memory leaks
      fabrics: fix invalid memory access in discover_from_conf_file()
      fabrics: export symbols required for monitor functionality

Max Gurtovoy (1):
      nvme: add NVIDIA plugin for NVMe SNAP controllers

Minwoo Im (10):
      Add missing sub-command links from main man page
      zns: fix showing system error in report_zones
      nvme: set block size to blkdev before re-read partition
      nvme: refactor S_ISCHR/S_ISBLK with helpers
      nvme-print: fix Namespace ID to decimal format
      nvme-topology: fix returning invalid value in scan_subsystems()
      zns: print select_all field for Zone Management Send
      nvme-status: return negative status if !errno
      nvme: remove spurious command show 'rsvd'
      nvme-topology: fix build error for unused variable

Nate Roiger (2):
      Identify Primary Controller Capabilities support
      Address PR comments: Remove obsolete format options; Add JSON output.

Niklas Cassel (1):
      nvme-print: fix ZNS MAR/MOR print format

Sagi Grimberg (1):
      nvme-topology: have list-subsys print only controllers with attached namespace

Steven Seungcheol Lee (3):
      nvme.spec.in: using specific directory for nvme command on %post
      Makefile: remove duplicated line for zns.o
      nvme: Remove invalid device node from nvme list

Tomasz Zawadzki (4):
      add path to nvme list
      report scandir errors in legacy_list
      print topology for NVMe nodes in kernel and path
      skip display of missing controller fields

Zhangyi Huo (1):
      feat: clear-error-log support

asavah (1):
      fix missing sd-id128 include

dingjian (6):
      style: modify a prompt word
      chore: smart-log-add add more project support
      feat: support io latency histogram
      style: rename function
      feat: support high latency log
      feat: add timstamp support(Optional)

duanhaoqiang (1):
      Update nvme.c

swamytk (1):
      Fix: Seagate Uncorrectable Read Error Count reported twice #686

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agoZN-350 changes
Akhilesh RN [Tue, 20 Apr 2021 07:38:15 +0000 (13:08 +0530)]
ZN-350 changes

4 years agonvme: add one space around the operand and operator in d_raw
Gollu Appalanaidu [Wed, 7 Apr 2021 10:10:21 +0000 (15:40 +0530)]
nvme: add one space around the operand and operator in d_raw

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add space in persistent event log desc between words
Gollu Appalanaidu [Thu, 8 Apr 2021 11:42:02 +0000 (17:12 +0530)]
nvme: add space in persistent event log desc between words

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: remove buf allocation check since NULL free is acceptable
Gollu Appalanaidu [Thu, 8 Apr 2021 12:16:13 +0000 (17:46 +0530)]
nvme: remove buf allocation check since NULL free is acceptable

Cleaning up all the nvme-cli source filses where buffer allocation
check is ther before free up, NULL free is acceptable perfectly as
Chaitanya mentioned in another patch.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-print: fix io-command set profile feature
Gollu Appalanaidu [Sat, 17 Apr 2021 19:13:49 +0000 (00:43 +0530)]
nvme-print: fix io-command set profile feature

IO Command Set Profile feature with FID 0x19 in TP 4056d
CQE CDW0 value printing is incorrect, fix that.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agoadd timeout parameter to get-lba-status
Keith Busch [Thu, 15 Apr 2021 04:16:27 +0000 (21:16 -0700)]
add timeout parameter to get-lba-status

The spec suggests completing the command may take longer than typical
commands, so allow the user specify the timeout.

Link: https://github.com/linux-nvme/nvme-cli/issues/1010
Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agozns: for zra report zone make sure data len is set
Chaitanya Kulkarni [Wed, 31 Mar 2021 02:03:39 +0000 (19:03 -0700)]
zns: for zra report zone make sure data len is set

Make sure for the Zone Receive Action data length is set by the user.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
4 years agozns: NULL arg to free is perfectly acceptable
Chaitanya Kulkarni [Wed, 31 Mar 2021 02:03:38 +0000 (19:03 -0700)]
zns: NULL arg to free is perfectly acceptable

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
4 years agozns: NULL arg to free is perfectly acceptable
Chaitanya Kulkarni [Wed, 31 Mar 2021 02:03:37 +0000 (19:03 -0700)]
zns: NULL arg to free is perfectly acceptable

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
4 years agozns: return response with status to errno conversion
Gollu Appalanaidu [Wed, 7 Apr 2021 11:15:02 +0000 (16:45 +0530)]
zns: return response with status to errno conversion

Currently ZNS plugin nvme device status code 15 bits
being returned to shell which will take only 8 bits.
Convert the nvme status code to linux standard errno
with the help of status_to_errno function and return.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-topology: fix build error for unused variable
Minwoo Im [Tue, 6 Apr 2021 12:46:09 +0000 (21:46 +0900)]
nvme-topology: fix build error for unused variable

Fix the following build error.

nvme-topology.c: In function ‘uuid_from_systemd’:
nvme-topology.c:766:8: error: unused variable ‘ret’ [-Werror=unused-variable]
  766 |  char *ret;
      |        ^~~

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
4 years agonvme-print: print phase tag field separately in error-log fields
Gollu Appalanaidu [Thu, 25 Mar 2021 17:58:30 +0000 (23:28 +0530)]
nvme-print: print phase tag field separately in error-log fields

Status Field in error-log 16 bits, 15 bits from q to 15 are represents
status field and 0th bit is phase tag, print phase tag seperately, in
1.4b spec its been clearly called out.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agoFix return type for arconfig functions
Francisco Munoz [Fri, 26 Mar 2021 22:46:33 +0000 (15:46 -0700)]
Fix return type for arconfig functions

Changed function signatures to int in order to return negative
values on errors

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
4 years agoModify lat-stats cmd to cope with optane bucket format
Francisco Munoz [Fri, 26 Mar 2021 22:36:58 +0000 (15:36 -0700)]
Modify lat-stats cmd to cope with optane bucket format

Optane lat-stat thresholds are 8 bytes per bucket. Also
the amout of buckets is smaller when compared to nand ssds.
This change allows to query both types of ssds transparently.

Also added the command line option to print lat-stats in json
and introduced a plugin function to modify read/write bucket
thresholds for specific media versions.

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
4 years agonvme: Remove invalid device node from nvme list
Steven Seungcheol Lee [Mon, 5 Apr 2021 06:07:27 +0000 (15:07 +0900)]
nvme: Remove invalid device node from nvme list

normal print result
Node             SN                   Model                                    Namespace Usage                      Format           FW Rev
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1     S39XNX0J6C3BBA       91721190020910SAM0PM1725A0004T00035000   1           0.00   B /   4.19  TB      4 KiB +  0 B   MVP41G7A
/dev/nvme0n2     S39XNX0J6C3BBA       91721190020910SAM0PM1725A0004T00035000   2           4.19  MB /   4.19  MB      4 KiB +  0 B   MVP41G7A

json print result (nvme0c0n* are invaild devices name, so will be removed from list)
[root@localhost nvme-cli]# nvme list -o json
{
  "Devices" : [
    {
      "NameSpace" : 1,
      "DevicePath" : "/dev/nvme0c0n1",
      ...
      "SectorSize" : 1
    },
    {
      "NameSpace" : 2,
      "DevicePath" : "/dev/nvme0c0n2",
      ...
      "SectorSize" : 1
    },
    {
      "NameSpace" : 1,
      "DevicePath" : "/dev/nvme0n1",
      ...
      "SectorSize" : 4096
    },
    {
      "NameSpace" : 2,
      "DevicePath" : "/dev/nvme0n2",
      ...
      "SectorSize" : 4096
    }
  ]
}

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
4 years agonvme: add rae field in sanitize-log
Gollu Appalanaidu [Mon, 5 Apr 2021 10:11:47 +0000 (15:41 +0530)]
nvme: add rae field in sanitize-log

Added Retain Asynchronous Event (RAE) field for sanitize
log.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agoMakefile: remove duplicated line for zns.o
Steven Seungcheol Lee [Mon, 5 Apr 2021 11:11:17 +0000 (20:11 +0900)]
Makefile: remove duplicated line for zns.o

code duplicated while squashing the commits

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
4 years agonvme: fix and refactor virt mgmt cdw10 and cdw11 arguments
Gollu Appalanaidu [Sun, 4 Apr 2021 18:42:59 +0000 (00:12 +0530)]
nvme: fix and refactor virt mgmt cdw10 and cdw11 arguments

In virtualization management command CDW10 has been added user
parameters config structure which redundant and CDW11 has only
16 bits (NR) are defined use that only.

Refactor the CDW10 filling and NRM print.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: fix human-readable format option in primary ctrl caps
Gollu Appalanaidu [Sun, 4 Apr 2021 05:44:18 +0000 (11:14 +0530)]
nvme: fix human-readable format option in primary ctrl caps

In Primary controller caps though it supports human readable
format, currently there is no option to view it, adding
human-readable foramt option.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: random fixes in primary controller capabilities
Gollu Appalanaidu [Fri, 2 Apr 2021 16:54:00 +0000 (22:24 +0530)]
nvme: random fixes in primary controller capabilities

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agofix missing sd-id128 include
asavah [Fri, 2 Apr 2021 22:27:24 +0000 (01:27 +0300)]
fix missing sd-id128 include

4 years agonvme: nvme get and set features buffer length clean up
Gollu Appalanaidu [Thu, 25 Mar 2021 19:07:23 +0000 (00:37 +0530)]
nvme: nvme get and set features buffer length clean up

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: remove redundant structure of primary controller capabilities
Gollu Appalanaidu [Fri, 2 Apr 2021 15:41:02 +0000 (21:11 +0530)]
nvme: remove redundant structure of primary controller capabilities

In recent PR that merged has redundant/duplicate structure
with name "nvme_pri_ctrl_caps" that has already defined with
name "nvme_primary_ctrl_caps" and its been used.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agoAddress PR comments: Remove obsolete format options; Add JSON output.
Nate Roiger [Fri, 2 Apr 2021 14:30:21 +0000 (09:30 -0500)]
Address PR comments: Remove obsolete format options; Add JSON output.

Signed-off-by: Nate Roiger <nate.roiger@hpe.com>
4 years agoIdentify Primary Controller Capabilities support
Nate Roiger [Tue, 30 Mar 2021 15:02:47 +0000 (10:02 -0500)]
Identify Primary Controller Capabilities support

Signed-off-by: Nate Roiger <nate.roiger@hpe.com>
4 years agoMerge branch 'fixes' of https://github.com/mwilck/nvme-cli into mwilck-fixes
Keith Busch [Fri, 2 Apr 2021 02:50:53 +0000 (11:50 +0900)]
Merge branch 'fixes' of https://github.com/mwilck/nvme-cli into mwilck-fixes

4 years agoSquashed commit of the following:
Keith Busch [Fri, 2 Apr 2021 02:39:39 +0000 (11:39 +0900)]
Squashed commit of the following:

commit d08477e7d0ea9a0eb8aa10a0d572eec3abc2d486
Merge: c3a5ee7 755b906
Author: Chong_Liu <Jerry_Liu@ymtc.com>
Date:   Fri Apr 2 10:23:14 2021 +0800

    Merge remote-tracking branch 'upstream/master'

commit c3a5ee77b28a5a29ddf660b7e1f113138b90c533
Author: Chong_Liu <Jerry_Liu@ymtc.com>
Date:   Fri Apr 2 09:51:44 2021 +0800

    ymtc plugin version 0.0.1 - get additional smart support

Signed-off-by: Chong Liu <Jerry_Liu@ymtc.com>
4 years agomicron printf for 64-bit on 32-bit archs
Keith Busch [Thu, 1 Apr 2021 23:27:36 +0000 (08:27 +0900)]
micron printf for 64-bit on 32-bit archs

Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agonvme: add NVIDIA plugin for NVMe SNAP controllers
Max Gurtovoy [Thu, 1 Apr 2021 08:38:49 +0000 (08:38 +0000)]
nvme: add NVIDIA plugin for NVMe SNAP controllers

SNAP technology is supported on NVIDIA Mellanox BlueField DPU family
and combines a unique hardware-accelerated virtualization of NVMe
devices with the advanced networking and programmability capabilities of
the BlueField SmartNIC.
Add initial vendor specific parsing for id-ctrl command of NVMe SNAP
controllers.

For more info: https://www.mellanox.com/products/software/nvme-snap

Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
[merged up with "new" json usage]
Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agonvme: make else if and else statements uniform
Gollu Appalanaidu [Thu, 25 Mar 2021 18:53:38 +0000 (00:23 +0530)]
nvme: make else if and else statements uniform

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: fix timestamp feature in set feature
Gollu Appalanaidu [Thu, 25 Mar 2021 19:41:35 +0000 (01:11 +0530)]
nvme: fix timestamp feature in set feature

In Timestamp feature structure size is 8 bytes, since the 6th
and 7th bytes are reserved no need to change the data len
parameter to 6 bytes.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agoRead system UUID from DMI and merge hostnqn generation functions
Hannes Reinecke [Wed, 24 Mar 2021 07:22:28 +0000 (08:22 +0100)]
Read system UUID from DMI and merge hostnqn generation functions

Both fabrics.c and the 'gen-hostnqn' command contain functions
to generate a default host NQN. Needless to say, both are different.
_And_ we have the script 'nvme-gen-hostnqn' to read the host nqn
from the system UUID, implement yet another way.

This patch merges all of these functions, and implements a hierarchy
in generating host NQNs:
- Try reading system UUID from /sys/firmware/dmi/entries
- Try reading systemd-generated UUID
- Generate a random UUID

Signed-off-by: Hannes Reinecke <hare@suse.de>
4 years agonvme: build against json-c library
Hannes Reinecke [Sat, 20 Mar 2021 08:21:25 +0000 (09:21 +0100)]
nvme: build against json-c library

Allow to use the json-c library instead of our own hand-crafted
json routines. This allows us to add more functionality like
parsing json files in the future.

Signed-off-by: Hannes Reinecke <hare@suse.de>
4 years agoutil/json: unify struct json_object and struct json_array
Hannes Reinecke [Sat, 20 Mar 2021 08:19:04 +0000 (09:19 +0100)]
util/json: unify struct json_object and struct json_array

Merge both structure to have just a single json_object structure.

Signed-off-by: Hannes Reinecke <hare@suse.de>
4 years agofabrics: export symbols required for monitor functionality
Martin Wilck [Sun, 17 Jan 2021 21:40:10 +0000 (22:40 +0100)]
fabrics: export symbols required for monitor functionality

These macros, functions and variables will be used by the "nvme monitor"
functionality. Convert them to globally visible symbols.

Being able to access struct config and the "cfg" variable
from fabrics.c is essential for the monitor to leverage the existing,
well tested code as much as possible. Rename "cfg" to "fabrics_cfg"
to make the global variable name less generic.

4 years agofabrics: fix invalid memory access in discover_from_conf_file()
Martin Wilck [Fri, 5 Mar 2021 22:51:31 +0000 (23:51 +0100)]
fabrics: fix invalid memory access in discover_from_conf_file()

argconfig_parse() assigns pointers in cfg to point to memory allocated
in all_args. If this memory is freed, these pointers become dangling.
This is particularly dangerous if discovery.conf contains empty lines,
comment lines, or invalid lines.

Fix it by setting all transport parameter to NULL after processing each
line, and not proceeding if the basic parameters aren't set.

4 years agofabrics: fix some memory leaks
Martin Wilck [Thu, 25 Feb 2021 22:14:19 +0000 (23:14 +0100)]
fabrics: fix some memory leaks

None of these are critical for "nvme discover" or "nvme connect-all".
Still, silencing valgrind's error messages by fixing them gives some
peace of mind, and a longer-running program like the forthcomint
nvme monitor, leak checks are more important.

Use the previously introduced cleanup macros for this purpose.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
4 years agofabrics: use "const char *" in struct config
Martin Wilck [Sun, 17 Jan 2021 21:37:03 +0000 (22:37 +0100)]
fabrics: use "const char *" in struct config

This is easily done, and allows passing in some const char* pointers
that would otherwise need to be strdup()d first.

Do not use const char * for cfg->device, because we may need to free()
it.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
4 years agonvme: convert some function arguments from "char *" to "const char *"
Martin Wilck [Tue, 12 Jan 2021 21:52:55 +0000 (22:52 +0100)]
nvme: convert some function arguments from "char *" to "const char *"

Make some function arguments "const char *" where possible. This
is generally desirable and allows passing string constants to these
function.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
4 years agonvme-cli: add generic logging functionality
Martin Wilck [Tue, 12 Jan 2021 18:50:05 +0000 (19:50 +0100)]
nvme-cli: add generic logging functionality

Add a msg() macro that allows more flexible customization of logging
both at build time and at run time. Allow several log levels, using
the well-known standard sylog levels. Also optionally allow printing
of log timestamps.

Put '#define LOG_FUNCNAME' before '#include "util/log.h"' to enable printing
the name of the calling function before the log message.

Use this functionality in the fabrics code for now, wherever fprintf(stderr, ...)
had been used.

No functional change except changing the output channel of 554db7d ("print
device name when creating a persistent device") from stdout to stderr.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
4 years agonvme: add some simplifying macros for __attribute__((cleanup()))
Martin Wilck [Thu, 4 Mar 2021 17:16:03 +0000 (18:16 +0100)]
nvme: add some simplifying macros for __attribute__((cleanup()))

Using __attribute__((cleanup())) is very helpful for writing leak-free
code, but it requires lots of awkward boiler plate code. Add some
small helpers to make its use more comfortable.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
4 years agonvme-connect-all(1): fix documentation for --quiet/-S
Martin Wilck [Wed, 20 Jan 2021 22:43:39 +0000 (23:43 +0100)]
nvme-connect-all(1): fix documentation for --quiet/-S

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
4 years agodo_discover: free cfg.device when resetting it
Martin Wilck [Fri, 5 Mar 2021 20:19:10 +0000 (21:19 +0100)]
do_discover: free cfg.device when resetting it

cfg.device might have been allocated by a previous call to
find_ctrl_with_connectargs(), therefore free it. We must make sure
that cfg.device is always on the heap, thus change fabrics_discover()
accordingly.

4 years agonvme-discover: lookup existing persistent controllers
Hannes Reinecke [Thu, 25 Feb 2021 16:12:20 +0000 (17:12 +0100)]
nvme-discover: lookup existing persistent controllers

If persistent controller connections are present they should be
preferred even if no --device option is given on the commandline.

To avoid selecting a temporary non-persistent controller the
'kato' attribute is checked; any controller for which the
attribute is '0' will be skipped. This logic is not applied on
older kernels that don't support the 'kato' attribute. On these
kernels, we just have to assume that the encountered discovery
controller is persistent.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin Wilck <mwilck@suse.de>
4 years agofabrics: fix infinite loop on invalid parameters
Hannes Reinecke [Wed, 24 Mar 2021 06:39:31 +0000 (07:39 +0100)]
fabrics: fix infinite loop on invalid parameters

When parsing the discovery entries results in invalid parameters
for a given connection we'll enter an infinite loop as the -EINVAL
error code is always assumed to indicate a wrong 'disable_sqflow'
setting.

Signed-off-by: Hannes Reinecke <hare@suse.de>
4 years agomicron plugin version 1.0.5 - 51C2, 51C3 support
Hanumanthu H [Thu, 18 Mar 2021 17:56:37 +0000 (23:26 +0530)]
micron plugin version 1.0.5 - 51C2, 51C3 support

4 years agomicron plugin version 1.0.5
Hanumanthu H [Thu, 18 Mar 2021 16:45:50 +0000 (22:15 +0530)]
micron plugin version 1.0.5

4 years agonvme: fix commenting style
Gollu Appalanaidu [Wed, 17 Mar 2021 11:50:06 +0000 (17:20 +0530)]
nvme: fix commenting style

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years ago[NVMe-CLI] SN730 Updates for FW Maintenance Release
Jeff Lien [Wed, 17 Mar 2021 13:54:19 +0000 (08:54 -0500)]
[NVMe-CLI] SN730 Updates for FW Maintenance Release

4 years ago[NVMe-CLI] Add support for new customer ids to WDC plugin commmands
Jeff Lien [Wed, 17 Mar 2021 14:36:40 +0000 (09:36 -0500)]
[NVMe-CLI] Add support for new customer ids to WDC plugin commmands

4 years agonvme: add lba status information attributes feature support
Gollu Appalanaidu [Tue, 16 Mar 2021 13:06:50 +0000 (18:36 +0530)]
nvme: add lba status information attributes feature support

Adding LBA Status Information Attributes Feature with FID = 0x15.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: remove trailing space
Gollu Appalanaidu [Tue, 16 Mar 2021 07:30:53 +0000 (13:00 +0530)]
nvme: remove trailing space

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-topology: have list-subsys print only controllers with attached namespace
Sagi Grimberg [Mon, 15 Mar 2021 20:52:09 +0000 (13:52 -0700)]
nvme-topology: have list-subsys print only controllers with attached namespace

When running list-subsys on a specific namespace, we output all the
controllers that belong to the subsystem regardless if the requested
namespace is actually attached to them.

Example:
$ nvme list-subsys /dev/nvme0n1
nvme-subsys0 - NQN=nqn.2016-01.com.lightbitslabs:uuid:07cfffe6-5a4f-4151-b663-e13cf835609b
\
 +- nvme0 tcp traddr=10.113.5.1 trsvcid=4420 live optimized
 +- nvme1 tcp traddr=10.133.3.1 trsvcid=4420 live
 +- nvme2 tcp traddr=10.133.1.1 trsvcid=4420 live
 +- nvme3 tcp traddr=10.113.1.1 trsvcid=4420 live inaccessible
 +- nvme4 tcp traddr=10.133.5.1 trsvcid=4420 live
 +- nvme5 tcp traddr=10.113.4.1 trsvcid=4420 live
 +- nvme6 tcp traddr=10.133.4.1 trsvcid=4420 live
 +- nvme7 tcp traddr=10.113.2.1 trsvcid=4420 live
 +- nvme8 tcp traddr=10.133.2.1 trsvcid=4420 live
 +- nvme9 tcp traddr=10.113.3.1 trsvcid=4420 live

This output is somewhat confusing and makes the user think the namespace
is actually attached to all of these controllers, instead we want the
output which provided by the change introduced here:

$ nvme list-subsys /dev/nvme0n1
nvme-subsys0 - NQN=nqn.2016-01.com.lightbitslabs:uuid:07cfffe6-5a4f-4151-b663-e13cf835609b
\
 +- nvme0 tcp traddr=10.113.5.1 trsvcid=4420 live optimized
 +- nvme3 tcp traddr=10.113.1.1 trsvcid=4420 live inaccessible

Do the same trick as we do in scan_subsystems, we add the ctrl to the
topology if either ns_instance wasn't passed (see all controllers) or
it was pased _and_ the controller has this namespace is attached to
the controller (to do that we add nsid down the call chain for that).

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agonvme: address 1.4 to 1.4b changes for Change NS event type
Gollu Appalanaidu [Sun, 14 Mar 2021 17:57:47 +0000 (23:27 +0530)]
nvme: address 1.4 to 1.4b changes for Change NS event type

In NVMe 1.4 spec. Change Namespace Event Type (06h) of persistent
event log Data Format - NCAP field was assigned with 16 bytes. Now
in 1.4b spec. its modified to 8 bytes.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: fix dsm and copy commands free up buffers
Gollu Appalanaidu [Thu, 11 Mar 2021 18:45:05 +0000 (00:15 +0530)]
nvme: fix dsm and copy commands free up buffers

In DSM and Copy Commands buffers which dyamically allocated
not freed, fixing that.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add namespace id config field for copy command
Gollu Appalanaidu [Thu, 11 Mar 2021 19:19:52 +0000 (00:49 +0530)]
nvme: add namespace id config field for copy command

For Copy command add namespace id as a user config field

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: refactor and improve the passthru function
Gollu Appalanaidu [Wed, 10 Mar 2021 14:33:18 +0000 (20:03 +0530)]
nvme: refactor and improve the passthru function

Refactor and improve the passthru, io-passthru and admin-passthru
result printing based on the command opcode and type by using the
cmd_to_string.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add reservation notifacation log page
Gollu Appalanaidu [Fri, 5 Mar 2021 20:20:57 +0000 (01:50 +0530)]
nvme: add reservation notifacation log page

This is to add the support for the reservation notification
log page with LID = 0x80.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
Co-Authored-By: Karthik Balan <karthik.b82@samsung.com>
4 years agonvme-print: improve command support and effects log json format
Gollu Appalanaidu [Sun, 7 Mar 2021 18:32:35 +0000 (00:02 +0530)]
nvme-print: improve command support and effects log json format

Currently command support and effects log page on json format
printing all the opcodes irrespective of the command supported.
Most part of the log page is "Unkown" opcodes, fixed that. Also
added two json objects "acs" and "iocs" to print them seperately.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: fix DPS description and improve the other fields descriptions
Gollu Appalanaidu [Sat, 6 Mar 2021 19:10:25 +0000 (00:40 +0530)]
nvme: fix DPS description and improve the other fields descriptions

Fix DSP description, which is Data Protections Settings and other fields
description improved especially 'flbas' and 'block-size' relationship.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: use nvme_show_status when command status code is non-zero
Gollu Appalanaidu [Fri, 5 Mar 2021 17:12:20 +0000 (22:42 +0530)]
nvme: use nvme_show_status when command status code is non-zero

Show the command return status code along with details with the
help of nvme_show_status instead of printing the err.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agozns: support piremap flag for zone append
Klaus Jensen [Tue, 9 Mar 2021 13:22:50 +0000 (14:22 +0100)]
zns: support piremap flag for zone append

Add the '--piremap' / '-P' flag for zone-append.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
4 years agozns: do not check metadata when pract is set
Klaus Jensen [Tue, 9 Mar 2021 13:20:51 +0000 (14:20 +0100)]
zns: do not check metadata when pract is set

Do not check the alignment of metadata if the namespace is formatted
with 8 bytes of metadata and PRACT is set.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
4 years ago[nvme-cli] Fix Max/Min User data erase counts displayed in 0xC2 Log Page
Jeff Lien [Tue, 2 Mar 2021 22:32:38 +0000 (16:32 -0600)]
[nvme-cli] Fix Max/Min User data erase counts displayed in 0xC2 Log Page

4 years agofabrics: ensure zero kato for non-persistent controllers
Martin George [Wed, 3 Mar 2021 06:19:19 +0000 (11:49 +0530)]
fabrics: ensure zero kato for non-persistent controllers

Add a helper function that sets the default kato value for the
discovery controllers. Along with ensuring a non-zero kato value
(i.e. NVMF_DEF_DISC_TMO) is passed to a persistent discovery
controller, it also ensures a zero kato value is passed to a
non-persistent discovery controller, as mandated by the NVMe spec.

Signed-off-by: Martin George <marting@netapp.com>
4 years agonvme-print: fix register size for raw format print
Gollu Appalanaidu [Fri, 26 Feb 2021 20:49:12 +0000 (02:19 +0530)]
nvme-print: fix register size for raw format print

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-print: fix HMB get feature response in human readable format
Gollu Appalanaidu [Mon, 1 Mar 2021 18:37:07 +0000 (00:07 +0530)]
nvme-print: fix HMB get feature response in human readable format

For Host Memory Buffer(HMB) fearure as part of get feature Memory
Return(MR) bit is not part of the CQE CDW0 and add endianess conversion
for the get feature HMB attribute data structure.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-print: add NSSC field in directive receive show fields
Gollu Appalanaidu [Sun, 28 Feb 2021 16:59:44 +0000 (22:29 +0530)]
nvme-print: add NSSC field in directive receive show fields

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: fix securuty send and receive commands result field
Gollu Appalanaidu [Sat, 27 Feb 2021 19:40:01 +0000 (01:10 +0530)]
nvme: fix securuty send and receive commands result field

Security Send and Receive commands doesn't fill the CQE CDW0,
remove uncessary passing of result field in both the commands.
The changes are made in RPMB related files since it is dependent
on these commands. RPMB operations only result field as part of
the dataframe and this result is completely different from the
CQE CDW0.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: fix security send & receive commands show status code
Gollu Appalanaidu [Sat, 27 Feb 2021 19:02:43 +0000 (00:32 +0530)]
nvme: fix security send & receive commands show status code

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-print: split pmrmsc into pmrmscl and pmrmscu
Gollu Appalanaidu [Fri, 26 Feb 2021 19:53:44 +0000 (01:23 +0530)]
nvme-print: split pmrmsc into pmrmscl and pmrmscu

Split the PMR Memory Space Control register 64 bits into
PMR Memory Space Control Lower and Upper 32 bits each as
per NVM Express Spec. 1.4b changes.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: change system error notification from fprintf to perror
Gollu Appalanaidu [Thu, 25 Feb 2021 18:51:21 +0000 (00:21 +0530)]
nvme: change system error notification from fprintf to perror

As per the latest comment on PR #933, changing all the memory
failure errors notify using "perror" instead of "fprintf"

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agofabrics: correctly handle ctrl_loss_tmo settings for loop
Hannes Reinecke [Thu, 25 Feb 2021 15:53:00 +0000 (16:53 +0100)]
fabrics: correctly handle ctrl_loss_tmo settings for loop

The previous fix had an issue with referrals, as it would take
the default values and apply them to all referral entries.
And if the default entries were for 'loop', the default ctrl_loss_tmo
setting would not be used, but rather '-1'.
So this patch reverts the previous patch and correctly blanks
out the ctrl_loss_tmo setting when constructing the connect string.

Fixes: bdf4f3b ("fabrics: ctrl_loss_tmo setting is invalid for 'loop'")
Signed-off-by: Hannes Reinecke <hare@suse.de>
4 years ago[nvme-cli] Add support for WDC Plugin cloud-SSD-plugin-version to SN355
Jeff Lien [Mon, 1 Mar 2021 21:49:41 +0000 (15:49 -0600)]
[nvme-cli] Add support for WDC Plugin cloud-SSD-plugin-version to SN355

4 years agonvme: fix identify controller structure fabrics identify fields
Gollu Appalanaidu [Tue, 2 Mar 2021 19:06:17 +0000 (00:36 +0530)]
nvme: fix identify controller structure fabrics identify fields

The changes as per the Base NVMe 1.4b and NVMeOF 1.1 specification.
Optional Fabrics Command Support(OFCS) field added at wrong offset
of the structure, and other naming conventions fixed as per the Spec.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agofabrics: update discovery.conf error message
Martin George [Tue, 2 Mar 2021 09:55:22 +0000 (15:25 +0530)]
fabrics: update discovery.conf error message

Remove the extra "conf" in the error message when the open on
/etc/nvme/discovery.conf fails.

Signed-off-by: Martin George <marting@netapp.com>
4 years agonvme: Make gen-hostnqn use partition UUID on IBM POWER systems
Brian King [Fri, 26 Feb 2021 20:24:07 +0000 (14:24 -0600)]
nvme: Make gen-hostnqn use partition UUID on IBM POWER systems

IBM POWER systems expose a platform created UUID in the device
tree. Use that as the UUID in the host NQN.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
4 years agonvme-cli: misc. fixes for memory allocation failure case
Gollu Appalanaidu [Thu, 25 Feb 2021 19:08:34 +0000 (00:38 +0530)]
nvme-cli: misc. fixes for memory allocation failure case

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-discover: add json output
Hannes Reinecke [Tue, 16 Feb 2021 15:12:42 +0000 (16:12 +0100)]
nvme-discover: add json output

Add the '-o'/'--output-format' option to generate JSON output
for nvme discovery.

Signed-off-by: Hannes Reinecke <hare@suse.de>
4 years agonvme: add support for lba status log page
Gollu Appalanaidu [Tue, 23 Feb 2021 18:58:45 +0000 (00:28 +0530)]
nvme: add support for lba status log page

This log page is used to provide information about
subsequent actions the host may take to discover which
logical blocks, in namespaces that are attached to
the controller, may no longer be recoverable when read.
For more details see NVM Express 1.4 Spec. Section
5.14.1.14("LBA Status Information (Log Identifier 0Eh)")

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
Co-Authored-By: Karthik Balan <karthik.b82@samsung.com>
4 years agonvme: add support for endurance group event aggregate log
Gollu Appalanaidu [Sat, 20 Feb 2021 16:30:09 +0000 (22:00 +0530)]
nvme: add support for endurance group event aggregate log

This log page indicates if an Endurance Group Event has
occurred for a particular Endurance Group, the details of
the particular event are included in the Endurance Group
Information log page for that Group. For details see
NVM Express 1.4 Spec. Section 5.14.1.15 ("Endurance Group
Event Aggregate (Log Identifier 0Fh)")

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
Co-Authored-By: Karthik Balan <karthik.b82@samsung.com>
4 years agoprint device name when creating a persistent device
Martin Belanger [Mon, 22 Feb 2021 20:28:33 +0000 (15:28 -0500)]
print device name when creating a persistent device

4 years agonvme: fix status field masking and data type
Gollu Appalanaidu [Mon, 22 Feb 2021 19:09:18 +0000 (00:39 +0530)]
nvme: fix status field masking and data type

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: fix printing set-feature FID and print cdw12, save fields
Gollu Appalanaidu [Sun, 21 Feb 2021 14:12:47 +0000 (19:42 +0530)]
nvme: fix printing set-feature FID and print cdw12, save fields

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-print: show feat fields for FID = {0x17,0x12} and refactoring
Gollu Appalanaidu [Sun, 21 Feb 2021 12:04:16 +0000 (17:34 +0530)]
nvme-print: show feat fields for FID = {0x17,0x12} and refactoring

Showing Sanitize Config (FID = 0x17) and Read Recovery Level
Config (RRL) (FID = 0x12) feature fields. Refactor the FID = 0x0
and non-defined/reserved FIDs response.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add endurance group event configuration feature
Gollu Appalanaidu [Sun, 21 Feb 2021 11:12:28 +0000 (16:42 +0530)]
nvme: add endurance group event configuration feature

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-print: add status_to_string for IO command specific status codes
Gollu Appalanaidu [Fri, 19 Feb 2021 19:35:58 +0000 (01:05 +0530)]
nvme-print: add status_to_string for IO command specific status codes

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme: add path related error status codes
Gollu Appalanaidu [Fri, 19 Feb 2021 19:14:49 +0000 (00:44 +0530)]
nvme: add path related error status codes

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agonvme-print: remove unused argument passing to json output format print
Gollu Appalanaidu [Tue, 16 Feb 2021 17:47:31 +0000 (23:17 +0530)]
nvme-print: remove unused argument passing to json output format print

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
4 years agoMerge branch 'cgdeveloper1-HMT'
Keith Busch [Thu, 18 Feb 2021 21:05:34 +0000 (13:05 -0800)]
Merge branch 'cgdeveloper1-HMT'

4 years agoMerge branch 'HMT' of https://github.com/cgdeveloper1/nvme-cli into cgdeveloper1-HMT
Keith Busch [Thu, 18 Feb 2021 21:04:04 +0000 (13:04 -0800)]
Merge branch 'HMT' of https://github.com/cgdeveloper1/nvme-cli into cgdeveloper1-HMT

4 years agofabrics: permit kato int argument for discovery controllers
Martin George [Thu, 18 Feb 2021 09:46:42 +0000 (15:16 +0530)]
fabrics: permit kato int argument for discovery controllers

Given discovery controllers can now accept integer arguments
for kato, permit the same in build_options().

Signed-off-by: Martin George <marting@netapp.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
4 years agonvme: add man page and completions of nvm command set id controller
Gollu Appalanaidu [Thu, 18 Feb 2021 10:27:17 +0000 (15:57 +0530)]
nvme: add man page and completions of nvm command set id controller

This is to add the man page for the NVM comand set Identify Controller
struture and zsh, bash completions.

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
Co-Authored-By: Karthik Balan <karthik.b82@samsung.com>
4 years agoRebased and removed empty printouts for reserved locations.
Affe [Thu, 18 Feb 2021 10:00:29 +0000 (12:00 +0200)]
Rebased and removed empty printouts for reserved locations.

4 years agonvme: remove unassigned variable "lbads" from format function
Gollu Appalanaidu [Thu, 4 Feb 2021 12:32:23 +0000 (18:02 +0530)]
nvme: remove unassigned variable "lbads" from format function

Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>