From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A6615A034F for ; Thu, 1 Apr 2021 03:17:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A04E840142; Thu, 1 Apr 2021 03:17:07 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 90B3940142; Thu, 1 Apr 2021 03:17:05 +0200 (CEST) IronPort-SDR: RsHvfO+w6WMZCoXvNQJ0YA4LLGNQmj+dudZCjqw/yl5HPa6oA28YTNBGlC46RY5GurZ6Hx/A80 cDpjfQSKN4tg== X-IronPort-AV: E=McAfee;i="6000,8403,9940"; a="192227952" X-IronPort-AV: E=Sophos;i="5.81,295,1610438400"; d="scan'208";a="192227952" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2021 18:16:58 -0700 IronPort-SDR: HE8JWp7sRpF+OrW2nY6B9bNdTpr2CDGKB9YvkEk91SFV5EBUB8N68K/n2fS5AcR1SlzgHuc4hw 5hVfbp3Emz6w== X-IronPort-AV: E=Sophos;i="5.81,295,1610438400"; d="scan'208";a="445989143" Received: from shwdenpg235.ccr.corp.intel.com ([10.240.182.60]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2021 18:16:56 -0700 From: Alvin Zhang To: haiyue.wang@intel.com, jia.guo@intel.com Cc: dev@dpdk.org, Alvin Zhang , stable@dpdk.org Date: Thu, 1 Apr 2021 09:16:48 +0800 Message-Id: <20210401011648.17888-1-alvinx.zhang@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] net/igc: fix Rx error counter for badlen packets X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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" When the size of the packet is less than the minimum or greater than the maximum, the packet will be counted twice in the error packet counter. Fixes: e6defdfddc3b ("net/igc: enable statistics") Cc: stable@dpdk.org Signed-off-by: Alvin Zhang --- drivers/net/igc/igc_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c index 0ea6e2a..c398701 100644 --- a/drivers/net/igc/igc_ethdev.c +++ b/drivers/net/igc/igc_ethdev.c @@ -1901,8 +1901,7 @@ static int eth_igc_vlan_tpid_set(struct rte_eth_dev *dev, /* Rx Errors */ rte_stats->imissed = stats->mpc; - rte_stats->ierrors = stats->crcerrs + - stats->rlec + stats->ruc + stats->roc + + rte_stats->ierrors = stats->crcerrs + stats->rlec + stats->rxerrc + stats->algnerrc; /* Tx Errors */ -- 1.8.3.1