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 CE937A04FC; Tue, 2 Jun 2020 12:54:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AF8371BF7D; Tue, 2 Jun 2020 12:54:54 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 4E4961BF7C; Tue, 2 Jun 2020 12:54:52 +0200 (CEST) IronPort-SDR: D0RvMvIGbNwQguU8xYIQ2SFnWjhog6V1buqfgisElfShkx+2uIYp/NOgxy/1mTZwEnn7vk0vz/ 5vL07dRrWQjg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2020 03:54:51 -0700 IronPort-SDR: CU+V85hGDU8ggIxrvB1FTPR33gSh948IKBCrK5emcLqN/s8dJ6XYo4LY4qG5I7kv2dxiweMh3r X5TFbeWRMz8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,464,1583222400"; d="scan'208";a="257079863" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga007.fm.intel.com with ESMTP; 02 Jun 2020 03:54:51 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 2 Jun 2020 03:54:50 -0700 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 2 Jun 2020 18:54:48 +0800 Received: from shsmsx605.ccr.corp.intel.com ([10.109.6.215]) by SHSMSX605.ccr.corp.intel.com ([10.109.6.215]) with mapi id 15.01.1713.004; Tue, 2 Jun 2020 18:54:48 +0800 From: "Jiang, YuX" To: "Sun, GuinanX" , "dev@dpdk.org" , "Chen, BoX C" CC: "Zhao1, Wei" , "Yang, Qiming" , "Sun, GuinanX" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 2/2] net/ixgbe: fix flow control status get Thread-Index: AQHWMMO55zhb417560Ct7O0gYJ51najFNtRw Date: Tue, 2 Jun 2020 10:54:48 +0000 Message-ID: <5a1b2d5852b74121ac52082b86750145@intel.com> References: <20200522061208.31694-1-guinanx.sun@intel.com> <20200523052239.62928-1-guinanx.sun@intel.com> <20200523052239.62928-3-guinanx.sun@intel.com> In-Reply-To: <20200523052239.62928-3-guinanx.sun@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 2/2] net/ixgbe: fix flow control status get 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" Tested-by: Chen, BoX C -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Guinan Sun Sent: Saturday, May 23, 2020 1:23 PM To: dev@dpdk.org Cc: Zhao1, Wei ; Yang, Qiming ;= Sun, GuinanX ; stable@dpdk.org Subject: [dpdk-dev] [PATCH v2 2/2] net/ixgbe: fix flow control status get mac_ctrl_frame_fwd assignment is missing, so setting mac_ctrl_frame_fwd sho= uld be added in ixgbe_flow_ctrl_get(). The patch fixes the issue. Fixes: 56ea46a997b7 ("ethdev: retrieve flow control configuration") Cc: stable@dpdk.org Signed-off-by: Guinan Sun --- v2 changes: * Set fc mac_ctrl_frame_fwd by bit operation. * Modified commit messge. --- drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_eth= dev.c index 42947ba40..890d756e4 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -4752,6 +4752,11 @@ 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); + if (mflcn_reg & IXGBE_MFLCN_PMCF) + fc_conf->mac_ctrl_frame_fwd =3D 1; + else + fc_conf->mac_ctrl_frame_fwd =3D 0; + if (mflcn_reg & (IXGBE_MFLCN_RPFCE | IXGBE_MFLCN_RFCE)) rx_pause =3D 1; else -- 2.17.1