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.
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.
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.
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.
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
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>
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.
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.
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'.
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.
Fix this by passing the appropriate json array type for smdevices.
Also include a couple of minor changes as well - add a newline to
the end of the json output, and then free the json root device.
Signed-off-by: Martin George <marting@netapp.com> Tested-by: Clayton Skaggs <claytons@netapp.com>
Daniel Wagner [Thu, 17 Mar 2022 13:22:55 +0000 (14:22 +0100)]
nvme: Print full device path
Restore nvme-cli 1.x behavior to print the full path to the device
file. We assume that the devtmpfs is mounted under /dev which is the
case for any systemd based distro and a de-facto standard.
But SPDK users see their device populated under /dev/spdk have their
device file appear. So instead blindly prefix /dev do a stat to check
if the file exist.
If our educated guesses fail, don't add the full path. This should be
really a corner case and as long no one complains don't overengineer.
Minwoo Im [Thu, 18 Nov 2021 13:20:12 +0000 (22:20 +0900)]
nvme-print: print generic device in list command
Generic namespace device is one of I/O paths that needs to be listed up
in the `nvme list` command along with the blkdev. Print it out in the
simple list command.
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Hannes Reinecke [Wed, 16 Mar 2022 14:32:06 +0000 (15:32 +0100)]
fabrics: check for discovery controller instead of subsystem NQN
Unique discovery subsystems have a unique subsystem NQN, to we cannot
check for the standard discovery NQN when checking for persistent
discovery controllers, but rather have to check if the subsystem is a
discovery subsystem.
Daniel Wagner [Wed, 16 Mar 2022 10:47:46 +0000 (11:47 +0100)]
nvmf-autoconnect: Add option to specify path to systemctl
Many distros have adapted the usr merge and hence systemctl is install
in /usr/bin. Instead just hard coding the new path, let's introduce a
new build option to allow specifying the path to the systemclt
binary.
Note, the scripts also have hard coded paths to /bin/sh or
/bin/echo. None of these paths are covered by POSIX but in practice
all distros have those as symlinks when the usr merge have been
implemented. Let's address these issues when the pop up.
Daniel Wagner [Tue, 15 Mar 2022 18:25:22 +0000 (19:25 +0100)]
fabrics: Honor sysconfdir for hostnqn and hostid files
When sysconfdir is set during build the hostnqn and hostid file should
be installed under this path. Replace the hard coded path and also
update the documentation.
Daniel Wagner [Tue, 15 Mar 2022 18:08:25 +0000 (19:08 +0100)]
build: Copy include adoc files to build dir
asciidoctor wants all file to live under one common directory root,
thus we can't provide a search path for the include files. Copy
include files to the build dir.