]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
3 years agoMerge pull request #1545 from igaw/build-docs-on-arch
Daniel Wagner [Tue, 31 May 2022 18:34:06 +0000 (20:34 +0200)]
Merge pull request #1545 from igaw/build-docs-on-arch

docs: Search for 'asciidoctor' as alternative

3 years agodocs: Search for 'asciidoctor' as alternative
Daniel Wagner [Tue, 31 May 2022 18:26:12 +0000 (20:26 +0200)]
docs: Search for 'asciidoctor' as alternative

There are alternative binary names for asciidoctor. Search for
'asciidoc' or 'asciidoctor' when building the docs.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1540 from igaw/list-subsys-show-path-once
Daniel Wagner [Fri, 27 May 2022 16:09:25 +0000 (18:09 +0200)]
Merge pull request #1540 from igaw/list-subsys-show-path-once

nvme-print: Show paths from the first namespace only

3 years agoMerge pull request #1537 from lgdacunha/Solidigm_VU_garbage_collect_log
Daniel Wagner [Fri, 27 May 2022 16:08:49 +0000 (18:08 +0200)]
Merge pull request #1537 from lgdacunha/Solidigm_VU_garbage_collect_log

Added Vendor Unique Solidigm Garbage Collect Log.

3 years agoAdded Vendor Unique Solidigm Garbage Collect Log.
da Cunha, Leonardo [Fri, 6 May 2022 23:34:56 +0000 (19:34 -0400)]
Added Vendor Unique Solidigm Garbage Collect Log.

3 years agonvme-print: Show paths from the first namespace only
Daniel Wagner [Wed, 25 May 2022 15:33:08 +0000 (17:33 +0200)]
nvme-print: Show paths from the first namespace only

When listing the subsystem, show the path from the first namespace
only. Every namespace has the same paths for a subsystem. This avoids
listening the same controllers for each namespace.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1531 from igaw/apply-json-config
Daniel Wagner [Tue, 24 May 2022 13:12:07 +0000 (15:12 +0200)]
Merge pull request #1531 from igaw/apply-json-config

fabrics: Honor config file for connect-all

3 years agofabrics: Honor config file for connect-all
Daniel Wagner [Thu, 19 May 2022 12:14:47 +0000 (14:14 +0200)]
fabrics: Honor config file for connect-all

The command line option -J config.json allows to provide a
configuration via a JSON file. We handle this correctly for the
'connect' case but fail to apply the configuration for 'connect-all'
because we missed to add nvme_read_config() in this path.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1528 from igaw/fix-mec-field
Daniel Wagner [Wed, 18 May 2022 12:25:58 +0000 (14:25 +0200)]
Merge pull request #1528 from igaw/fix-mec-field

nvme-print: Show mec field in human output instead of vwci

3 years agonvme-print: Show mec field in human output instead of vwci
Daniel Wagner [Wed, 18 May 2022 12:17:03 +0000 (14:17 +0200)]
nvme-print: Show mec field in human output instead of vwci

Looks like a copy&past error for the human output.

Reported-by: mgerdts
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Fix: 43460fcce21b ("nvme: add identify controller structure 2.0 spec. fields")

3 years agoMerge pull request #1526 from igaw/clarify-lisence
Daniel Wagner [Wed, 18 May 2022 11:57:57 +0000 (13:57 +0200)]
Merge pull request #1526 from igaw/clarify-lisence

treewide: Add SPDX identifier

3 years agobuild: Clarify current main project license
Daniel Wagner [Wed, 18 May 2022 06:19:23 +0000 (08:19 +0200)]
build: Clarify current main project license

The original desired license for the project was GPL-2.0-or-later
but during the development a few files (e.g. fabrics.c and nvme.h)
got added which are licensed as GPL-2.0-only, which renders the
whole project to GPL-2.0-only.

Update the meson license field and the nvme.spec license field.
While at it mentions this in the contributions notes as well.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agotreewide: Add SPDX identifier
Daniel Wagner [Mon, 16 May 2022 14:02:17 +0000 (16:02 +0200)]
treewide: Add SPDX identifier

Add the default project wide license SPDX identifier GPL-2.0-or-later
to all files which do not have any copyright statement.

Add the GPL-2.0-or-later or GPL-2.0-only according the copyright
statement listed in the file.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoocp: Update license to GPL-2.0-or-later
Daniel Wagner [Tue, 17 May 2022 06:02:56 +0000 (08:02 +0200)]
ocp: Update license to GPL-2.0-or-later

