Daniel Wagner [Fri, 18 Mar 2022 16:40:19 +0000 (17:40 +0100)]
doc: Provide SYSCONFDIR without quotes
Unfortunately, we can't use the configuration data object defined in
the top meson.build file as this one is with quotes. Instead, making
the c code ugly, just provide a new configuration data object without
the quotes. This avoid generating strings suchs as
Daniel Wagner [Fri, 18 Mar 2022 13:05:27 +0000 (14:05 +0100)]
fabrics: Correctly stringify default hostnqn and hostid paths
Fixes: f356ab0ca74a ("fabrics: Allow to change sysconfdir for hostnqn and hostid file") Reported-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Daniel Wagner <dwagner@suse.de>
Hannes Reinecke [Fri, 18 Mar 2022 13:54:07 +0000 (14:54 +0100)]
linux: fixup log page offset in nvme_get_log_page()
When resubmitting the log page with a different length in
nvme_get_log_page() we need to store the original length
of the log page to avoid the length being overwritten.
Daniel Wagner [Tue, 15 Mar 2022 11:09:58 +0000 (12:09 +0100)]
fabrics: Allow to change sysconfdir for hostnqn and hostid file
Instead hard coding the sysconfdir allow the user to overwrite the
location of the hostnqn and hostid file. The default is "/etc" but
when configured with --prefix=DIR the files should be read from
"DIR/nvme/".
Hannes Reinecke [Fri, 11 Mar 2022 12:43:08 +0000 (13:43 +0100)]
tree: link paths to namespaces in nvme_subsystem_scan_namespace()
Depending on the order of scanning nvme_subsystem_scan_namespace()
might be called after nvme_scan_ctrl(), causing the links from
paths to namespaces to be missing.
Boris Glimcher [Mon, 28 Feb 2022 17:24:02 +0000 (19:24 +0200)]
CI: add python wheel build in addition to source package
When using source distribution,
python package will be compiled during pip install.
Wheels make the end-to-end installation of Python packages faster:
- wheels are typically smaller in size than source distributions
- pip fetches a prebuilt wheel and avoids the intermediate step of building
So why cibuildwheel and manylinux?
See https://github.com/pypa/manylinux and https://github.com/pypa/cibuildwheel
The goal of the manylinux project is to provide a convenient way to distribute binary Python extensions as wheels on Linux
See https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
Skipping musllinux and auditwheel repair.
Skipping MacOS and Windows for now.
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Boris Glimcher [Sun, 6 Mar 2022 16:33:12 +0000 (18:33 +0200)]
openssl: update to patch-3 to fix installation issue
Fixes #268
Patch taken from https://mesonbuild.com/Wrapdb-projects.html
Wrap file used https://wrapdb.mesonbuild.com/v2/openssl_1.1.1l-3/openssl.wrap
Fixed by mesonbuild/wrapdb#322
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Wen Xiong [Tue, 1 Mar 2022 21:32:18 +0000 (16:32 -0500)]
ioctl: Set lsp to action in nvme_get_log_persistent_event
Retrieving PEL fails because the lsp is set to NVME_LOG_LSP_NONE
instead of action:
# nvme -persistent-event-log -a 1 /dev/nvme0
NVMe status: Command Sequence Error: The command was aborted due to a protocol violation in a multi- command sequence(0xc)
Daniel Wagner [Tue, 1 Mar 2022 15:01:27 +0000 (16:01 +0100)]
tree: Ignore traddr case in nvme_lookup_ctrl()
Some FC discovery controllers return traddr strings with upper case
hexadecimal. There was is no requirement in the NVME-FC specification
that it be upper or lower case. Switch to strcasecmp for case
insentive traddr comparison.
Based on nvme-cli change 1264c6323937 ("nvme-cli: Make connect-all
matching be case insensitive")
Daniel Wagner [Tue, 1 Mar 2022 09:03:23 +0000 (10:03 +0100)]
fabrics: Do not swap bytes for system uuid
The kernel is taking care of swapping the system uuid bytes since f1d8e614d74b ("drivers/firmware/dmi_scan.c: check dmi version when get
system uuid"). Hence we should not swap them again. Instead just read
/sys/class/dmi/id/product_uuid and store the bytes directly into the
system_uuid buffer.
Daniel Wagner [Tue, 22 Feb 2022 15:06:52 +0000 (16:06 +0100)]
fabrics: add default port number for NVMe/TCP I/O controllers
As per section 7.4.9.3 "Transport Service Identifier" of the NVMe over
Fabrics 1.1 specification, the default IANA port number for a NVMe/TCP
discovery controller is 8009. But at the same time, it also clearly
states that NVMe/TCP I/O controllers should not use TCP port number
8009, but may instead use 4420 as the default here.
So make sure to fill these values appropriately, and pass it down.
Signed-off-by: Martin George <marting@netapp.com>
[dwagner: backport from monolithic branch] Signed-off-by: Daniel Wagner <dwagner@suse.de>
Martin Belanger [Thu, 17 Feb 2022 16:33:50 +0000 (17:33 +0100)]
types: Add Discovery Information Managment types
Add Discovery Information Management related types for TP8010.
Signed-off-by: Martin Belanger <martin.belanger@dell.com>
[dwagner: renaming, adding documation and reformating] Signed-off-by: Daniel Wagner <dwagner@suse.de>
Martin Belanger [Wed, 16 Feb 2022 15:11:05 +0000 (10:11 -0500)]
tree: Add cntrltype and dctype to the controller object
The Discovery Controller Type (dctype) is a new attribute defined
in TP8010. This new attribute, as well as the existing Controller
Type (cntrltype) attributes will now be exposed through the sysfs
starting with kernel 5.18. For older kernels, the cntrltype and
dctype must be retrieved by performing a Identify command.
Signed-off-by: Martin Belanger <martin.belanger@dell.com>
[dwagner: Removed nvme_fetch_cntrltype_dctype_from_id] Signed-off-by: Daniel Wagner <dwagner@suse.de>
Daniel Wagner [Thu, 17 Feb 2022 09:25:31 +0000 (10:25 +0100)]
log: Allow nvme_msg usage with invalid root pointer
24ac082f481d ("Add 'nvme_root_t' argument to nvme_msg()") and 19b12831a9ec ("Move global logging variables into nvme_root_t") moved
the logging controller knobs into the root object. In case the pointer
is invalid we should not try to use it. Instead just bailing out just
log the line.
Martin Belanger [Tue, 15 Feb 2022 20:54:38 +0000 (15:54 -0500)]
tree: Add host symbolic name
The host symbolic name was introduced in TP8010. It is used for
explicit registration with discovery controllers using the
discovery information management (DIM) command.x
Signed-off-by: Martin Belanger <martin.belanger@dell.com>