[PATCH] Move nvme driver source into subdirectory and move pci specifics from core into separate file

Christoph Hellwig hch at infradead.org
Sat Sep 26 09:09:33 PDT 2015


On Fri, Sep 25, 2015 at 08:12:33AM -0700, J Freyensee wrote:
> > My suggestion would be:
> > 
> >  a) move files to a new directory.  My suggestion for that would be
> >     driver/nvme/host/ as I have a software NVMe controller
> >     implementation under development which I'd like to also add under
> >     a different subdirectory of drivers/nvme.
> 
> Would that directory be slightly confusing name as the split
> implementation in this patch can still be used as the NVMe PCIe driver
> for SSD devices inside a given computer (laptop, PC, etc)?  I have no
> issue with the name, just posing a question.

Host is what the NVMe spec uses when referring to the computer housing
the NVMe card, that's why I came up with it.  But I'm open for alternate
suggestions.

> I can see that.  However we started with the split we had just out of
> the concern for backwards compatibility and worry of breaking something
> with the initial split.  There was the thought we can optimize some of
> the operations and remove them on future patches on operations that we
> know are safe to remove.

If you look at the NVMe spec we're basically down to two sort of
operations: NVMe commands, and MMIO read/write access to the main
BAR, so those seem the most important abstraction.  My nvme_command
passthrough through struct request takes care of the first, so some
{read,write}_bar_{32,64} ops seem to be most important ops.  Depending
on how exactly the initialization path is structured there might be a
frw more, but I'd tend towards duplicating a bit more in doubt there
initially.

Note that I've done a pre-"NVMe over Fabrics" RDMA transport and a
nvme-loop driver that directy injects commands from a front end
driver into a virtual controller about a year ago, and both fit this
scheme pretty well, as does the virtio-nvme code from Ming.



More information about the Linux-nvme mailing list