summaryrefslogtreecommitdiff
path: root/ofproto
diff options
context:
space:
mode:
authorJarno Rajahalme <jarno@ovn.org>2016-09-15 13:59:52 -0700
committerJarno Rajahalme <jarno@ovn.org>2016-09-15 13:59:52 -0700
commit0c78eebea4dd240392567fe9c452d659468f6a6d (patch)
tree7d031a27cd0e38ccb002d4479412de97723ed6e6 /ofproto
parentf069903d28eeb3067ad3842cf0095a3692a5eb61 (diff)
downloadopenvswitch-0c78eebea4dd240392567fe9c452d659468f6a6d.tar.gz
ofproto: Remove double reporting from bundles.
Patch b0d38b2f17 unified flow mod reporting in ofproto for both stand-alone flow mods and bundle flow mods, but left bundle-specific reporting to the bundle removal code. This patch fixes this by removing the bundle-specific reporting of flow mods. Found by inspection. Fixes: b0d38b2f17 ("ofproto: Report flow mods also from bundles.") Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r--ofproto/bundles.c20
-rw-r--r--ofproto/bundles.h2
-rw-r--r--ofproto/connmgr.c4
-rw-r--r--ofproto/ofproto.c2
4 files changed, 11 insertions, 17 deletions
diff --git a/ofproto/bundles.c b/ofproto/bundles.c
index e0b4b7d1f..24ea1ae7a 100644
--- a/ofproto/bundles.c
+++ b/ofproto/bundles.c
@@ -62,16 +62,11 @@ ofp_bundle_create(uint32_t id, uint16_t flags, const struct ofp_header *oh)
}
void
-ofp_bundle_remove__(struct ofconn *ofconn, struct ofp_bundle *bundle,
- bool success)
+ofp_bundle_remove__(struct ofconn *ofconn, struct ofp_bundle *bundle)
{
struct ofp_bundle_entry *msg;
LIST_FOR_EACH_POP (msg, node, &bundle->msg_list) {
- if (success && msg->type == OFPTYPE_FLOW_MOD) {
- /* Tell connmgr about successful flow mods. */
- ofconn_report_flow_mod(ofconn, msg->ofm.command);
- }
ofp_bundle_entry_free(msg);
}
@@ -90,7 +85,7 @@ ofp_bundle_open(struct ofconn *ofconn, uint32_t id, uint16_t flags,
if (bundle) {
VLOG_INFO("Bundle %x already exists.", id);
- ofp_bundle_remove__(ofconn, bundle, false);
+ ofp_bundle_remove__(ofconn, bundle);
return OFPERR_OFPBFC_BAD_ID;
}
@@ -116,12 +111,12 @@ ofp_bundle_close(struct ofconn *ofconn, uint32_t id, uint16_t flags)
}
if (bundle->state == BS_CLOSED) {
- ofp_bundle_remove__(ofconn, bundle, false);
+ ofp_bundle_remove__(ofconn, bundle);
return OFPERR_OFPBFC_BUNDLE_CLOSED;
}
if (bundle->flags != flags) {
- ofp_bundle_remove__(ofconn, bundle, false);
+ ofp_bundle_remove__(ofconn, bundle);
return OFPERR_OFPBFC_BAD_FLAGS;
}
@@ -141,8 +136,7 @@ ofp_bundle_discard(struct ofconn *ofconn, uint32_t id)
return OFPERR_OFPBFC_BAD_ID;
}
- ofp_bundle_remove__(ofconn, bundle, false);
-
+ ofp_bundle_remove__(ofconn, bundle);
return 0;
}
@@ -165,10 +159,10 @@ ofp_bundle_add_message(struct ofconn *ofconn, uint32_t id, uint16_t flags,
return error;
}
} else if (bundle->state == BS_CLOSED) {
- ofp_bundle_remove__(ofconn, bundle, false);
+ ofp_bundle_remove__(ofconn, bundle);
return OFPERR_OFPBFC_BUNDLE_CLOSED;
} else if (flags != bundle->flags) {
- ofp_bundle_remove__(ofconn, bundle, false);
+ ofp_bundle_remove__(ofconn, bundle);
return OFPERR_OFPBFC_BAD_FLAGS;
}
diff --git a/ofproto/bundles.h b/ofproto/bundles.h
index 1818b161d..dd64700aa 100644
--- a/ofproto/bundles.h
+++ b/ofproto/bundles.h
@@ -83,7 +83,7 @@ enum ofperr ofp_bundle_add_message(struct ofconn *, uint32_t id,
uint16_t flags, struct ofp_bundle_entry *,
const struct ofp_header *);
-void ofp_bundle_remove__(struct ofconn *, struct ofp_bundle *, bool success);
+void ofp_bundle_remove__(struct ofconn *, struct ofp_bundle *);
static inline struct ofp_bundle_entry *
ofp_bundle_entry_alloc(enum ofptype type, const struct ofp_header *oh)
diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c
index 637724541..4b927d64b 100644
--- a/ofproto/connmgr.c
+++ b/ofproto/connmgr.c
@@ -1234,7 +1234,7 @@ bundle_remove_all(struct ofconn *ofconn)
struct ofp_bundle *b, *next;
HMAP_FOR_EACH_SAFE (b, next, node, &ofconn->bundles) {
- ofp_bundle_remove__(ofconn, b, false);
+ ofp_bundle_remove__(ofconn, b);
}
}
@@ -1247,7 +1247,7 @@ bundle_remove_expired(struct ofconn *ofconn, long long int now)
HMAP_FOR_EACH_SAFE (b, next, node, &ofconn->bundles) {
if (b->used <= limit) {
ofconn_send_error(ofconn, &b->ofp_msg, OFPERR_OFPBFC_TIMEOUT);
- ofp_bundle_remove__(ofconn, b, false);
+ ofp_bundle_remove__(ofconn, b);
}
}
}
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 90b1ffab0..f89f0ef04 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -7590,7 +7590,7 @@ do_bundle_commit(struct ofconn *ofconn, uint32_t id, uint16_t flags)
}
/* The bundle is discarded regardless the outcome. */
- ofp_bundle_remove__(ofconn, bundle, !error);
+ ofp_bundle_remove__(ofconn, bundle);
return error;
}