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 D15F8A04F5; Thu, 12 Dec 2019 06:55:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A453C374C; Thu, 12 Dec 2019 06:55:34 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 232322BC8; Thu, 12 Dec 2019 06:55:32 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2019 21:55:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,304,1571727600"; d="scan'208";a="245575780" Received: from intel.sh.intel.com ([10.239.255.32]) by fmsmga002.fm.intel.com with ESMTP; 11 Dec 2019 21:55:29 -0800 From: Jiaqi Min To: dev@dpdk.org Cc: Jingjing Wu , Wenzhuo Lu , Qiming Yang , Jiaqi Min , stable@dpdk.org Date: Thu, 12 Dec 2019 13:49:47 +0000 Message-Id: <20191212134947.79096-1-jiaqix.min@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/iavf: fix Rx total stats 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" Rx total statistics error when packets above the jumbo frame. The patch fixed the issue. Fixes: f4a41a6953af ("net/avf: support stats") Cc: stable@dpdk.org Signed-off-by: Jiaqi Min --- drivers/net/iavf/iavf_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index a39ba1466..867843205 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -1068,7 +1068,7 @@ iavf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) if (ret == 0) { iavf_update_stats(vsi, pstats); stats->ipackets = pstats->rx_unicast + pstats->rx_multicast + - pstats->rx_broadcast; + pstats->rx_broadcast - pstats->rx_discards; stats->opackets = pstats->tx_broadcast + pstats->tx_multicast + pstats->tx_unicast; stats->imissed = pstats->rx_discards; -- 2.17.1