diff mbox series

[ovs-dev,v2,10/10] ovn-northd-ddlog: Avoid unnecessary joins for SwitchPortARPForwards.

Message ID 20210907224516.489604-11-blp@ovn.org
State Accepted
Headers show
Series 3x performance improvement for ddlog with load balancer benchmark | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed

Commit Message

Ben Pfaff Sept. 7, 2021, 10:45 p.m. UTC
SwitchPortARPForwards already has all the necessary data in it and joining
with SwitchPort just wastes time.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 northd/ovn_northd.dl | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/northd/ovn_northd.dl b/northd/ovn_northd.dl
index 573c2b392..201c08a24 100644
--- a/northd/ovn_northd.dl
+++ b/northd/ovn_northd.dl
@@ -4612,8 +4612,7 @@  Flow(.logical_datapath = sw._uuid,
      .io_port          = None,
      .controller_meter = None) :-
     var mc_flood_l2 = json_escape(mC_FLOOD_L2().0),
-    sp in &SwitchPort(.sw = sw, .peer = Some{rp@&RouterPort{.enabled = true}}),
-    &SwitchPortARPForwards(.port = sp, .reachable_ips_v4 = ips_v4),
+    &SwitchPortARPForwards(.port = sp@&SwitchPort{.sw = sw}, .reachable_ips_v4 = ips_v4),
     var ipv4 = FlatMap(ips_v4).
 Flow(.logical_datapath = sw._uuid,
      .stage            = s_SWITCH_IN_L2_LKUP(),
@@ -4629,8 +4628,7 @@  Flow(.logical_datapath = sw._uuid,
      .io_port          = None,
      .controller_meter = None) :-
     var mc_flood_l2 = json_escape(mC_FLOOD_L2().0),
-    sp in &SwitchPort(.sw = sw, .peer = Some{rp@&RouterPort{.enabled = true}}),
-    &SwitchPortARPForwards(.port = sp, .reachable_ips_v6 = ips_v6),
+    &SwitchPortARPForwards(.port = sp@&SwitchPort{.sw = sw}, .reachable_ips_v6 = ips_v6),
     var ipv6 = FlatMap(ips_v6).
 
 Flow(.logical_datapath = sw._uuid,
@@ -4642,8 +4640,7 @@  Flow(.logical_datapath = sw._uuid,
      .io_port          = None,
      .controller_meter = None) :-
     var actions = i"outport = ${json_escape(mC_FLOOD().0)}; output;",
-    sp in &SwitchPort(.sw = sw, .peer = Some{rp@&RouterPort{.enabled = true}}),
-    &SwitchPortARPForwards(.port = sp, .unreachable_ips_v4 = ips_v4),
+    &SwitchPortARPForwards(.port = sp@&SwitchPort{.sw = sw}, .unreachable_ips_v4 = ips_v4),
     var ipv4 = FlatMap(ips_v4).
 Flow(.logical_datapath = sw._uuid,
      .stage            = s_SWITCH_IN_L2_LKUP(),
@@ -4654,8 +4651,7 @@  Flow(.logical_datapath = sw._uuid,
      .io_port          = None,
      .controller_meter = None) :-
     var actions = i"outport = ${json_escape(mC_FLOOD().0)}; output;",
-    sp in &SwitchPort(.sw = sw, .peer = Some{rp@&RouterPort{.enabled = true}}),
-    &SwitchPortARPForwards(.port = sp, .unreachable_ips_v6 = ips_v6),
+    &SwitchPortARPForwards(.port = sp@&SwitchPort{.sw = sw}, .unreachable_ips_v6 = ips_v6),
     var ipv6 = FlatMap(ips_v6).
 
 for (SwitchPortNewDynamicAddress(.port = &SwitchPort{.lsp = lsp, .json_name = json_name, .sw = sw},