[dpdk-dev] [PATCH v2] bus/pci: fix wrong intr_handle.type with uio_pci_generic

Yang, Zhiyong zhiyong.yang at intel.com
Wed Jan 10 02:28:32 CET 2018



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas at monjalon.net]
> Sent: Tuesday, January 9, 2018 11:34 PM
> To: Yang, Zhiyong <zhiyong.yang at intel.com>
> Cc: dev at dpdk.org; Yigit, Ferruh <ferruh.yigit at intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2] bus/pci: fix wrong intr_handle.type with
> uio_pci_generic
> 
> 03/01/2018 04:29, Yang, Zhiyong:
> > From: Thomas Monjalon [mailto:thomas at monjalon.net]
> > > 29/12/2017 08:55, Zhiyong Yang:
> > > > --- a/drivers/bus/pci/linux/pci.c
> > > > +++ b/drivers/bus/pci/linux/pci.c
> > > > @@ -723,7 +723,6 @@ pci_ioport_map(struct rte_pci_device *dev, int
> > > > bar
> > > __rte_unused,
> > > >  	if (!found)
> > > >  		return -1;
> > > >
> > > > -	dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
> > >
> > > There is the same assignment in pci_vfio_map_resource_primary(),
> > > pci_vfio_map_resource_secondary() and pci_uio_map_resource().
> > >
> > > Please could you check why there is such assignments?
> >
> > In general, the operation in the three functions intends to initialize
> > the "intr_handle.type", For example, For pci_uio_map_resource(),  it
> > wants to get "unknown" status once the code returns abnormally after
> initializing.
> > If the code goes smoothly,  dev->intr_handle.type must be assigned to
> > "RTE_INTR_HANDLE_UIO"  for bsd environment, Or must be assigned to
> > "RTE_INTR_HANDLE_UIO" or " RTE_INTR_HANDLE_UIO_INTX" for linux
> environment In consideration of the "memset" in pci_scan_one, it can be
> removed to has no harm to the existing logic.
> 
> So what do you think of doing a v3 which removes it everywhere?
> It would remove inconsistencies and avoid future questions.
> 

It's reasonable  and I will do that in V3.

Thanks
Zhiyong


More information about the dev mailing list