From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 95881A0350; Sat, 23 May 2020 04:35:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 53F4E1D920; Sat, 23 May 2020 04:35:49 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 4B8F31D91D; Sat, 23 May 2020 04:35:47 +0200 (CEST) IronPort-SDR: Qut7JjDJJ5xwTDT7rvVLifZS+q4geFr1D3BFVMT+ADNhbM3a/4fCeihUBIw2V0wMnxW4o3eNb+ Wid0MTUDmG6A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 19:35:46 -0700 IronPort-SDR: ZP/Cglbes3PFrKmxAFllYc+tGq8AyD8vV8vfXEeDlmp0qeSFR1sPHXEHv9lQqsGlOrfRa0rIyX DQd1z3EcNmEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,423,1583222400"; d="scan'208";a="283576456" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 22 May 2020 19:35:45 -0700 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 22 May 2020 19:35:45 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 22 May 2020 19:35:45 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.178]) by shsmsx102.ccr.corp.intel.com ([169.254.2.245]) with mapi id 14.03.0439.000; Sat, 23 May 2020 10:35:42 +0800 From: "Sun, GuinanX" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Yang, Qiming" , "Ye, Xiaolong" Thread-Topic: [PATCH] net/ixgbe: delete MAC control frame fwd in struct adapter Thread-Index: AQHWMAKDKQ+PxR7PE0qUPjFHScfpWKizVaSAgAGeY9A= Date: Sat, 23 May 2020 02:35:41 +0000 Message-ID: <05758BDAD7FC8E4BAED63D0390A8A955857454@SHSMSX101.ccr.corp.intel.com> References: <20200522061208.31694-1-guinanx.sun@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: delete MAC control frame fwd in struct adapter 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi > -----Original Message----- > From: Zhao1, Wei > Sent: Friday, May 22, 2020 5:47 PM > To: Sun, GuinanX ; dev@dpdk.org > Cc: stable@dpdk.org; Yang, Qiming ; Ye, Xiaolong > > Subject: RE: [PATCH] net/ixgbe: delete MAC control frame fwd in struct ad= apter >=20 > Hi, >=20 > > -----Original Message----- > > From: Sun, GuinanX > > Sent: Friday, May 22, 2020 2:12 PM > > To: dev@dpdk.org > > Cc: Zhao1, Wei ; Sun, GuinanX > > ; stable@dpdk.org > > Subject: [PATCH] net/ixgbe: delete MAC control frame fwd in struct > > adapter > > > > If some user set mac_ctrl_frame_fwd to 1 from fc ops, then he do a > > port reset process of > > > > testpmd> start > > testpmd> set flow_ctrl mac_ctrl_frame_fwd on 0 stop port stop 0 port > > testpmd> start 0 start > > > > Then after this process, the mac_ctrl_frame_fwd has been change to > > "off", so we should delete "adapter->mac_ctrl_frame_fwd =3D 0;" from de= v-stop. > > > > In addition, add a value to mac_ctrl_frame_fwd in the > > ixgbe_flow_ctrl_get () function. > > > > Fixes: a524f550da6e ("net/ixgbe: fix flow control mode setting") > > Cc: stable@dpdk.org > > > > Signed-off-by: SunGuinan > > --- > > drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > > b/drivers/net/ixgbe/ixgbe_ethdev.c > > index f8a84c565..dd4023f01 100644 > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > > @@ -2939,8 +2939,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev) > > > > adapter->rss_reta_updated =3D 0; > > > > -adapter->mac_ctrl_frame_fwd =3D 0; > > - > > hw->adapter_stopped =3D true; > > } > > > > @@ -4754,6 +4752,8 @@ ixgbe_flow_ctrl_get(struct rte_eth_dev *dev, > > struct rte_eth_fc_conf *fc_conf) > > * MFLCN register. > > */ > > mflcn_reg =3D IXGBE_READ_REG(hw, IXGBE_MFLCN); > > +fc_conf->mac_ctrl_frame_fwd =3D mflcn_reg; > > + >=20 >=20 > Error, that is not right!! You are right, I will make corrections later. In addition, the problem of ixgbe_flow_ctrl_get () and the timing of mac_ct= rl_frame_fwd are two problems.=20 I will make a patch set and release it later. >=20 > > if (mflcn_reg & (IXGBE_MFLCN_RPFCE | IXGBE_MFLCN_RFCE)) rx_pause =3D > > 1; else > > -- > > 2.17.1 >=20