[PATCH] nvme-pci: place chain addresses in iod

Sagi Grimberg sagi at grimberg.me
Sun Dec 25 01:53:40 PST 2022


> On Tue, Dec 20, 2022 at 10:21:31AM -0800, Keith Busch wrote:
>> -#define NVME_MAX_KB_SZ	4096
>> -#define NVME_MAX_SEGS	127
>> +#define NVME_MAX_KB_SZ	8192
>> +#define NVME_MAX_SEGS	128
>> +#define NVME_MAX_CHAINS	5
> 
> NVME_MAX_CHAINS sounds a bit odd.  Maybe MAX_ALLOCATIONS to match
> the nr_allocations field?

Makes sense.

> 
>>   
>>   static int use_threaded_interrupts;
>>   module_param(use_threaded_interrupts, int, 0444);
>> @@ -232,6 +233,7 @@ struct nvme_iod {
>>   	dma_addr_t first_dma;
>>   	dma_addr_t meta_dma;
>>   	struct sg_table sgt;
>> +	void *list[NVME_MAX_CHAINS];
> 
> I think this should a union nvme_data_ptr * so that we have some typing
> information.

nvme_data_ptr is a wire struct, Maybe it would be better if nvme-pci had
its own union for this.

Also, "list" is not a great name, primarily because it is not a list...
maybe data_ptrs ?



More information about the Linux-nvme mailing list