diff mbox series

[ovs-dev,3/3] ovn-controller: Consider only port binding changes of normal type for run_time dataengine

Message ID 20190624095356.10639-1-nusiddiq@redhat.com
State Superseded
Headers show
Series [ovs-dev,1/3] ovn-controller: Omit alert for Port_Binding.external_ids changes | expand

Commit Message

Numan Siddique June 24, 2019, 9:53 a.m. UTC
From: Numan Siddique <nusiddiq@redhat.com>

Any changes for Port_Bindings rows of type - "chassisredirect", "patch", "l3gateway" etc
which are not related to the chassis can be ignored in the function
'binding_evaluate_port_binding_changes()'. Presently this returns true and this results
in unnecessary flow computation on a chassis.

Changes to these Port_Bindings (of type != "") will be handled by the engine handler
flow_output_sb_port_binding_handler() for the engine node 'en_sb_port_binding' (which
is input to 'en_flow_output'.

For example, if a chassisredirect port is claimed by a gateway chassis, the compute
nodes only need to update the flow in table 32 in the bundle action. Where as presently
flow computation is triggered and this causes wastage of CPU.

Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
---
 ovn/controller/binding.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Comments

0-day Robot June 24, 2019, 10:04 a.m. UTC | #1
Bleep bloop.  Greetings Numan Siddique, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Line is 92 characters long (recommended limit is 79)
#44 FILE: ovn/controller/binding.c:727:
        if (strcmp(binding_rec->type, "") && strcmp(binding_rec->type, "chassisredirect")) {

Lines checked: 50, Warnings: 1, Errors: 0


Please check this out.  If you feel there has been an error, please email aconole@bytheb.org

Thanks,
0-day Robot
diff mbox series

Patch

diff --git a/ovn/controller/binding.c b/ovn/controller/binding.c
index 87d0b6d88..a7f82d3ce 100644
--- a/ovn/controller/binding.c
+++ b/ovn/controller/binding.c
@@ -715,11 +715,16 @@  binding_evaluate_port_binding_changes(
          * - If a regular VIF is unbound from this chassis, the local ovsdb
          *   interface table will be updated, which will trigger recompute.
          *
-         * - If the port is not a regular VIF, always trigger recompute. */
+         * If the port is not a regular VIF, then ignore it. */
         if (binding_rec->chassis == chassis_rec
             || is_our_chassis(chassis_rec, binding_rec,
-                              active_tunnels, &lport_to_iface, local_lports)
-            || strcmp(binding_rec->type, "")) {
+                              active_tunnels, &lport_to_iface,
+                              local_lports)) {
+            changed = true;
+            break;
+        }
+
+        if (strcmp(binding_rec->type, "") && strcmp(binding_rec->type, "chassisredirect")) {
             changed = true;
             break;
         }