mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
netdev-dpdk: Fix rx_error stat for dpdk ports.
"rx_error" stat for a DPDK interface was calculated with the assumption that
dropped packets due to hardware buffer overload were counted as errors
in DPDK and the rte ierror stat included rte imissed packets i.e.
rx_errors = rte_stats.ierrors - rte_stats.imissed
This results in negative statistic values as imissed packets are no longer
counted as part of ierror since DPDK v.16.04.
Fix this by setting rx_errors equal to ierrors only.
Fixes: 9e3ddd45
(netdev-dpdk: Add some missing statistics.)
CC: Timo Puha <timox.puha@intel.com>)
Reported-by: Stepan Andrushko <stepanx.andrushko@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
This commit is contained in:
committed by
Daniele Di Proietto
parent
57fc4fd033
commit
21e9844c59
@@ -2067,8 +2067,7 @@ out:
|
||||
stats->tx_packets = rte_stats.opackets;
|
||||
stats->rx_bytes = rte_stats.ibytes;
|
||||
stats->tx_bytes = rte_stats.obytes;
|
||||
/* DPDK counts imissed as errors, but count them here as dropped instead */
|
||||
stats->rx_errors = rte_stats.ierrors - rte_stats.imissed;
|
||||
stats->rx_errors = rte_stats.ierrors;
|
||||
stats->tx_errors = rte_stats.oerrors;
|
||||
|
||||
rte_spinlock_lock(&dev->stats_lock);
|
||||
|
Reference in New Issue
Block a user