secchan: Optimize flow expiration when not connected.
authorBen Pfaff <blp@nicira.com>
Mon, 9 Mar 2009 20:50:16 +0000 (13:50 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 9 Mar 2009 22:44:03 +0000 (15:44 -0700)
There is no point in composing a flow-expiration message for an ofconn
whose rconn is not connected.

This optimization might be a win for a standalone vswitch.

secchan/ofproto.c

index fa6b11a58f0ea4fc86fc8c1587b243a31e51f348..9e32d3df3bb3162cc7b13c56edd5fd8749de6e98 100644 (file)
@@ -2566,7 +2566,7 @@ send_flow_exp(struct ofproto *p, struct rule *rule,
 
     prev = NULL;
     LIST_FOR_EACH (ofconn, struct ofconn, node, &p->all_conns) {
-        if (ofconn->send_flow_exp) {
+        if (ofconn->send_flow_exp && rconn_is_connected(ofconn->rconn)) {
             if (prev) {
                 queue_tx(ofpbuf_clone(buf), prev);
             } else {