Re: [dpdk-dev] [PATCH v8 3/9] pci: split match and probe function

2017-01-17 Thread Thomas Monjalon
2017-01-18 06:17, Shreyansh Jain: > From: Thomas Monjalon [mailto:thomas.monja...@6wind.com] > > 2017-01-17 19:07, Shreyansh Jain: > > > +static int > > > +rte_eal_pci_detach_dev(struct rte_pci_driver *dr, > > > + struct rte_pci_device *dev) > > > +{ > > > + int ret; > > > +

Re: [dpdk-dev] [PATCH v8 3/9] pci: split match and probe function

2017-01-17 Thread Shreyansh Jain
> -Original Message- > From: Thomas Monjalon [mailto:thomas.monja...@6wind.com] > Sent: Wednesday, January 18, 2017 5:02 AM > To: Shreyansh Jain > Cc: dev@dpdk.org > Subject: Re: [PATCH v8 3/9] pci: split match and probe function > > 2017-01-17 19:07, Shreyansh Jain: > > +static int > > +

Re: [dpdk-dev] [PATCH v8 3/9] pci: split match and probe function

2017-01-17 Thread Thomas Monjalon
2017-01-17 19:07, Shreyansh Jain: > +static int > +rte_eal_pci_detach_dev(struct rte_pci_driver *dr, > + struct rte_pci_device *dev) > +{ > + int ret; > + struct rte_pci_addr *loc; > + > + if ((dr == NULL) || (dev == NULL)) > + return -EINVAL; > + > +

[dpdk-dev] [PATCH v8 3/9] pci: split match and probe function

2017-01-17 Thread Shreyansh Jain
Matching of PCI device address and driver ID table is being done at two discreet locations duplicating the code. (rte_eal_pci_probe_one_driver and rte_eal_pci_detach_dev). Splitting the matching function into a public fn rte_pci_match. Signed-off-by: Shreyansh Jain Reviewed-by: Ferruh Yigit ---