[PATCH 5/9] nvme-fc: centralize admin tagset initialization
Chaitanya Kulkarni
chaitanyak at nvidia.com
Tue Feb 1 22:48:28 PST 2022
Sagi,
>> +static inline void nvme_init_admin_tagset(struct blk_mq_tag_set *set,
>> + void *driver_data, int numa_node,
>> + const struct blk_mq_ops *ops,
>> + unsigned int flags,
>> + unsigned int reserved_tags)
>> +{
>> + memset(set, 0, sizeof(*set));
>> + set->driver_data = driver_data;
>> + set->numa_node = numa_node;
>> + set->ops = ops;
>> + set->flags = flags;
>> + set->reserved_tags = reserved_tags;
>> + set->queue_depth = NVME_AQ_MQ_TAG_DEPTH;
>> + set->nr_hw_queues = 1;
>> + set->timeout = NVME_ADMIN_TIMEOUT;
>> +}
>
> Not sure what this buys us... helper that takes 6 arguments and
> sets 2 duplicated values?
It just that code is duplicated all over the place and most fabrics
controller use common values for admin tagset such as queue depth,
nr_hw_queues, and timeout.
-ck
More information about the Linux-nvme
mailing list