]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
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 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>
3 years agofabrics: Switch connect and persistent argument for __disover
Daniel Wagner [Mon, 4 Apr 2022 10:28:43 +0000 (12:28 +0200)]
fabrics: Switch connect and persistent argument for __disover

The order of the connect and persistent argument for the recursive
call to __discover is in the wrong order:

  __discover(.., bool connect, bool persistent, enum nvme_print_flags flags)

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

fabrics: Support connect even when no /etc/nvme/hostnqn file exists

3 years agofabrics: Support connect even when no /etc/nvme/hostnqn file exists
Daniel Wagner [Mon, 4 Apr 2022 09:56:15 +0000 (11:56 +0200)]
fabrics: Support connect even when no /etc/nvme/hostnqn file exists

The connect call will fail if there is no /etc/nvme/hostnqn file
available. The 1.x version did have a fallback mechanisme in place
when the config file was missing.

Let's add this feature back by calling nvmf_hostnqn_generate() when
there is no /etc/nvme/hostnqn file.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoplugins/intel: make 'buckets' a json array
Hannes Reinecke [Mon, 4 Apr 2022 06:57:24 +0000 (08:57 +0200)]
plugins/intel: make 'buckets' a json array

The 'buckets' elements in the statistics output are an array, not
a list of (identically named) objects.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoplugin: Update WDC capabilities command with new commmands
Jeff Lien [Fri, 1 Apr 2022 21:15:05 +0000 (16:15 -0500)]
plugin: Update WDC capabilities command with new commmands

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agodocumentation: Add doc files for new wdc plugin commands
Jeff Lien [Wed, 30 Mar 2022 18:02:10 +0000 (13:02 -0500)]
documentation: Add doc files for new wdc plugin commands

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agoplugin: Add new WDC plugin commands for OCP 2.0
Jeff Lien [Fri, 25 Mar 2022 15:41:38 +0000 (10:41 -0500)]
plugin: Add new WDC plugin commands for OCP 2.0
  Add command to display error recovery (id 0xC1) log page
  Add command to display device capabilities (id 0xC4) log page
  Add command to display unsupported requirements (id 0xC5) log page
  Update WDC plugin version to 1.16.4

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agobuild: Update libnvme wrap v2.0-rc8
Daniel Wagner [Fri, 1 Apr 2022 13:10:37 +0000 (15:10 +0200)]
build: Update libnvme wrap

Update to v1.0-rc8 of libnvme.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agodoc: Regenerate all documentation
Daniel Wagner [Fri, 1 Apr 2022 13:09:56 +0000 (15:09 +0200)]
doc: Regenerate all documentation

Prepare for next release candiate.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1468 from martin-belanger/dim-cmd
Daniel Wagner [Fri, 1 Apr 2022 12:38:15 +0000 (14:38 +0200)]
Merge pull request #1468 from martin-belanger/dim-cmd

fabrics: Add DIM command

3 years agoMerge pull request #1470 from hreinecke/config-fix
Hannes Reinecke [Fri, 1 Apr 2022 11:41:40 +0000 (13:41 +0200)]
Merge pull request #1470 from hreinecke/config-fix

build: Update libnvme.wrap

3 years agobuild: Update libnvme.wrap
Hannes Reinecke [Wed, 30 Mar 2022 06:29:08 +0000 (08:29 +0200)]
build: Update libnvme.wrap

Get "tree: always allocate config file in nvme_read_config()" from upstream.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agofabrics: Add DIM command
Martin Belanger [Fri, 1 Apr 2022 11:16:47 +0000 (07:16 -0400)]
fabrics: Add DIM command

TP8010 defines the DIM command (Discovery Information Management)
as a way to Register-with or Deregister-from a Discovery
Controller. This is used for NVMe-over-Fabrics when connecting to
Central Discovery Controllers (CDC).

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
3 years agoMerge pull request #1467 from rnaveentec/fix_spell
Daniel Wagner [Fri, 1 Apr 2022 10:31:48 +0000 (12:31 +0200)]
Merge pull request #1467 from rnaveentec/fix_spell

