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

Alfredo Cardigliano cardigliano at ntop.org
Sun Dec 8 20:25:01 CET 2019


> On 2 Dec 2019, at 17:09, Ferruh Yigit <ferruh.yigit at intel.com> 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


More information about the dev mailing list