Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbft: Discovery support #2315

Merged
merged 5 commits into from
Jun 13, 2024
Merged

nbft: Discovery support #2315

merged 5 commits into from
Jun 13, 2024

Conversation

tbzatek
Copy link
Contributor

@tbzatek tbzatek commented Apr 25, 2024

This brings support for performing discovery and connect-all from Discovery Descriptor List records.

Needs linux-nvme/libnvme#820 to parse URIs from NBFT.

Tested with static IPv4 and IPv6 against linux soft target. For now, persistent discovery controllers have not been tested.

tbzatek added 5 commits May 29, 2024 14:50
Needed for nbft, useful to have public.

Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
libnvme cleanup definitions are not part of public API.

Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
This adds actual discovery support for Discovery Descriptor records.

SSNS records are connected first. Discovery Descriptor records
are checked for any existing (back-)reference from SSNS records
and are skipped if so. It is assumed in such case that the pre-OS
driver has succeeded in discovery and filled SSNS records
accordingly.

In case no SSNS record references the particular Discovery
record, an actual discovery is performed.

Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
Depending on a pre-OS implementation, boot attempts pointing
to the well-known discovery NQN may get transformed in
an SSNS record (and marked as 'unavailable') in case
the discovery cannot be performed. Otherwise the NBFT
table should be populated by discovered records instead.

Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
Attempt to look up and use existing (persistent) discovery
controller.

Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
@tbzatek tbzatek force-pushed the nbft-discovery-2 branch from 37b825e to 8b4c300 Compare May 29, 2024 12:51
@igaw igaw merged commit 34f3fbd into linux-nvme:master Jun 13, 2024
15 of 16 checks passed
@igaw
Copy link
Collaborator

igaw commented Jun 13, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants