On 6/30/26 3:17 PM, Lorenzo Bianconi wrote:
> Always use sb_table_set_req_mon_condition macro in update_sb_monitors
> routine even for optional tables (e.g. advertised_mac_binding or
> advertised_route) since OvS IDL layer will take care of creating proper
> monitor requests according to the real db schema.

This will only be true after we move submodule to the current ovs/main.
Before that the change is not safe to apply.

> This patch fixes the conditional monitor support for optional tables
> since sb_table_set_opt_mon_condition macro will not properly enable
> conditional monitoring until we run update_sb_monitors() in the
> ovn-controller main loop. As result we will always receive notifications
> for all the columns of optional tables (even if monitor-all is not enabled)
> until we modify a monitor conditions.
> 
> Reported-at: https://issues.redhat.com/browse/FDP-3114
> Signed-off-by: Lorenzo Bianconi <[email protected]>
> ---
>  controller/ovn-controller.c | 41 +++++++++++++++----------------------
>  1 file changed, 16 insertions(+), 25 deletions(-)
> 
> diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
> index 7e6c9e69a..06736395b 100644
> --- a/controller/ovn-controller.c
> +++ b/controller/ovn-controller.c
> @@ -215,15 +215,7 @@ static char *get_file_system_id(void)
>      free(filename);
>      return ret;
>  }
> -/* Only set monitor conditions on tables that are available in the
> - * server schema.
> - */
> -#define sb_table_set_opt_mon_condition(idl, table, cond) \
> -    (sbrec_server_has_##table##_table(idl)               \
> -     ? sbrec_##table##_set_condition(idl, cond)          \
> -     : 0)
>  
> -/* Assume the table exists in the server schema and set its condition. */
>  #define sb_table_set_req_mon_condition(idl, table, cond) \
>      sbrec_##table##_set_condition(idl, cond)

Should this also be removed?

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to