-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There are two reasons why we have these two functions in public. (1) high-level APIs that using these two are not considering interrupt event support (e.g., MSI-X) for the completion. For example, nvme_create_io[sq|cq]() APIs call __admin() internal helper to issue an admin command simply and it waits for the CQ entry by spinning on CQ by default even if device enables the interrupt and application thread might have fetched the cq entry while racing with this API. To prevent this conflicts, application should be able to choose how to reap the CQ entry, not just relying on the libvfn high-level API. (2) SQ and CQ are major driver context and they can be located in the device memory such as CMB. In this case, application might want to initialize sq and cq instances with a queue memory which application might have already allocated one. To configure sq and cq instances much more flexible, this patch exported them to public by adding @vaddr argument to give callers have a chance to configure their own queue address space. @vaddr can be given as NULL and they will allocate one by default as it was, otherwise it will just initialize sq and cq instances with the given @vaddr. Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
- Loading branch information
Showing
2 changed files
with
79 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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