From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f194.google.com (mail-qk0-f194.google.com [209.85.220.194]) by dpdk.org (Postfix) with ESMTP id C15692C60 for ; Sat, 6 May 2017 15:51:04 +0200 (CEST) Received: by mail-qk0-f194.google.com with SMTP id u75so4459968qka.1 for ; Sat, 06 May 2017 06:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=IOn+Kwo4nAOptJd15o7lI4rFBY/Js2cpejKP6XBESS0=; b=RETlfwIY8fKHyGtz61XTzbwvj2zfcjpgp5QMhr8UV/cRpry+wXG32MTxm9tcnjjmmL 35lSNROhV3EezDj9UXEZzlNWiIzj1MAx/FM0BOh82FPEfG5wQrWo4//YwtpFY5ydXC7N 10GEaMVhp65UNgVMRjKstAmsF4KP3D1xCwvBijeszt1h05HjkTA5k81VFW2JH3bvc4Ih gTaxBoxgmvZLFFDQ3/8CwduEDzUHBEM7Ctcpp9CQ0RL9uT0yT0ODtUNFBxbmmPofh91L COKglg3rKZobpy/fdE0il4w5Xk7zKi1lxxOt85ukdV34iOpcGa72v5UPcv8R2RwRtZa9 TCMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=IOn+Kwo4nAOptJd15o7lI4rFBY/Js2cpejKP6XBESS0=; b=Z1MiSlVTekXwySR8rqZ5OmmzSJBqHBTiyHavbV2QMTBJX7OLQmwjrVSoeSZaOUCp3Y ebfvzLkdJfz39qdp6b99QHERW6v5cq+FcwguBviHL1uhRsqYujFRMU2r4g9ewS2dLPH0 J3M9Ce2XlxX1TytQlNKkyan80WllEmINzJec3JLMlwEf0SHmwArzs2dZrpNOC5I5U3a0 zYeBgPi1iFlN5p73blSJer6IxPbTduL5xaLR/HwJNWKHHe/G+UxbnvTlMaxuObj8H1Lu SQW/EmAMjf4bGKCrN9Gk+uV7w8/4a58haAXpSnPn8bjm8sD4wB9cR3ZMjXhqg/itneeG 6alA== X-Gm-Message-State: AODbwcD/dZ0VQTQvYgpIy0o5QdNWwLpQZEqyewxZTyTY9Gk9sspH8XAZ /+W/NkUmXENggadAEpcLznlp4qktiC+w X-Received: by 10.55.200.214 with SMTP id t83mr16326415qkl.24.1494078664230; Sat, 06 May 2017 06:51:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.179.206 with HTTP; Sat, 6 May 2017 06:51:03 -0700 (PDT) In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09093B59C4B1@shsmsx102.ccr.corp.intel.com> References: <1492685271-7583-1-git-send-email-srinidpdk@gmail.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B59B57F@shsmsx102.ccr.corp.intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B59C18B@shsmsx102.ccr.corp.intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B59C4B1@shsmsx102.ccr.corp.intel.com> From: Srinivasan J Date: Sat, 6 May 2017 19:21:03 +0530 Message-ID: To: "Lu, Wenzhuo" Cc: "Ananyev, Konstantin" , "dev@dpdk.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: support detection of hot swapped SFP/SFP+ X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 May 2017 13:51:05 -0000 Hi, Do we need an explicit "Acked-by" keyword for this patch to be accepted and applied? Thanks, Srini On Tue, Apr 25, 2017 at 6:53 AM, Lu, Wenzhuo wrote: > 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 dynamica= lly 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 chan= ge >> for a give NIC. > Yes, APP needs to handle the port id change. Agree this patch is a much s= impler solution than the port hot-plug. > So I don=E2=80=99t 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 >> 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 >> >> 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 >> >> >> >> >> >> Adds support to use a different SFP/SFP+ without restarting th= e >> >> >> 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 >> >> >> --- >> >> >> 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 =3D ixgbe_pf_reset_hw(hw); >> >> >> if (status !=3D 0) >> >> >> return -1; >> >> >> + >> >> >> + /* Set phy type as unknown so that PHY scan is always done *= / >> >> >> + hw->phy.type =3D ixgbe_phy_unknown; >> >> >> + >> >> >> + /* Identify PHY and related function pointers */ >> >> >> + status =3D hw->phy.ops.init(hw); >> >> >> + >> >> >> + if (status =3D=3D IXGBE_ERR_SFP_NOT_SUPPORTED) { >> >> >> + PMD_INIT_LOG(ERR, "Found unsupported SFP in " >> >> >> + "ixgbe_dev_start(): %d", sta= tus); >> >> >> + 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 =3D true; >> >> >> >> >> >> -- >> >> >> 1.8.1.4 >> >> >