@@ -175,6 +175,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 {
@@ -4215,5 +4215,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);
@@ -5679,7 +5679,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;
}
}
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 <ktraynor@redhat.com> --- lib/dpif-netdev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)