[PATCH 1/2] nvme-pci: allocate nvme_command within driver pdu

Christoph Hellwig hch at lst.de
Tue Mar 16 18:34:45 GMT 2021


On Tue, Mar 16, 2021 at 11:27:20AM -0700, Sagi Grimberg wrote:
>
>>>> All the nvme transport drivers had allocated the nvme command within the
>>>> driver's pdu except for pci. Align pci with everyone else and replace
>>>> the stack variable with the pdu command.
>>>
>>> At some point in this series nvme_request.cmd should become the
>>> actual structure instead of a pointer so that we can remove this
>>> indiretion.  I'd be tempted to just do this in the initial patch,
>>> but I'm fine with any kind of patch ordering.
>>
>> I tried to start off in that direction, but had some trouble. All the
>> fabrics drivers embed their preallocated command within a larger
>> protocol specific payload, so we either need the indirection or have a
>> copy of the command.
>
> Yes, tcp and fc have headers that prepend the command so its better
> for them to have cmd+header allocated together.

Ok, I guess we need to keep the pointer than.  Would have been nice
to avoid that, though.



More information about the Linux-nvme mailing list