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 1BB02A04FA; Thu, 6 Feb 2020 11:56:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E20931C0B4; Thu, 6 Feb 2020 11:56:16 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 9C8BE1C0AD for ; Thu, 6 Feb 2020 11:56:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580986574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vliRlnzzTTr9wQeHpy6l1qFE+1VIb/rMDICkPA/xmyw=; b=LabqkS1ZI6FBULAiCnxkMoS1KtrXQ3fGvoNTNI2QCm7clWxzxkgOH9ZiqhGYyGC0OgUQRp uUh70MxWCoPNyR0oYvZLlR/lVtlmlqG9Y3nEgq0GfiLKD9jldyISeWyP3ja+EOUe9okFDK Uhdp4Kv8MJcQXlopLpBdTmoT4THXlog= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-111-0kvCO6IWMdGjpkTYYjBXOA-1; Thu, 06 Feb 2020 05:56:12 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F3F52101FC65; Thu, 6 Feb 2020 10:56:10 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-23.ams2.redhat.com [10.36.116.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACE28790CD; Thu, 6 Feb 2020 10:56:06 +0000 (UTC) From: Mohammed Gamal To: dev@dpdk.org, sthemmin@microsoft.com Cc: kys@microsoft.com, haiyangz@microsoft.com, Mohammed Gamal Date: Thu, 6 Feb 2020 12:55:41 +0200 Message-Id: <20200206105541.1186-1-mgamal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: 0kvCO6IWMdGjpkTYYjBXOA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [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" 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 --- drivers/net/netvsc/hn_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.= c index c79f92437..1120fc688 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -265,6 +265,11 @@ static int hn_dev_info_get(struct rte_eth_dev *dev, =09if (rc !=3D 0) =09=09return rc; =20 +=09/* fill in link status and link speed */ +=09rc =3D hn_dev_link_update(dev, 0); +=09if (rc !=3D 0) +=09=09return rc; + =09/* merges the offload and queues of vf */ =09return hn_vf_info_get(hv, dev_info); } --=20 2.21.0