Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 13 additions & 5 deletions tests/acl/test_acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import ptf.testutils as testutils
import ptf.mask as mask
import ptf.packet as packet
import re

from abc import ABCMeta, abstractmethod
from collections import defaultdict
Expand Down Expand Up @@ -423,11 +424,18 @@ def setup(duthosts, ptfhost, rand_selected_dut, rand_selected_front_end_dut, ran
# In multi-asic we need config both in host and namespace.
if namespace:
acl_table_ports[''] += port
if len(port_channels) and topo in ["t0", "m0_vlan", "m0_l3"] or tbinfo["topo"]["name"] in ("t1-lag", "t1-64-lag",
"t1-64-lag-clet",
"t1-56-lag",
"t1-28-lag",
"t1-32-lag"):
if (
len(port_channels)
and (
topo in ["t0", "m0_vlan", "m0_l3"]
or tbinfo["topo"]["name"] in (
"t1-lag", "t1-64-lag", "t1-64-lag-clet",
"t1-56-lag", "t1-28-lag", "t1-32-lag"
)
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)
Expand Down
3 changes: 2 additions & 1 deletion tests/acl/test_stress_acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ def prepare_test_port(rand_selected_dut, tbinfo):
upstream_port_neighbor_ips = {}
for interface, neighbor in list(mg_facts["minigraph_neighbors"].items()):
port_id = mg_facts["minigraph_ptf_indices"][interface]
if (topo == "t1" and "T2" in neighbor["name"]) or (topo == "t0" and "T1" in neighbor["name"]) or \
if (topo == "t1" and "T2" in neighbor["name"]) or \
(topo == "t0" and ("T1" in neighbor["name"] or "PT0" in neighbor["name"])) or \
(topo == "m0" and "M1" in neighbor["name"]) or (topo == "mx" and "M0" in neighbor["name"]) or \
(topo_name in ("t1-isolated-d32", "t1-isolated-d128") and "T0" in neighbor["name"]):
upstream_ports[neighbor['namespace']].append(interface)
Expand Down
2 changes: 1 addition & 1 deletion tests/common/helpers/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

# Describe ALL upstream neighbor of dut in different topos
UPSTREAM_ALL_NEIGHBOR_MAP = {
"t0": ["t1"],
"t0": ["t1", "pt0"],
"t1": ["t2"],
"m1": ["ma", "mb"],
"m0": ["m1"],
Expand Down
2 changes: 1 addition & 1 deletion tests/common/helpers/ptf_tests_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def upstream_links(rand_selected_dut, tbinfo, nbrhosts):
duthost = rand_selected_dut

def filter(interface, neighbor, mg_facts, tbinfo):
if ((tbinfo["topo"]["type"] == "t0" and "T1" in neighbor["name"])
if ((tbinfo["topo"]["type"] == "t0" and ("T1" in neighbor["name"] or "PT0" in neighbor["name"]))
or (tbinfo["topo"]["type"] == "t1" and "T2" in neighbor["name"])):
local_ipv4_addr = None
peer_ipv4_addr = None
Expand Down
Loading