ofproto-dpif: Remove 'has_bundle_action'.
authorEthan Jackson <ethan@nicira.com>
Sat, 22 Jun 2013 20:21:39 +0000 (13:21 -0700)
committerEthan Jackson <ethan@nicira.com>
Fri, 28 Jun 2013 01:23:40 +0000 (18:23 -0700)
It requires ofproto-dpif-xlate to poke into 'struct ofproto-dpif'
which won't be allowed in future patches.  It's also a case of
premature optimization.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif.c
ofproto/ofproto-dpif.h

index d77e4df..7cd889a 100644 (file)
@@ -1691,7 +1691,6 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len,
             break;
 
         case OFPACT_BUNDLE:
-            ctx->ofproto->has_bundle_action = true;
             xlate_bundle_action(ctx, ofpact_get_BUNDLE(a));
             break;
 
index b3b38ae..b6c1c83 100644 (file)
@@ -1045,8 +1045,6 @@ construct(struct ofproto *ofproto_)
     ofproto_dpif_unixctl_init();
 
     ofproto->has_mirrors = false;
-    ofproto->has_bundle_action = false;
-
     hmap_init(&ofproto->vlandev_map);
     hmap_init(&ofproto->realdev_vid_map);
 
@@ -2956,10 +2954,7 @@ port_run(struct ofport_dpif *ofport)
 
     if (ofport->may_enable != enable) {
         struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofport->up.ofproto);
-
-        if (ofproto->has_bundle_action) {
-            ofproto->backer->need_revalidate = REV_PORT_TOGGLED;
-        }
+        ofproto->backer->need_revalidate = REV_PORT_TOGGLED;
     }
 
     ofport->may_enable = enable;
index b9f5eab..511184a 100644 (file)
@@ -100,7 +100,6 @@ struct ofproto_dpif {
     /* Support for debugging async flow mods. */
     struct list completions;
 
-    bool has_bundle_action; /* True when the first bundle action appears. */
     struct netdev_stats stats; /* To account packets generated and consumed in
                                 * userspace. */