Blob Blame History Raw
From 96f740501f7eb026f9fbbf7de921c28dca2c9693 Mon Sep 17 00:00:00 2001
From: Dumitru Ceara <dceara@redhat.com>
Date: Tue, 24 Mar 2020 20:37:17 +0100
Subject: [PATCH 2/2] ovn.at: Fix ARP test that fails due to timing.

The test for "ARP/ND request broadcast limiting" checks that injected
ARP packets are not flooded using the MC_FLOOD multicast group. However,
this introduces a race condition in the test because GARPs generated by
OVN would also hit the same openflow rules.

Remove the checks that use the MC_FLOOD group. They are also redundant
as the rest of the test checks that packets are forwarded according to
the newly added, higher priority rules.

Fixes: 32f5ebb06226 ("ovn-northd: Limit ARP/ND broadcast domain whenever possible.")
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
(cherry picked from upstream commit 598a07cd240d7d01de3d7f04ca7abc58a33977a1)

Change-Id: Ie526595b017bcfcc4744a014f19db351d98ee658
---
 tests/ovn.at | 33 ---------------------------------
 1 file changed, 33 deletions(-)

diff --git a/tests/ovn.at b/tests/ovn.at
index 551c399..72f4ebd 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -15943,9 +15943,6 @@ r1_dp_key=$(ovn-sbctl --bare --columns tunnel_key list datapath_binding rtr1)
 r1_tnl_key=$(ovn-sbctl --bare --columns tunnel_key list port_binding sw-rtr1)
 r2_tnl_key=$(ovn-sbctl --bare --columns tunnel_key list port_binding sw-rtr2)
 
-mc_key=$(ovn-sbctl --bare --columns tunnel_key find multicast_group datapath=${sw_dp_uuid} name="_MC_flood")
-mc_key=$(printf "%04x" $mc_key)
-
 match_sw_metadata="metadata=0x${sw_dp_key}"
 match_r1_metadata="metadata=0x${r1_dp_key}"
 
@@ -15970,11 +15967,6 @@ OVS_WAIT_UNTIL([
     grep n_packets=1 -c)
     test "0" = "${pkts_to_rtr2}"
 ])
-OVS_WAIT_UNTIL([
-    pkts_flooded=$(ovs-ofctl dump-flows br-int | \
-    grep -E "${match_sw_metadata}" | grep ${mc_key} | grep -v n_packets=0 -c)
-    test "0" = "${pkts_flooded}"
-])
 
 # Inject ND_NS for ofirst router owned IP address.
 src_ipv6=00100000000000000000000000000254
@@ -15997,11 +15989,6 @@ OVS_WAIT_UNTIL([
     grep n_packets=1 -c)
     test "0" = "${pkts_to_rtr2}"
 ])
-OVS_WAIT_UNTIL([
-    pkts_flooded=$(ovs-ofctl dump-flows br-int | \
-    grep -E "${match_sw_metadata}" | grep ${mc_key} | grep -v n_packets=0 -c)
-    test "0" = "${pkts_flooded}"
-])
 
 # Configure load balancing on both routers.
 ovn-nbctl lb-add lb1-v4 10.0.0.11 42.42.42.1
@@ -16036,11 +16023,6 @@ OVS_WAIT_UNTIL([
     grep n_packets=1 -c)
     test "0" = "${pkts_to_rtr2}"
 ])
-OVS_WAIT_UNTIL([
-    pkts_flooded=$(ovs-ofctl dump-flows br-int | \
-    grep -E "${match_sw_metadata}" | grep ${mc_key} | grep -v n_packets=0 -c)
-    test "0" = "${pkts_flooded}"
-])
 
 # Inject ND_NS for first router owned VIP address.
 src_ipv6=00100000000000000000000000000254
@@ -16063,11 +16045,6 @@ OVS_WAIT_UNTIL([
     grep n_packets=1 -c)
     test "0" = "${pkts_to_rtr2}"
 ])
-OVS_WAIT_UNTIL([
-    pkts_flooded=$(ovs-ofctl dump-flows br-int | \
-    grep -E "${match_sw_metadata}" | grep ${mc_key} | grep -v n_packets=0 -c)
-    test "0" = "${pkts_flooded}"
-])
 
 # Configure NAT on both routers.
 ovn-nbctl lr-nat-add rtr1 dnat_and_snat 10.0.0.111 42.42.42.1
@@ -16103,11 +16080,6 @@ OVS_WAIT_UNTIL([
     grep n_packets=1 -c)
     test "0" = "${pkts_to_rtr2}"
 ])
-OVS_WAIT_UNTIL([
-    pkts_flooded=$(ovs-ofctl dump-flows br-int | \
-    grep -E "${match_sw_metadata}" | grep ${mc_key} | grep -v n_packets=0 -c)
-    test "0" = "${pkts_flooded}"
-])
 
 # Inject ARP request for FIP1.
 send_arp_request 1 0 ${src_mac} $(ip_to_hex 10 0 0 254) $(ip_to_hex 10 0 0 121)
@@ -16170,11 +16142,6 @@ OVS_WAIT_UNTIL([
     grep n_packets=1 -c)
     test "0" = "${pkts_to_rtr2}"
 ])
-OVS_WAIT_UNTIL([
-    pkts_flooded=$(ovs-ofctl dump-flows br-int | \
-    grep -E "${match_sw_metadata}" | grep ${mc_key} | grep -v n_packets=0 -c)
-    test "0" = "${pkts_flooded}"
-])
 
 # Inject ND_NS for FIP1.
 src_ipv6=00100000000000000000000000000254
-- 
1.8.3.1