diff mbox series

[ovs-dev,v2,4/5] ovn-controller: Always monitor all logical datapath groups.

Message ID 20210611193530.1114259-5-hzhou@ovn.org
State Superseded
Headers show
Series Fix ovn-controller I-P for multicast groups and lport changes | expand

Commit Message

Han Zhou June 11, 2021, 7:35 p.m. UTC
Always monitor all logical datapath groups. Otherwise, DPG updates may
be received *after* the lflows using it are seen by ovn-controller.
Since the number of DPGs are relatively small, we monitor all DPGs to
avoid the unnecessarily extra control plane round trip for the lflows to
be processed.

Signed-off-by: Han Zhou <hzhou@ovn.org>
---
 controller/ovn-controller.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Dumitru Ceara June 18, 2021, 3:52 p.m. UTC | #1
On 6/11/21 9:35 PM, Han Zhou wrote:
> Always monitor all logical datapath groups. Otherwise, DPG updates may
> be received *after* the lflows using it are seen by ovn-controller.
> Since the number of DPGs are relatively small, we monitor all DPGs to
> avoid the unnecessarily extra control plane round trip for the lflows to
> be processed.
> 
> Signed-off-by: Han Zhou <hzhou@ovn.org>
> ---

Acked-by: Dumitru Ceara <dceara@redhat.com>

Thanks!
diff mbox series

Patch

diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index 31d0df634..c358675ac 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -190,10 +190,15 @@  update_sb_monitors(struct ovsdb_idl *ovnsb_idl,
     struct ovsdb_idl_condition igmp = OVSDB_IDL_CONDITION_INIT(&igmp);
     struct ovsdb_idl_condition chprv = OVSDB_IDL_CONDITION_INIT(&chprv);
 
+    /* Always monitor all logical datapath groups. Otherwise, DPG updates may
+     * be received *after* the lflows using it are seen by ovn-controller.
+     * Since the number of DPGs are relatively small, we monitor all DPGs to
+     * avoid the unnecessarily extra wake-ups of ovn-controller. */
+    ovsdb_idl_condition_add_clause_true(&ldpg);
+
     if (monitor_all) {
         ovsdb_idl_condition_add_clause_true(&pb);
         ovsdb_idl_condition_add_clause_true(&lf);
-        ovsdb_idl_condition_add_clause_true(&ldpg);
         ovsdb_idl_condition_add_clause_true(&mb);
         ovsdb_idl_condition_add_clause_true(&mg);
         ovsdb_idl_condition_add_clause_true(&dns);
@@ -257,8 +262,6 @@  update_sb_monitors(struct ovsdb_idl *ovnsb_idl,
             sbrec_port_binding_add_clause_datapath(&pb, OVSDB_F_EQ, uuid);
             sbrec_logical_flow_add_clause_logical_datapath(&lf, OVSDB_F_EQ,
                                                            uuid);
-            sbrec_logical_dp_group_add_clause_datapaths(
-                &ldpg, OVSDB_F_INCLUDES, &uuid, 1);
             sbrec_mac_binding_add_clause_datapath(&mb, OVSDB_F_EQ, uuid);
             sbrec_multicast_group_add_clause_datapath(&mg, OVSDB_F_EQ, uuid);
             sbrec_dns_add_clause_datapaths(&dns, OVSDB_F_INCLUDES, &uuid, 1);