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: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: I40bc9d3c576abd145bd6b296c07dbd64fd3dabd1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470897
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Anil Veerabhadrappa 2019-10-09 22:03:11 -07:00 committed by Jim Harris
parent 2dab6e4ab2
commit 128bd51ad0

View File

@ -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)) {