On 12/10/2019 10:37 PM, David Harton wrote:
> Network drivers were originally modified to initialize PCI info with
> commit eeefe73f0af1 ("drivers: copy PCI device info to ethdev data").
> Modifying net/ena to conform.
> 
> Signed-off-by: David Harton <dhar...@cisco.com>
> ---
>  drivers/net/ena/ena_ethdev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
> index 7d4a3b225..4170cf749 100644
> --- a/drivers/net/ena/ena_ethdev.c
> +++ b/drivers/net/ena/ena_ethdev.c
> @@ -1701,6 +1701,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
>       adapter->rte_dev = eth_dev;
>  
>       pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
> +     rte_eth_copy_pci_info(eth_dev, pci_dev);
>       adapter->pdev = pci_dev;
>  
>       PMD_INIT_LOG(INFO, "Initializing %x:%x:%x.%d",
> 

Hi David,

Is it really needed, since it should be called by API already [1], what field in
eth_dev was missing?

[1]
eth_ena_pci_probe()
  rte_eth_dev_pci_generic_probe(eth_ena_dev_init)
    rte_eth_dev_pci_allocate()
      rte_eth_copy_pci_info()
    eth_ena_dev_init()

Reply via email to