]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
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 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>
3 years agoMerge pull request #1490 from igaw/connect_unique_ctrl
Daniel Wagner [Fri, 8 Apr 2022 15:48:43 +0000 (17:48 +0200)]
Merge pull request #1490 from igaw/connect_unique_ctrl

Create persistent controller using unique subsystem NQN

3 years agofabrics: Create persistent controller using unique subsystem NQN
Daniel Wagner [Fri, 8 Apr 2022 15:21:07 +0000 (17:21 +0200)]
fabrics: Create persistent controller using unique subsystem NQN

Prefer unique subsystem NQN discovery controllers over well-known
subsystem NQN when a persistent controller is created.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Refactor discover controller creation
Daniel Wagner [Fri, 8 Apr 2022 14:19:39 +0000 (16:19 +0200)]
fabrics: Refactor discover controller creation

Move the discover controller creation code into one place.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Refactor argument passing for transport configuration
Daniel Wagner [Fri, 8 Apr 2022 13:23:41 +0000 (15:23 +0200)]
fabrics: Refactor argument passing for transport configuration

We passing all the attributes of the transport configuration
individually. Group them together to reduce the number of arguments
one has to pass into the functions.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Set default trsvcid before lookups and match
Daniel Wagner [Fri, 8 Apr 2022 13:42:52 +0000 (15:42 +0200)]
fabrics: Set default trsvcid before lookups and match

Set the default trsvcid before trying to lookup or match against
existing persistent discovery controllers.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1489 from igaw/fix-persistent-kato-tmo2
Daniel Wagner [Fri, 8 Apr 2022 15:41:45 +0000 (17:41 +0200)]
Merge pull request #1489 from igaw/fix-persistent-kato-tmo2

fabrics: Set KATO for discovery controller when connecting

3 years agoMerge pull request #1488 from igaw/fix-discover-argument
Daniel Wagner [Fri, 8 Apr 2022 15:36:27 +0000 (17:36 +0200)]
Merge pull request #1488 from igaw/fix-discover-argument

fabrics: Switch connect and persistent argument for __disover

3 years agofabrics: Set KATO for discovery controller when connecting
Daniel Wagner [Fri, 8 Apr 2022 12:08:47 +0000 (14:08 +0200)]
fabrics: Set KATO for discovery controller when connecting

In case we are connecting to the discovered controllers we should also
set the KATO value for persistent discocovery controllers correctly.

Unfortunatly, the compiler seems to get confused by only conditionally
setting tmo and warns about uninitialized variable. Hence we always
store and restore keep_alive_tmo.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Do no modify default config for discovery controller
Daniel Wagner [Fri, 8 Apr 2022 11:58:01 +0000 (13:58 +0200)]
fabrics: Do no modify default config for discovery controller

When a discovery controller is setup we are currently modifying the
default config. As this configuration might also be used for normal
I/O controllers don't modify it permanently.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Refactor discover controller setup
Daniel Wagner [Fri, 8 Apr 2022 11:32:21 +0000 (13:32 +0200)]
fabrics: Refactor discover controller setup

Move the setup of the discovery controller into a helper
function. This in preperation for handling KATO value updates
centrally.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1485 from igaw/scan-filter-update
Daniel Wagner [Thu, 7 Apr 2022 15:43:13 +0000 (17:43 +0200)]
Merge pull request #1485 from igaw/scan-filter-update

nvme: update to nvme_scan_filter_t modifications

3 years agoMerge pull request #1486 from jeffreyalien/master
Daniel Wagner [Thu, 7 Apr 2022 14:46:58 +0000 (16:46 +0200)]
Merge pull request #1486 from jeffreyalien/master

build: Update meson tips in README.md

3 years agonvme: update to nvme_scan_filter_t modifications
Hannes Reinecke [Wed, 6 Apr 2022 13:24:20 +0000 (15:24 +0200)]
nvme: update to nvme_scan_filter_t modifications

The scan filter in libnvme has been updated, so update the code
to make use of it.

Signed-off-by: Hannes Reinecke <hare@suse.de>
[dwagner: list also the paths for non multipath namespaces]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Update libnvme wrap
Daniel Wagner [Wed, 6 Apr 2022 12:37:51 +0000 (14:37 +0200)]
build: Update libnvme wrap

