The new comment reflects with more clarity what ovsdb_idl_add_table() does. Previous comment could be misunderstood, leading to believe that this function replicates all columns on IDL. Hopefully this fix clarifies that columns are not replicated, just minimal data for reference integrity is replicated. A comment in ovsdb_idl_table_class is also modified to better reflect this behaviour.
Signed-off-by: Edward Aymerich <edward.aymer...@hpe.com> --- diff --git a/lib/ovsdb-idl-provider.h b/lib/ovsdb-idl-provider.h index 3dddf69..099535e 100644 --- a/lib/ovsdb-idl-provider.h +++ b/lib/ovsdb-idl-provider.h @@ -61,7 +61,8 @@ struct ovsdb_idl_table_class { struct ovsdb_idl_table { const struct ovsdb_idl_table_class *class; unsigned char *modes; /* OVSDB_IDL_* bitmasks, indexed by column. */ - bool need_table; /* Monitor table even if no columns? */ + bool need_table; /* Monitor table even if no columns are selected + * for replication. */ struct shash columns; /* Contains "const struct ovsdb_idl_column *"s. */ struct hmap rows; /* Contains "struct ovsdb_idl_row"s. */ struct ovsdb_idl *idl; /* Containing idl. */ diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 588582a..8f75bf0 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -557,11 +557,13 @@ ovsdb_idl_add_column(struct ovsdb_idl *idl, } /* Ensures that the table with class 'tc' will be replicated on 'idl' even if - * no columns are selected for replication. This can be useful because it - * allows 'idl' to keep track of what rows in the table actually exist, which - * in turn allows columns that reference the table to have accurate contents. - * (The IDL presents the database with references to rows that do not exist - * removed.) + * no columns are selected for replication. Just the necessary data for table + * references will be replicated (the UUID of the rows, for instance), any + * columns not selected for replication will remain unreplicated. + * This can be useful because it allows 'idl' to keep track of what rows in the + * table actually exist, which in turn allows columns that reference the table + * to have accurate contents. (The IDL presents the database with references to + * rows that do not exist removed.) * * This function is only useful if 'monitor_everything_by_default' was false in * the call to ovsdb_idl_create(). This function should be called between -- 2.4.90 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev