nvme: export nvme_configure_[sq|cq] to public #31
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.
They have been used when creating admin queue and I/O queues in nvme_configure_adminq() and nvme_create_iosq|cq to create an instance of SQ and CQ to be managed in libvfn with
ctrl->sq[qid]
andctrl->cq[qid]
.The problem happens when an application handles admin CQ only when an interrupt (e.g., MSI-X) comes with its own CQ handling behavior on top of it. In this case, nvme_create_iosq() and nvme_create_iocq() high-level APIs issue create I/O queue admin command by __admin() where the command is handled in a sync way by reaping the CQ entry right after the command submission. It goes to collision of the CQ between application CQ reaper class and libvfn __admin() callstack.
To solve this issue, export nvme_configure_sq|cq to public to let application manages admin command submission for creating queues.