[ovs-discuss] Number of flow entries with ovs-controller

Ben Pfaff blp at nicira.com
Tue May 31 16:58:21 UTC 2011

On Tue, May 31, 2011 at 02:49:58PM +0500, ahmad numan wrote:
> If ovs-controller is initialized with --with-flows *file* option then how
> many entries can be added in the *file*. In my experimentation the *file *can
> hold only eight entries. beyond this "tx queue overflow" is generated and
> entries remain ineffective. Is it correct or there is some configuration
> issue by my side

This is a bug.  Here is a patch to test.  Can you verify that it works
for you?  If so then I will commit it to master and the 1.1 branch.

--8<--------------------------cut here-------------------------->8--

From: Ben Pfaff <blp at nicira.com>
Date: Tue, 31 May 2011 09:48:13 -0700
Subject: [PATCH] learning-switch: Don't limit message queued by --with-flows.

queue_tx() intentionally limits the number of outstanding OpenFlow messages
queued to the switch.  This was unintentionally being applied to the
messages queued to the switch at startup by ovs-ofctl's --with-flows
command.  This patch should fix the problem, by calling rconn_send()
directly instead of through queue_tx().

Reported-by: ahmad numan <numan252 at gmail.com>
 AUTHORS               |    1 +
 lib/learning-switch.c |    9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index b7f6cf5..b6e7372 100644
@@ -43,6 +43,7 @@ provided helpful bug reports or suggestions.
 Aaron M. Ucko           ucko at debian.org
 Aaron Rosen             arosen at clemson.edu
+Ahmed Bilal             numan252 at gmail.com
 Alex Yip                alex at nicira.com
 Alexey I. Froloff       raorn at altlinux.org
 Bob Ball                bob.ball at citrix.com
diff --git a/lib/learning-switch.c b/lib/learning-switch.c
index 6bd2286..7905e3c 100644
--- a/lib/learning-switch.c
+++ b/lib/learning-switch.c
@@ -131,7 +131,14 @@ lswitch_create(struct rconn *rconn, const struct lswitch_config *cfg)
         const struct ofpbuf *b;
         LIST_FOR_EACH (b, list_node, cfg->default_flows) {
-            queue_tx(sw, rconn, ofpbuf_clone(b));
+            struct ofpbuf *copy = ofpbuf_clone(b);
+            int error = rconn_send(rconn, copy, NULL);
+            if (error) {
+                VLOG_INFO_RL(&rl, "%s: failed to queue default flows (%s)",
+                             rconn_get_name(rconn), strerror(error));
+                ofpbuf_delete(copy);
+                break;
+            }

More information about the discuss mailing list