Is there any way for ioctl() in linux to specify submission queue ID for a nvme IO request
Look a little bit into nvme_submit_io()
, it calls nvme_submit_user_cmd()
Refer here. You will see nvme_alloc_request(q, cmd, 0, NVME_QID_ANY)
. The request allocates to NVME_QID_ANY
means it not specify QID and let the hardware queue mapping to decide which queue is going to send.
Back to your question. AFAIK, there has NO native way to specify QID when sending ioctl cmd. If you really want to. You need to modify native nvme source code and build your own nvme driver.
HINT: Try to let nvme_alloc_request
can receive specified QID, instead of NVME_QID_ANY
.
Is there any alternative for ioctl() in linux to interact with nvme drives
You can try SPDK (https://github.com/spdk/spdk) which contains an user-space NVMe driver. It is written in C. Youc an find its NVMe driver APIs in spdk/include/spdk/nvme.h. For example, spdk_nvme_ctrlr_cmd_io_raw() is used to send any kinds of IO commands to the device, with any created qpair.
You can also try Pynvme (https://github.com/cranechu/pynvme), a python extension of SPDK. Its IOWorker just sends requests within separated process and qpair.
Do we have a way to read NVMe driver's completion queue entry via nvmecli?
https://github.com/linux-nvme/nvme-cli/issues/858
Got answers from another forum. Hence arking this as closed.
Related Topics
Openssl Shows a Different Server Certificate While Browser Shows Correctly
Gitlab: You Are Not Allowed to Access Master! After Moving Gitlab to Another Server
What Is How to Call Execve with Arguments in Assembly
Youcompleteme Can't Find Local Header Files
Bash Script for Executing Commands on Multiple Server
Behavior of Writing to Tcp Socket Before Reading All Data
Why Is Running Node.Js on Port 80 Might Not Be Safe
Difference Between Double and Single Bigger Than in Linux Terminal
Shell Script Not Running via Crontab, Runs Fine Manually
Arch/X86/Include/Asm/Unistd.H VS. Include/Asm-Generic/Unistd.H
Removing First 3 Characters of File Names in Linux
How to Extract Value from JSON Contained in a Variable Using Jq in Bash
Cuda - Confusion About The Visual Profiler Results of "Branch" and "Divergent Branch" (2)