Skip to content

Commit

Permalink
controller: Make sure the meter and group tables are initialized.
Browse files Browse the repository at this point in the history
When the feature detection was done in two calls, the second call
might have returned false because flag wasn't updated. That would
prevent the tables from being updated, because at that time
ovs_feature_set_discovered() returned false. Remove the check
for full discovery to prevent that issue, at the same time it wasn't
needed anyway, the table would be updated only if the maximum number
of groups/meters would change during the update.

Signed-off-by: Ales Musil <amusil@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
(cherry picked from commit 74d5134)
  • Loading branch information
almusil authored and dceara committed Aug 12, 2024
1 parent 6c74ef6 commit 9ef4b9e
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions controller/ovn-controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -5501,17 +5501,14 @@ main(int argc, char *argv[])
br_int_remote.probe_interval)) {
VLOG_INFO("OVS feature set changed, force recompute.");
engine_set_force_recompute(true);
if (ovs_feature_set_discovered()) {
uint32_t max_groups = ovs_feature_max_select_groups_get();
uint32_t max_meters = ovs_feature_max_meters_get();
struct ed_type_lflow_output *lflow_out_data =
engine_get_internal_data(&en_lflow_output);

ovn_extend_table_reinit(&lflow_out_data->group_table,
max_groups);
ovn_extend_table_reinit(&lflow_out_data->meter_table,
max_meters);
}

struct ed_type_lflow_output *lflow_out_data =
engine_get_internal_data(&en_lflow_output);

ovn_extend_table_reinit(&lflow_out_data->group_table,
ovs_feature_max_select_groups_get());
ovn_extend_table_reinit(&lflow_out_data->meter_table,
ovs_feature_max_meters_get());
}

if (br_int) {
Expand Down

0 comments on commit 9ef4b9e

Please sign in to comment.