L2: BM traffic does not use UU-FWD (VPP-1445) 27/15227/2
authorNeale Ranns <nranns@cisco.com>
Wed, 10 Oct 2018 15:55:01 +0000 (15:55 +0000)
committerJohn Lo <loj@cisco.com>
Thu, 11 Oct 2018 13:36:43 +0000 (13:36 +0000)
Change-Id: I5495c37da2fb8ff48c4af14ccba021d64eac52b6
Signed-off-by: Neale Ranns <nranns@cisco.com>
src/vnet/l2/l2_input.c
test/test_l2_flood.py

index f94ef66..c4f6d6f 100644 (file)
@@ -177,7 +177,8 @@ classify_and_dispatch (l2input_main_t * msm, vlib_buffer_t * b0, u32 * next0)
 
       /* Disable bridge forwarding (flooding will execute instead if not xconnect) */
       feat_mask &= ~(L2INPUT_FEAT_FWD |
-                    L2INPUT_FEAT_UU_FLOOD | L2INPUT_FEAT_GBP_FWD);
+                    L2INPUT_FEAT_UU_FLOOD |
+                    L2INPUT_FEAT_UU_FWD | L2INPUT_FEAT_GBP_FWD);
 
       /* Disable ARP-term for non-ARP and non-ICMP6 packet */
       if (ethertype != ETHERNET_TYPE_ARP &&
index 8b8a3f0..5a2694c 100644 (file)
@@ -192,13 +192,18 @@ class TestL2Flood(VppTestCase):
             self.vapi.sw_interface_set_l2_bridge(i.sw_if_index, 1, 0)
 
         #
-        # an unknown unicast packet
+        # an unknown unicast and braodcast packets
         #
         p_uu = (Ether(dst="00:00:00:c1:5c:00",
                       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))
+        p_bm = (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, expected copies on pg1->4
@@ -207,6 +212,13 @@ class TestL2Flood(VppTestCase):
         self.pg_enable_capture(self.pg_interfaces)
         self.pg_start()
 
+        for i in self.pg_interfaces[1:4]:
+            rx0 = i.get_capture(65, timeout=1)
+
+        self.pg0.add_stream(p_bm*65)
+        self.pg_enable_capture(self.pg_interfaces)
+        self.pg_start()
+
         for i in self.pg_interfaces[1:4]:
             rx0 = i.get_capture(65, timeout=1)
 
@@ -228,6 +240,13 @@ class TestL2Flood(VppTestCase):
         for i in self.pg_interfaces[0:4]:
             i.assert_nothing_captured(remark="UU not flooded")
 
+        self.pg0.add_stream(p_bm*65)
+        self.pg_enable_capture(self.pg_interfaces)
+        self.pg_start()
+
+        for i in self.pg_interfaces[1:4]:
+            rx0 = i.get_capture(65, timeout=1)
+
         #
         # remove the uu-fwd interface and expect UU to be flooded again
         #