]> git.proxmox.com Git - ovs.git/commitdiff
dpif-netdev: Reset the rxq current cycle counter on reload.
authorKevin Traynor <ktraynor@redhat.com>
Thu, 11 Jan 2018 14:25:33 +0000 (14:25 +0000)
committerIan Stokes <ian.stokes@intel.com>
Wed, 17 Jan 2018 18:11:28 +0000 (18:11 +0000)
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>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
lib/dpif-netdev.c

index 0dc84f82041148e8a6a542057d9a7395db4dc7bd..48a8ebb9082071a73ac089d33d749aa380fc61d4 100644 (file)
@@ -4105,6 +4105,8 @@ reload:
        VLOG_DBG("Core %d processing port \'%s\' with queue-id %d\n",
                 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);
     }
 
     if (!poll_cnt) {