Commit 128bd51a authored by Anil Veerabhadrappa's avatar Anil Veerabhadrappa Committed by Jim Harris
Browse files

nvmf/fc: Distinguish between IO and LS queue



   hwqp->fgroup is valid only for IO queues and this particular function
deals with pending requests for IO queues. Check hwqp->fgroup and
bailout if called in LS queue context.

Signed-off-by: default avatarAnil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: I40bc9d3c576abd145bd6b296c07dbd64fd3dabd1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470897


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 2dab6e4a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1605,6 +1605,13 @@ spdk_nvmf_fc_hwqp_process_pending_reqs(struct spdk_nvmf_fc_hwqp *hwqp)
	struct spdk_nvmf_fc_request *fc_req;
	int budget = 64;

	if (!hwqp->fgroup) {
		/* LS queue is tied to acceptor_poll group and LS pending requests
		 * are stagged and processed using hwqp->ls_pending_queue.
		 */
		return;
	}

	STAILQ_FOREACH_SAFE(req, &hwqp->fgroup->group.pending_buf_queue, buf_link, tmp) {
		fc_req = SPDK_CONTAINEROF(req, struct spdk_nvmf_fc_request, req);
		if (!nvmf_fc_request_execute(fc_req)) {