Re: [ovs-dev] [PATCH] netdev-dpdk: Fix rx_error stat for dpdk ports.

2017-02-16 Thread Daniele Di Proietto
2017-02-16 7:31 GMT-08:00 Ian Stokes :
> "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 )
> Reported-by: Stepan Andrushko 
> Signed-off-by: Ian Stokes 

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(>stats_lock);
> --
> 1.7.0.7
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH] netdev-dpdk: Fix rx_error stat for dpdk ports.

2017-02-16 Thread Ian Stokes
"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 )
Reported-by: Stepan Andrushko 
Signed-off-by: Ian Stokes 
---
 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(>stats_lock);
-- 
1.7.0.7

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev