DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: dev@dpdk.org
Cc: Felix Marti <felix@chelsio.com>,
	Kumar Sanghvi <kumaras@chelsio.com>,
	Nirranjan Kirubaharan <nirranjan@chelsio.com>
Subject: [dpdk-dev] [PATCH 1/2] cxgbe: fix to copy pci info to other ports under same PF
Date: Sun, 31 Jan 2016 16:52:49 +0530	[thread overview]
Message-ID: <52cbd2698f43bf5753fbb9b7e9d1dd678519d61f.1454152758.git.rahul.lakkireddy@chelsio.com> (raw)
In-Reply-To: <cover.1454152758.git.rahul.lakkireddy@chelsio.com>
In-Reply-To: <cover.1454152758.git.rahul.lakkireddy@chelsio.com>

Chelsio NIC ports share a single PF. Move rte_eth_copy_pci_info()
to copy the pci device information to the remaining ports as well.

Fixes: eeefe73f0af1 ("drivers: copy PCI device info to ethdev data")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
---
 drivers/net/cxgbe/cxgbe_ethdev.c | 2 --
 drivers/net/cxgbe/cxgbe_main.c   | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 97ef152..fd0eb1c 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -819,8 +819,6 @@ static int eth_cxgbe_dev_init(struct rte_eth_dev *eth_dev)
 
 	pci_dev = eth_dev->pci_dev;
 
-	rte_eth_copy_pci_info(eth_dev, pci_dev);
-
 	snprintf(name, sizeof(name), "cxgbeadapter%d", eth_dev->data->port_id);
 	adapter = rte_zmalloc(name, sizeof(*adapter), 0);
 	if (!adapter)
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index aff23d0..6c7eb7f 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -1166,6 +1166,9 @@ allocate_mac:
 		pi->eth_dev->dev_ops = adapter->eth_dev->dev_ops;
 		pi->eth_dev->tx_pkt_burst = adapter->eth_dev->tx_pkt_burst;
 		pi->eth_dev->rx_pkt_burst = adapter->eth_dev->rx_pkt_burst;
+
+		rte_eth_copy_pci_info(pi->eth_dev, pi->eth_dev->pci_dev);
+
 		TAILQ_INIT(&pi->eth_dev->link_intr_cbs);
 
 		pi->eth_dev->data->mac_addrs = rte_zmalloc(name,
-- 
2.5.3

  reply	other threads:[~2016-01-31 11:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-31 11:22 [dpdk-dev] [PATCH 0/2] cxgbe: Minor bug fix and update license year Rahul Lakkireddy
2016-01-31 11:22 ` Rahul Lakkireddy [this message]
2016-02-24 14:08   ` [dpdk-dev] [PATCH 1/2] cxgbe: fix to copy pci info to other ports under same PF Bruce Richardson
2016-01-31 11:22 ` [dpdk-dev] [PATCH 2/2] cxgbe: update license year to 2016 Rahul Lakkireddy
2016-02-24 13:59   ` Bruce Richardson
2016-02-25  9:37 ` [dpdk-dev] [PATCH v2] cxgbe: fix to copy pci info to ports under same PF Rahul Lakkireddy
2016-02-25 13:39   ` Bruce Richardson

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=52cbd2698f43bf5753fbb9b7e9d1dd678519d61f.1454152758.git.rahul.lakkireddy@chelsio.com \
    --to=rahul.lakkireddy@chelsio.com \
    --cc=dev@dpdk.org \
    --cc=felix@chelsio.com \
    --cc=kumaras@chelsio.com \
    --cc=nirranjan@chelsio.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).