nvmf/fc: Fix unfair LS queue pending processing.

If ls_pending_queue is not empty, then add the ls_rqst to
ls_pending_queue instead of trying to get xri.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I97e48f30cb6d4fd69548d48e6360275d9f1adec0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5502
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
This commit is contained in:
Naresh Gottumukkala 2020-12-09 10:26:31 +00:00 committed by Tomasz Zawadzki
parent 67429f288d
commit 8611bc17ca

View File

@ -1516,7 +1516,12 @@ nvmf_fc_hwqp_process_frame(struct spdk_nvmf_fc_hwqp *hwqp,
ls_rqst->rport = rport; ls_rqst->rport = rport;
ls_rqst->nvmf_tgt = g_nvmf_ftransport->transport.tgt; ls_rqst->nvmf_tgt = g_nvmf_ftransport->transport.tgt;
ls_rqst->xchg = nvmf_fc_get_xri(hwqp); if (TAILQ_EMPTY(&hwqp->ls_pending_queue)) {
ls_rqst->xchg = nvmf_fc_get_xri(hwqp);
} else {
ls_rqst->xchg = NULL;
}
if (ls_rqst->xchg) { if (ls_rqst->xchg) {
/* Handover the request to LS module */ /* Handover the request to LS module */
nvmf_fc_handle_ls_rqst(ls_rqst); nvmf_fc_handle_ls_rqst(ls_rqst);