diff mbox series

[ovs-dev,v2] dpif-netdev: Reset the rxq current cycle counter on reload.

Message ID 1515680733-15437-1-git-send-email-ktraynor@redhat.com
State Accepted
Delegated to: Ian Stokes
Headers show
Series [ovs-dev,v2] dpif-netdev: Reset the rxq current cycle counter on reload. | expand

Commit Message

Kevin Traynor Jan. 11, 2018, 2:25 p.m. UTC
An rxq may have processing cycles counted in the current
counter when a reload happens. That could temporarily create
a small skew on the stats for an rxq. Reset the counter after
reload.

Fixes: 4809891b2e01 ("dpif-netdev: Count the rxq processing cycles for an rxq.")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---

V2:
- No change, just split from series as is a minor fix
  and no longer causes rebase issues.

 lib/dpif-netdev.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Stokes, Ian Jan. 15, 2018, 5:46 p.m. UTC | #1
> An rxq may have processing cycles counted in the current counter when a
> reload happens. That could temporarily create a small skew on the stats
> for an rxq. Reset the counter after reload.
> 
> Fixes: 4809891b2e01 ("dpif-netdev: Count the rxq processing cycles for an
> rxq.")
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> ---
> 
> V2:
> - No change, just split from series as is a minor fix
>   and no longer causes rebase issues.
> 
>  lib/dpif-netdev.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index c7d157a..57f6570
> 100644
> --- a/lib/dpif-netdev.c
> +++ b/lib/dpif-netdev.c
> @@ -4145,4 +4145,6 @@ reload:
>                  pmd->core_id, netdev_rxq_get_name(poll_list[i].rxq->rx),
>                  netdev_rxq_get_queue_id(poll_list[i].rxq->rx));
> +       /* Reset the rxq current cycles counter. */
> +       dp_netdev_rxq_set_cycles(poll_list[i].rxq, RXQ_CYCLES_PROC_CURR,
> + 0);
>      }

LGTM, will apply this to DPDK_MERGE.
> 
> --
> 1.8.3.1
diff mbox series

Patch

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index c7d157a..57f6570 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -4145,4 +4145,6 @@  reload:
                 pmd->core_id, netdev_rxq_get_name(poll_list[i].rxq->rx),
                 netdev_rxq_get_queue_id(poll_list[i].rxq->rx));
+       /* Reset the rxq current cycles counter. */
+       dp_netdev_rxq_set_cycles(poll_list[i].rxq, RXQ_CYCLES_PROC_CURR, 0);
     }