Skip to content

Commit

Permalink
nvme_rdma: Clear rqpair->num_completions after it is used for resubmi…
Browse files Browse the repository at this point in the history
…ssion

It is enough if we clear rqpair->num_completions after it is actually
used for resubmission. This is helpful to reduce connected qpair
traversal loop.

Signed-off-by: Shuhei Matsumoto <[email protected]>
Change-Id: I99ab47b211d703d722768eac64239712c8142d7f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18841
Tested-by: SPDK CI Jenkins <[email protected]>
Reviewed-by: Aleksey Marchuk <[email protected]>
Reviewed-by: Ben Walker <[email protected]>
Community-CI: Mellanox Build Bot
  • Loading branch information
shuhei-matsumoto authored and tomzawadzki committed Dec 14, 2023
1 parent 77967a6 commit f7b8505
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nvme/nvme_rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -3086,6 +3086,7 @@ nvme_rdma_qpair_process_submits(struct spdk_nvme_qpair *qpair)
}
if (rqpair->num_completions > 0) {
nvme_qpair_resubmit_requests(qpair, rqpair->num_completions);
rqpair->num_completions = 0;
}
}

Expand Down Expand Up @@ -3118,7 +3119,6 @@ nvme_rdma_poll_group_process_completions(struct spdk_nvme_transport_poll_group *

STAILQ_FOREACH_SAFE(qpair, &tgroup->connected_qpairs, poll_group_stailq, tmp_qpair) {
rqpair = nvme_rdma_qpair(qpair);
rqpair->num_completions = 0;

if (spdk_unlikely(nvme_qpair_get_state(qpair) == NVME_QPAIR_CONNECTING)) {
rc = nvme_rdma_ctrlr_connect_qpair_poll(qpair->ctrlr, qpair);
Expand Down

0 comments on commit f7b8505

Please sign in to comment.