From 83341407560671e7d24491b9b2287ee400040e03 Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Sat, 22 Jun 2013 13:21:39 -0700 Subject: [PATCH] ofproto-dpif: Remove 'has_bundle_action'. 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 Acked-by: Ben Pfaff --- ofproto/ofproto-dpif-xlate.c | 1 - ofproto/ofproto-dpif.c | 7 +------ ofproto/ofproto-dpif.h | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index d77e4df7a..7cd889a87 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -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; diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index b3b38ae0c..b6c1c834c 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -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; diff --git a/ofproto/ofproto-dpif.h b/ofproto/ofproto-dpif.h index b9f5eab45..511184aa4 100644 --- a/ofproto/ofproto-dpif.h +++ b/ofproto/ofproto-dpif.h @@ -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. */ -- 2.43.0