From 0ac315f0470f01b6d895d15ad0435a7912da1332 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Mon, 9 Aug 2021 17:47:55 +0800 Subject: [PATCH] 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: Changpeng Liu Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9121 Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Aleksey Marchuk Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- lib/nvmf/vfio_user.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/nvmf/vfio_user.c b/lib/nvmf/vfio_user.c index c828f0544..a5668ea33 100644 --- a/lib/nvmf/vfio_user.c +++ b/lib/nvmf/vfio_user.c @@ -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