From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6E796A0590 for ; Wed, 25 Mar 2020 23:48:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 41200374C; Wed, 25 Mar 2020 23:48:31 +0100 (CET) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id D211E2C15 for ; Wed, 25 Mar 2020 23:48:29 +0100 (CET) Received: by mail-pg1-f195.google.com with SMTP id t24so1884746pgj.7 for ; Wed, 25 Mar 2020 15:48:29 -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=nHGUvrbRRDIC91eAntLUydHRUNf5KEIb1VJ1aiiOojo=; b=FWaGD5mkMnYCfELprNc3KAGinnywiQj5d2DPMNPOpxY/LGtyXX14koGf953HxPu9pz qTVbKuhJpZbMGDBVfzGyXpCzLf8TtZY2vtBZaIlJ9Frg1oMhjAcuEQGgZaeTuqYm69zo DBJ1o+T15T1YXYYdQSDcBuNAIFbAJ7zfybV5yW9lY9BEk24FaGUNITqvWWkohOVlZe3R rwKdu7Sqf7tkvnqobbeULnX/IPqq/9jy5kNl22TXfF5PXqqBlF5kx8SfeJnvUSM5SJe6 Fa/PbVxaohPei2+PQNHLBqg9Xmi0gZCwpNSR7Qmn7kbu+1T8QHgJhDt2OqEC7jdm/tQm fnXw== 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=nHGUvrbRRDIC91eAntLUydHRUNf5KEIb1VJ1aiiOojo=; b=E8YRSFWKk2SJ2/IYgQaFOrcA2WX8ZG7bHaX+LkRKD5INWzaNMWS77lqpbEA1bNum3s OVKgpGH6rxFhT8gV0op35bUXTc8svqFHfJAz7RXIEZ+NAC7ws7RaljRL3k1Lu2J235DW JiU9vdbLBDbjMXbeLhSNwKnQyMC9Q/Xe8OB6we/wPpeSwx3Y4cjRHekcntkfwXZmb/dC 6eeJeO7c3oRSQoV9iOQop28gESZm/oxkl7+VYKYm+Z67B9UJZYAGRLGZsiirZypHXpk3 eaCq8kzQfOrDJoqT97zUs5v/F9/vGTAO4o/ueqJ1FbbcaP/iru8c2AzxmHCpH/9eVH/s Rxig== X-Gm-Message-State: ANhLgQ2InEvxkMJk/j/Lv1hRaxyC82B/9KFbCCXZk3OyuZUCRd2nOl67 d+BI3/hDVzsSLYGw8vA5qUv6SQ== X-Google-Smtp-Source: ADFU+vvirUa2f4MU6BU3JLKrup4RF/soHEIHFwGBbAeArkH58vOMs8n7YmKYucgscy3oLZd1Y/7y0w== X-Received: by 2002:a63:1660:: with SMTP id 32mr1093072pgw.169.1585176508831; Wed, 25 Mar 2020 15:48:28 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id z16sm225995pjt.40.2020.03.25.15.48.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 15:48:28 -0700 (PDT) Date: Wed, 25 Mar 2020 15:48:15 -0700 From: Stephen Hemminger To: "Benoit Ganne (bganne)" Cc: "users@dpdk.org" Message-ID: <20200325154815.13fc7a4e@hermes.lan> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] CX4-Lx VF link status in Azure X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" On Wed, 25 Mar 2020 19:07:09 +0000 "Benoit Ganne (bganne)" wrote: > Hi all, > > We noticed a problematic behavior when using DPDK in Azure with Mellanox CX4-Lx VFs on Ubuntu 18.04: the link status (link up or down) is never updated - and so for an application trusting the link state reported by DPDK, the link looks unavailable. > The root cause is mlx5_link_update_unlocked_gs() failing to get the link speed from the Linux driver and always returning EAGAIN because of this test at the end of the function: > > if (((dev_link.link_speed && !dev_link.link_status) || > (!dev_link.link_speed && dev_link.link_status))) > > Here, dev_link.link_status is correctly set but not dev_link.link_speed. > The Linux kernel driver does not seem to be able to get the link speed because ethtool also fails to retrieve it from the kernel so the DPDK cannot do any miracle here, but I wonder whether this should prevent to update the other link status information to be correctly updated. > > Any thoughts? > > Thx > ben You maybe missing this patch, which is only in current development branch. Since it is tagged for stable, it should end up in later LTS versions as well 18.11.X and 19.11.X. commit 047ad3787a2f5d99277e0d8d756580a1d5ea2891 Author: Stephen Hemminger Date: Fri Feb 7 10:08:16 2020 -0800 net/netvsc: initialize link state If application is using link state interrupt, the correct link state needs to be filled in when device is started. This is similar to how virtio updates link information. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Cc: stable@dpdk.org Reported-by: Mohammed Gamal Signed-off-by: Stephen Hemminger Tested-by: Mohammed Gamal