git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
upcall: Avoid divide-by-zero calculating flow limit
[sliver-openvswitch.git]
/
ofproto
/
ofproto-dpif-upcall.c
diff --git
a/ofproto/ofproto-dpif-upcall.c
b/ofproto/ofproto-dpif-upcall.c
index
24919db
..
ff979ba
100644
(file)
--- a/
ofproto/ofproto-dpif-upcall.c
+++ b/
ofproto/ofproto-dpif-upcall.c
@@
-615,7
+615,7
@@
udpif_flow_dumper(void *arg)
ovs_mutex_unlock(&revalidator->mutex);
}
- duration =
time_msec() - start_time
;
+ duration =
MAX(time_msec() - start_time, 1)
;
udpif->dump_duration = duration;
if (duration > 2000) {
flow_limit /= duration / 1000;