DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: sodey@rbbn.com, jan@semihalf.com, jpa@semihalf.com,
	netanel@amazon.com, evgenys@amazon.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v1] drivers/net/ena: Copy PCI info to rte_eth_dev
Date: Tue, 16 Jan 2018 19:16:45 +0000	[thread overview]
Message-ID: <9ad79501-24bc-1292-1f20-7ce365721a17@intel.com> (raw)
In-Reply-To: <20180116190606.20208-1-sodey@rbbn.com>

On 1/16/2018 7:06 PM, sodey@rbbn.com wrote:
> From: Souvik Dey <sodey@rbbn.com>
> 
> We need to add the pci_dev info to the rte_eth_dev structure
> during the eth_ena_dev_init. Informantions like driver_name
> and numa_node will not be populated otherwise.

stacktrace is like:

eth_ena_pci_probe
  rte_eth_dev_pci_generic_probe
    rte_eth_dev_pci_allocate
      rte_eth_copy_pci_info
    eth_ena_dev_init

So, before eth_ena_dev_init() called,  rte_eth_copy_pci_info() already should be
called and eth_dev updated with pci_dev info. And you shouldn't need this patch.

Do you observe any missing data in eth_dev?

> 
> Signed-off-by: Souvik Dey <sodey@rbbn.com>
> 
> ---
> 
>  drivers/net/ena/ena_ethdev.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
> index ac0803d..329cb29 100644
> --- a/drivers/net/ena/ena_ethdev.c
> +++ b/drivers/net/ena/ena_ethdev.c
> @@ -1270,6 +1270,8 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
>  		     pci_dev->addr.devid,
>  		     pci_dev->addr.function);
>  
> +	rte_eth_copy_pci_info(eth_dev, pci_dev);
> +
>  	adapter->regs = pci_dev->mem_resource[ENA_REGS_BAR].addr;
>  	adapter->dev_mem_base = pci_dev->mem_resource[ENA_MEM_BAR].addr;
>  
> 

  reply	other threads:[~2018-01-16 19:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16 19:06 sodey
2018-01-16 19:16 ` Ferruh Yigit [this message]
2018-01-17 20:49   ` Dey, Souvik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ad79501-24bc-1292-1f20-7ce365721a17@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=evgenys@amazon.com \
    --cc=jan@semihalf.com \
    --cc=jpa@semihalf.com \
    --cc=netanel@amazon.com \
    --cc=sodey@rbbn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).