From: Qi Zhang Date: Thu, 9 Feb 2017 19:59:43 +0000 (-0500) Subject: vfio: fix maximum number of interrupt for MSI-X X-Git-Tag: spdx-start~4491 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2eed820fd4fdea456103402e0ad13f955321e6cc;p=dpdk.git vfio: fix maximum number of interrupt for MSI-X The max number of interrupt request is possible be changed after rte_intr_callback_register, so in get_max_intr, we need to check if necessary to update the max_intr. Signed-off-by: Qi Zhang --- diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c index b5b3f2bd87..92a19cb860 100644 --- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c +++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c @@ -287,6 +287,8 @@ get_max_intr(const struct rte_intr_handle *intr_handle) if (src->intr_handle.fd != intr_handle->fd) continue; + if (src->intr_handle.max_intr < intr_handle->max_intr) + src->intr_handle.max_intr = intr_handle->max_intr; if (!src->intr_handle.max_intr) src->intr_handle.max_intr = 1; else if (src->intr_handle.max_intr > RTE_MAX_RXTX_INTR_VEC_ID)