X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=vswitchd%2Fbridge.c;h=3356a049673c363caaa142607f26dc45cefe57a8;hb=11a574a737fa506c8e66c7bd42fa3186e70c286f;hp=f7ed68a6692267b2a36790c2566137ca13b808ae;hpb=e8f2a2a2fa62fcab47f7f9691e2fd64690d9e950;p=openvswitch diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index f7ed68a6..3356a049 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2078,8 +2078,17 @@ refresh_instant_stats(void) void bridge_run_fast(void) { + struct sset types; + const char *type; struct bridge *br; + sset_init(&types); + ofproto_enumerate_types(&types); + SSET_FOR_EACH (type, &types) { + ofproto_type_run_fast(type); + } + sset_destroy(&types); + HMAP_FOR_EACH (br, node, &all_bridges) { ofproto_run_fast(br->ofproto); } @@ -2091,6 +2100,8 @@ bridge_run(void) static const struct ovsrec_open_vswitch null_cfg; const struct ovsrec_open_vswitch *cfg; struct ovsdb_idl_txn *reconf_txn = NULL; + struct sset types; + const char *type; bool vlan_splinters_changed; struct bridge *br; @@ -2124,6 +2135,14 @@ bridge_run(void) * returns immediately. */ bridge_init_ofproto(cfg); + /* Let each datapath type do the work that it needs to do. */ + sset_init(&types); + ofproto_enumerate_types(&types); + SSET_FOR_EACH (type, &types) { + ofproto_type_run(type); + } + sset_destroy(&types); + /* Let each bridge do the work that it needs to do. */ HMAP_FOR_EACH (br, node, &all_bridges) { ofproto_run(br->ofproto); @@ -2226,12 +2245,22 @@ bridge_run(void) void bridge_wait(void) { + struct sset types; + const char *type; + ovsdb_idl_wait(idl); if (reconfiguring) { poll_immediate_wake(); } + sset_init(&types); + ofproto_enumerate_types(&types); + SSET_FOR_EACH (type, &types) { + ofproto_type_wait(type); + } + sset_destroy(&types); + if (!hmap_is_empty(&all_bridges)) { struct bridge *br;