On 12/12/2019 12:04 PM, Alfredo Cardigliano wrote: > > >> On 10 Dec 2019, at 19:50, Ferruh Yigit <ferruh.yi...@intel.com> wrote: >> >> On 12/9/2019 9:46 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 <cardigli...@ntop.org> >>> Reviewed-by: Shannon Nelson <snel...@pensando.io> >> >> <...> >> >>> +/* >>> + * There is no room in struct rte_pci_driver to keep a reference >>> + * to the adapter, using a static list for the time being. >>> + */ >>> +static LIST_HEAD(ionic_pci_adapters_list, ionic_adapter) >>> ionic_pci_adapters = >>> + LIST_HEAD_INITIALIZER(ionic_pci_adapters); >>> +static rte_spinlock_t ionic_pci_adapters_lock = RTE_SPINLOCK_INITIALIZER; >> >> As described in previous version of the patchset, it is possible to remove >> the >> PMD maintained list of adapters, is there any benefit to keep it? > > I will try to implement the approach you recommended. If that looks messy, > is it a problem to keep this static list? >
No problem, that looks reasonable. I believe it will work without being messy, please check octeontx PMD [1], it does something similar, but if it turns out to be messy please feel free to keep the static list. [1] http://lxr.dpdk.org/dpdk/v19.11/source/drivers/net/octeontx/octeontx_ethdev.c#L1146