When I reviewed the plugin I asked wrongly for GPL-2.0-only. The
project is using the GPL-2.0-or-later license. Relax the license
requirement to GPL-2.0-or-later.

Cc: Wei Zhang <wzhang@fb.com>
Cc: Venkat Ramesh <venkatraghavan@fb.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Arthur Shau <arthurshau@fb.com>
Link: https://lore.kernel.org/r/20220517060256.6733-1-dwagner@suse.de
3 years agonvme-rpmb: Update license to GPL-2.0-or-later
Daniel Wagner [Tue, 17 May 2022 06:20:23 +0000 (08:20 +0200)]
nvme-rpmb: Update license to GPL-2.0-or-later

The project is using the GPL-2.0-or-later license. Relax the license
requirement to GPL-2.0-or-later.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Hanumanthu H <hanumanthuh@micron.com>
Link: https://lore.kernel.org/r/20220517062806.9448-1-dwagner@suse.de
3 years agoMerge pull request #1525 from glimchb/master
Daniel Wagner [Tue, 17 May 2022 14:52:27 +0000 (16:52 +0200)]
Merge pull request #1525 from glimchb/master

ci: add static library compilation

3 years agoci: bump meson version from 0.53.2 to 0.61.2
Boris Glimcher [Tue, 17 May 2022 14:47:45 +0000 (17:47 +0300)]
ci: bump meson version from 0.53.2 to 0.61.2

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
3 years agoci: disable werror for uuid subproject
Boris Glimcher [Tue, 17 May 2022 12:22:47 +0000 (15:22 +0300)]
ci: disable werror for uuid subproject

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
3 years agosubprojects: libnvme.wrap update for static uuid
Boris Glimcher [Mon, 16 May 2022 17:07:20 +0000 (20:07 +0300)]
subprojects: libnvme.wrap update for static uuid

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
3 years agoci: add static library compilation
Boris Glimcher [Fri, 13 May 2022 19:33:51 +0000 (22:33 +0300)]
ci: add static library compilation

Now possible since we can use uuid for fallback

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
3 years agoMerge pull request #1523 from jeffreyalien/sn810-2-master
Daniel Wagner [Tue, 17 May 2022 11:02:25 +0000 (13:02 +0200)]
Merge pull request #1523 from jeffreyalien/sn810-2-master

Changes for WDC SN810-2 Drive

3 years agoMerge pull request #1510 from lgdacunha/feature/SMART_VU_plugin
Daniel Wagner [Tue, 17 May 2022 10:52:04 +0000 (12:52 +0200)]
Merge pull request #1510 from lgdacunha/feature/SMART_VU_plugin

Feature/smart vu plugin

3 years agosolidigm: Add Solidigm pluging for vendor specific SMART fields.
da Cunha, Leonardo [Fri, 18 Mar 2022 19:45:43 +0000 (15:45 -0400)]
solidigm: Add Solidigm pluging for vendor specific SMART fields.

3 years agoMerge pull request #1527 from igaw/remove-parser
Daniel Wagner [Tue, 17 May 2022 06:40:45 +0000 (08:40 +0200)]
Merge pull request #1527 from igaw/remove-parser

util: Remove unused parser

3 years agoutil: Remove unused parser
Daniel Wagner [Tue, 17 May 2022 06:33:15 +0000 (08:33 +0200)]
util: Remove unused parser

There is no user for parser. Remove the implementation.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1524 from glimchb/master
Daniel Wagner [Fri, 13 May 2022 15:36:06 +0000 (17:36 +0200)]
Merge pull request #1524 from glimchb/master

build: use uuid wrap for fallback build

3 years agobuild: use uuid wrap for fallback build
Boris Glimcher [Fri, 13 May 2022 15:27:03 +0000 (18:27 +0300)]
build: use uuid wrap for fallback build

see util-linux/util-linux#1657

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
3 years agoMerge pull request #1518 from bmouring/master
Daniel Wagner [Fri, 13 May 2022 14:48:55 +0000 (16:48 +0200)]
Merge pull request #1518 from bmouring/master

completions: Collapse declaration and attribute assignment

3 years agoMerge pull request #1513 from Foxboron/morten/systemd-service
Daniel Wagner [Fri, 13 May 2022 14:42:00 +0000 (16:42 +0200)]
Merge pull request #1513 from Foxboron/morten/systemd-service

