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 C4DF9A04B1; Thu, 24 Sep 2020 01:27:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1493A1DB40; Thu, 24 Sep 2020 01:27:58 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 819CD1DB38; Thu, 24 Sep 2020 01:27:55 +0200 (CEST) IronPort-SDR: kuID0tx1+F+8cU9OR2lZF4AVh+MLOymxtbdvcpZnaBYNp98t0mHWLWxzfve+6FrY/q8A2+uyTa f39RzEdEkz4A== X-IronPort-AV: E=McAfee;i="6000,8403,9753"; a="141051085" X-IronPort-AV: E=Sophos;i="5.77,295,1596524400"; d="scan'208";a="141051085" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2020 16:27:54 -0700 IronPort-SDR: I12F20+48XcTG1zTOU02w5Sdc94YDtKwc6t+MSN0cCI39LkdibC1YYWs+i5X2VqsMWlvICWb12 LR84I0kp8bPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,295,1596524400"; d="scan'208";a="486653131" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga005.jf.intel.com with ESMTP; 23 Sep 2020 16:27:53 -0700 Received: from shsmsx604.ccr.corp.intel.com (10.109.6.214) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 23 Sep 2020 16:27:52 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX604.ccr.corp.intel.com (10.109.6.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 24 Sep 2020 07:27:50 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Thu, 24 Sep 2020 07:27:50 +0800 From: "Zhang, Qi Z" To: "Yang, MurphyX" , "dev@dpdk.org" CC: "Yang, MurphyX" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/iavf: fix link status Thread-Index: AQHWjaNZYo6hxW0PFkW4VizOvJaC8ql25hjg Date: Wed, 23 Sep 2020 23:27:50 +0000 Message-ID: References: <20200918094718.22621-1-murphyx.yang@intel.com> In-Reply-To: <20200918094718.22621-1-murphyx.yang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix link status 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" > -----Original Message----- > From: dev On Behalf Of murphy yang > Sent: Friday, September 18, 2020 5:47 PM > To: dev@dpdk.org > Cc: Yang, MurphyX ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] net/iavf: fix link status >=20 > From: murphy >=20 > If the PF driver supports the new speed reporting capabilities then use > link_event_adv instead of link_event to get the speed. >=20 > Fixes: 5330b042977c ("net/iavf: fix link speed") >=20 > Cc: stable@dpdk.org >=20 > Signed-off-by: murphy > --- > drivers/net/iavf/iavf_vchnl.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) >=20 > 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 =3D 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 =3D > - pf_msg->event_data.link_event_adv.link_speed; > + speed =3D pf_msg->event_data.link_event_adv.link_speed; According to vritual channel spec, link_event_adv.link_speed should store t= he link_speed provided in Mbps, it no need to be further converted. If the value is wrong, it should be fixed in kernel driver. > } else { > - enum virtchnl_link_speed speed; > speed =3D pf_msg->event_data.link_event.link_speed; > - vf->link_speed =3D iavf_convert_link_speed(speed); > } > + vf->link_speed =3D 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