It's not actually useful, since it's not used in the unit tests, but it makes implementing an upcoming feature harder.
Signed-off-by: Ben Pfaff <b...@nicira.com> --- ofproto/ofproto-dpif.c | 63 +----------------------------------------------- 1 files changed, 1 insertions(+), 62 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index d727781..2840123 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -460,11 +460,6 @@ static void port_wait(struct ofport_dpif *); static int set_cfm(struct ofport *, const struct cfm_settings *); static void ofport_clear_priorities(struct ofport_dpif *); -struct dpif_completion { - struct list list_node; - struct ofoperation *op; -}; - /* Extra information about a classifier table. * Currently used just for optimized flow revalidation. */ struct table_dpif { @@ -506,8 +501,6 @@ struct ofproto_dpif { struct tag_set revalidate_set; /* 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. */ @@ -521,10 +514,6 @@ struct ofproto_dpif { struct hmap vlandev_map; /* vlandev -> (realdev,vid). */ }; -/* Defer flow mod completion until "ovs-appctl ofproto/unclog"? (Useful only - * for debugging the asynchronous flow_mod implementation.) */ -static bool clogged; - /* All existing ofproto_dpif instances, indexed by ->up.name. */ static struct hmap all_ofproto_dpifs = HMAP_INITIALIZER(&all_ofproto_dpifs); @@ -664,8 +653,6 @@ construct(struct ofproto *ofproto_) ofproto->need_revalidate = false; tag_set_init(&ofproto->revalidate_set); - list_init(&ofproto->completions); - ofproto_dpif_unixctl_init(); ofproto->has_bundle_action = false; @@ -683,18 +670,6 @@ construct(struct ofproto *ofproto_) } static void -complete_operations(struct ofproto_dpif *ofproto) -{ - struct dpif_completion *c, *next; - - LIST_FOR_EACH_SAFE (c, next, list_node, &ofproto->completions) { - ofoperation_complete(c->op, 0); - list_remove(&c->list_node); - free(c); - } -} - -static void destruct(struct ofproto *ofproto_) { struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofproto_); @@ -703,7 +678,6 @@ destruct(struct ofproto *ofproto_) int i; hmap_remove(&all_ofproto_dpifs, &ofproto->all_ofproto_dpifs_node); - complete_operations(ofproto); OFPROTO_FOR_EACH_TABLE (table, &ofproto->up) { struct cls_cursor cursor; @@ -766,9 +740,6 @@ run(struct ofproto *ofproto_) struct ofbundle *bundle; int error; - if (!clogged) { - complete_operations(ofproto); - } dpif_run(ofproto->dpif); error = run_fast(ofproto_); @@ -829,10 +800,6 @@ wait(struct ofproto *ofproto_) struct ofport_dpif *ofport; struct ofbundle *bundle; - if (!clogged && !list_is_empty(&ofproto->completions)) { - poll_immediate_wake(); - } - dpif_wait(ofproto->dpif); dpif_recv_wait(ofproto->dpif); if (ofproto->sflow) { @@ -3843,16 +3810,8 @@ rule_dpif_lookup(struct ofproto_dpif *ofproto, const struct flow *flow, static void complete_operation(struct rule_dpif *rule) { - struct ofproto_dpif *ofproto = ofproto_dpif_cast(rule->up.ofproto); - rule_invalidate(rule); - if (clogged) { - struct dpif_completion *c = xmalloc(sizeof *c); - c->op = rule->up.pending; - list_push_back(&ofproto->completions, &c->list_node); - } else { - ofoperation_complete(rule->up.pending, 0); - } + ofoperation_complete(rule->up.pending, 0); } static struct rule * @@ -5801,22 +5760,6 @@ exit: } static void -ofproto_dpif_clog(struct unixctl_conn *conn OVS_UNUSED, int argc OVS_UNUSED, - const char *argv[] OVS_UNUSED, void *aux OVS_UNUSED) -{ - clogged = true; - unixctl_command_reply(conn, 200, NULL); -} - -static void -ofproto_dpif_unclog(struct unixctl_conn *conn OVS_UNUSED, int argc OVS_UNUSED, - const char *argv[] OVS_UNUSED, void *aux OVS_UNUSED) -{ - clogged = false; - unixctl_command_reply(conn, 200, NULL); -} - -static void ofproto_dpif_unixctl_init(void) { static bool registered; @@ -5833,10 +5776,6 @@ ofproto_dpif_unixctl_init(void) ofproto_unixctl_fdb_flush, NULL); unixctl_command_register("fdb/show", "bridge", 1, 1, ofproto_unixctl_fdb_show, NULL); - unixctl_command_register("ofproto/clog", "", 0, 0, - ofproto_dpif_clog, NULL); - unixctl_command_register("ofproto/unclog", "", 0, 0, - ofproto_dpif_unclog, NULL); } /* Linux VLAN device support (e.g. "eth0.10" for VLAN 10.) -- 1.7.2.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev