From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id C692623D for ; Thu, 26 Jul 2018 04:50:27 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2018 19:50:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,403,1526367600"; d="scan'208";a="70413105" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga002.fm.intel.com with ESMTP; 25 Jul 2018 19:49:56 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 25 Jul 2018 19:49:49 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 25 Jul 2018 19:49:49 -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 10:49:47 +0800 From: "Wang, Dong1" To: "Wu, Yanglong" , "dev@dpdk.org" CC: "Zhang, Qi Z" Thread-Topic: [PATCH v3] net/ixgbe: fix ixgbevf link status Thread-Index: AQHUJIkrz8WAhzs69EKcThWDE1nHs6Sgywng Date: Thu, 26 Jul 2018 02:49:46 +0000 Message-ID: <3E2E5017C928014B90FD7864A64F0B5514ED2015@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWMwNWQwYmItMDRiOC00Nzc4LWFlODEtMTBiYzIwYTRlMmE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTlk4cHhzVW9PT045czB0QURSbkVmNkxWdlwvUlNUXC9mdk4zNDRvYjNEYVhlXC9QWXkwMzNjTkYyRUdBUExvd0FLciJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 27 Jul 2018 00:22:29 +0200 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 02:50:28 -0000 Hi Yanglong, I think the risk (or bug) is in ixgbevf_check_link(), not how to invoke thi= s function(). Anyone who call ixgbevf_check_link() with "wait =3D 0", they = must can't get right link status when 82599 use DA Cable. In ixgbevf kernel driver, ixgbe_check_mac_link_vf(), "wait" didn't be refer= enced. What about reference to ixgbevf kernel driver, don't use "wait" parameter i= n ixgbevf_check_link()? Regards, Dong -----Original Message----- From: Wu, Yanglong=20 Sent: Thursday, July 26, 2018 10:25 To: dev@dpdk.org Cc: Zhang, Qi Z ; Wang, Dong1 ;= Wu, Yanglong Subject: [PATCH v3] net/ixgbe: fix ixgbevf link status ixgbevf can't get right link status unless it check PF link status in wait = mode. Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF") 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(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_eth= dev.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); else diag =3D ixgbe_check_link(hw, &link_speed, &link_up, wait); =20 -- 2.11.0