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

nvme: export nvme_configure_[sq|cq] to public #31

Merged
merged 1 commit into from
Jan 15, 2025
Merged

Conversation

minwooim
Copy link
Collaborator

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] and ctrl->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.

They have been used when creating admin queue and I/O queues in
nvme_configure_adminq() and nvme_create_io[sq|cq]() to create an
instance of SQ and CQ to be managed in libvfn with ``ctrl->sq[qid]`` and
``ctrl->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.

Signed-off-by: Minwoo Im <[email protected]>
@minwooim minwooim added the enhancement New feature or request label Jan 14, 2025
@minwooim minwooim requested a review from birkelund January 14, 2025 03:39
@birkelund birkelund added the approved Approved for device testing label Jan 15, 2025
@birkelund birkelund merged commit ecab35e into main Jan 15, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Approved for device testing enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants