rdma: change structure of drained_qpair to work w/ messages.
This will become important later on. Change-Id: I94e5af03359e476afbc68664e43f44269ad5974c Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448074 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
7dd3cf441a
commit
33668b2254
@ -2322,9 +2322,12 @@ spdk_nvmf_rdma_start_disconnect(struct spdk_nvmf_rdma_qpair *rqpair)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void spdk_nvmf_rdma_destroy_drained_qpair(struct spdk_nvmf_rdma_qpair *rqpair,
|
static void nvmf_rdma_destroy_drained_qpair(void *ctx)
|
||||||
struct spdk_nvmf_rdma_transport *rtransport)
|
|
||||||
{
|
{
|
||||||
|
struct spdk_nvmf_rdma_qpair *rqpair = ctx;
|
||||||
|
struct spdk_nvmf_rdma_transport *rtransport = SPDK_CONTAINEROF(rqpair->qpair.transport,
|
||||||
|
struct spdk_nvmf_rdma_transport, transport);
|
||||||
|
|
||||||
if (rqpair->current_send_depth == 0 && rqpair->current_recv_depth == rqpair->max_queue_depth) {
|
if (rqpair->current_send_depth == 0 && rqpair->current_recv_depth == rqpair->max_queue_depth) {
|
||||||
/* The qpair has been drained. Free the resources. */
|
/* The qpair has been drained. Free the resources. */
|
||||||
spdk_nvmf_rdma_qpair_process_pending(rtransport, rqpair, true);
|
spdk_nvmf_rdma_qpair_process_pending(rtransport, rqpair, true);
|
||||||
@ -2963,7 +2966,7 @@ spdk_nvmf_rdma_poller_poll(struct spdk_nvmf_rdma_transport *rtransport,
|
|||||||
/* Disconnect the connection. */
|
/* Disconnect the connection. */
|
||||||
spdk_nvmf_rdma_start_disconnect(rqpair);
|
spdk_nvmf_rdma_start_disconnect(rqpair);
|
||||||
} else {
|
} else {
|
||||||
spdk_nvmf_rdma_destroy_drained_qpair(rqpair, rtransport);
|
nvmf_rdma_destroy_drained_qpair(rqpair);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -3044,7 +3047,7 @@ spdk_nvmf_rdma_poller_poll(struct spdk_nvmf_rdma_transport *rtransport,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rqpair->qpair.state != SPDK_NVMF_QPAIR_ACTIVE) {
|
if (rqpair->qpair.state != SPDK_NVMF_QPAIR_ACTIVE) {
|
||||||
spdk_nvmf_rdma_destroy_drained_qpair(rqpair, rtransport);
|
nvmf_rdma_destroy_drained_qpair(rqpair);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user