meson_options: Include system sub directory

3 years agoMerge pull request #1522 from igaw/sfx-byte-align
Daniel Wagner [Fri, 13 May 2022 14:28:06 +0000 (16:28 +0200)]
Merge pull request #1522 from igaw/sfx-byte-align

sfx: align fixes + smartlog

3 years agosfx: support query-cap change-cap for sfx csd3000
yuekunjin [Thu, 28 Apr 2022 11:53:47 +0000 (19:53 +0800)]
sfx: support query-cap change-cap for sfx csd3000

Support query-cap change-cap for myrtle

Co-authored-by: yjin <yuekun.jin@scaleflux.com>
Signed-off-by: Wei Hou <wei.hou@scaleflux.com>
3 years agosfx: fixed some of add_smart_log_items not shown issue
Wei Hou [Wed, 27 Apr 2022 01:40:00 +0000 (09:40 +0800)]
sfx: fixed some of add_smart_log_items not shown issue

3 years agosfx: fixed byte aligned issue; add additional smart log items
Wei Hou [Tue, 19 Apr 2022 07:40:47 +0000 (15:40 +0800)]
sfx: fixed byte aligned issue; add additional smart log items

3 years agoMerge pull request #1498 from sc108-lee/passthru
Daniel Wagner [Fri, 13 May 2022 13:58:07 +0000 (15:58 +0200)]
Merge pull request #1498 from sc108-lee/passthru

nvme: Fix error when passthru does not match opcode based flags

3 years agowdc: Add vs-temperature-stats for SN810-2
Jeff Lien [Wed, 11 May 2022 21:27:18 +0000 (16:27 -0500)]
wdc: Add vs-temperature-stats for SN810-2

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agowdc: Updated field descriptions in vs-cloud-log command
Jeff Lien [Mon, 2 May 2022 20:51:25 +0000 (15:51 -0500)]
wdc: Updated field descriptions in vs-cloud-log command

  Fixed printout of 16 byte smart log fields

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agowdc: Update wdc plugin version to 2.0.0
Jeff Lien [Wed, 11 May 2022 21:41:15 +0000 (16:41 -0500)]
wdc: Update wdc plugin version to 2.0.0

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agodoc: Add doc files for wdc vs-device-waf command
Jeff Lien [Tue, 3 May 2022 22:00:46 +0000 (17:00 -0500)]
doc: Add doc files for wdc vs-device-waf command

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agowdc: add vs-device-waf command
Jeff Lien [Tue, 3 May 2022 20:59:28 +0000 (15:59 -0500)]
wdc: add vs-device-waf command

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agocompletions: Collapse declaration and attribute assignment
Brad Mouring [Tue, 3 May 2022 03:38:24 +0000 (22:38 -0500)]
completions: Collapse declaration and attribute assignment

