> On 2 Dec 2019, at 17:09, Ferruh Yigit <[email protected]> wrote:
> 
>> + * 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);
> 
> Why this list is used? Will holding the reference in the private data help?


A pci_dev is tied to an adapter, that can be tied to multiple LIFs (logical 
interfaces), 
an eth_dev is created with rte_eth_dev_create for each LIF. The reason we have 
the
adapters list is for example to handle eth_ionic_pci_remove which is called on 
a 
pci_dev, thus we need to keep the adapter with the list of LIFs (eth_devs) to 
destroy
them.

Btw, all other comments have been fixed, a new patch-set is coming.

Thank you
Alfredo

Reply via email to