From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5D24423D for ; Thu, 26 Jul 2018 07:20:39 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2018 22:20:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,403,1526367600"; d="scan'208";a="57254308" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga007.fm.intel.com with ESMTP; 25 Jul 2018 22:17:43 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 25 Jul 2018 22:17:43 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 25 Jul 2018 22:17:42 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.100]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.81]) with mapi id 14.03.0319.002; Thu, 26 Jul 2018 13:17:39 +0800 From: "Zhang, Qi Z" To: "Wu, Yanglong" , "dev@dpdk.org" CC: "Wang, Dong1" Thread-Topic: [PATCH v3] net/ixgbe: fix ixgbevf link status Thread-Index: AQHUJIkr29r0pKcMRkSlaqYI8i6woaSg8hmQ Date: Thu, 26 Jul 2018 05:17:38 +0000 Message-ID: <039ED4275CED7440929022BC67E70611532602D9@SHSMSX103.ccr.corp.intel.com> References: <20180724073032.33332-1-yanglong.wu@intel.com> <20180726022449.108272-1-yanglong.wu@intel.com> In-Reply-To: <20180726022449.108272-1-yanglong.wu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTA4NTJhYWYtNWFmYS00ODE2LWI5NzktYjEzZDlhNTM1MWE3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib1VUMlJoSGlmWnRmMml5enpPSm8rRWw4MEYwd1wvVThXVDJjRWZ1NnBDUGFZK2hyc3VPYWRUSTRIMnZIb3ljVisifQ== x-ctpclassification: CTP_NT x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] net/ixgbe: fix ixgbevf 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: , X-List-Received-Date: Thu, 26 Jul 2018 05:20:40 -0000 > -----Original Message----- > From: Wu, Yanglong > Sent: Thursday, July 26, 2018 10:25 AM > To: dev@dpdk.org > Cc: Zhang, Qi Z ; Wang, Dong1 > ; Wu, Yanglong > Subject: [PATCH v3] net/ixgbe: fix ixgbevf link status >=20 > ixgbevf can't get right link status unless it check PF link status in wai= t mode. >=20 > Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF") >=20 > Signed-off-by: Yanglong Wu > --- > v3: > change to wait mode in ixgbevf > --- > v2: > no need to set link status again > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index 26b192737..b90b352e3 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -4006,7 +4006,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev > *dev, > wait =3D 0; >=20 > if (vf) > - diag =3D ixgbevf_check_link(hw, &link_speed, &link_up, wait); > + /* ixgbevf need to wait to get link status */ > + diag =3D ixgbevf_check_link(hw, &link_speed, &link_up, 1); Sorry, I mislead you in our offline talk. I think to implement a no_wait ops with a wait method may confuse the user,= because an application may call rte_eth_link_get_nowait in the data path, = we should not do any time consume tasks. So maybe the reasonable way is return -ENOTSUP for a nowait request since i= xgbevf can't support this due to hardware limitation. And also the parameter " wait_to_complete" can be omitted in ixgbevf_check_= link, since the nowait implementation is not correct and should be removed. > else > diag =3D ixgbe_check_link(hw, &link_speed, &link_up, wait); >=20 > -- > 2.11.0