Skip to contentSkip to conversation

nvme lightnvm comments

DISCUSSION Christoph Hellwig 3 participants 12 messages Nov 20, 2015 – Nov 23, 2015 NVMe

lore
Share & tools
lore
#0 lore raw

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!

#1 lore raw

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_register
nvme_nvm_unregister
nvme_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!

#2 lore raw
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_register
nvme_nvm_unregister
nvme_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.

Just keep the stubs as inlines in the header.

#3 lore raw
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_register
nvme_nvm_unregister
nvme_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.

#4 lore raw
Quoted 5 lines · Matias Bj?rling

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.

->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!

#6 lore raw
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.

#7 lore raw
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.

#8 lore raw
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_queue still 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.

#9 lore raw
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.

#10 lore raw
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.

#11 lore raw
In reply to Christoph Hellwig
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_queue still 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.