aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-10-02 07:27:02 -0700
committerMarco Varlese <marco.varlese@suse.de>2018-10-12 07:35:46 +0000
commit9a5f9c9a43ae6057fe760a59d40443a12af37f90 (patch)
tree7a54d4ef075022cd3b1149c97a210315f0ec7513 /test
parent9864f87b1bd410a6ef533f34b571e28500ee80f7 (diff)
L2-flood: no clone for 1 replication
Change-Id: If178dd38e7920f35588f5d821ff097168b078026 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit b9fa29d513bfad0d9f18e8ed8c2da3feaa6d3bf0)
Diffstat (limited to 'test')
-rw-r--r--test/test_l2_flood.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/test_l2_flood.py b/test/test_l2_flood.py
index 50a692e57e8..8b8a3f0f960 100644
--- a/test/test_l2_flood.py
+++ b/test/test_l2_flood.py
@@ -144,6 +144,39 @@ class TestL2Flood(VppTestCase):
self.vapi.bridge_domain_add_del(1, is_add=0)
+ def test_flood_one(self):
+ """ L2 no-Flood Test """
+
+ #
+ # Create a single bridge Domain
+ #
+ self.vapi.bridge_domain_add_del(1)
+
+ #
+ # add 2 interfaces to the BD. this means a flood goes to only
+ # one member
+ #
+ for i in self.pg_interfaces[:2]:
+ self.vapi.sw_interface_set_l2_bridge(i.sw_if_index, 1, 0)
+
+ p = (Ether(dst="ff:ff:ff:ff:ff:ff",
+ src="00:00:de:ad:be:ef") /
+ IP(src="10.10.10.10", dst="1.1.1.1") /
+ UDP(sport=1234, dport=1234) /
+ Raw('\xa5' * 100))
+
+ #
+ # input on pg0 expect copies on pg1
+ #
+ self.send_and_expect(self.pg0, p*65, self.pg1)
+
+ #
+ # cleanup
+ #
+ for i in self.pg_interfaces[:2]:
+ self.vapi.sw_interface_set_l2_bridge(i.sw_if_index, 1, enable=0)
+ self.vapi.bridge_domain_add_del(1, is_add=0)
+
def test_uu_fwd(self):
""" UU Flood """