Skip to content

Commit

Permalink
nvmet-rdma: +1 to *queue_size from hsqsize/hrqsize
Browse files Browse the repository at this point in the history
The host will be sending sqsize 0-based hsqsize value,
the target need to be adjusted as well.

Signed-off-by: Jay Freyensee <james_p_freyensee@linux.intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
  • Loading branch information
Jay Freyensee authored and Sagi Grimberg committed Aug 18, 2016
1 parent 3256aae commit b825b44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/nvme/target/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,10 +1004,10 @@ 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->hsqsize corresponds to our recv queue size plus 1
* req->hrqsize corresponds to our send queue size
*/
queue->recv_queue_size = le16_to_cpu(req->hsqsize);
queue->recv_queue_size = le16_to_cpu(req->hsqsize) + 1;
queue->send_queue_size = le16_to_cpu(req->hrqsize);

if (!queue->host_qid && queue->recv_queue_size > NVMF_AQ_DEPTH)
Expand Down

0 comments on commit b825b44

Please sign in to comment.