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 B835AA04F5; Fri, 13 Dec 2019 02:27:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 80F3B1BF96; Fri, 13 Dec 2019 02:27:36 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 536BC1BF90; Fri, 13 Dec 2019 02:27:34 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Dec 2019 17:27:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,307,1571727600"; d="scan'208";a="220816134" Received: from intel.sh.intel.com ([10.239.255.32]) by fmsmga001.fm.intel.com with ESMTP; 12 Dec 2019 17:27:32 -0800 From: Jiaqi Min To: dev@dpdk.org Cc: Jingjing Wu , Qiming Yang , Jiaqi Min , stable@dpdk.org Date: Fri, 13 Dec 2019 01:23:29 +0000 Message-Id: <20191213012329.3935-1-jiaqix.min@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191212134947.79096-1-jiaqix.min@intel.com> References: <20191212134947.79096-1-jiaqix.min@intel.com> Subject: [dpdk-dev] [PATCH v2] 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 stats is the total number of successfully received packets, so exclude the number of rx_discards for Rx total stats. Fixes: f4a41a6953af ("net/avf: support stats") Cc: stable@dpdk.org Signed-off-by: Jiaqi Min --- v2: * Changed commit message. --- 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..f544303c0 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