From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by dpdk.org (Postfix) with ESMTP id 60A122C5 for ; Mon, 24 Apr 2017 08:23:54 +0200 (CEST) Received: by mail-qt0-f193.google.com with SMTP id o36so19080254qtb.2 for ; Sun, 23 Apr 2017 23:23:54 -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; bh=6o2IlSOvkjf77GPDcEodLXsx71CbBXxXxmKwUyfGDuw=; b=J1UM3YsAowYue5B4ncNqwxQ8ifdqM6L9dM9fXSUl1UjV14mgxtXBoupUtddufOEFbZ gNZBIq/dYwxQvlP6mLUNimdKyFJkHVsQaK8WpBYbkVxI7roDerXVYaE8Aysd5EjX0TaR e5LLHeNAsEPK2XrYCsz3QdyioR3iM7m0TTFD1MMSM4ghngL9/j7xFx3XYxzlEnOHb9Mb ODIgYO2pK7bRARGbDWN/BqfvVJyYYLJbIntirWTx55FPJ4vxO7/LQKP4g7XPS0pAGGVz eZQTYHBWmtthIupihf2CelsrFcZVUCq0mWM+OneIOcgOB+MoLo/6+qaKaVzZhaeRhUOX XN6w== 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; bh=6o2IlSOvkjf77GPDcEodLXsx71CbBXxXxmKwUyfGDuw=; b=Y3yq38TZXAGI0/cjVBqjr3Y+kr1YYhpCDLZHEJmmJ+cN03OSu1aLFPbkfQ8Jd/+E1x bYNZCm5HEWp8+EpeqbM5nh01tPt0r5yyFucqoHo+tTyIgEdPR8pc9iZRT61+zoa94trT JU7V62w7GQex1hDW5MFi8osaCvBRY2j4A1E9W7JH8OZVePwM/nbX7TqvZqVSn/Qw+qEx 5DRkoZaNVvAKL/Os5T4RJbl9omgSTi22vTxXVOq5UDeoEWSbXVa8s1ZfWvpyQwKTVOa9 G8OXvIXosZjKk4VB9ct0g3RJ8GFq6M2QHyV/TTa0LAUN+e0p10k8yZm73qlquhLk1L1q vbQQ== X-Gm-Message-State: AN3rC/6LQU4ZI8xzCS3uu2ZaAGjl9Elw/q1aAEXCHizqw6Dpr361aM0u +FUM1iF48be9SJKEE9NSzxJCRS2v/Q== X-Received: by 10.200.36.139 with SMTP id s11mr25814077qts.19.1493015033870; Sun, 23 Apr 2017 23:23:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.177.84 with HTTP; Sun, 23 Apr 2017 23:23:53 -0700 (PDT) In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09093B59B57F@shsmsx102.ccr.corp.intel.com> References: <1492685271-7583-1-git-send-email-srinidpdk@gmail.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B59B57F@shsmsx102.ccr.corp.intel.com> From: Srinivasan J Date: Mon, 24 Apr 2017 11:53:53 +0530 Message-ID: To: "Lu, Wenzhuo" Cc: "Ananyev, Konstantin" , "dev@dpdk.org" Content-Type: text/plain; charset=UTF-8 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: Mon, 24 Apr 2017 06:23:54 -0000 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 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 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 >> --- >> 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 >