Get the changes in the filter API and the removal of
ctrl_get_ana_state.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1483 from tbzatek/sysfs-fixes-2
Daniel Wagner [Thu, 7 Apr 2022 08:05:03 +0000 (10:05 +0200)]
Merge pull request #1483 from tbzatek/sysfs-fixes-2

nvme-print: Fix json array object instantiation

3 years agonvme-print: Fix json array object instantiation
Tomas Bzatek [Tue, 22 Mar 2022 14:56:32 +0000 (15:56 +0100)]
nvme-print: Fix json array object instantiation

In the case of multiple hosts records the array objects
gets corrupted.

3 years agoMerge pull request #1484 from wubo009/master
Daniel Wagner [Thu, 7 Apr 2022 07:24:44 +0000 (09:24 +0200)]
Merge pull request #1484 from wubo009/master

Fix memory leak when nvme_scan_toplopy return failed

3 years agoMerge pull request #1405 from arthurshau/add/ocp-plugin
Daniel Wagner [Thu, 7 Apr 2022 07:16:45 +0000 (09:16 +0200)]
Merge pull request #1405 from arthurshau/add/ocp-plugin

Add new OCP plugin

3 years agoFix memory leak when nvme_scan_toplopy return failed
Wu Bo [Thu, 7 Apr 2022 06:50:26 +0000 (14:50 +0800)]
Fix memory leak when nvme_scan_toplopy return failed

3 years agodoc: Add doc files for new ocp plugin commands
Arthur Shau [Wed, 6 Apr 2022 22:45:20 +0000 (15:45 -0700)]
doc: Add doc files for new ocp plugin commands

3 years agoAdd new OCP plugin
Arthur Shau [Thu, 3 Mar 2022 22:08:15 +0000 (14:08 -0800)]
Add new OCP plugin
New OCP plugin that consolidates some of the functionality from the other vendor plugins. For now, implements getting of C0 and C3 log pages.

Signed-off-by: Arthur Shau <arthurshau@fb.com>
Signed-off-by: Wei Zhang <wzhang@fb.com>
Signed-off-by: Venkat Ramesh <venkatraghavan@fb.com>
3 years agobuild: Update meson tips in README.md
Jeff Lien [Wed, 6 Apr 2022 19:35:42 +0000 (14:35 -0500)]
build: Update meson tips in README.md

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agoMerge pull request #1480 from igaw/fix-default-ports
Daniel Wagner [Wed, 6 Apr 2022 14:42:06 +0000 (16:42 +0200)]
Merge pull request #1480 from igaw/fix-default-ports

fabrics: Set default trsvcid ports for TCP and RDMA

3 years agoMerge pull request #1474 from hreinecke/intel-json
Daniel Wagner [Wed, 6 Apr 2022 08:38:40 +0000 (10:38 +0200)]
Merge pull request #1474 from hreinecke/intel-json

plugins/intel: make 'buckets' a json array

3 years agoMerge pull request #1471 from jeffreyalien/OCP-2.0-final
Daniel Wagner [Mon, 4 Apr 2022 16:03:11 +0000 (18:03 +0200)]
Merge pull request #1471 from jeffreyalien/OCP-2.0-final

WDC plugin changes to support OCP 2.0 Spec

3 years agofabrics: Set default trsvcid ports for TCP and RDMA
Daniel Wagner [Mon, 4 Apr 2022 15:46:11 +0000 (17:46 +0200)]
fabrics: Set default trsvcid ports for TCP and RDMA

libnvme doesn't know at controller creation if the new controller is
going to be discovery controller. But nvme-cli knows it, so just set
defaults on the caller level.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1478 from igaw/fix-empty-hostnqn-file
Daniel Wagner [Mon, 4 Apr 2022 11:34:25 +0000 (13:34 +0200)]
Merge pull request #1478 from igaw/fix-empty-hostnqn-file

fabrics: Do not free static string

3 years agofabrics: Do not free static string
Daniel Wagner [Mon, 4 Apr 2022 10:48:55 +0000 (12:48 +0200)]
fabrics: Do not free static string

38f5a54a7306 ("fabrics: Support connect even when no /etc/nvme/hostnqn
file exists") introduce a regression. arg_parser() might assign a
static string to hostnqn and/or hostid. Can't free this.

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