Fixed spelling for Partition

3 years agonvme-rpmb: Fix spelling for 'Partition'
naveen kumar [Thu, 31 Mar 2022 17:12:32 +0000 (22:42 +0530)]
nvme-rpmb: Fix spelling for 'Partition'

3 years agoMerge pull request #1455 from jeffreyalien/nvme-2.0
Daniel Wagner [Fri, 1 Apr 2022 10:29:49 +0000 (12:29 +0200)]
Merge pull request #1455 from jeffreyalien/nvme-2.0

Nvme 2.0 Changes

3 years agonvme-print: Add human readable print for nsattr field
Jeff Lien [Tue, 22 Mar 2022 20:44:18 +0000 (15:44 -0500)]
nvme-print: Add human readable print for nsattr field

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agonvme-print: Update Persistent Event log fields
Jeff Lien [Tue, 22 Mar 2022 20:08:57 +0000 (15:08 -0500)]
nvme-print: Update Persistent Event log fields

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agodocs: Add Documentation files for get_mi_cmd_support_effects_log
Jeff Lien [Tue, 22 Mar 2022 19:56:01 +0000 (14:56 -0500)]
docs: Add Documentation files for get_mi_cmd_support_effects_log

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agonvme: add get_mi_cmd_support_effects_log command
Jeff Lien [Tue, 22 Mar 2022 19:47:40 +0000 (14:47 -0500)]
nvme: add get_mi_cmd_support_effects_log command

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agoMerge pull request #1460 from Arunpandian15/tests_lba
Daniel Wagner [Fri, 1 Apr 2022 10:07:50 +0000 (12:07 +0200)]
Merge pull request #1460 from Arunpandian15/tests_lba

tests: Add test for get lba status command

3 years agoMerge pull request #1457 from 0xRZ/nvme_copy_fix
Daniel Wagner [Fri, 1 Apr 2022 10:04:35 +0000 (12:04 +0200)]
Merge pull request #1457 from 0xRZ/nvme_copy_fix

nvme-copy: add missing field to the command

3 years agoMerge pull request #1453 from igaw/pdc-force
Daniel Wagner [Thu, 31 Mar 2022 18:46:16 +0000 (20:46 +0200)]
Merge pull request #1453 from igaw/pdc-force

fabrics: Introduce force flag to overwrite persistence logic

3 years agofabrics: Introduce force flag to overwrite persistence logic
Daniel Wagner [Thu, 24 Mar 2022 18:27:01 +0000 (19:27 +0100)]
fabrics: Introduce force flag to overwrite persistence logic

The persistence flag will be overwritten by the built in logic. Allow
the user to overwrite this by providing a force command line option.

While at it make the 'discover_from_config_file' path behave as the
'nvmf_discover' path. The idea here is that whenever a matching
persistent discovery controller is present just use this one. Only
create a new discovery controller when none matching found or
we are asked to do so via --force.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agofabrics: Free non-matching controller during discovery
Daniel Wagner [Mon, 28 Mar 2022 11:42:44 +0000 (13:42 +0200)]
fabrics: Free non-matching controller during discovery

Release all resources for the non-matching controller.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1466 from hreinecke/ns-filter-fix
Hannes Reinecke [Thu, 31 Mar 2022 12:52:29 +0000 (14:52 +0200)]
Merge pull request #1466 from hreinecke/ns-filter-fix

nvme: Fixup namespace filtering yet again

3 years agonvme: Fixup namespace filtering yet again
Hannes Reinecke [Thu, 31 Mar 2022 12:34:19 +0000 (14:34 +0200)]
nvme: Fixup namespace filtering yet again

strcmp() is tricky, so rather check for something with a given
length.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoMerge pull request #1464 from hreinecke/nvme-config
Hannes Reinecke [Thu, 31 Mar 2022 07:23:31 +0000 (09:23 +0200)]
Merge pull request #1464 from hreinecke/nvme-config

