From patchwork Sat May 23 05:22:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 70545 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6C3B2A04A3; Sat, 23 May 2020 07:33:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 09C1D1D9C7; Sat, 23 May 2020 07:33:09 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 249991D987; Sat, 23 May 2020 07:33:05 +0200 (CEST) IronPort-SDR: 5LVt23mVB1mcNG7ovwo0925oe+OsffA/o+yNWHqqZ/Xi2d4+ibAx9EnUt+Bs0cqdlaWlEll/fF zMoSjhTlWxRA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 22:33:05 -0700 IronPort-SDR: QW7cVtrLAb4XZPqnQiPq8s1rj83CNKbmGTjT0R3xxcCNiPyBmcL4GQB/bhyzdB+zIbvGrOt3ix c2zCHKhnoJWg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,424,1583222400"; d="scan'208";a="374957074" Received: from dpdk.sh.intel.com ([10.239.255.14]) by fmsmga001.fm.intel.com with ESMTP; 22 May 2020 22:33:03 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Zhao1 Wei , Qiming Yang , Guinan Sun , stable@dpdk.org Date: Sat, 23 May 2020 05:22:38 +0000 Message-Id: <20200523052239.62928-2-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200523052239.62928-1-guinanx.sun@intel.com> References: <20200522061208.31694-1-guinanx.sun@intel.com> <20200523052239.62928-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH v2 1/2] net/ixgbe: fix incorrect MAC control frame forward 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" mac_ctrl_frame_fwd shouldn't be cleared when port stop, otherwise it will be inconsistent with the actual status. This patch fixes the issue. Fixes: a524f550da6e ("net/ixgbe: fix flow control mode setting") Cc: stable@dpdk.org Signed-off-by: Guinan Sun --- v2 changes: * Modified commit messge. --- drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index f8a84c565..42947ba40 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 = 0; - adapter->mac_ctrl_frame_fwd = 0; - hw->adapter_stopped = true; } From patchwork Sat May 23 05:22:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 70546 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9F804A04A3; Sat, 23 May 2020 07:33:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 53B821DA08; Sat, 23 May 2020 07:33:11 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 1C51D1D9B4; Sat, 23 May 2020 07:33:07 +0200 (CEST) IronPort-SDR: s+gUH9fnkr/uQIf75Q7T7bQXS59Lvbc6iRcRSDtlACY3wKE+Dsh17vmTR/9JgLNDirOqjWQSVo jqBi853xQGyA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 22:33:07 -0700 IronPort-SDR: DMo4UWqX+YwSUt/iows+FTeYqJSAjCEr9sjOwgD9ikk81gpJgJY8jzWuVB9S+OSnAZ5ABVV29y WFg7IpswZ1MA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,424,1583222400"; d="scan'208";a="374957080" Received: from dpdk.sh.intel.com ([10.239.255.14]) by fmsmga001.fm.intel.com with ESMTP; 22 May 2020 22:33:05 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Zhao1 Wei , Qiming Yang , Guinan Sun , stable@dpdk.org Date: Sat, 23 May 2020 05:22:39 +0000 Message-Id: <20200523052239.62928-3-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200523052239.62928-1-guinanx.sun@intel.com> References: <20200522061208.31694-1-guinanx.sun@intel.com> <20200523052239.62928-1-guinanx.sun@intel.com> Subject: [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" mac_ctrl_frame_fwd assignment is missing, so setting mac_ctrl_frame_fwd should 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 Tested-by: Chen, BoX C 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_ethdev.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 = IXGBE_READ_REG(hw, IXGBE_MFLCN); + if (mflcn_reg & IXGBE_MFLCN_PMCF) + fc_conf->mac_ctrl_frame_fwd = 1; + else + fc_conf->mac_ctrl_frame_fwd = 0; + if (mflcn_reg & (IXGBE_MFLCN_RPFCE | IXGBE_MFLCN_RFCE)) rx_pause = 1; else