From: Numan Siddique <[email protected]>

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 <[email protected]>
---
 ovn/controller/binding.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

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;
         }
-- 
2.21.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to