diff --git a/controller/mac-cache.c b/controller/mac-cache.c index 861cfa62ab..d00b571f77 100644 --- a/controller/mac-cache.c +++ b/controller/mac-cache.c @@ -267,22 +267,6 @@ mac_bindings_to_string(const struct hmap *map, struct ds *out_data) } } -bool -sb_mac_binding_updated(const struct sbrec_mac_binding *mb) -{ - bool updated = false; - for (size_t i = 0; i < SBREC_MAC_BINDING_N_COLUMNS; i++) { - /* Ignore timestamp update as this does not affect the existing nodes - * at all. */ - if (i == SBREC_MAC_BINDING_COL_TIMESTAMP) { - continue; - } - updated |= sbrec_mac_binding_is_updated(mb, i); - } - - return updated || sbrec_mac_binding_is_deleted(mb); -} - const struct sbrec_mac_binding * mac_binding_lookup(struct ovsdb_idl_index *sbrec_mac_binding_by_lport_ip, const char *logical_port, const char *ip) { @@ -354,22 +338,6 @@ fdb_find(const struct hmap *map, const struct fdb_data *fdb_data) return NULL; } -bool -sb_fdb_updated(const struct sbrec_fdb *fdb) -{ - bool updated = false; - for (size_t i = 0; i < SBREC_FDB_N_COLUMNS; i++) { - /* Ignore timestamp update as this does not affect the existing nodes - * at all. */ - if (i == SBREC_FDB_COL_TIMESTAMP) { - continue; - } - updated |= sbrec_fdb_is_updated(fdb, i); - } - - return updated || sbrec_fdb_is_deleted(fdb); -} - void fdbs_clear(struct hmap *map) { diff --git a/controller/mac-cache.h b/controller/mac-cache.h index 9c30f7df5d..70fa215257 100644 --- a/controller/mac-cache.h +++ b/controller/mac-cache.h @@ -163,8 +163,6 @@ bool mac_binding_data_from_sbrec(struct mac_binding_data *data, void mac_bindings_clear(struct hmap *map); void mac_bindings_to_string(const struct hmap *map, struct ds *out_data); -bool sb_mac_binding_updated(const struct sbrec_mac_binding *mb); - const struct sbrec_mac_binding * mac_binding_lookup(struct ovsdb_idl_index *sbrec_mac_binding_by_lport_ip, const char *logical_port, const char *ip); @@ -179,8 +177,6 @@ bool fdb_data_from_sbrec(struct fdb_data *data, const struct sbrec_fdb *fdb); struct fdb *fdb_find(const struct hmap *map, const struct fdb_data *fdb_data); -bool sb_fdb_updated(const struct sbrec_fdb *fdb); - void fdbs_clear(struct hmap *map); /* MAC binding stat processing. */ diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c index 3856ae4193..1e6f1e6bc0 100644 --- a/controller/ovn-controller.c +++ b/controller/ovn-controller.c @@ -3163,10 +3163,6 @@ mac_cache_sb_mac_binding_handler(struct engine_node *node, void *data) const struct sbrec_mac_binding *sbrec_mb; SBREC_MAC_BINDING_TABLE_FOR_EACH_TRACKED (sbrec_mb, mb_table) { - if (!sb_mac_binding_updated(sbrec_mb)) { - continue; - } - if (!sbrec_mac_binding_is_new(sbrec_mb)) { mac_binding_remove_sb(cache_data, sbrec_mb); } @@ -3204,10 +3200,6 @@ mac_cache_sb_fdb_handler(struct engine_node *node, void *data) struct local_datapath *local_dp; const struct sbrec_fdb *sbrec_fdb; SBREC_FDB_TABLE_FOR_EACH_TRACKED (sbrec_fdb, fdb_table) { - if (!sb_fdb_updated(sbrec_fdb)) { - continue; - } - if (!sbrec_fdb_is_new(sbrec_fdb)) { fdb_remove_sb(cache_data, sbrec_fdb); } @@ -5034,6 +5026,12 @@ main(int argc, char *argv[]) &sbrec_chassis_private_col_nb_cfg); ovsdb_idl_omit_alert(ovnsb_idl_loop.idl, &sbrec_chassis_private_col_nb_cfg_timestamp); + /* Omit the timestamp columns of the MAC_Binding and FDB tables. + * ovn-controller doesn't need to react to changes in timestamp + * values (it does read them to implement aging). Therefore we + * can disable change tracking and alerting for these columns. */ + ovsdb_idl_omit_alert(ovnsb_idl_loop.idl, &sbrec_mac_binding_col_timestamp); + ovsdb_idl_omit_alert(ovnsb_idl_loop.idl, &sbrec_fdb_col_timestamp); /* Omit the external_ids column of all the tables except for - * - DNS. pinctrl.c uses the external_ids column of DNS,