* IOCTL question.
@ 2015-10-30 11:36 Olivier Mallinger - IP Maker
2015-10-30 13:38 ` Keith Busch
0 siblings, 1 reply; 2+ messages in thread
From: Olivier Mallinger - IP Maker @ 2015-10-30 11:36 UTC (permalink / raw)
Hello.
I want to use the driver's ioctl and nvme cli with pass-through command
to manage queues.
The purpose is to create a queue with Submission and completion PRP List.
I did a script doing the following :
- Delete all submission queue (ex. : nvme admin-passthru /dev/nvme0
--opcode=0x00 --cdw10=0x1)
- Delete all completion queue (ex. : nvme admin-passthru /dev/nvme0
--opcode=0x04 --cdw10=0x1)
- Create new completion queue (ex. : nvme admin-passthru /dev/nvme0
--opcode=0x05 --cdw10=0x3ff0001 --cdw11=0x2)
- Create new submission queue (ex. : nvme admin-passthru /dev/nvme0
--opcode=0x01 --cdw10=0x3ff0001 --cdw11=0x00010000)
Until now, the device has completed all the command successfully and is
ready to perform I/O command with this new queue.
Then, i try to send a single write command (ex. : nvme write
/dev/nvme0n1 -s 0 -c 0 -z 4096 -y 0 -r 0 -d essai.txt -p 0 -m 0 -a 0 -l
0 -t 0 -f 0).
The device is never warn that a new command is available and the write
is never fetch and not executed.
Can I manage the queue with the driver ioctl in that way ?
What is the driver behavior when I delete and create queue ?
Thanks.
Regards.
Olivier.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: olivier_mallinger.vcf
Type: text/x-vcard
Size: 316 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20151030/d59a63c1/attachment.vcf>
^ permalink raw reply [flat|nested] 2+ messages in thread
* IOCTL question.
2015-10-30 11:36 IOCTL question Olivier Mallinger - IP Maker
@ 2015-10-30 13:38 ` Keith Busch
0 siblings, 0 replies; 2+ messages in thread
From: Keith Busch @ 2015-10-30 13:38 UTC (permalink / raw)
On Fri, Oct 30, 2015@12:36:27PM +0100, Olivier Mallinger - IP Maker wrote:
> Hello.
>
> I want to use the driver's ioctl and nvme cli with pass-through
> command to manage queues.
>
> The purpose is to create a queue with Submission and completion PRP List.
> I did a script doing the following :
> - Delete all submission queue (ex. : nvme admin-passthru
> /dev/nvme0 --opcode=0x00 --cdw10=0x1)
> - Delete all completion queue (ex. : nvme admin-passthru
> /dev/nvme0 --opcode=0x04 --cdw10=0x1)
> - Create new completion queue (ex. : nvme admin-passthru /dev/nvme0
> --opcode=0x05 --cdw10=0x3ff0001 --cdw11=0x2)
> - Create new submission queue (ex. : nvme admin-passthru
> /dev/nvme0 --opcode=0x01 --cdw10=0x3ff0001 --cdw11=0x00010000)
>
> Until now, the device has completed all the command successfully and
> is ready to perform I/O command with this new queue.
>
> Then, i try to send a single write command (ex. : nvme write
> /dev/nvme0n1 -s 0 -c 0 -z 4096 -y 0 -r 0 -d essai.txt -p 0 -m 0 -a 0
> -l 0 -t 0 -f 0).
> The device is never warn that a new command is available and the
> write is never fetch and not executed.
>
> Can I manage the queue with the driver ioctl in that way ?
> What is the driver behavior when I delete and create queue ?
This is outside the scope of what the driver provides. The driver passes
through what you requested without further interpretation or examination
for sanity. It has no idea you just deleted the queues, so you're
just going to confuse the driver when the queues it created no longer
work. Similarly, the driver is not aware that you're creating new queues.
Creating queues requires DMA mapped memory. You can't do that with the
nvme-cli. Passthrough memory, if any is provided (which you have not
in your example), is pinned and mapped by the driver for only as long
as the command is in flight. Once complete, the driver unmaps it, then
the cli frees it.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-30 13:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-30 11:36 IOCTL question Olivier Mallinger - IP Maker
2015-10-30 13:38 ` Keith Busch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.