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 C578EA04C8 for ; Fri, 18 Sep 2020 10:59:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A32AB1D93D; Fri, 18 Sep 2020 10:59:23 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id B320F1D93D for ; Fri, 18 Sep 2020 10:59:21 +0200 (CEST) IronPort-SDR: m8BEpUAOaeGPDyC9lXxwhME5cMK86RGbTTZgGBggXRHhoBUYa75zSLCsaj8PKRgJw1wCrLNIp7 u38LvzL/uc4w== X-IronPort-AV: E=McAfee;i="6000,8403,9747"; a="224060497" X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="224060497" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2020 01:59:20 -0700 IronPort-SDR: JVrzBCmubct0OE1bHLDK4cFX3GsWTy5Yyy5Z24QiWb4FoibKbsS7Ykt8kaAk5TdxZZ7txloBUe 3yJaMWmS+uUA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="320548135" Received: from unknown (HELO intel-npg-odc-srv02.cd.intel.com) ([10.240.178.134]) by orsmga002.jf.intel.com with ESMTP; 18 Sep 2020 01:59:19 -0700 From: murphy yang To: build_sh@intel.com Cc: murphy , stable@dpdk.org Date: Fri, 18 Sep 2020 08:31:12 +0000 Message-Id: <20200918083112.17483-1-murphyx.yang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-stable] [DPDK] net/iavf: fix link status X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: murphy If the PF driver supports the new speed reporting capabilities then use link_event_adv instead of link_event to get the speed. Fixes: 5330b042977c ("net/iavf: fix link speed") Cc: stable@dpdk.org Signed-off-by: murphy --- drivers/net/iavf/iavf_vchnl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 76f8e38d1..c4956dc58 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -195,14 +195,13 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg, case VIRTCHNL_EVENT_LINK_CHANGE: PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event"); vf->link_up = pf_msg->event_data.link_event.link_status; + enum virtchnl_link_speed speed; if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_CAP_ADV_LINK_SPEED) { - vf->link_speed = - pf_msg->event_data.link_event_adv.link_speed; + speed = pf_msg->event_data.link_event_adv.link_speed; } else { - enum virtchnl_link_speed speed; speed = pf_msg->event_data.link_event.link_speed; - vf->link_speed = iavf_convert_link_speed(speed); } + vf->link_speed = iavf_convert_link_speed(speed); iavf_dev_link_update(dev, 0); rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL); break; -- 2.17.1