nvmet-rdma: +1 to *queue_size from hsqsize/hrqsize
Subsystems (2)
RFC PATCH 1/1 nvmet-rdma: +1 to *queue_size from hsqsize/hrqsize
Now that the host will be sending hsqsize/hrqsize 0-based values, the target may need to be adjusted as well.
I am not 100% clear this is the only spot on the target. Lightly testing host+target I haven't noticed any difference with this change but my target went down so
I cannot do anything else for now so just make this an RFC...
--- drivers/nvme/target/rdma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/nvme/target/rdma.c +4 -4
@@ -1004,11 +1004,11 @@ nvmet_rdma_parse_cm_connect_req(struct rdma_conn_param *conn, queue->host_qid =le16_to_cpu (req->qid);/* -* req->hsqsize corresponds to our recv queue size -* req->hrqsize corresponds to our send queue size +* req->hsqsize corresponds to our recv queue size, plus 1 +* req->hrqsize corresponds to our send queue size, plus 1 */ - queue->recv_queue_size =le16_to_cpu (req->hsqsize); - queue->send_queue_size =le16_to_cpu (req->hrqsize); + queue->recv_queue_size =le16_to_cpu (req->hsqsize)+1 ; + queue->send_queue_size =le16_to_cpu (req->hrqsize)+1 ;if (!queue->host_qid && queue->recv_queue_size >NVMF_AQ_DEPTH )return NVME_RDMA_CM_INVALID_HSQSIZE ;
Signature · 1 line
2.7.4
RFC PATCH 1/1 nvmet-rdma: +1 to *queue_size from hsqsize/hrqsize
Hi Jay,
drivers/nvme/target/rdma.c nvmet_rdma_parse_cm_connect_req(struct rdma_conn_param *conn, · line 1011
Quoted 4 lines · Jay Freyensee
drivers/nvme/target/rdma.c +2
-2- queue->recv_queue_size =le16_to_cpu (req->hsqsize); - queue->send_queue_size =le16_to_cpu (req->hrqsize); + queue->recv_queue_size =le16_to_cpu (req->hsqsize)+1 ; + queue->send_queue_size =le16_to_cpu (req->hrqsize)+1 ;
I think the +1 needs to be inside the le16_to_cpu() in both cases.
-- Daniel
RFC PATCH 1/1 nvmet-rdma: +1 to *queue_size from hsqsize/hrqsize
Quoted 10 lines · Daniel
Hi Jay,
drivers/nvme/target/rdma.c nvmet_rdma_parse_cm_connect_req(struct rdma_conn_param *conn, · line 1011
Quoted 5 lines · Jay Freyensee
drivers/nvme/target/rdma.c +2
-2- queue->recv_queue_size =le16_to_cpu (req->hsqsize); - queue->send_queue_size =le16_to_cpu (req->hrqsize); + queue->recv_queue_size =le16_to_cpu (req->hsqsize)+1 ; + queue->send_queue_size =le16_to_cpu (req->hrqsize)+1 ;I think the +1 needs to be inside the
le16_to_cpu()in both cases.
Thanks.
This patch will be dependent on the "nvme-rdma: sqsize/hsqsize/hrqsize is 0-based val" patch, which reading the spec again I still think it's 0-based.
Quoted 2 lines
-- Daniel