diff options
author | Eelco Chaudron <echaudro@redhat.com> | 2023-03-09 13:30:16 +0100 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2023-03-15 21:23:14 +0100 |
commit | a4cd2afea5c3ba08f38379a7356ffb3bf5662d5c (patch) | |
tree | b9b3a9a5d12b3fdabefc761695c0d4b16640acb8 | |
parent | 29720e378e96b27bc250aac9b287a67e023650fd (diff) | |
download | openvswitch-a4cd2afea5c3ba08f38379a7356ffb3bf5662d5c.tar.gz |
ofproto-dpif-upcall: Remove redundant time_msec() in revalidate().
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 <echaudro@redhat.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r-- | ofproto/ofproto-dpif-upcall.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index cac118c61..cd57fdbd9 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -2750,8 +2750,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: * @@ -2788,7 +2786,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; |