From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 98AFD326C for ; Thu, 6 Sep 2018 07:33:49 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Sep 2018 22:33:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,334,1531810800"; d="scan'208";a="72000870" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga006.jf.intel.com with ESMTP; 05 Sep 2018 22:33:48 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 5 Sep 2018 22:33:48 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 5 Sep 2018 22:33:47 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.150]) with mapi id 14.03.0319.002; Thu, 6 Sep 2018 13:33:45 +0800 From: "Zhang, Qi Z" To: "Wu, Yanglong" , "dev@dpdk.org" CC: "Xu, Rosen" , "Wang, Dong1" Thread-Topic: [PATCH] net/ixgbe: fix ixgbevf link status Thread-Index: AQHUMIMH6/BGOnCz00m5rkFs4K7irqTi347A Date: Thu, 6 Sep 2018 05:33:45 +0000 Message-ID: <039ED4275CED7440929022BC67E7061153281BC6@SHSMSX103.ccr.corp.intel.com> References: <20180810081000.4454-1-yanglong.wu@intel.com> In-Reply-To: <20180810081000.4454-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTI1OWQ5ZjktNDA4ZC00Zjk2LWE5YmItMWJiZmE4MmQ2NzYzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYUhIem9NelFDbnh5VllZYVlZZ0JnMmd0UDRySUw4bm8rbHFnWmozWE82MVkyVXRqVmRndkxwXC9MSXRka2piZVoifQ== 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 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: Thu, 06 Sep 2018 05:33:50 -0000 Hi Yanglong: > -----Original Message----- > From: Wu, Yanglong > Sent: Friday, August 10, 2018 4:10 PM > To: dev@dpdk.org > Cc: Xu, Rosen ; Wang, Dong1 ; > Zhang, Qi Z ; Wu, Yanglong > Subject: [PATCH] net/ixgbe: fix ixgbevf link status >=20 > For ixgbevf kernel driver, link status changes from down to up will trigg= er vf > kernel driver send IXGBE_VF_RESET message to pf kernel driver, after this= , vf > kernel driver will disable and enable it self. By these series operations= , the vf > kernel driver report link up. Besides, all these operations handles in ke= rnel > thread. > For DPDK user space driver, it only gets link status changes from down to= up, > but miss IXGBE_VF_RESET message sending and reset itself. > If we will add fully implementation of link status change for DPDK user s= pace > driver, we need take much more modification. We have aligned that for lin= k > status changes from down to up we only notify link is up, users need to r= eset > 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, > 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, > 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