Add 'nvme config' command

3 years agofabrics: add 'nvme config' command
Hannes Reinecke [Wed, 30 Mar 2022 10:04:16 +0000 (12:04 +0200)]
fabrics: add 'nvme config' command

Add a command to display and modify the JSON configuration.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agobuild: Update libnvme.wrap
Hannes Reinecke [Wed, 30 Mar 2022 06:29:08 +0000 (08:29 +0200)]
build: Update libnvme.wrap

Get "fabrics: add 'nvmf_update_config()'" from upstream.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoMerge pull request #1463 from hreinecke/meson-stringify
Hannes Reinecke [Wed, 30 Mar 2022 07:33:41 +0000 (09:33 +0200)]
Merge pull request #1463 from hreinecke/meson-stringify

fabrics: Correctly stringify discovery.conf and config.json paths

3 years agofabrics: Correctly stringify discovery.conf and config.json paths
Hannes Reinecke [Wed, 30 Mar 2022 07:20:43 +0000 (09:20 +0200)]
fabrics: Correctly stringify discovery.conf and config.json paths

The C preprocessor will not evaluate tokens in strings.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoMerge pull request #1462 from igaw/fix-argconfig-parser-opt-flag
Daniel Wagner [Tue, 29 Mar 2022 11:10:01 +0000 (13:10 +0200)]
Merge pull request #1462 from igaw/fix-argconfig-parser-opt-flag

argconfig: Do not use default value loading by getopt_long_only

3 years agoargconfig: Rename CFG_NONE to CFG_FLAG
Daniel Wagner [Tue, 29 Mar 2022 10:02:43 +0000 (12:02 +0200)]
argconfig: Rename CFG_NONE to CFG_FLAG

CFG_NONE is used to for OPT_FLAG. All other OPT_ macros have the
matching CFG_ enum. Let's rename CFG_NONE to CFG_FLAG to match and
make it consistent.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoplugins: Use type bool for OPT_FLAG
Daniel Wagner [Tue, 29 Mar 2022 09:58:29 +0000 (11:58 +0200)]
plugins: Use type bool for OPT_FLAG

We switched the arg parser over to using the bool type for
OPT_FLAG. Update all OPT_FLAG user to new type.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: Use type bool for OPT_FLAG
Daniel Wagner [Tue, 29 Mar 2022 09:35:15 +0000 (11:35 +0200)]
nvme: Use type bool for OPT_FLAG

We switched the arg parser over to using the bool type for
OPT_FLAG. Update all OPT_FLAG user to new type.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoargconfig: Do not use default value loading by getopt_long_only
Daniel Wagner [Mon, 28 Mar 2022 18:24:21 +0000 (20:24 +0200)]
argconfig: Do not use default value loading by getopt_long_only

getopt_long_only() is able to load the default values directly. Though
the type has to be 'int'. If the target type of argument not 'int'
getopt_long_only will overwrite adjacent memory location.

Reduce the complexity by not using this feature.

Instead use the type bool because libnvme uses bool in 'struct
nvme_fabrics_config'.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1461 from hreinecke/filter-ns
Hannes Reinecke [Tue, 29 Mar 2022 10:00:23 +0000 (12:00 +0200)]
Merge pull request #1461 from hreinecke/filter-ns

nvme: use filter for 'list-subsys <devname>'

3 years agonvme: use filter for 'list-subsys <devname>'
Hannes Reinecke [Tue, 29 Mar 2022 08:57:04 +0000 (10:57 +0200)]
nvme: use filter for 'list-subsys <devname>'

When a device name is specified for 'nvme list-subsys' we should
be printing out only those parts of the tree which relate to the
specified device name, not the entire tree.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agobuild: Update libnvme.wrap
Hannes Reinecke [Tue, 29 Mar 2022 09:54:50 +0000 (11:54 +0200)]
build: Update libnvme.wrap

Get 'tree: do not return error when filtering out subsystems' from
upstream.

Signed-off-by: Hannes Reinecke <hare@suse.de>