nvme_fc: minor fixes on sqsize
Subsystems (2)
PATCH 1/1 nvme_fc: minor fixes on sqsize
Corrected two outstanding issues in the transport around sqsize.
The first is the Create Connection LS, which is to use a sqvalue which mirror what will be in the fabric connect, is sending count rather than count - 1.
The second is the hw queue for the admin queue. It's using the define that corresponds to the count - 1 value. It should be count.
--- drivers/nvme/host/fc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/host/fc.c +2 -2
@@ -1323,7 +1323,7 @@ nvme_fc_connect_queue(struct nvme_fc_ctrl *ctrl, struct nvme_fc_queue *queue, sizeof(struct fcnvme_lsdesc_cr_conn_cmd)); conn_rqst->connect_cmd.ersp_ratio =cpu_to_be16 (ersp_ratio); conn_rqst->connect_cmd.qid =cpu_to_be16 (queue->qnum); - conn_rqst->connect_cmd.sqsize =cpu_to_be16 (qsize); + conn_rqst->connect_cmd.sqsize =cpu_to_be16 (qsize -1 ); lsop->queue = queue; lsreq->rqstaddr = conn_rqst;
@@ -2643,7 +2643,7 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)nvme_fc_init_queue (ctrl,0 ); ret =__nvme_fc_create_hw_queue (ctrl, &ctrl->queues[0 ],0 , -NVME_AQ_BLK_MQ_DEPTH ); +NVME_AQ_BLK_MQ_DEPTH +1 );if (ret) goto out_free_queue;
Signature · 1 line
2.13.1
PATCH 1/1 nvme_fc: minor fixes on sqsize
drivers/nvme/host/fc.c nvme_fc_create_association(struct nvme_fc_ctrl *ctrl) · line 2646
Quoted 3 lines · James Smart
drivers/nvme/host/fc.c +1
-1ret =__nvme_fc_create_hw_queue (ctrl, &ctrl->queues[0 ],0 , -NVME_AQ_BLK_MQ_DEPTH ); +NVME_AQ_BLK_MQ_DEPTH +1 );
A bit of a nit, but I think you'd prefer to use NVME_AQ_DEPTH here instead of assuming the +1.
PATCH 1/1 nvme_fc: minor fixes on sqsize
Quoted 6 lines · Keith Busch
drivers/nvme/host/fc.c nvme_fc_create_association(struct nvme_fc_ctrl *ctrl) · line 2646
Quoted 3 lines · James Smart
ret = __nvme_fc_create_hw_queue(ctrl, &ctrl->queues[0], 0,
drivers/nvme/host/fc.c +1
-1- NVME_AQ_BLK_MQ_DEPTH); + NVME_AQ_BLK_MQ_DEPTH + 1);A bit of a nit, but I think you'd prefer to use
NVME_AQ_DEPTHhere instead of assuming the +1.
NP.?? I'll address it. I need to rework the patch as I found another area when we tune for controller limits that isn't right either.
-- james