Don't rate-limit packet_ins from flows that the controller set up.
authorBen Pfaff <blp@nicira.com>
Fri, 21 Nov 2008 18:48:00 +0000 (10:48 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 21 Nov 2008 18:48:00 +0000 (10:48 -0800)
secchan/ratelimit.c

index 3736703eb9b5cae236f4835406b191ab9f72723d..e44352c381c805025722a5ee186f17332756dc4e 100644 (file)
@@ -160,6 +160,13 @@ rate_limit_local_packet_cb(struct relay *r, void *rl_)
         return false;
     }
 
+    if (opi->reason == OFPR_ACTION) {
+        /* Don't rate-limit 'ofp-packet_in's generated by flows that the
+         * controller set up.  XXX we should really just rate-limit them
+         * *separately* so that no one can flood the controller this way. */
+        return false;
+    }
+
     if (!rl->n_queued && get_token(rl)) {
         /* In the common case where we are not constrained by the rate limit,
          * let the packet take the normal path. */