Previously, the associative arrays for the vendor/subcommands and
vendor/functions listings were split into a declaration of type
(using "typeset") and attribute definition (using "readonly"). On
bash 5.1.16 (at least), this lead to the following error (reported
after enabling -xv to expand and print shell inputs)

  ...
  + . /usr/share/bash-completion/completions/nvme
  # bash tab completion for the nvme command line utility
  # (unfortunately, bash won't let me add descriptions to cmds)
  # Kelly Kaoudis kelly.n.kaoudis at intel.com, Aug. 2015

  # Constant to indicate command has no options
  readonly NO_OPTS=""
  ++ readonly NO_OPTS=
  ++ NO_OPTS=

  # Associative array of plugins and associated subcommands
  # Order here is same as PLUGIN_OBJS in Makefile
  typeset -A _plugin_subcmds
  ++ typeset -A _plugin_subcmds
  readonly _plugin_subcmds=(
          [intel]="id-ctrl internal-log lat-stats \
  ...
  ++ _plugin_subcmds=(['intel']='id-ctrl internal-log lat-stats...
  bash: 'intel': syntax error: operand expected (error token is "'intel'")
  ...

Using the available flags for "typeset" to declare the variables as
readonly arrays resolved the issue (and allows for bash completion
to work as-expected)

Signed-off-by: Brad Mouring <bmouring@gmail.com>
3 years agoMerge pull request #1517 from glimchb/master
Hannes Reinecke [Mon, 2 May 2022 16:12:45 +0000 (18:12 +0200)]
Merge pull request #1517 from glimchb/master

README: add more badges

3 years agoREADME: add more badges
Boris Glimcher [Mon, 2 May 2022 10:49:14 +0000 (13:49 +0300)]
README: add more badges

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
3 years agomeson_options: Include system sub directory
Morten Linderud [Wed, 27 Apr 2022 21:44:32 +0000 (23:44 +0200)]
meson_options: Include system sub directory

Signed-off-by: Morten Linderud <morten@linderud.pw>
3 years agoMerge pull request #1512 from hreinecke/coverity
Hannes Reinecke [Fri, 22 Apr 2022 11:40:09 +0000 (13:40 +0200)]
Merge pull request #1512 from hreinecke/coverity

Coverity fixes

3 years agoMerge pull request #1511 from vincentkfu/addr-cleanup
Hannes Reinecke [Fri, 22 Apr 2022 11:39:40 +0000 (13:39 +0200)]
Merge pull request #1511 from vincentkfu/addr-cleanup

fabrics: fix help string for connect traddr option

3 years agonvme: add '--groups' option to nvme ana-log
Hannes Reinecke [Fri, 22 Apr 2022 11:22:39 +0000 (13:22 +0200)]
nvme: add '--groups' option to nvme ana-log

Coverity complained that the 'groups' variable was never changed,
so implement a '--groups' option to 'nvme ana-log'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agonvme: coverity fixes
Hannes Reinecke [Fri, 22 Apr 2022 11:20:30 +0000 (13:20 +0200)]
nvme: coverity fixes

Coverity found some logic issues and resource leaks.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agonvme-rpmb: fixup resource leaks
Hannes Reinecke [Fri, 22 Apr 2022 11:19:02 +0000 (13:19 +0200)]
nvme-rpmb: fixup resource leaks

Found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agonvme-models: fixup resource leaks
Hannes Reinecke [Fri, 22 Apr 2022 11:19:02 +0000 (13:19 +0200)]
nvme-models: fixup resource leaks

Found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agofabrics: 'e->traddr' is static
Hannes Reinecke [Fri, 22 Apr 2022 11:18:08 +0000 (13:18 +0200)]
fabrics: 'e->traddr' is static

Found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoutil/argconfig: fixup possible overflows
Hannes Reinecke [Fri, 22 Apr 2022 11:17:30 +0000 (13:17 +0200)]
util/argconfig: fixup possible overflows

Found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/zns: fixup resource leaks
Hannes Reinecke [Fri, 22 Apr 2022 11:14:37 +0000 (13:14 +0200)]
plugins/zns: fixup resource leaks

Found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/ymtc: fixup resource leaks
Hannes Reinecke [Fri, 22 Apr 2022 11:14:37 +0000 (13:14 +0200)]
plugins/ymtc: fixup resource leaks

Found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/virtium: fixup possible string overflows
Hannes Reinecke [Fri, 22 Apr 2022 11:12:57 +0000 (13:12 +0200)]
plugins/virtium: fixup possible string overflows

Found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/toshiba: fix resource leak
Hannes Reinecke [Fri, 22 Apr 2022 11:11:58 +0000 (13:11 +0200)]
plugins/toshiba: fix resource leak

Found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/seagate: fixup byte calculation
Hannes Reinecke [Fri, 22 Apr 2022 11:10:01 +0000 (13:10 +0200)]
plugins/seagate: fixup byte calculation

When calculating the number of bytes from the number of blocks one
has to ensure that the values can't overflow, so use a large data
type for the number of bytes than for the number of blocks.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/scaleflux: fixup fgetc() usage
Hannes Reinecke [Fri, 22 Apr 2022 11:08:22 +0000 (13:08 +0200)]
plugins/scaleflux: fixup fgetc() usage

fgetc() actually returns an unsigned char.
Found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/ocp: remove dead code
Hannes Reinecke [Fri, 22 Apr 2022 11:07:27 +0000 (13:07 +0200)]
plugins/ocp: remove dead code

Found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/wdc: coverity fixes
Hannes Reinecke [Fri, 22 Apr 2022 11:04:37 +0000 (13:04 +0200)]
plugins/wdc: coverity fixes

Coverity found an off-by-one error when printing raw values; looks
like someone forgot convert the 1-based NVMe spec convention into
the 0-based C convention.
And, of course, various resource leaks.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/wdc: fixup error printing and possible size overflow
Hannes Reinecke [Fri, 22 Apr 2022 11:01:20 +0000 (13:01 +0200)]
plugins/wdc: fixup error printing and possible size overflow

Fixup handling of error codes and possible overflows when printing
LBA values.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/micron: coverity fixes
Hannes Reinecke [Fri, 22 Apr 2022 10:59:55 +0000 (12:59 +0200)]
plugins/micron: coverity fixes

Cleanup possible string overflows and fix resource leaks found
by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/memblaze: coverity fixes
Hannes Reinecke [Fri, 22 Apr 2022 10:49:03 +0000 (12:49 +0200)]
plugins/memblaze: coverity fixes

Fixed some resource leaks and possible string overflows.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/intel: fix logic errors
Hannes Reinecke [Fri, 22 Apr 2022 10:37:22 +0000 (12:37 +0200)]
plugins/intel: fix logic errors

Fixup some logic errors found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/huawei: coverity fixes
Hannes Reinecke [Fri, 22 Apr 2022 10:35:39 +0000 (12:35 +0200)]
plugins/huawei: coverity fixes

Fix some resource leaks and the overly large stack usage in
huawei_print_list_item().

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins/dera: fix possible overflow in get_status()
Hannes Reinecke [Fri, 22 Apr 2022 10:34:16 +0000 (12:34 +0200)]
plugins/dera: fix possible overflow in get_status()

Found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugins: close filedescriptors
Hannes Reinecke [Fri, 22 Apr 2022 10:31:40 +0000 (12:31 +0200)]
plugins: close filedescriptors

For some reasons the plugin authors don't seem to believe in having
to close filedecriptors. Coverity, OTOH, does.
So fix them up to close filedescriptors after use.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agosubprojects: libnvme.wrap update
Hannes Reinecke [Fri, 22 Apr 2022 10:18:49 +0000 (12:18 +0200)]
subprojects: libnvme.wrap update

Pull in coverity fixes.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoUpdate README.md
Hannes Reinecke [Fri, 22 Apr 2022 10:10:20 +0000 (12:10 +0200)]
Update README.md

Add coverity scan badge.

3 years agonvme: Fix error when passthru does not match opcode based flags
Steven Seungcheol Lee [Tue, 12 Apr 2022 05:45:46 +0000 (14:45 +0900)]
nvme: Fix error when passthru does not match opcode based flags

when write option is set(but opcode is not), file should open with read flag
same for read
it occur 'Bad file descriptor' error when access the file

write & read flags are set by opcode as well
Spec mentioned below about opcode(01:00 Data Transfer)
All options to the command shall transfer data as specified or transfer no data.
All commands, including vendor specific commands
01b = host to controller; 10b = controller to host

Reported-by: Kyungsik Shin <ks1012.shin@samsung.com>
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agofabrics: fix help string for connect traddr option
Vincent Fu [Wed, 20 Apr 2022 21:36:24 +0000 (14:36 -0700)]
fabrics: fix help string for connect traddr option

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
3 years agoMerge pull request #1507 from martin-gpy/no_transport_segfault
Hannes Reinecke [Tue, 19 Apr 2022 14:26:29 +0000 (16:26 +0200)]
Merge pull request #1507 from martin-gpy/no_transport_segfault

fabrics: avoid segfault if transport type is omitted

3 years agoMerge pull request #1503 from martin-gpy/skip_connect
Hannes Reinecke [Tue, 19 Apr 2022 14:25:31 +0000 (16:25 +0200)]
Merge pull request #1503 from martin-gpy/skip_connect

fabrics: skip connect if the transport types don't match

3 years agofabrics: avoid segfault if transport type is omitted
Martin George [Mon, 18 Apr 2022 07:22:37 +0000 (12:52 +0530)]
fabrics: avoid segfault if transport type is omitted

A nvme discover or connect-all would currently end up in a
segfault if the transport type is omitted as shown below:

nvme discover -w 192.168.1.114 -a 192.168.1.160
Segmentation fault (core dumped)

Avoid this segfault by checking if the transport type is
available before proceeding in get_default_trsvcid().

Signed-off-by: Martin George <marting@netapp.com>
3 years agoMerge pull request #1492 from jeffreyalien/sn810-2
Daniel Wagner [Thu, 14 Apr 2022 12:20:38 +0000 (14:20 +0200)]
Merge pull request #1492 from jeffreyalien/sn810-2

WDC Plugin Changes for SN_810-2 Drive

3 years agodoc: Add/update man page files for WDC plugin command changes
Jeff Lien [Wed, 13 Apr 2022 19:12:01 +0000 (14:12 -0500)]
doc: Add/update man page files for WDC plugin command changes

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agowdc: Plugin changes to support new SN810-2 drive
Jeff Lien [Wed, 13 Apr 2022 19:06:57 +0000 (14:06 -0500)]
wdc: Plugin changes to support new SN810-2 drive

Add cloud-boot-SSD-version command
Add vs-cloud-log command
Add vs-hw-rev-log command
Update vs-drive-info command
Update vs-nand-stats command

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agoMerge pull request #1499 from igaw/add-git-version
Daniel Wagner [Thu, 14 Apr 2022 12:12:34 +0000 (14:12 +0200)]
Merge pull request #1499 from igaw/add-git-version

nvme: Add git ref to the binary

3 years agonvme: output also libnvme version
Daniel Wagner [Wed, 13 Apr 2022 19:31:02 +0000 (21:31 +0200)]
nvme: output also libnvme version

Print the used libnvme version which the nvme-cli fronent is using.

In order to be backward compatible don't expect that the newly
introduce function in libnvme to be 1available.

This is done by providing a weak symbol which is overwritten when
statically build or when libnvme is is used as shared libray the
dlsym() call checks if the function is available.

  $ nvme --version
  nvme version 2.0 (git 2.0-2-g037372a+)
  libnvme version 1.0 (git 1.0-2-gfb628fe)

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: Add git ref to the binary
Daniel Wagner [Tue, 12 Apr 2022 11:52:59 +0000 (13:52 +0200)]
nvme: Add git ref to the binary

In order to be able to figure out which binary is in use (for example
in debugging situation) it's really helpful to have the 'git describe'
ref added to the binary.

  $ .build/nvme --version
  nvme version 2.0 (git 2.0-2-gcbd3f8d+)

  $ .build/nvme wdc --version
  nvme wdc version 1.16.4 (git 2.0-2-gcbd3f8d+)

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agodocs: move update-docs.sh to doc dir
Daniel Wagner [Tue, 12 Apr 2022 11:43:21 +0000 (13:43 +0200)]
docs: move update-docs.sh to doc dir

No point in clutter in the root dir with this update script. Move to
the Documentation directory.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Update libnvme wrap
Daniel Wagner [Wed, 13 Apr 2022 19:49:05 +0000 (21:49 +0200)]
build: Update libnvme wrap

Get nvme_get_version from libnvme

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: skip connect if the transport types don't match
Martin George [Wed, 13 Apr 2022 15:16:35 +0000 (20:46 +0530)]
fabrics: skip connect if the transport types don't match

Discovery log page data may include records belonging to different
transport types. If during a nvme connect-all, a connect is attempted
on a record that doesn't match the transport type passed here, it
would end up in a connect failure for that record. For e.g. one would
see the following error if a connect is attempted on a tcp record,
but the transport type passed here is 'fc' and its associated params:

nvme_tcp: malformed src address passed: nn-0xXXXX:pn-0xYYYY

Fix this by proceeding with the connect only if the transport types
match for a given record during the connect-all.

[marting: backport from monolithic branch]
Signed-off-by: Martin George <marting@netapp.com>
3 years agoMerge pull request #1502 from linux-nvme/dependabot/github_actions/actions/setup...
Daniel Wagner [Wed, 13 Apr 2022 12:16:05 +0000 (14:16 +0200)]
Merge pull request #1502 from linux-nvme/dependabot/github_actions/actions/setup-python-3

build(deps): bump actions/setup-python from 1 to 3

3 years agobuild(deps): bump actions/setup-python from 1 to 3
dependabot[bot] [Wed, 13 Apr 2022 12:14:37 +0000 (12:14 +0000)]
build(deps): bump actions/setup-python from 1 to 3

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 1 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoMerge pull request #1501 from linux-nvme/dependabot/github_actions/actions/checkout-3
Daniel Wagner [Wed, 13 Apr 2022 12:13:50 +0000 (14:13 +0200)]
Merge pull request #1501 from linux-nvme/dependabot/github_actions/actions/checkout-3

build(deps): bump actions/checkout from 2 to 3

3 years agobuild(deps): bump actions/checkout from 2 to 3
dependabot[bot] [Wed, 13 Apr 2022 12:07:32 +0000 (12:07 +0000)]
build(deps): bump actions/checkout from 2 to 3

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoMerge pull request #1500 from glimchb/master
Daniel Wagner [Wed, 13 Apr 2022 12:07:10 +0000 (14:07 +0200)]
Merge pull request #1500 from glimchb/master

ci: create first dependabot.yml

3 years agoci: create first dependabot.yml
Boris Glimcher [Wed, 13 Apr 2022 11:45:12 +0000 (14:45 +0300)]
ci: create first dependabot.yml

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
3 years agoMerge pull request #1497 from martin-gpy/err_no_params
Daniel Wagner [Wed, 13 Apr 2022 11:13:39 +0000 (13:13 +0200)]
Merge pull request #1497 from martin-gpy/err_no_params

fabrics: error message for nvme discover/connect-all with no params

3 years agoMerge pull request #1495 from martin-gpy/disc_persist_segfault
Daniel Wagner [Wed, 13 Apr 2022 11:06:01 +0000 (13:06 +0200)]
Merge pull request #1495 from martin-gpy/disc_persist_segfault

fabrics: avoid segfault when nvme discover fails with the -p option

3 years agofabrics: avoid segfault when nvme discover fails with the -p option
Martin George [Mon, 11 Apr 2022 04:06:20 +0000 (09:36 +0530)]
fabrics: avoid segfault when nvme discover fails with the -p option

If the initial discovery controller creation fails while passing
the -p option to the nvme discover (or connect-all) command, it
could lead to the below segfault:

nvme discover -t rdma -w 192.168.1.114 -a 192.168.1.113 -p
Failed to write to /dev/nvme-fabrics: Connection reset by peer
Segmentation fault (core dumped)

Avoid this segfault by checking if the controller created in
__create_discover_ctrl() is valid before proceeding.

Signed-off-by: Martin George <marting@netapp.com>
3 years agoMerge pull request #1493 from Foxboron/morten/fix-meson
Daniel Wagner [Wed, 13 Apr 2022 11:03:45 +0000 (13:03 +0200)]
Merge pull request #1493 from Foxboron/morten/fix-meson

meson: Install udev rules to /usr/lib

3 years agoMerge pull request #1494 from nekopsykose/types
Daniel Wagner [Wed, 13 Apr 2022 11:00:45 +0000 (13:00 +0200)]
Merge pull request #1494 from nekopsykose/types

util/base64: fix missing sys/types.h include

3 years agofabrics: error message for nvme discover/connect-all with no params
Martin George [Mon, 11 Apr 2022 12:03:17 +0000 (17:33 +0530)]
fabrics: error message for nvme discover/connect-all with no params

Currently when nvme discover or connect-all is called without
passing any params, it simply blanks out without any meaningful
error. So add an appropriate error message for such scenarios,
similar to what's done in the erstwhile nvme-cli-monolithic branch.

Signed-off-by: Martin George <marting@netapp.com>
3 years agomeson: Install udev rules to /usr/lib
Morten Linderud [Sat, 9 Apr 2022 11:51:21 +0000 (13:51 +0200)]
meson: Install udev rules to /usr/lib

Signed-off-by: Morten Linderud <morten@linderud.pw>
3 years agoutil/base64: fix missing sys/types.h include
psykose [Sat, 9 Apr 2022 17:36:14 +0000 (17:36 +0000)]
util/base64: fix missing sys/types.h include

needed for u_int32_t

3 years agodoc: Regenerate all documentation v2.0
Daniel Wagner [Fri, 8 Apr 2022 16:50:16 +0000 (18:50 +0200)]
doc: Regenerate all documentation

Prepare for first release of the 2.0 major version.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agodocs: Fix title for ocp plugin commands
Daniel Wagner [Fri, 8 Apr 2022 16:47:59 +0000 (18:47 +0200)]
docs: Fix title for ocp plugin commands

asciidoc complains due to correct title markdown.

  asciidoc: FAILED: manpage document title is mandatory

While at it also stream line the documention slightly.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Update libnvme wrap
Daniel Wagner [Fri, 8 Apr 2022 16:42:04 +0000 (18:42 +0200)]
build: Update libnvme wrap

Update to v1.0 of libnvme.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Update zlib wrap
Daniel Wagner [Fri, 8 Apr 2022 16:39:19 +0000 (18:39 +0200)]
build: Update zlib wrap

Update to zlib-1.2.12

Signed-off-by: Daniel Wagner <dwagner@suse.de>