[dpdk-dev] [PATCH] eal: fix max number of interrupt request

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Feb 13 22:28:52 CET 2017


2017-02-13 01:16, Zhang, Qi Z:
> Hi Thomas:
> 
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> > 2017-02-09 14:59, Qi Zhang:
> > > 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
> > > nessesary to update the max_intr.
> > 
> > So you are using rte_intr_enable() to update the max_intr field in the case of
> > VFIO_MSIX.
> > What about MSI, INTX and UIO cases?
> 
> My thought is, even without my fix, VFIO_MSIX is already the only case that try to modify max_intr field 
> In get_max_intr, we have:
> 				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)
>                         src->intr_handle.max_intr
>                                 = RTE_MAX_RXTX_INTR_VEC_ID + 1;
> So my patch just follow this and fix some problem.
> 
> Another option is I can use a local variable that assigned by max_intr with boundary check, so get_max_intr can be totally removed and max_intr in intr_source will not be modified.
> 
> To me both fix are not perfect, I think the problem is in rte_intr_callback_register we just save a copy of the pci_dev->intr_handle but not the address point, so we are missing some mechanism to sync them.
> But since we have tight schedule on the 17.02 release and this issue does cause some example code can't work, so we need to a fix it first, we may consider improve the mechanism later.
> 
> Thanks
> Qi

Applied with this title: "vfio: fix maximum number of interrupt for MSI-X"

Please check how to document this behaviour and make it consistent
with other types of interrupts.


More information about the dev mailing list