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 3A02FA0541; Fri, 7 Feb 2020 00:45:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DFE471C01E; Fri, 7 Feb 2020 00:45:57 +0100 (CET) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id 71DD81C012 for ; Fri, 7 Feb 2020 00:45:56 +0100 (CET) Received: by mail-pf1-f194.google.com with SMTP id p14so283526pfn.4 for ; Thu, 06 Feb 2020 15:45:56 -0800 (PST) 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=nI+ETr2vYnwsEaAXiowBHkmVt4kpW4k1IqXz2n6ys5Y=; b=w1ypTsgAv/+EMJ5Hb6AtXa4AX1Avnr3wjADC/se/x3ldlSuDLXWSKeQllMB/jrxUBz JGu9Xz2XIUM2OBKghtNUvvRPtDGVvzU+P3ytgzSF2GIAU492ZX+vqPQTM3WRmYrC+sxF daEblgfEgA67NFg0yrd+GFoulmoElTvJFs7jSboO5DmLIvqy7ahP/ghSsXx1vK1tHx31 g2zu1Vt3Os2Vu/5MHi5GbmxATtsabnl3mNovv8hNc87lc8HdtrAZx4eA1kMIqicAUT2S 82QF+Hse+3vTeeFBF41B9Ajmjj+JemrDvPD/Z5XeimdP+klYNIIYMOpTQLBUAHUuQPw+ 5ErQ== 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=nI+ETr2vYnwsEaAXiowBHkmVt4kpW4k1IqXz2n6ys5Y=; b=SBRP4kSCfPruiuK8vNmXofi01K3GbLrenprZVosN/0AwhhwsNsvUMbH+zAeDjtOd1x 2Cv+4ej2mLuEAnoyXhpByllLXocsYR5zk6gpmckhP/LggDr7vAt1v7y/N/DdCkOzBaeY hHrDDTKO+nt2JLpSc264XUNyo7yNVSJeiqJ7/MkvNZy1Rt9DCag8VxJH/aVoPGMZCtOS 1LEw2el2UjGLDJVJ6gOPMRNMmtR5HuSTcAz8qdv4PfR0Pk77KfwM22b+7TwwzpT0t6YF 08qtxfqpAL7Iozh3F5aGt/bM9JtmHXL7Jnx42kTpMot2eamlxBEk3yqWwi+eRoGFytJf HDIw== X-Gm-Message-State: APjAAAUsjcSHEiCMFMTZKz7LNBnhnPRESlaN74pShe06mFQXb5lbDBM3 O658Jtq3hhbpaHTRpsj2RWXrZg== X-Google-Smtp-Source: APXvYqxVS/R2tR+xSdH3w2w4uFq8ayVtISpRlIBxM2HpHoYBP/nqLqMMQMhoYrS92C3kF25WHBVYAg== X-Received: by 2002:a62:6342:: with SMTP id x63mr6751937pfb.103.1581032755280; Thu, 06 Feb 2020 15:45:55 -0800 (PST) Received: from shemminger-XPS-13-9360 ([204.239.251.21]) by smtp.gmail.com with ESMTPSA id o16sm461021pgl.58.2020.02.06.15.45.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 15:45:54 -0800 (PST) Date: Thu, 6 Feb 2020 15:45:51 -0800 From: Stephen Hemminger To: Mohammed Gamal Cc: dev@dpdk.org, sthemmin@microsoft.com, kys@microsoft.com, haiyangz@microsoft.com Message-ID: <20200206154551.0c6f7f48@shemminger-XPS-13-9360> In-Reply-To: <20200206105541.1186-1-mgamal@redhat.com> References: <20200206105541.1186-1-mgamal@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] netvsc: update link info when getting device info 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 6 Feb 2020 12:55:41 +0200 Mohammed Gamal wrote: > testpmd 'show summary' command always shows interface status as down > with 0 Mbps speed regardless of the underlying VF's status. > This happens as hn_dev_link_update() is never called, even on the initial > RNDIS_STATUS_MEDIA_CONNECT message as LSC interrupts are not yet enabled > at this point. > > Let's call it and update link info when calling hn_dev_info_get(). > > Signed-off-by: Mohammed Gamal This is not the right way to address this. There is nothing in rte_eth_dev_info about link status. That is in rte_eth_link_get. I think the issue is that testpmd calls with "nowait" and the definition of nowait is poorly designed in original DPDK. The Intel version of wait/nowait is to have rte_eth_link_get wait until the link comes up (in a spin loop). And nowait just polls state. The current netvsc driver implements no wait, as "I will ask the host what the link state is but not wait for a response". This is probably not what testpmd wants. I can easily fix netvsc to block even in nowait case, but first we need to see what other drivers do. Also link state is undefined if driver has never started. Is testpmd using Link State Interrupt?