From: Jon DeVree <nuxi@vault24.org>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] igb/e1000: Copy PCI device info after the rte_eal_process_type() check
Date: Mon, 23 Nov 2015 10:13:53 -0500 [thread overview]
Message-ID: <1448291633-14347-1-git-send-email-nuxi@vault24.org> (raw)
This fixes a bug added to these two drivers by eeefe73 (drivers: copy
PCI device info to ethdev data) which causes the pci info seen by the
primary process to become invalidated by secondary process startup.
This call was added after the process type check in the other drivers.
Signed-off-by: Jon DeVree <nuxi@vault24.org>
---
drivers/net/e1000/em_ethdev.c | 4 ++--
drivers/net/e1000/igb_ethdev.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 3e81109..66e8993 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -244,8 +244,6 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
pci_dev = eth_dev->pci_dev;
- rte_eth_copy_pci_info(eth_dev, pci_dev);
-
eth_dev->dev_ops = ð_em_ops;
eth_dev->rx_pkt_burst = (eth_rx_burst_t)ð_em_recv_pkts;
eth_dev->tx_pkt_burst = (eth_tx_burst_t)ð_em_xmit_pkts;
@@ -260,6 +258,8 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
return 0;
}
+ rte_eth_copy_pci_info(eth_dev, pci_dev);
+
hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
hw->device_id = pci_dev->id.device_id;
adapter->stopped = 0;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 88995b0..0dc6357 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -647,8 +647,6 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
pci_dev = eth_dev->pci_dev;
- rte_eth_copy_pci_info(eth_dev, pci_dev);
-
eth_dev->dev_ops = ð_igb_ops;
eth_dev->rx_pkt_burst = ð_igb_recv_pkts;
eth_dev->tx_pkt_burst = ð_igb_xmit_pkts;
@@ -662,6 +660,8 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
return 0;
}
+ rte_eth_copy_pci_info(eth_dev, pci_dev);
+
hw->hw_addr= (void *)pci_dev->mem_resource[0].addr;
igb_identify_hardware(eth_dev);
--
2.6.2
next reply other threads:[~2015-11-23 15:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 15:13 Jon DeVree [this message]
2015-11-23 17:08 ` Iremonger, Bernard
2015-11-23 21:39 ` Thomas Monjalon
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=1448291633-14347-1-git-send-email-nuxi@vault24.org \
--to=nuxi@vault24.org \
--cc=dev@dpdk.org \
/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).