Remove one of two consecutive time_msec() calls in the revalidate() function.
We take the time stamp after udpif_get_n_flows(), to avoid any potential delays in getting the number of offloaded flows. Signed-off-by: Eelco Chaudron <[email protected]> --- v2: Moved time_msec() after udpif_get_n_flows(). ofproto/ofproto-dpif-upcall.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index db7570ee2..7d96a3300 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -2712,8 +2712,6 @@ revalidate(struct revalidator *revalidator) break; } - now = time_msec(); - /* In normal operation we want to keep flows around until they have * been idle for 'ofproto_max_idle' milliseconds. However: * @@ -2750,7 +2748,7 @@ revalidate(struct revalidator *revalidator) max_idle = n_dp_flows > flow_limit ? 100 : ofproto_max_idle; - udpif->dpif->current_ms = time_msec(); + udpif->dpif->current_ms = now = time_msec(); for (f = flows; f < &flows[n_dumped]; f++) { long long int used = f->stats.used; struct recirc_refs recircs = RECIRC_REFS_EMPTY_INITIALIZER; _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
