2017-02-16 7:31 GMT-08:00 Ian Stokes <[email protected]>: > "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 <[email protected]>) > Reported-by: Stepan Andrushko <[email protected]> > Signed-off-by: Ian Stokes <[email protected]>
Good catch! I've applied this to master, branch-2.7 and branch-2.6. > --- > lib/netdev-dpdk.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > index 94568a1..ee53c4c 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -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); > -- > 1.7.0.7 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
