diff mbox series

[ovs-dev,v4] ovn-controller: Omit tracking external_ids columns

Message ID 20190628104404.28887-1-nusiddiq@redhat.com
State Accepted
Headers show
Series [ovs-dev,v4] ovn-controller: Omit tracking external_ids columns | expand

Commit Message

Numan Siddique June 28, 2019, 10:44 a.m. UTC
From: Numan Siddique <nusiddiq@redhat.com>

Running the command "ovn-nbctl set logical_switch_port foo external_ids:foo=bar"
results in the incremetal processing engine to recompute the flows on the
chassis where the logical port 'foo' is claimed.

This patch avoids this unnecessary recomputation by omitting the tracking of
external_ids column of all the Southbound DB tables except DNS, Chassis
and Datapath_Binding tables. ovn-controller is refering to the external_ids
column of these tables.

Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
---

v3 -> v4
-------
  * Using 'ovsdb_idl_omit' as suggested by Ben.
    Also omitting external_ids column for most of the SB tables.

v2 -> v3
------
  * Based on the review comments from Han, dropped p2 and p3 from the series.

 ovn/controller/ovn-controller.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Ben Pfaff July 5, 2019, 6:24 p.m. UTC | #1
On Fri, Jun 28, 2019 at 04:14:04PM +0530, nusiddiq@redhat.com wrote:
> From: Numan Siddique <nusiddiq@redhat.com>
> 
> Running the command "ovn-nbctl set logical_switch_port foo external_ids:foo=bar"
> results in the incremetal processing engine to recompute the flows on the
> chassis where the logical port 'foo' is claimed.
> 
> This patch avoids this unnecessary recomputation by omitting the tracking of
> external_ids column of all the Southbound DB tables except DNS, Chassis
> and Datapath_Binding tables. ovn-controller is refering to the external_ids
> column of these tables.
> 
> Signed-off-by: Numan Siddique <nusiddiq@redhat.com>

Thanks, applied to master.
Numan Siddique July 5, 2019, 6:47 p.m. UTC | #2
On Fri, Jul 5, 2019 at 11:55 PM Ben Pfaff <blp@ovn.org> wrote:

> On Fri, Jun 28, 2019 at 04:14:04PM +0530, nusiddiq@redhat.com wrote:
> > From: Numan Siddique <nusiddiq@redhat.com>
> >
> > Running the command "ovn-nbctl set logical_switch_port foo
> external_ids:foo=bar"
> > results in the incremetal processing engine to recompute the flows on the
> > chassis where the logical port 'foo' is claimed.
> >
> > This patch avoids this unnecessary recomputation by omitting the
> tracking of
> > external_ids column of all the Southbound DB tables except DNS, Chassis
> > and Datapath_Binding tables. ovn-controller is refering to the
> external_ids
> > column of these tables.
> >
> > Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
>
> Thanks, applied to master.
>

Thanks for the review and applying the patch.

Numan
diff mbox series

Patch

diff --git a/ovn/controller/ovn-controller.c b/ovn/controller/ovn-controller.c
index 60190161f..7fb322ed1 100644
--- a/ovn/controller/ovn-controller.c
+++ b/ovn/controller/ovn-controller.c
@@ -1732,6 +1732,30 @@  main(int argc, char *argv[])
 
     ovsdb_idl_track_add_all(ovnsb_idl_loop.idl);
     ovsdb_idl_omit_alert(ovnsb_idl_loop.idl, &sbrec_chassis_col_nb_cfg);
+
+    /* Omit the external_ids column of all the tables except for -
+     *  - DNS. pinctrl.c uses the external_ids column of DNS,
+     *    which it shouldn't. This should be removed.
+     *
+     *  - Chassis - chassis.c copies the chassis configuration from
+     *              local open_vswitch table to the external_ids of
+     *              chassis.
+     *
+     *  - Datapath_binding - lflow.c is using this to check if the datapath
+     *                       is switch or not. This should be removed.
+     * */
+
+    ovsdb_idl_omit(ovnsb_idl_loop.idl, &sbrec_sb_global_col_external_ids);
+    ovsdb_idl_omit(ovnsb_idl_loop.idl, &sbrec_logical_flow_col_external_ids);
+    ovsdb_idl_omit(ovnsb_idl_loop.idl, &sbrec_port_binding_col_external_ids);
+    ovsdb_idl_omit(ovnsb_idl_loop.idl, &sbrec_connection_col_external_ids);
+    ovsdb_idl_omit(ovnsb_idl_loop.idl, &sbrec_ssl_col_external_ids);
+    ovsdb_idl_omit(ovnsb_idl_loop.idl,
+                   &sbrec_gateway_chassis_col_external_ids);
+    ovsdb_idl_omit(ovnsb_idl_loop.idl, &sbrec_ha_chassis_col_external_ids);
+    ovsdb_idl_omit(ovnsb_idl_loop.idl,
+                   &sbrec_ha_chassis_group_col_external_ids);
+
     update_sb_monitors(ovnsb_idl_loop.idl, NULL, NULL, NULL);
 
     stopwatch_create(CONTROLLER_LOOP_STOPWATCH_NAME, SW_MS);