Skip to content

Commit

Permalink
ovn-controller: Add monitor condition for FDB.
Browse files Browse the repository at this point in the history
Use conditional monitor for the FDB for local datapaths.

Fixes: 6ec3b12 ("MAC learning: Add a new FDB table in southbound db.")
Signed-off-by: Han Zhou <hzhou@ovn.org>
Acked-by: Dumitru Ceara <dceara@redhat.com>
(cherry picked from commit 2b1d8e1)
  • Loading branch information
hzhou8 committed Oct 3, 2023
1 parent 792742e commit bc8276b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions controller/ovn-controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ update_sb_monitors(struct ovsdb_idl *ovnsb_idl,
{
/* Monitor Port_Bindings rows for local interfaces and local datapaths.
*
* Monitor Logical_Flow, MAC_Binding, Multicast_Group, and DNS tables for
* local datapaths.
* Monitor Logical_Flow, MAC_Binding, FDB, Multicast_Group, and DNS tables
* for local datapaths.
*
* Monitor Controller_Event rows for local chassis.
*
Expand All @@ -187,6 +187,7 @@ update_sb_monitors(struct ovsdb_idl *ovnsb_idl,
struct ovsdb_idl_condition lf = OVSDB_IDL_CONDITION_INIT(&lf);
struct ovsdb_idl_condition ldpg = OVSDB_IDL_CONDITION_INIT(&ldpg);
struct ovsdb_idl_condition mb = OVSDB_IDL_CONDITION_INIT(&mb);
struct ovsdb_idl_condition fdb = OVSDB_IDL_CONDITION_INIT(&fdb);
struct ovsdb_idl_condition mg = OVSDB_IDL_CONDITION_INIT(&mg);
struct ovsdb_idl_condition dns = OVSDB_IDL_CONDITION_INIT(&dns);
struct ovsdb_idl_condition ce = OVSDB_IDL_CONDITION_INIT(&ce);
Expand All @@ -204,6 +205,7 @@ update_sb_monitors(struct ovsdb_idl *ovnsb_idl,
ovsdb_idl_condition_add_clause_true(&pb);
ovsdb_idl_condition_add_clause_true(&lf);
ovsdb_idl_condition_add_clause_true(&mb);
ovsdb_idl_condition_add_clause_true(&fdb);
ovsdb_idl_condition_add_clause_true(&mg);
ovsdb_idl_condition_add_clause_true(&dns);
ovsdb_idl_condition_add_clause_true(&ce);
Expand Down Expand Up @@ -278,6 +280,8 @@ update_sb_monitors(struct ovsdb_idl *ovnsb_idl,
sbrec_logical_flow_add_clause_logical_datapath(&lf, OVSDB_F_EQ,
uuid);
sbrec_mac_binding_add_clause_datapath(&mb, OVSDB_F_EQ, uuid);
sbrec_fdb_add_clause_dp_key(&fdb, OVSDB_F_EQ,
ld->datapath->tunnel_key);
sbrec_multicast_group_add_clause_datapath(&mg, OVSDB_F_EQ, uuid);
sbrec_dns_add_clause_datapaths(&dns, OVSDB_F_INCLUDES, &uuid, 1);
sbrec_ip_multicast_add_clause_datapath(&ip_mcast, OVSDB_F_EQ,
Expand All @@ -301,6 +305,7 @@ out:;
sb_table_set_req_mon_condition(ovnsb_idl, logical_flow, &lf),
sb_table_set_req_mon_condition(ovnsb_idl, logical_dp_group, &ldpg),
sb_table_set_req_mon_condition(ovnsb_idl, mac_binding, &mb),
sb_table_set_req_mon_condition(ovnsb_idl, fdb, &fdb),
sb_table_set_req_mon_condition(ovnsb_idl, multicast_group, &mg),
sb_table_set_req_mon_condition(ovnsb_idl, dns, &dns),
sb_table_set_req_mon_condition(ovnsb_idl, controller_event, &ce),
Expand All @@ -318,6 +323,7 @@ out:;
ovsdb_idl_condition_destroy(&lf);
ovsdb_idl_condition_destroy(&ldpg);
ovsdb_idl_condition_destroy(&mb);
ovsdb_idl_condition_destroy(&fdb);
ovsdb_idl_condition_destroy(&mg);
ovsdb_idl_condition_destroy(&dns);
ovsdb_idl_condition_destroy(&ce);
Expand Down

0 comments on commit bc8276b

Please sign in to comment.