From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E59752C72 for ; Fri, 21 Apr 2017 06:52:06 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Apr 2017 21:52:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,228,1488873600"; d="scan'208";a="1159100152" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 20 Apr 2017 21:52:04 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 20 Apr 2017 21:52:04 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 20 Apr 2017 21:52:03 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.217]) with mapi id 14.03.0319.002; Fri, 21 Apr 2017 12:52:02 +0800 From: "Lu, Wenzhuo" To: Srini J , "Ananyev, Konstantin" CC: "dev@dpdk.org" Thread-Topic: [PATCH] net/ixgbe: support detection of hot swapped SFP/SFP+ Thread-Index: AQHSucOZ1YeI96AYaUmMwMt6SC8l3aHPQdew Date: Fri, 21 Apr 2017 04:52:01 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B59B57F@shsmsx102.ccr.corp.intel.com> References: <1492685271-7583-1-git-send-email-srinidpdk@gmail.com> In-Reply-To: <1492685271-7583-1-git-send-email-srinidpdk@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Fri, 21 Apr 2017 04:52:07 -0000 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+ >=20 > From: Srinivasan Jayarajan >=20 > 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. >=20 > Signed-off-by: Srinivasan Jayarajan > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) >=20 > 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", 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 =3D true; >=20 > -- > 1.8.1.4