DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
To: Srinivasan J <srinidpdk@gmail.com>
Cc: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: support detection of hot swapped SFP/SFP+
Date: Tue, 25 Apr 2017 01:23:34 +0000	[thread overview]
Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B59C4B1@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <CAEbeQ+pRB=hR7skGwkY0HgWcswkVNNuix0xiq=izXStzCJD7zQ@mail.gmail.com>

Hi Srini,


> -----Original Message-----
> From: Srinivasan J [mailto:srinidpdk@gmail.com]
> Sent: Monday, April 24, 2017 6:51 PM
> To: Lu, Wenzhuo
> Cc: Ananyev, Konstantin; dev@dpdk.org
> Subject: Re: [PATCH] net/ixgbe: support detection of hot swapped SFP/SFP+
> 
> Hi Wenzhuo,
>                     Port hot-plug would require the DPDK app to dynamically mange
> ports and the kernel to support PCI hot-plugging.
> When multiple ports are detached/attached (SFP's plugged in/out), would
> the DPDK port id's remain same? If not, app needs to handle port id change
> for a give NIC.
Yes, APP needs to handle the port id change. Agree this patch is a much simpler solution than the port hot-plug.
So I don’t object it :)

> 
> While port hot-plug can be used to dynamically handle SFP hot-plugging, I
> feel it's not the optimal solution.
> 
> Regards,
> Srini
> 
> On Mon, Apr 24, 2017 at 12:45 PM, Lu, Wenzhuo <wenzhuo.lu@intel.com>
> wrote:
> > Hi Srini,
> >
> >
> >> -----Original Message-----
> >> From: Srinivasan J [mailto:srinidpdk@gmail.com]
> >> Sent: Monday, April 24, 2017 2:24 PM
> >> To: Lu, Wenzhuo
> >> Cc: Ananyev, Konstantin; dev@dpdk.org
> >> Subject: Re: [PATCH] net/ixgbe: support detection of hot swapped
> >> SFP/SFP+
> >>
> >> 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.
> > I think restarting the APP is not necessary. You can uninit the port,  then
> re-init the port.
> > Please reference
> http://dpdk.org/doc/guides/prog_guide/port_hotplug_framework.html to
> see if it can help.
> >
> >>
> >> Regards,
> >> Srini
> >>
> >> On Fri, Apr 21, 2017 at 10:22 AM, Lu, Wenzhuo <wenzhuo.lu@intel.com>
> >> wrote:
> >> > Hi Srini,
> >> >
> >> >> -----Original Message-----
> >> >> From: Srini J [mailto:srinidpdk@gmail.com]
> >> >> Sent: Thursday, April 20, 2017 6:48 PM
> >> >> To: Lu, Wenzhuo; Ananyev, Konstantin
> >> >> Cc: dev@dpdk.org; Srinivasan Jayarajan
> >> >> Subject: [PATCH] net/ixgbe: support detection of hot swapped
> >> >> SFP/SFP+
> >> >>
> >> >> 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;
> >> >> +     }
> >> >> +
> >> > 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
> >> >

  reply	other threads:[~2017-04-25  1:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-20 10:47 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 [this message]
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

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=6A0DE07E22DDAD4C9103DF62FEBC09093B59C4B1@shsmsx102.ccr.corp.intel.com \
    --to=wenzhuo.lu@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=srinidpdk@gmail.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).