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

Sagi Grimberg sagi at grimberg.me
Tue Mar 16 18:27:20 GMT 2021


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



More information about the Linux-nvme mailing list