Merged
Conversation
libnvme/libnvme/nvme.i
Outdated
| * ctrl->s ctrl->subsystem | ||
| * ctrl->dhchap_key ctrl->dhchap_host_key | ||
| * ctrl->dhchap_host_key ctrl->dhchap_host_key | ||
| * ctrl->dhchap_ctrl_key ctrl->dhchap_key |
There was a problem hiding this comment.
@hreinecke — For consistency, it might make sense to have the Python ctrl_key match the C definition. Backward compatibility shouldn’t be a concern since this is a major release, and nvme-stas is already planning a corresponding major release for nvme-cli 3.0.
Collaborator
Author
There was a problem hiding this comment.
Sure. I'm more than happy to update the SWIG interface, too.
e60e59e to
431e658
Compare
During merge two sets of discovery functions had been created with identical content. Delete one set. Signed-off-by: Hannes Reinecke <hare@suse.de>
4bcafb6 to
ad1d899
Compare
There are two dhchap keys, a 'host' and a 'ctrl' key. Additionally, the libnvme interface prefixes function calls with 'nvme_ctrl_XX' and 'nvme_host_XX', depending on whether the first argument is a controller or a host. But that means that the function 'nvme_ctrl_dhchap_key' does _not_ refer to the dhchap ctrl key, but in fact to the dhchap host key. So to avoid all confusion make the naming consistent, and use the '_host_key' suffix for all functions referring to the dhchap host key, and '_ctrl_key' to all functions referring to the dhchap ctrl key. Which, incidentally, uncovered quite a few mixups. Signed-off-by: Hannes Reinecke <hare@suse.de>
Update dhchap key options when calling __create_discovery_ctrl(). Signed-off-by: Hannes Reinecke <hare@suse.de>
When we have a unique discovery controller we can use dhchap authentication, so remove the limitations and ensure we're only setting the dhchap host key when a unique discovery controller is referenced. Signed-off-by: Hannes Reinecke <hare@suse.de>
f68416e to
c8aad19
Compare
There already is an accessor function nvme_ctrl_get_traddr(), so use that instead and drop the old function. Signed-off-by: Hannes Reinecke <hare@suse.de>
The accessor functions already have implementations for the various nvme subsystem accessors, so drop them from tree.c Signed-off-by: Hannes Reinecke <hare@suse.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There had been some issues during libnvme merge, where the distinction between dhchap host and controller keys was not correctly maintained. And some functions had been duplicated, making the code very hard to follow.
This patchset fixes up these issues.