summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-11-28 19:19:51 +0200
committerHanoh Haim <hhaim@cisco.com>2016-11-28 21:16:09 +0200
commit27a705e477cd1912aed4e4b83149c5820a3466d5 (patch)
treed275d053e183a53f96087312a8825676e0901fc1 /src
parent3f11d1c5e42eecb2e4120cbd36f337455be60559 (diff)
fix trex-280 VIC DPDK rx counter issue
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/dpdk/drivers/net/enic/enic_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dpdk/drivers/net/enic/enic_main.c b/src/dpdk/drivers/net/enic/enic_main.c
index 889bc692..473bfc3c 100644
--- a/src/dpdk/drivers/net/enic/enic_main.c
+++ b/src/dpdk/drivers/net/enic/enic_main.c
@@ -166,6 +166,7 @@ void enic_dev_stats_get(struct enic *enic, struct rte_eth_stats *r_stats)
return;
}
+
/* The number of truncated packets can only be calculated by
* subtracting a hardware counter from error packets received by
* the driver. Note: this causes transient inaccuracies in the
@@ -180,7 +181,7 @@ void enic_dev_stats_get(struct enic *enic, struct rte_eth_stats *r_stats)
r_stats->ipackets = stats->rx.rx_frames_ok - rx_truncated;
r_stats->opackets = stats->tx.tx_frames_ok;
- r_stats->ibytes = stats->rx.rx_bytes_ok;
+ r_stats->ibytes = stats->rx.rx_unicast_bytes_ok+stats->rx.rx_multicast_bytes_ok+stats->rx.rx_broadcast_bytes_ok;
r_stats->obytes = stats->tx.tx_bytes_ok;
r_stats->ierrors = stats->rx.rx_errors + stats->rx.rx_drop;