- self.vapi.sw_interface_set_l2_bridge(self.pg0.sw_if_index, 1,
- enable=0)
- self.vapi.sw_interface_set_l2_bridge(self.pg1.sw_if_index, 1,
- enable=0)
- self.vapi.sw_interface_set_l2_bridge(sub_if_on_pg2.sw_if_index,
- 1, enable=0)
- self.vapi.sw_interface_set_l2_bridge(sub_if_on_pg3.sw_if_index,
- 1, enable=0)
- self.vapi.sw_interface_set_l2_bridge(self.loop0.sw_if_index,
- 1, bvi=1, enable=0)
+ self.vapi.acl_interface_set_acl_list(self.pg1.sw_if_index,
+ 0, [])
+ self.vapi.acl_del(acl.acl_index)
+
+ self.vapi.sw_interface_set_l2_bridge(
+ rx_sw_if_index=self.pg0.sw_if_index, bd_id=1, enable=0)
+ self.vapi.sw_interface_set_l2_bridge(
+ rx_sw_if_index=self.pg1.sw_if_index, bd_id=1, enable=0)
+ self.vapi.sw_interface_set_l2_bridge(
+ rx_sw_if_index=sub_if_on_pg2.sw_if_index, bd_id=1, enable=0)
+ self.vapi.sw_interface_set_l2_bridge(
+ rx_sw_if_index=sub_if_on_pg3.sw_if_index, bd_id=1, enable=0)
+ self.vapi.sw_interface_set_l2_bridge(
+ rx_sw_if_index=self.loop0.sw_if_index, bd_id=1,
+ port_type=L2_PORT_TYPE.BVI, enable=0)
+
+ #
+ # Do a FIB dump to make sure the paths are correctly reported as DVR
+ #
+ routes = self.vapi.ip_fib_dump()
+
+ for r in routes:
+ if (inet_pton(AF_INET, ip_tag_bridged) == r.address):
+ self.assertEqual(r.path[0].sw_if_index,
+ sub_if_on_pg3.sw_if_index)
+ self.assertEqual(r.path[0].is_dvr, 1)
+ if (inet_pton(AF_INET, ip_non_tag_bridged) == r.address):
+ self.assertEqual(r.path[0].sw_if_index,
+ self.pg1.sw_if_index)
+ self.assertEqual(r.path[0].is_dvr, 1)