So far the interval was only used for dpcls optimization.
Soon, we will use it for storing rxq cycles so make the
names more generic. Also, set the interval regardless
of whether dpcls optimization has occurred, as the
optimization interval will need to be consistent across
pmds.

Signed-off-by: Kevin Traynor <[email protected]>
---
 lib/dpif-netdev.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 47a9fa0..aa8c05d 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -178,6 +178,6 @@ struct emc_cache {
 /* Simple non-wildcarding single-priority classifier. */
 
-/* Time in ms between successive optimizations of the dpcls subtable vector */
-#define DPCLS_OPTIMIZATION_INTERVAL 1000
+/* Time in ms between successive optimizations of the pmd */
+#define PMD_OPTIMIZATION_INTERVAL 1000
 
 struct dpcls {
@@ -4208,5 +4208,5 @@ dp_netdev_configure_pmd(struct dp_netdev_pmd_thread *pmd, 
struct dp_netdev *dp,
     cmap_init(&pmd->flow_table);
     cmap_init(&pmd->classifiers);
-    pmd->next_optimization = time_msec() + DPCLS_OPTIMIZATION_INTERVAL;
+    pmd->next_optimization = time_msec() + PMD_OPTIMIZATION_INTERVAL;
     hmap_init(&pmd->poll_list);
     hmap_init(&pmd->tx_ports);
@@ -5656,7 +5656,7 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread 
*pmd)
             }
             ovs_mutex_unlock(&pmd->flow_mutex);
-            /* Start new measuring interval */
-            pmd->next_optimization = now + DPCLS_OPTIMIZATION_INTERVAL;
         }
+        /* Start new measuring interval */
+        pmd->next_optimization = now + PMD_OPTIMIZATION_INTERVAL;
     }
 }
-- 
1.8.3.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to