nvmf,rdma: Remove spdk_nvmf_rdma_request_ack_completion
The sq_head handling is already done in spdk_nvmf_rdma_request_send_completion, so do not need to do again. Change-Id: I527ff8adfcbdf43ac79794cb5c7777c0e8ef6973 Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
parent
427e90fea3
commit
d706fa417f
@ -519,7 +519,7 @@ nvmf_post_rdma_send(struct spdk_nvmf_request *req)
|
|||||||
* 2) Upon transfer completion, update sq_head, re-post the recv capsule,
|
* 2) Upon transfer completion, update sq_head, re-post the recv capsule,
|
||||||
* and send the completion. (spdk_nvmf_rdma_request_send_completion)
|
* and send the completion. (spdk_nvmf_rdma_request_send_completion)
|
||||||
* 3) Upon getting acknowledgement of the completion, decrement the internal
|
* 3) Upon getting acknowledgement of the completion, decrement the internal
|
||||||
* count of number of outstanding requests. (spdk_nvmf_rdma_request_ack_completion)
|
* count of number of outstanding requests.
|
||||||
*
|
*
|
||||||
* The public interface to initiate the process of completing a request is
|
* The public interface to initiate the process of completing a request is
|
||||||
* spdk_nvmf_rdma_request_complete(), which calls a a callback in the transport layer.
|
* spdk_nvmf_rdma_request_complete(), which calls a a callback in the transport layer.
|
||||||
@ -600,24 +600,6 @@ spdk_nvmf_rdma_request_send_completion(struct spdk_nvmf_request *req)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
spdk_nvmf_rdma_request_ack_completion(struct spdk_nvmf_request *req)
|
|
||||||
{
|
|
||||||
struct spdk_nvmf_conn *conn = req->conn;
|
|
||||||
struct spdk_nvmf_rdma_conn *rdma_conn = get_rdma_conn(conn);
|
|
||||||
|
|
||||||
/* Advance our sq_head pointer */
|
|
||||||
if (conn->sq_head == conn->sq_head_max) {
|
|
||||||
conn->sq_head = 0;
|
|
||||||
} else {
|
|
||||||
conn->sq_head++;
|
|
||||||
}
|
|
||||||
|
|
||||||
rdma_conn->cur_queue_depth--;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
nvmf_rdma_connect(struct rdma_cm_event *event)
|
nvmf_rdma_connect(struct rdma_cm_event *event)
|
||||||
{
|
{
|
||||||
@ -1429,11 +1411,7 @@ spdk_nvmf_rdma_poll(struct spdk_nvmf_conn *conn)
|
|||||||
SPDK_TRACELOG(SPDK_TRACE_RDMA,
|
SPDK_TRACELOG(SPDK_TRACE_RDMA,
|
||||||
"RDMA SEND Complete. Request: %p Connection: %p Outstanding I/O: %d\n",
|
"RDMA SEND Complete. Request: %p Connection: %p Outstanding I/O: %d\n",
|
||||||
req, conn, rdma_conn->cur_queue_depth - 1);
|
req, conn, rdma_conn->cur_queue_depth - 1);
|
||||||
rc = spdk_nvmf_rdma_request_ack_completion(req);
|
rdma_conn->cur_queue_depth--;
|
||||||
if (rc) {
|
|
||||||
error = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IBV_WC_RDMA_WRITE:
|
case IBV_WC_RDMA_WRITE:
|
||||||
|
Loading…
Reference in New Issue
Block a user