From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 0E3C6F94 for ; Wed, 31 Oct 2018 02:43:36 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2018 18:43:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,446,1534834800"; d="scan'208";a="87933490" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by orsmga008.jf.intel.com with ESMTP; 30 Oct 2018 18:43:33 -0700 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.114]) by KMSMSX153.gar.corp.intel.com ([169.254.5.169]) with mapi id 14.03.0415.000; Wed, 31 Oct 2018 09:42:50 +0800 From: "Zhao1, Wei" To: Stephen Hemminger , David Evans CC: "Yang, Qiming" , "dev@dpdk.org" , Ilya Maximets Thread-Topic: [dpdk-dev] to wait or not to wait.. DPDK & OVS ixgbe with fibre disconnected Thread-Index: AQHUQT09JN3wMILerk2D+wGnUoMJ6qU48g7w Date: Wed, 31 Oct 2018 01:42:49 +0000 Message-ID: References: <20180831081205.7a588890@xeon-e3> In-Reply-To: <20180831081205.7a588890@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] to wait or not to wait.. DPDK & OVS ixgbe with fibre disconnected 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: Wed, 31 Oct 2018 01:43:37 -0000 Hi, Stephen Hemminger > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen > Hemminger > Sent: Friday, August 31, 2018 11:12 PM > To: David Evans > Cc: Yang, Qiming ; dev@dpdk.org > Subject: Re: [dpdk-dev] to wait or not to wait.. DPDK & OVS ixgbe with fi= bre > disconnected >=20 > On Wed, 29 Aug 2018 16:57:55 -0500 > David Evans wrote: >=20 > > Hi! > > > > We have a thread running on ovs discuss. - Can you contribute? > > > > regarding ixgbe_ethdev.c > > > > ixgbe_dev_link_update() doesn't honour wait_to_complete flag always. > > > > Basically, where you have 'wait_to_complete' set to 0, we are still > > having to wait sometimes Dpdk is always attempting setup if > > intr->flags & IXGBE_FLAG_NEED_LINK_CONFIG Which happens if you > unplug > > fibre, or don't plug it in. > > > > is there a better way to handle this? It is causing OVS to get stuck > > busy... on the thread that calls this. > > > > eg: > > in line 4000 - ixgbe_setup_link(hw,speed,true) > > > > if ((intr->flags & IXGBE_FLAG_NEED_LINK_CONFIG) && > > ixgbe_get_media_type(hw) =3D=3D ixgbe_media_type_fiber)= { > > speed =3D hw->phy.autoneg_advertised; > > if (!speed) > > ixgbe_get_link_capabilities(hw, &speed, &autone= g); > > ixgbe_setup_link(hw, speed, true); > > } > > > > > > or also... > > > > #0 rte_delay_us_block (us=3D100000) at > > /usr/src/debug/dpdk- > 17.11.3/lib/librte_eal/common/eal_common_timer.c:5 > > 9 > > #1 0x00007f548f79ceec in ixgbe_setup_mac_link_multispeed_fiber > > (hw=3D0x7f543fc2f680, speed=3D128, autoneg_wait_to_complete=3D0) at > > /usr/src/debug/dpdk- > 17.11.3/drivers/net/ixgbe/base/ixgbe_common.c:5155 > > #2 0x00007f548f7c2cb2 in ixgbe_dev_link_update_share (vf=3D0, > > wait_to_complete=3D0, dev=3D0x7f549492d480 ) at > > /usr/src/debug/dpdk-17.11.3/drivers/net/ixgbe/ixgbe_ethdev.c:4000 > > #3 ixgbe_dev_link_update (dev=3D0x7f549492d480 > , > > wait_to_complete=3D0) at > > /usr/src/debug/dpdk-17.11.3/drivers/net/ixgbe/ixgbe_ethdev.c:4070 > > > > Thanks so much > > > > Dave. >=20 > In my experience the wait flag is pretty useless. It means "wait until li= nk is > up" > which means the wait loop happens in the driver when it is better handled= by > the application. Also, many drivers do not implement it. Yes, you are right, we have a discussion about this several days before, do= you have any comment on the following fix patch for this problem? http://patchwork.dpdk.org/patch/44110/ =20