nvmf: resume queued zcopy requests
The zero-copy requests can also be queued when a subsystem is paused, so we need to properly resume and submit them by using zcopy_start. Since only requests that haven't received the zero-copy buffer (i.e. before zcopy_start was called) can be queued, we don't need to bother with checking zcopy_phase. Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Ie629688f6961eb2ae05741df496720b91be4d80d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10792 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> 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
58701cc4c5
commit
974a32b72e
@ -1591,8 +1591,12 @@ nvmf_poll_group_resume_subsystem(struct spdk_nvmf_poll_group *group,
|
|||||||
/* Release all queued requests */
|
/* Release all queued requests */
|
||||||
TAILQ_FOREACH_SAFE(req, &sgroup->queued, link, tmp) {
|
TAILQ_FOREACH_SAFE(req, &sgroup->queued, link, tmp) {
|
||||||
TAILQ_REMOVE(&sgroup->queued, req, link);
|
TAILQ_REMOVE(&sgroup->queued, req, link);
|
||||||
assert(req->zcopy_phase == NVMF_ZCOPY_PHASE_NONE);
|
if (spdk_nvmf_request_using_zcopy(req)) {
|
||||||
spdk_nvmf_request_exec(req);
|
spdk_nvmf_request_zcopy_start(req);
|
||||||
|
} else {
|
||||||
|
spdk_nvmf_request_exec(req);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
fini:
|
fini:
|
||||||
if (cb_fn) {
|
if (cb_fn) {
|
||||||
|
@ -133,6 +133,7 @@ DEFINE_STUB_V(rte_hash_free, (struct rte_hash *h));
|
|||||||
DEFINE_STUB(nvmf_fc_lld_port_add, int, (struct spdk_nvmf_fc_port *fc_port), 0);
|
DEFINE_STUB(nvmf_fc_lld_port_add, int, (struct spdk_nvmf_fc_port *fc_port), 0);
|
||||||
DEFINE_STUB(nvmf_fc_lld_port_remove, int, (struct spdk_nvmf_fc_port *fc_port), 0);
|
DEFINE_STUB(nvmf_fc_lld_port_remove, int, (struct spdk_nvmf_fc_port *fc_port), 0);
|
||||||
|
|
||||||
|
DEFINE_STUB_V(spdk_nvmf_request_zcopy_start, (struct spdk_nvmf_request *req));
|
||||||
DEFINE_STUB_V(spdk_nvmf_request_zcopy_end, (struct spdk_nvmf_request *req, bool commit));
|
DEFINE_STUB_V(spdk_nvmf_request_zcopy_end, (struct spdk_nvmf_request *req, bool commit));
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
|
@ -121,6 +121,7 @@ DEFINE_STUB(nvmf_transport_qpair_get_listen_trid, int,
|
|||||||
(struct spdk_nvmf_qpair *qpair,
|
(struct spdk_nvmf_qpair *qpair,
|
||||||
struct spdk_nvme_transport_id *trid), 0);
|
struct spdk_nvme_transport_id *trid), 0);
|
||||||
DEFINE_STUB_V(spdk_nvmf_request_exec, (struct spdk_nvmf_request *req));
|
DEFINE_STUB_V(spdk_nvmf_request_exec, (struct spdk_nvmf_request *req));
|
||||||
|
DEFINE_STUB_V(spdk_nvmf_request_zcopy_start, (struct spdk_nvmf_request *req));
|
||||||
DEFINE_STUB(spdk_nvmf_get_transport_name, const char *,
|
DEFINE_STUB(spdk_nvmf_get_transport_name, const char *,
|
||||||
(struct spdk_nvmf_transport *transport), NULL);
|
(struct spdk_nvmf_transport *transport), NULL);
|
||||||
DEFINE_STUB(spdk_nvmf_transport_destroy, int, (struct spdk_nvmf_transport *transport,
|
DEFINE_STUB(spdk_nvmf_transport_destroy, int, (struct spdk_nvmf_transport *transport,
|
||||||
|
Loading…
Reference in New Issue
Block a user