Commit 0ac315f0 authored by Changpeng Liu's avatar Changpeng Liu
Browse files

nvmf/vfio-user: inline ctrlr_interrupt_enabled()



This function is called in the IO processing context, also
rename vfio-user controller data structure with "vu_" prefix.

Change-Id: Icb8fd18772f64c1e633f4a8b8eac26d0bafeed16
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9121


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 2746d51a
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -481,15 +481,15 @@ fail_ctrlr(struct nvmf_vfio_user_ctrlr *ctrlr)
	ctrlr->cfs = 1U;
}

static bool
ctrlr_interrupt_enabled(struct nvmf_vfio_user_ctrlr *ctrlr)
static inline bool
ctrlr_interrupt_enabled(struct nvmf_vfio_user_ctrlr *vu_ctrlr)
{
	assert(ctrlr != NULL);
	assert(ctrlr->endpoint != NULL);
	assert(vu_ctrlr != NULL);
	assert(vu_ctrlr->endpoint != NULL);

	vfu_pci_config_space_t *pci = ctrlr->endpoint->pci_config_space;
	vfu_pci_config_space_t *pci = vu_ctrlr->endpoint->pci_config_space;

	return (!pci->hdr.cmd.id || ctrlr->endpoint->msix->mxc.mxe);
	return (!pci->hdr.cmd.id || vu_ctrlr->endpoint->msix->mxc.mxe);
}

static void