nvme lightnvm comments
Hi Matias,
two small comments on the NVME lighnvm support:
1) please don't claim the existing Qemu NVMe PCI ID for lightnvm support. We might need the actual vendor specific data for qemu purposes. Please allocate a different PCI ID for a qemu emulated lightnvm nvme device
2) please build the lightnvm.o object conditionally in the makefile
Thanks!
Hi Christoph,
Quoted 8 lines · Christoph Hellwig
Hi Matias,
two small comments on the NVME lighnvm support:
1) please don't claim the existing Qemu NVMe PCI ID for lightnvm support. We might need the actual vendor specific data for qemu purposes. Please allocate a different PCI ID for a qemu emulated lightnvm nvme device
I'll look into it.
Quoted 1 line
2) please build the lightnvm.o object conditionally in the makefile
Then the functions
nvme_nvm_registernvme_nvm_unregisternvme_nvm_register
have to be #ifdef'ed in the pci file. Do you want that instead? It was on purpose the other way around, so that the nvme_nvm_* functions was null functions if lightnvm isn't compiled in.
Quoted 3 lines
Thanks!
Quoted 11 lines · Matias Bj?rling
Quoted 1 line
2) please build the lightnvm.o object conditionally in the makefile
Then the functions
nvme_nvm_registernvme_nvm_unregisternvme_nvm_registerhave to be #ifdef'ed in the pci file. Do you want that instead? It was on purpose the other way around, so that the nvme_nvm_* functions was null functions if lightnvm isn't compiled in.
Just keep the stubs as inlines in the header.
Quoted 9 lines · Christoph Hellwig
Quoted 8 lines · Matias Bj?rling
Quoted 1 line
2) please build the lightnvm.o object conditionally in the makefile
Then the functions
nvme_nvm_registernvme_nvm_unregisternvme_nvm_register
Quoted 6 lines
Quoted 3 lines
have to be #ifdef'ed in the pci file. Do you want that instead? It was on purpose the other way around, so that the nvme_nvm_* functions was null functions if lightnvm isn't compiled in.
Just keep the stubs as inlines in the header.
That'll do.
Do you have any plans for exposing the completion_entry on req_completion in the driver? I'm interested in the fields ->result and ->rsvd in struct nvme_completion. They contain the completion bits for each of the PPA entries. Which I'll need higher up in the stack to perform correct retries and so forth.
Quoted 5 lines · Matias Bj?rling
Do you have any plans for exposing the
completion_entryonreq_completionin the driver? I'm interested in the fields ->result and ->rsvd in structnvme_completion. They contain the completion bits for each of the PPA entries. Which I'll need higher up in the stack to perform correct retries and so forth.
->result is available already for passthrough commands. But for Fabrics I actually need the full CQE as well, and I'm working on that at the moment. Stay tuned!
Btw, another one: it seems like LightNVM devices still claim to use the NVM I/O set per CAP and CC, which seems a little odd.
Quoted 3 lines · Christoph Hellwig
Btw, another one: it seems like LightNVM devices still claim to use the NVM I/O set per CAP and CC, which seems a little odd.
Oh, where have you seen it? Thought I had it changed everywhere.
Quoted 6 lines · Matias Bj?rling
Quoted 3 lines · Christoph Hellwig
Btw, another one: it seems like LightNVM devices still claim to use the NVM I/O set per CAP and CC, which seems a little odd.
Oh, where have you seen it? Thought I had it changed everywhere.
nvme_configure_admin_queue still hardcodes then NVM comman set when enabling the controller.
Quoted 10 lines · Christoph Hellwig
Quoted 6 lines · Matias Bj?rling
Quoted 3 lines · Christoph Hellwig
Btw, another one: it seems like LightNVM devices still claim to use the NVM I/O set per CAP and CC, which seems a little odd.
Oh, where have you seen it? Thought I had it changed everywhere.
nvme_configure_admin_queuestill hardcodes then NVM comman set when enabling the controller.
We also thought it'd have been cleaner to have a different command set, but the committee hasn't taken on assigning these reserved bits for any new purposes yet. LightNVM detection is done with the vendor + device id at the moment.
Quoted 4 lines · Keith Busch
We also thought it'd have been cleaner to have a different command set, but the committee hasn't taken on assigning these reserved bits for any new purposes yet. LightNVM detection is done with the vendor + device id at the moment.
I saw the vendor + device, but even with that I'd rather see a reserved value in the command set in addition. Claiming that we're NVM if we're not is a bad idea.
While we're at it - the NVMe driver really should check for these reserved bits and reject a PCIe device that doesn't claim to implement the NVM command set.
Quoted 10 lines · Christoph Hellwig
Quoted 4 lines · Keith Busch
We also thought it'd have been cleaner to have a different command set, but the committee hasn't taken on assigning these reserved bits for any new purposes yet. LightNVM detection is done with the vendor + device id at the moment.
I saw the vendor + device, but even with that I'd rather see a reserved value in the command set in addition. Claiming that we're NVM if we're not is a bad idea.
Well, I would too. However, we can't add a new mode without breaking compatibility at some other point in time. We're working on the standardization process.
Quoted 11 lines · Christoph Hellwig
Quoted 6 lines · Matias Bj?rling
Quoted 3 lines · Christoph Hellwig
Btw, another one: it seems like LightNVM devices still claim to use the NVM I/O set per CAP and CC, which seems a little odd.
Oh, where have you seen it? Thought I had it changed everywhere.
nvme_configure_admin_queuestill hardcodes then NVM comman set when enabling the controller.
I might be wrong. That is the normal nvme command set. It isn't the lightnvm command set. In the previous implementation, it was called NVME_CC_CSS_LIGHTNVM.