From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 4D36256A3 for ; Fri, 26 Oct 2018 08:10:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2018 23:10:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,426,1534834800"; d="scan'208";a="95163222" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 25 Oct 2018 23:10:25 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 25 Oct 2018 23:10:25 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.84]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.161]) with mapi id 14.03.0415.000; Fri, 26 Oct 2018 14:10:23 +0800 From: "Wu, Yanglong" To: "Zhang, Qi Z" , "dev@dpdk.org" CC: "Xu, Rosen" , "Wang, Dong1" Thread-Topic: [PATCH] net/ixgbe: fix ixgbevf link status Thread-Index: AQHUMIMHHZ74cFv6uEeAQhfLKusQaKTiXzmAgE8huBA= Date: Fri, 26 Oct 2018 06:10:21 +0000 Message-ID: References: <20180810081000.4454-1-yanglong.wu@intel.com> <039ED4275CED7440929022BC67E7061153281BC6@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E7061153281BC6@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTI1OWQ5ZjktNDA4ZC00Zjk2LWE5YmItMWJiZmE4MmQ2NzYzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYUhIem9NelFDbnh5VllZYVlZZ0JnMmd0UDRySUw4bm8rbHFnWmozWE82MVkyVXRqVmRndkxwXC9MSXRka2piZVoifQ== 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] 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: Fri, 26 Oct 2018 06:10:26 -0000 Hi, qi: This patch we are going to fix the problem H3C: 82599 Niantic VF can't get= correct link status when use cable :https://jira01.devtools.intel.com/brow= se/DPDK-5543?filter=3D-3 The commit log describe about the gap between kernel and dpdk and why we de= sign this workaround to get right link status.=20 Regard Yanglong wu=20 -----Original Message----- From: Zhang, Qi Z=20 Sent: Thursday, September 6, 2018 1:34 PM To: Wu, Yanglong ; dev@dpdk.org Cc: Xu, Rosen ; Wang, Dong1 Subject: RE: [PATCH] net/ixgbe: fix ixgbevf link status Hi Yanglong: > -----Original Message----- > From: Wu, Yanglong > Sent: Friday, August 10, 2018 4:10 PM > To: dev@dpdk.org > Cc: Xu, Rosen ; Wang, Dong1=20 > ; Zhang, Qi Z ; Wu,=20 > Yanglong > Subject: [PATCH] net/ixgbe: fix ixgbevf link status >=20 > For ixgbevf kernel driver, link status changes from down to up will=20 > trigger vf kernel driver send IXGBE_VF_RESET message to pf kernel=20 > driver, after this, vf kernel driver will disable and enable it self.=20 > By these series operations, the vf kernel driver report link up.=20 > Besides, all these operations handles in kernel thread. > For DPDK user space driver, it only gets link status changes from down=20 > to up, but miss IXGBE_VF_RESET message sending and reset itself. > If we will add fully implementation of link status change for DPDK=20 > user space driver, we need take much more modification. We have=20 > aligned that for link status changes from down to up we only notify=20 > link is up, users need to reset vf port. OK, the commit log described the gap between kernel driver and DPDK driver,= and the workaround which require proper change in application. But what is the problem the patch is going to fix?, what's the relationship= between the fix and commit log, I can't figure out. Basically the patch remove the no_pflink_check branch, so it will always ch= eck with PF for the link status. I guess this help to guarantee that applic= ation can always get correct link status, but why we need that commit log h= ere? would you explain more? >=20 > Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF") >=20 > Signed-off-by: Rosen Xu > Signed-off-by: Yanglong Wu > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 14 ++------------ > 1 file changed, 2 insertions(+), 12 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index 26b192737..4d5f4441b 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -3865,13 +3865,12 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev, >=20 > static int > ixgbevf_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, > - int *link_up, int wait_to_complete) > + int *link_up, __attribute__((unused)) int wait_to_complete) I think we can just remove "wait_to_complete", right? > { > /** > * for a quick link status checking, wait_to_compelet =3D=3D 0, > * skip PF link status checking > */ > - bool no_pflink_check =3D wait_to_complete =3D=3D 0; > struct ixgbe_mbx_info *mbx =3D &hw->mbx; > struct ixgbe_mac_info *mac =3D &hw->mac; > uint32_t links_reg, in_msg; > @@ -3931,15 +3930,6 @@ ixgbevf_check_link(struct ixgbe_hw *hw,=20 > ixgbe_link_speed *speed, > default: > *speed =3D IXGBE_LINK_SPEED_UNKNOWN; > } > - > - if (no_pflink_check) { > - if (*speed =3D=3D IXGBE_LINK_SPEED_UNKNOWN) > - mac->get_link_status =3D true; > - else > - mac->get_link_status =3D false; > - > - goto out; > - } > /* if the read failed it could just be a mailbox collision, best wait > * until we are called again and don't report an error > */ > @@ -3949,7 +3939,7 @@ ixgbevf_check_link(struct ixgbe_hw *hw,=20 > ixgbe_link_speed *speed, > if (!(in_msg & IXGBE_VT_MSGTYPE_CTS)) { > /* msg is not CTS and is NACK we must have lost CTS status */ > if (in_msg & IXGBE_VT_MSGTYPE_NACK) > - ret_val =3D -1; > + mac->get_link_status =3D false; > goto out; > } >=20 > -- > 2.11.0