From: Jiaqi Min <jiaqix.min@intel.com>
To: dev@dpdk.org
Cc: Jingjing Wu <jingjing.wu@intel.com>,
Qiming Yang <qiming.yang@intel.com>,
Jiaqi Min <jiaqix.min@intel.com>,
stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2] net/iavf: fix Rx total stats
Date: Fri, 13 Dec 2019 01:23:29 +0000 [thread overview]
Message-ID: <20191213012329.3935-1-jiaqix.min@intel.com> (raw)
In-Reply-To: <20191212134947.79096-1-jiaqix.min@intel.com>
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 <jiaqix.min@intel.com>
---
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
next prev parent reply other threads:[~2019-12-13 1:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-12 13:49 [dpdk-dev] [PATCH] " Jiaqi Min
2019-12-13 1:23 ` Jiaqi Min [this message]
2019-12-13 7:16 ` [dpdk-dev] [PATCH v2] " Wu, Jingjing
2019-12-13 7:57 ` Ye Xiaolong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191213012329.3935-1-jiaqix.min@intel.com \
--to=jiaqix.min@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=qiming.yang@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).