Re: [dpdk-dev] [PATCH v4 04/17] net/ionic: register and initialize the adapter

2020-01-07 Thread Ferruh Yigit
On 12/19/2019 10:18 PM, Alfredo Cardigliano wrote: > Register the Pensando ionic PMD (net_ionic) and define initial probe > and remove callbacks with adapter initialization. > > Signed-off-by: Alfredo Cardigliano > Reviewed-by: Shannon Nelson <...> > +static int > +eth_ionic_pci_remove(struct

Re: [dpdk-dev] [PATCH v4 04/17] net/ionic: register and initialize the adapter

2019-12-19 Thread Stephen Hemminger
On Thu, 19 Dec 2019 23:18:34 +0100 Alfredo Cardigliano wrote: > + > +static inline uint16_t ilog2(uint32_t n) > +{ > + uint16_t logv = -1; > + > + if (n == 0) > + return 0; > + > + while (n) { > + logv++; > + n >>= 1; > + } > + > + return lo

Re: [dpdk-dev] [PATCH v4 04/17] net/ionic: register and initialize the adapter

2019-12-19 Thread Stephen Hemminger
On Thu, 19 Dec 2019 23:18:34 +0100 Alfredo Cardigliano wrote: > +static int > +eth_ionic_pci_remove(struct rte_pci_device *pci_dev) > +{ > + return 0; > +} > + You probably want to u se rte_eth_dev_pci_generic_remove here

Re: [dpdk-dev] [PATCH v4 04/17] net/ionic: register and initialize the adapter

2019-12-19 Thread Stephen Hemminger
On Thu, 19 Dec 2019 23:18:34 +0100 Alfredo Cardigliano wrote: > + adapter->pci_dev = pci_dev; > + hw = &adapter->hw; > + > + hw->device_id = pci_dev->id.device_id; > + hw->vendor_id = pci_dev->id.vendor_id; Other drives to rte_eth_copy_pci_info(eth_dev, pci_dev) here.

Re: [dpdk-dev] [PATCH v4 04/17] net/ionic: register and initialize the adapter

2019-12-19 Thread Stephen Hemminger
On Thu, 19 Dec 2019 23:18:34 +0100 Alfredo Cardigliano wrote: > + adapter = rte_zmalloc("ionic", sizeof(*adapter), 0); > + > + if (!adapter) { Don't need a blank line here; better to have assignment and check next to each other. You probably want to use rte_zmalloc_socket to make sure

[dpdk-dev] [PATCH v4 04/17] net/ionic: register and initialize the adapter

2019-12-19 Thread Alfredo Cardigliano
Register the Pensando ionic PMD (net_ionic) and define initial probe and remove callbacks with adapter initialization. Signed-off-by: Alfredo Cardigliano Reviewed-by: Shannon Nelson --- doc/guides/nics/features/ionic.ini | 2 + drivers/net/ionic/Makefile | 3 + drivers/net/ionic/ion