Tomas Bzatek [Wed, 23 Mar 2022 12:17:02 +0000 (13:17 +0100)]
tree: Handle NULL subsysname in nvme_scan_ctrl()
As noted couple of lines earlier, the subsysname string might
be NULL. In that case, defer initialization of nvme_subsystem_t
in hope that it would get initialized while scanning subsystems.
Tomas Bzatek [Tue, 22 Mar 2022 15:22:30 +0000 (16:22 +0100)]
tree: Fix subsystem initialization in nvme_scan_ctrl()
The subsystem instance would normally get properly initialized
in later stages of topology scanning, unless there's a host
mismatch and the instance would stand alone.
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>