Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions tests/acl/test_acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ def setup(duthosts, ptfhost, rand_selected_dut, rand_selected_front_end_dut, ran
# Get the list of upstream/downstream ports
downstream_ports = defaultdict(list)
upstream_ports = defaultdict(list)
upstream_service_ports = defaultdict(list)
downstream_port_ids = []
upstream_port_ids = []
upstream_port_id_to_router_mac_map = {}
Expand Down Expand Up @@ -419,6 +420,8 @@ def setup(duthosts, ptfhost, rand_selected_dut, rand_selected_front_end_dut, ran
upstream_ports[neighbor['namespace']].append(interface)
upstream_port_ids.append(port_id)
upstream_port_id_to_router_mac_map[port_id] = rand_selected_dut.facts["router_mac"]
if neigh_type == "PT0":
upstream_service_ports[neighbor['namespace']].append(interface)

# stop garp service for single tor
if 'dualtor' not in tbinfo['topo']['name']:
Expand Down Expand Up @@ -466,9 +469,7 @@ def setup(duthosts, ptfhost, rand_selected_dut, rand_selected_front_end_dut, ran
)
or 't1-isolated' in tbinfo["topo"]["name"]
)
and not re.match(r"t0-.*s\d+", tbinfo["topo"]["name"])
):

for k, v in list(port_channels.items()):
acl_table_ports[v['namespace']].append(k)
# In multi-asic we need config both in host and namespace.
Expand All @@ -483,6 +484,13 @@ def setup(duthosts, ptfhost, rand_selected_dut, rand_selected_front_end_dut, ran
if namespace:
acl_table_ports[''] += port

if re.match(r"t0-.*s\d+", tbinfo["topo"]["name"]):
for namespace, port in list(upstream_service_ports.items()):
acl_table_ports[namespace] += port
# In multi-asic we need config both in host and namespace.
if namespace:
acl_table_ports[''] += port

dest_mac_mapping = {
"downlink->uplink": downstream_port_id_to_router_mac_map,
"uplink->downlink": upstream_port_id_to_router_mac_map
Expand Down
Loading