projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofproto: Add type "run", "run_fast", and "wait" provider methods.
[openvswitch]
/
vswitchd
/
bridge.c
diff --git
a/vswitchd/bridge.c
b/vswitchd/bridge.c
index f7ed68a6692267b2a36790c2566137ca13b808ae..3356a049673c363caaa142607f26dc45cefe57a8 100644
(file)
--- a/
vswitchd/bridge.c
+++ b/
vswitchd/bridge.c
@@
-2078,8
+2078,17
@@
refresh_instant_stats(void)
void
bridge_run_fast(void)
{
void
bridge_run_fast(void)
{
+ struct sset types;
+ const char *type;
struct bridge *br;
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);
}
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;
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;
bool vlan_splinters_changed;
struct bridge *br;
@@
-2124,6
+2135,14
@@
bridge_run(void)
* returns immediately. */
bridge_init_ofproto(cfg);
* 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);
/* 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)
{
void
bridge_wait(void)
{
+ struct sset types;
+ const char *type;
+
ovsdb_idl_wait(idl);
if (reconfiguring) {
poll_immediate_wake();
}
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;
if (!hmap_is_empty(&all_bridges)) {
struct bridge *br;