[PATCH 8/9] nvme-tcp: use helper for tagset initialization
Chaitanya Kulkarni
chaitanyak at nvidia.com
Fri Jan 28 01:20:14 PST 2022
From: Chaitanya Kulkarni <kch at nvidia.com>
Use helper to remove duplicate code for admin tag initialization
for all transports.
Signed-off-by: Chaitanya Kulkarni <kch at nvidia.com>
---
drivers/nvme/host/tcp.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 6cbcc8b4daaf..e51ceada3bd9 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1613,16 +1613,10 @@ static struct blk_mq_tag_set *nvme_tcp_alloc_tagset(struct nvme_ctrl *nctrl,
if (admin) {
set = &ctrl->admin_tag_set;
- memset(set, 0, sizeof(*set));
- set->ops = &nvme_tcp_admin_mq_ops;
- set->queue_depth = NVME_AQ_MQ_TAG_DEPTH;
- set->reserved_tags = NVMF_RESERVED_TAGS;
- set->numa_node = nctrl->numa_node;
- set->flags = BLK_MQ_F_BLOCKING;
+ nvme_init_admin_tagset(set, ctrl, nctrl->numa_node,
+ &nvme_tcp_admin_mq_ops, BLK_MQ_F_BLOCKING,
+ NVMF_RESERVED_TAGS);
set->cmd_size = sizeof(struct nvme_tcp_request);
- set->driver_data = ctrl;
- set->nr_hw_queues = 1;
- set->timeout = NVME_ADMIN_TIMEOUT;
} else {
set = &ctrl->tag_set;
memset(set, 0, sizeof(*set));
--
2.29.0
More information about the Linux-nvme
mailing list