From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C25327CAF for ; Fri, 30 Mar 2018 18:30:48 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Mar 2018 09:30:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,382,1517904000"; d="scan'208";a="212658777" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 30 Mar 2018 09:30:46 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 30 Mar 2018 09:30:46 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 30 Mar 2018 09:30:46 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.235]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.166]) with mapi id 14.03.0319.002; Sat, 31 Mar 2018 00:30:44 +0800 From: "Zhang, Helin" To: Chas Williams <3chas3@gmail.com>, "dev@dpdk.org" CC: "Lu, Wenzhuo" , "Ananyev, Konstantin" , "Charles (Chas) Williams" Thread-Topic: [dpdk-dev] [PATCH] net/ixgbe: update data->eth_link status on start Thread-Index: AQHTpR3wC038yg5mBEKBiVcORtuwWKPpPiPw Date: Fri, 30 Mar 2018 16:30:44 +0000 Message-ID: References: <20180213225618.15693-1-3chas3@gmail.com> In-Reply-To: <20180213225618.15693-1-3chas3@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: update data->eth_link status on start 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, 30 Mar 2018 16:30:50 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Chas Williams > Sent: Wednesday, February 14, 2018 6:56 AM > To: dev@dpdk.org > Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams > Subject: [dpdk-dev] [PATCH] net/ixgbe: update data->eth_link status on st= art >=20 > From: "Charles (Chas) Williams" >=20 > dev->data->eth_link isn't updated until the first interrupt. If a > link is carrier down, then this interrupt may never happen. Before we fi= nished > starting the PMD, call ixgbe_dev_link_update() to ensure we have a valid = status. >=20 > Signed-off-by: Chas Williams > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index 37eb668..27d29dc 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev) > if (err) > goto error; >=20 > + ixgbe_dev_link_update(dev, 0); It is called in rte_eth_dev_start() if lsc is not enabled, and it is not needed here to avoid any duplication. BTW, did you see any issue or just check the code? Thanks! /Helin > + > skip_link_setup: >=20 > if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@ > ixgbevf_dev_start(struct rte_eth_dev *dev) >=20 > ixgbevf_dev_rxtx_start(dev); >=20 > + ixgbevf_dev_link_update(dev, 0); > + > /* check and configure queue intr-vector mapping */ > if (rte_intr_cap_multiple(intr_handle) && > dev->data->dev_conf.intr_conf.rxq) { > -- > 2.9.5