aboutsummaryrefslogtreecommitdiff
path: root/ofproto
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2013-04-02 12:32:22 -0700
committerEthan Jackson <ethan@nicira.com>2013-04-02 15:46:23 -0700
commit1e9dc006a1544b3f84d30512cc90b78f46ab9065 (patch)
treeba7488ef8d344986b8dd83a1470a8594cf7f4abc /ofproto
parentbe87803d64dc0c29472d4702db43e6b6ed0fefdd (diff)
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 <ethan@nicira.com>
Diffstat (limited to 'ofproto')
-rw-r--r--ofproto/ofproto-dpif.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 2ea439c4..b56f9f9d 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -4595,13 +4595,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