DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: support detection of hot swapped SFP/SFP+
@ 2017-04-20 10:47 Srini J
  2017-04-21  4:52 ` Lu, Wenzhuo
  0 siblings, 1 reply; 13+ messages in thread
From: Srini J @ 2017-04-20 10:47 UTC (permalink / raw)
  To: Wenzhuo Lu, Konstantin Ananyev; +Cc: dev, Srinivasan Jayarajan

From: Srinivasan Jayarajan <srinidpdk@gmail.com>

    Adds support to use a different SFP/SFP+ without restarting the
    DPDK app. rte_eth_dev_stop()/rte_eth_dev_start() will need
    to be called on the port to detect the SFP/SFP+ change.

Signed-off-by: Srinivasan Jayarajan <srinidpdk@gmail.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index c226e0a..85407a9 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2520,6 +2520,19 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 	status = ixgbe_pf_reset_hw(hw);
 	if (status != 0)
 		return -1;
+
+	/* Set phy type as unknown so that PHY scan is always done */
+	hw->phy.type = ixgbe_phy_unknown;
+
+	/* Identify PHY and related function pointers */
+	status = hw->phy.ops.init(hw);
+
+	if (status == IXGBE_ERR_SFP_NOT_SUPPORTED) {
+		PMD_INIT_LOG(ERR, "Found unsupported SFP in "
+					"ixgbe_dev_start(): %d", status);
+		return -1;
+	}
+
 	hw->mac.ops.start_hw(hw);
 	hw->mac.get_link_status = true;
 
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-08-28  9:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20 10:47 [dpdk-dev] [PATCH] net/ixgbe: support detection of hot swapped SFP/SFP+ Srini J
2017-04-21  4:52 ` Lu, Wenzhuo
2017-04-24  6:23   ` Srinivasan J
2017-04-24  7:15     ` Lu, Wenzhuo
2017-04-24 10:51       ` Srinivasan J
2017-04-25  1:23         ` Lu, Wenzhuo
2017-05-06 13:51           ` Srinivasan J
2017-05-06 22:36             ` Thomas Monjalon
2017-05-16  3:34               ` Dai, Wei
2017-05-19 10:04                 ` Srinivasan J
2017-06-29 13:00                   ` Ferruh Yigit
2017-07-18 14:56                     ` Dai, Wei
2017-08-28  9:32                       ` Ferruh Yigit

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).