Click here to Skip to main content
15,747,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am working on a testing tool for nvme-cli(written in c and can run on linux).

For SSD validation purpose, we are actually looking for sending I/O commands to a particular Submission queue(IO Queue pair). We needed this because we wanted threading, but for threading to happen we need to send I/O requests to different queues else the I/O requests would be processed serially.

So is there any way in ioctl() where we can specify the Submission queue IDs?


Is there another API similar to ioctl() where we can specify the Submission queue IDs(Additional parameters)?

What I have tried:

Here is how a nvme IO is requested with ioctl()

ioctl(fd, NVME_IOCTL_SUBMIT_IO, &io);
This invokes nvme_ioctl() in the driver here

nvme_ioctl() intern invokes the nvme_submit_io() Function here

nvme_submit_io() has the a parameter struct nvme_ns *ns where the structure has a field name queue view herehere

I wanted to know if we can invoke ioctl() with a additional new parameter queue_id which is to be assigned to queue field of struct nvme_ns *ns in the nvme_submit_io() function.

Can I know if we can do like this?

If yes, please give me some brief steps. If NO, please suggest me any possible solution.

Since i am new to nvme or ioctl, please correct me if i am wrong.
Updated 21-Dec-17 17:15pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900