From: Ethan Jackson Date: Tue, 2 Apr 2013 19:32:22 +0000 (-0700) Subject: ofproto-dpif: Don't rate limit facet_learn() with fin_timeouts. X-Git-Tag: sliver-openvswitch-1.10.90-1~10^2~1 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=62bd7349adaf5ee740cd9da58305f7523d7c9e6e ofproto-dpif: Don't rate limit facet_learn() with fin_timeouts. In the standard case, rate limiting facet_learn() to once ever 500ms, makes sense. The worst that can happen is a learning entry is expired half a second to early. However, when using fin_timeouts, we really need react quickly to delete the newly stale flow. Bug #15915. Signed-off-by: Ethan Jackson --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 32ed0919a..47830c19e 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -4585,13 +4585,14 @@ facet_learn(struct facet *facet) struct ofproto_dpif *ofproto = ofproto_dpif_cast(facet->rule->up.ofproto); struct subfacet *subfacet= CONTAINER_OF(list_front(&facet->subfacets), struct subfacet, list_node); + long long int now = time_msec(); struct action_xlate_ctx ctx; - if (time_msec() < facet->learn_rl) { + if (!facet->has_fin_timeout && now < facet->learn_rl) { return; } - facet->learn_rl = time_msec() + 500; + facet->learn_rl = now + 500; if (!facet->has_learn && !facet->has_normal