From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by dpdk.org (Postfix) with ESMTP id 07E7C1AEF0 for ; Fri, 31 Aug 2018 17:12:14 +0200 (CEST) Received: by mail-pl1-f194.google.com with SMTP id b12-v6so5608044plr.8 for ; Fri, 31 Aug 2018 08:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ctx9YFF8csnMKy1OJ7mm8dVSPj5ocA/GBSmIU7M/nJQ=; b=04o+BBFVTcGqXRzCe6kSnsNU6QT6dWkFYTYHMjmlGubCc4T1mitGduvsvXQvOjcWoa INxYdQvK7V12UzS1P16r0bi58+3D2lAPiMUZouuSz3YWgVA6Q1wZj2NJWR3MB98Kw1op TZxX5UdnLWjuDlJaO7XsX8SdeH4w/gG/NbXaQiZT+O5Mo+BQ7/eSrlKMSMfW1WWgLipZ UHoiOm0rde0w5nWI11yXxWtSfJZIQ4aqoJ6H66NDutga9nRSnI96GSVowG6mNdP/ygSd ydkQGP77x/o/ALmVZdh5VICW4GYP9RM3SZ2SxXXERJUCcWaRznv/WE+NwfYrJFClemJZ rDAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ctx9YFF8csnMKy1OJ7mm8dVSPj5ocA/GBSmIU7M/nJQ=; b=H1aSZz+v1w4ekqYRW8oBc2hDApc4dOId7O9XcNGGVMBEdqSEHmxmswXF0gfvNWrRcc C3+QlebOSjwr9TAewd0CIpndZ/Fk6avqZZJzWnBAW/gPQDEAmXYu4a46nSrPTNGYsokj EkSmGyYZnFqZQuVb/+MRU4KfM1ds0sbZPmrh8FxGxDhjujHh2BEdhwD68uUgci46J4SQ EnRJOcdJL4FNuGAaTriYlE3r2KuohWpAEtJZ1d+/jDJrXU8Hh+51C70s1VpWm6a97sH3 VZGyI1YGq+dFOGh73TdnSii8Isg9+QhqAVcjqcfEOWUSchcMEVJQaQCLfK0bkHV1slL6 yafQ== X-Gm-Message-State: APzg51CzbcXKg5TbIJ0o2lTLglng4ZRJ46cdpN9d7QFrYyO++9/wK29D kKPuJKdQHdJVRXDvx9fVdWNYCA== X-Google-Smtp-Source: ANB0Vda4EX6nuwvhKrkjCucvT9fookGrf6bJ+H7qfSiOXWwkVJZKhA4OXIuoNW+94Ce5Qced8HCmGg== X-Received: by 2002:a17:902:4a0c:: with SMTP id w12-v6mr15877205pld.289.1535728333122; Fri, 31 Aug 2018 08:12:13 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id x2-v6sm21760064pfi.166.2018.08.31.08.12.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 31 Aug 2018 08:12:13 -0700 (PDT) Date: Fri, 31 Aug 2018 08:12:05 -0700 From: Stephen Hemminger To: David Evans Cc: qiming.yang@intel.com, dev@dpdk.org Message-ID: <20180831081205.7a588890@xeon-e3> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Fri, 31 Aug 2018 15:12:14 -0000 On Wed, 29 Aug 2018 16:57:55 -0500 David Evans wrote: > 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) == ixgbe_media_type_fiber) { > speed = hw->phy.autoneg_advertised; > if (!speed) > ixgbe_get_link_capabilities(hw, &speed, &autoneg); > ixgbe_setup_link(hw, speed, true); > } > > > or also... > > #0 rte_delay_us_block (us=100000) at > /usr/src/debug/dpdk-17.11.3/lib/librte_eal/common/eal_common_timer.c:59 > #1 0x00007f548f79ceec in ixgbe_setup_mac_link_multispeed_fiber > (hw=0x7f543fc2f680, speed=128, autoneg_wait_to_complete=0) 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=0, > wait_to_complete=0, dev=0x7f549492d480 ) at > /usr/src/debug/dpdk-17.11.3/drivers/net/ixgbe/ixgbe_ethdev.c:4000 > #3 ixgbe_dev_link_update (dev=0x7f549492d480 , > wait_to_complete=0) at > /usr/src/debug/dpdk-17.11.3/drivers/net/ixgbe/ixgbe_ethdev.c:4070 > > Thanks so much > > Dave. In my experience the wait flag is pretty useless. It means "wait until link 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.