On 7/12/2024 4:47 PM, Serhii Iliushyk wrote: > add implementation for probe/init and remove/deinit of the PCI device > > Signed-off-by: Serhii Iliushyk <sil-...@napatech.com>
<...> > > static int > nthw_pci_dev_deinit(struct rte_eth_dev *eth_dev __rte_unused) > { > - return 0; > + NT_LOG_DBGX(DEBUG, NTNIC, "PCI device deinitialization\n"); > + > + int i; > + char name[32]; > + > + struct pmd_internals *internals = eth_dev->data->dev_private; > At this stage "struct pmd_internals" is not declerad yet, so I expect this commit will fail to build. Can you please test build with each patch, and make sure all builds? > + ntdrv_4ga_t *p_ntdrv = &internals->p_drv->ntdrv; > + fpga_info_t *fpga_info = &p_ntdrv->adapter_info.fpga_info; > + const int n_phy_ports = fpga_info->n_phy_ports; > + for (i = 0; i < n_phy_ports; i++) { > + sprintf(name, "ntnic%d", i); > + eth_dev = rte_eth_dev_allocated(name); > + if (eth_dev == NULL) > + continue; /* port already released */ > + rte_eth_dev_release_port(eth_dev); > + } > + return 0; > There is double tab, please reduce indentation one level.