Good catch. Here's an incremental. The real solution to this problem, of course, is to get your worker series reviewed, and move port additions and deletions into it. Also, as you suggested offline, it may make sense to pull sending of CFMs into its own process.
--- ofproto/ofproto-dpif.c | 3 +++ vswitchd/bridge.c | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 77cb826..323d208 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -6083,6 +6083,9 @@ lookup_input_bundle(const struct ofproto_dpif *ofproto, uint16_t in_port, * we don't know about. * * - The ofproto client didn't configure the port as part of a bundle. + * This is particularly likely to happen if a packet was received on the + * port after it was created, but before the client had a chance to + * configure its bundle. */ if (warn) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 149696a..33cef34 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -474,6 +474,10 @@ bridge_reconfigure_ofp(void) struct ofpp_garbage *garbage, *next; LIST_FOR_EACH_SAFE (garbage, next, list_node, &br->ofpp_garbage) { + /* XXX: It's a bit dangerous to call bridge_run_fast() here as + * ofproto's internal datastructures may not be consistent. + * Eventually, when port additions and deletions are cheaper, these + * calls should be removed. */ bridge_run_fast(); ofproto_port_del(br->ofproto, garbage->ofp_port); list_remove(&garbage->list_node); @@ -1331,7 +1335,11 @@ iface_create(struct bridge *br, struct if_cfg *if_cfg, int ofp_port) hmap_remove(&br->if_cfg_todo, &if_cfg->hmap_node); free(if_cfg); - /* Do the bits that can fail up front. */ + /* Do the bits that can fail up front. + * + * XXX: It's a bit dangerous to call bridge_run_fast() here as ofproto's + * internal datastructures may not be consistent. Eventually, when port + * additions and deletions are cheaper, these calls should be removed. */ bridge_run_fast(); assert(!iface_lookup(br, iface_cfg->name)); error = iface_do_create(br, iface_cfg, port_cfg, &ofp_port, &netdev); -- 1.7.10.2 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev