From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id A4E262B83 for ; Tue, 13 Nov 2018 20:28:00 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2018 11:27:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,229,1539673200"; d="scan'208";a="249427096" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 13 Nov 2018 11:27:59 -0800 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 13 Nov 2018 11:27:59 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 13 Nov 2018 11:27:58 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.161]) by shsmsx102.ccr.corp.intel.com ([169.254.2.84]) with mapi id 14.03.0415.000; Wed, 14 Nov 2018 03:27:56 +0800 From: "Zhang, Qi Z" To: "Wu, Yanglong" , "dev@dpdk.org" CC: "Xu, Rosen" , "Wang, Dong1" Thread-Topic: [PATCH v2] net/ixgbe: fix ixgbevf link status Thread-Index: AQHUexxjICP7w78QA0iXdwscOQ6ihqVOF4ow Date: Tue, 13 Nov 2018 19:27:56 +0000 Message-ID: <039ED4275CED7440929022BC67E70611532E34CC@SHSMSX103.ccr.corp.intel.com> References: <20180810081000.4454-1-yanglong.wu@intel.com> <20181113063443.50070-1-yanglong.wu@intel.com> In-Reply-To: <20181113063443.50070-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzUxMDQxZjctOTQ1MS00NWRmLTg5YjQtMDA1YTYzYjg0NTQwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNE84RTJzZFJCeHRPQ2h2Zk1IZkFcL1l4MllodVY5aEdrT2dnSm1mU1FaRVZYMWJXMmlBOEFTWCtSZkhvWUtwc0QifQ== 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 v2] 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: Tue, 13 Nov 2018 19:28:01 -0000 > -----Original Message----- > From: Wu, Yanglong > Sent: Monday, November 12, 2018 10:35 PM > To: dev@dpdk.org > Cc: Zhang, Qi Z ; Xu, Rosen ; > Wang, Dong1 ; Wu, Yanglong > > Subject: [PATCH v2] 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. >=20 > Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF") >=20 > Signed-off-by: Rosen Xu > Signed-off-by: Yanglong Wu Acked-by: Qi Zhang Applied to dpdk-next-net-intel. Thanks Qi > --- > v2 > change as comments > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 15 +-------------- > 1 file changed, 1 insertion(+), 14 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index 8148577f5..91ba6201d 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -3880,11 +3880,6 @@ static int > ixgbevf_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed, > int *link_up, int wait_to_complete) { > - /** > - * 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; > @@ -3945,14 +3940,6 @@ ixgbevf_check_link(struct ixgbe_hw *hw, > ixgbe_link_speed *speed, > *speed =3D IXGBE_LINK_SPEED_UNKNOWN; > } >=20 > - 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 > */ > @@ -3962,7 +3949,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