Here's an incremental.
---
ofproto/ofproto-dpif.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 5fd20f0..30ef5f9 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -1121,21 +1121,19 @@ static void
run_fast_rl(void)
{
static long long int port_rl = LLONG_MIN;
- static long long int backer_rl = 0;
- long long int now = time_msec();
- struct shash_node *node;
+ static unsigned int backer_rl = 0;
- if (now - port_rl > 200) {
+ if (time_msec() >= port_rl) {
struct ofproto_dpif *ofproto;
struct ofport_dpif *ofport;
- port_rl = now;
HMAP_FOR_EACH (ofproto, all_ofproto_dpifs_node, &all_ofproto_dpifs) {
HMAP_FOR_EACH (ofport, up.hmap_node, &ofproto->up.ports) {
port_run_fast(ofport);
}
}
+ port_rl = time_msec() + 200;
}
/* XXX: We have to be careful not to do too much work in this function. If
@@ -1146,12 +1144,13 @@ run_fast_rl(void)
* long term, is to separate flow miss handling into it's own thread so it
* isn't affected by revalidations, and expirations. Until then, this is
* the best we can do. */
- if (backer_rl++ % 10) {
- return;
- }
+ if (++backer_rl >= 10) {
+ struct shash_node *node;
- SHASH_FOR_EACH (node, &all_dpif_backers) {
- dpif_backer_run_fast(node->data, 1);
+ backer_rl = 0;
+ SHASH_FOR_EACH (node, &all_dpif_backers) {
+ dpif_backer_run_fast(node->data, 1);
+ }
}
}
--
1.7.9.5
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev