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 C2CFAA04A3 for ; Tue, 12 May 2020 10:25:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9DD411C192; Tue, 12 May 2020 10:25:25 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id CD00B1C043; Tue, 12 May 2020 10:25:21 +0200 (CEST) IronPort-SDR: IQnJ3qwslE7cuceKGcU0FJhzHt4Ia/jfbW+iYRyE+8AmPYJbkSazcSiTiOnIgEnz6gBZbs8nI6 GmmECuExJw0w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2020 01:25:20 -0700 IronPort-SDR: ZtfygU/4Au6zpWd/+hBwhyvtgjSewHqyA6xa1RbBPd0/7S9SuLuOAZ3FMvYR1jLaLGlxx2GSAs RwIQe+YalZmQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,383,1583222400"; d="scan'208";a="280052596" Received: from dpdk.sh.intel.com ([10.239.255.59]) by orsmga002.jf.intel.com with ESMTP; 12 May 2020 01:25:19 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Guinan Sun , stable@dpdk.org Date: Tue, 12 May 2020 08:13:06 +0000 Message-Id: <20200512081306.16013-1-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508082939.32525-1-guinanx.sun@intel.com> References: <20200508082939.32525-1-guinanx.sun@intel.com> Subject: [dpdk-stable] [PATCH v2] net/ixgbe: fix statistics error in flow control mode X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" The register autoneg can't be updated synchronously with flow control mode setting in the state of port start , so NIC statistics error occurs. AUTO_NEG Advt register should be updated by ixgbe_setup_fc() when enabling flow control. The patch fixes the issue. Fixes: a524f550da6e ("net/ixgbe: fix flow control mode setting") Cc: stable@dpdk.org Signed-off-by: Guinan Sun --- v2 changes: * Replaced mac.ops.setup_fc() with ixgbe_setup_fc() * Modified commit message. --- drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index a4e5c539d..f8a84c565 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2543,6 +2543,8 @@ ixgbe_flow_ctrl_enable(struct rte_eth_dev *dev, struct ixgbe_hw *hw) int err; uint32_t mflcn; + ixgbe_setup_fc(hw); + err = ixgbe_fc_enable(hw); /* Not negotiated is not an error case */ -- 2.17.1