[dpdk-dev] [PATCH] net/ixgbe: support detection of hot swapped SFP/SFP+
Srinivasan J
srinidpdk at gmail.com
Mon Apr 24 08:23:53 CEST 2017
Hi Wenzhuo,
I understand your concern. I had to do this change
to support hot swap of SFP/SFP+ modules without restarting the DPDK
app. If we have some other mechanism in pipeline to support hot swap
of SFP/SFP+ modules, then my changes can be ignored. I just wanted to
share the changes which worked for me back to the community.
Regards,
Srini
On Fri, Apr 21, 2017 at 10:22 AM, Lu, Wenzhuo <wenzhuo.lu at intel.com> wrote:
> Hi Srini,
>
>> -----Original Message-----
>> From: Srini J [mailto:srinidpdk at gmail.com]
>> Sent: Thursday, April 20, 2017 6:48 PM
>> To: Lu, Wenzhuo; Ananyev, Konstantin
>> Cc: dev at dpdk.org; Srinivasan Jayarajan
>> Subject: [PATCH] net/ixgbe: support detection of hot swapped SFP/SFP+
>>
>> From: Srinivasan Jayarajan <srinidpdk at 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 at 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;
>> + }
>> +
> I have the concern if it's a good idea to move the functions from dev_init to dev_start. Especially this function named init.
> Anyway, let's listen to others opinion.
>
>
>> hw->mac.ops.start_hw(hw);
>> hw->mac.get_link_status = true;
>>
>> --
>> 1.8.1.4
>
More information about the dev
mailing list