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 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 --- 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 -- 2.17.1