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
17 changes: 16 additions & 1 deletion tests/common/helpers/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"t2": "t3",
"m0_vlan": "m1",
"m0_l3": "m1",
"ft2": "lt2"
"ft2": "lt2",
"lt2": "ut2"
}
# Describe downstream neighbor of dut in different topos
DOWNSTREAM_NEIGHBOR_MAP = {
Expand All @@ -31,3 +32,17 @@
"m0_l3": "mx",
"ft2": "lt2"
}

# Describe downstream neighbor of dut in different topos
DOWNSTREAM_ALL_NEIGHBOR_MAP = {
"t0": ["server"],
"t1": ["t0"],
"m1": ["m0", "c0"],
"m0": ["mx", "server"],
"mx": ["server"],
"t2": ["t1"],
"m0_vlan": ["mx", "server"],
"m0_l3": ["mx", "server"],
"ft2": "lt2",
"lt2": "t1"
}
51 changes: 8 additions & 43 deletions tests/common/plugins/conditional_mark/tests_mark_conditions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@ everflow/test_everflow_testbed.py::TestEverflowV4EgressAclEgressMirror::test_eve
conditions:
- "asic_subtype in ['broadcom-dnx']"
- "asic_type in ['cisco-8000']"
- "topo_type in ['lt2', 'ft2']"

everflow/test_everflow_testbed.py::TestEverflowV4EgressAclEgressMirror::test_everflow_frwd_with_bkg_trf:
skip:
Expand All @@ -934,6 +935,7 @@ everflow/test_everflow_testbed.py::TestEverflowV4IngressAclIngressMirror::test_e
conditions:
- "asic_type in ['cisco-8000']"
- "asic_subtype in ['broadcom-dnx']"
- "topo_type in ['lt2', 'ft2']"

everflow/test_everflow_testbed.py::TestEverflowV4IngressAclIngressMirror::test_everflow_frwd_with_bkg_trf:
skip:
Expand Down Expand Up @@ -1172,19 +1174,6 @@ hash/test_generic_hash.py::test_ecmp_and_lag_hash[CRC_CCITT-IN_PORT:
conditions:
- "asic_type in ['broadcom', 'mellanox']"

hash/test_generic_hash.py::test_ecmp_and_lag_hash[CRC_CCITT-INNER_IP_PROTOCOL:
skip:
reason: "On Mellanox platforms, due to HW limitation, it would not support CRC algorithm on INNER_IP_PROTOCOL field"
conditions:
- "asic_type in ['mellanox']"

hash/test_generic_hash.py::test_ecmp_and_lag_hash[CRC_CCITT-IN_PORT:
skip:
reason: "On Mellanox platforms, due to HW limitation, when ecmp and lag hash at the same time, it would not support
setting ecmp hash as CRC_CCITT and lag hash as CRC on ingress port hash field"
conditions:
- "asic_type in ['mellanox']"

hash/test_generic_hash.py::test_ecmp_hash:
skip:
reason: 'ECMP hash not supported in broadcom SAI and Cisco 8000'
Expand Down Expand Up @@ -1231,12 +1220,6 @@ hash/test_generic_hash.py::test_lag_member_flap[CRC-INNER_IP_PROTOCOL:
conditions:
- "asic_type in ['broadcom', 'mellanox']"

hash/test_generic_hash.py::test_lag_member_flap[CRC_CCITT-INNER_IP_PROTOCOL:
skip:
reason: "On Mellanox platforms, due to HW limitation, it would not support CRC algorithm on INNER_IP_PROTOCOL field. For broadcom, LAG hash not supported in broadcom SAI."
conditions:
- "asic_type in ['broadcom', 'mellanox']"

hash/test_generic_hash.py::test_lag_member_flap[CRC-IP_PROTOCOL-ipv4:
skip:
reason: "With IP Protocol alone, we don't have enough entropy to distribute the packets evenly"
Expand All @@ -1245,9 +1228,9 @@ hash/test_generic_hash.py::test_lag_member_flap[CRC-IP_PROTOCOL-ipv4:

hash/test_generic_hash.py::test_lag_member_flap[CRC_CCITT-INNER_IP_PROTOCOL:
skip:
reason: "On Mellanox platforms, due to HW limitation, it would not support CRC algorithm on INNER_IP_PROTOCOL field"
reason: "On Mellanox platforms, due to HW limitation, it would not support CRC algorithm on INNER_IP_PROTOCOL field. For broadcom, LAG hash not supported in broadcom SAI."
conditions:
- "asic_type in ['mellanox']"
- "asic_type in ['broadcom', 'mellanox']"

hash/test_generic_hash.py::test_lag_member_flap[CRC_CCITT-IN_PORT:
skip:
Expand Down Expand Up @@ -1278,12 +1261,6 @@ hash/test_generic_hash.py::test_lag_member_remove_add[CRC-INNER_IP_PROTOCOL:
conditions:
- "asic_type in ['broadcom', 'mellanox']"

hash/test_generic_hash.py::test_lag_member_remove_add[CRC_CCITT-INNER_IP_PROTOCOL:
skip:
reason: "On Mellanox platforms, due to HW limitation, it would not support CRC algorithm on INNER_IP_PROTOCOL field. For broadcom, LAG hash not supported in broadcom SAI."
conditions:
- "asic_type in ['broadcom', 'mellanox']"

hash/test_generic_hash.py::test_lag_member_remove_add[CRC-IP_PROTOCOL-ipv4:
skip:
reason: "With IP Protocol alone, we don't have enough entropy to distribute the packets evenly"
Expand All @@ -1292,9 +1269,9 @@ hash/test_generic_hash.py::test_lag_member_remove_add[CRC-IP_PROTOCOL-ipv4:

hash/test_generic_hash.py::test_lag_member_remove_add[CRC_CCITT-INNER_IP_PROTOCOL:
skip:
reason: "On Mellanox platforms, due to HW limitation, it would not support CRC algorithm on INNER_IP_PROTOCOL field"
reason: "On Mellanox platforms, due to HW limitation, it would not support CRC algorithm on INNER_IP_PROTOCOL field. For broadcom, LAG hash not supported in broadcom SAI."
conditions:
- "asic_type in ['mellanox']"
- "asic_type in ['broadcom', 'mellanox']"

hash/test_generic_hash.py::test_lag_member_remove_add[CRC_CCITT-IN_PORT:
skip:
Expand Down Expand Up @@ -1334,12 +1311,6 @@ hash/test_generic_hash.py::test_nexthop_flap[CRC_CCITT-INNER_IP_PROTOCOL:
conditions:
- "asic_type in ['broadcom', 'mellanox']"

hash/test_generic_hash.py::test_nexthop_flap[CRC_CCITT-INNER_IP_PROTOCOL:
skip:
reason: "On Mellanox platforms, due to HW limitation, it would not support CRC algorithm on INNER_IP_PROTOCOL field"
conditions:
- "asic_type in ['mellanox']"

hash/test_generic_hash.py::test_nexthop_flap[CRC_CCITT-IN_PORT:
skip:
reason: "On Mellanox platforms, due to HW limitation, when ecmp and lag hash at the same time, it would not support
Expand All @@ -1361,12 +1332,6 @@ hash/test_generic_hash.py::test_reboot[CRC-INNER_IP_PROTOCOL:
conditions:
- "asic_type in ['broadcom', 'mellanox']"

hash/test_generic_hash.py::test_reboot[CRC_CCITT-INNER_IP_PROTOCOL:
skip:
reason: "On Mellanox platforms, due to HW limitation, it would not support CRC algorithm on INNER_IP_PROTOCOL field. For broadcom, ECMP/LAG hash not supported in broadcom SAI"
conditions:
- "asic_type in ['broadcom', 'mellanox']"

hash/test_generic_hash.py::test_reboot[CRC-IP_PROTOCOL-ipv4:
skip:
reason: "With IP Protocol alone, we don't have enough entropy to distribute the packets evenly"
Expand All @@ -1375,9 +1340,9 @@ hash/test_generic_hash.py::test_reboot[CRC-IP_PROTOCOL-ipv4:

hash/test_generic_hash.py::test_reboot[CRC_CCITT-INNER_IP_PROTOCOL:
skip:
reason: "On Mellanox platforms, due to HW limitation, it would not support CRC algorithm on INNER_IP_PROTOCOL field"
reason: "On Mellanox platforms, due to HW limitation, it would not support CRC algorithm on INNER_IP_PROTOCOL field. For broadcom, ECMP/LAG hash not supported in broadcom SAI"
conditions:
- "asic_type in ['mellanox']"
- "asic_type in ['broadcom', 'mellanox']"

hash/test_generic_hash.py::test_reboot[CRC_CCITT-IN_PORT:
skip:
Expand Down
10 changes: 7 additions & 3 deletions tests/everflow/everflow_test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ def gen_setup_information(dutHost, downStreamDutHost, upStreamDutHost, tbinfo, t
downstream_ports_namespace_map[neigh['namespace']].append(dut_port)
downstream_ports_namespace.add(neigh['namespace'])
downstream_neigh_namespace_map[neigh['namespace']].add(neigh["name"])
# For FT2, we just copy the upstream ports to downstream ports
if "ft2" in topo:
downstream_ports_namespace = upstream_ports_namespace.copy()
downstream_ports_namespace_map = upstream_ports_namespace_map.copy()

for ns, neigh_set in list(upstream_neigh_namespace_map.items()):
if len(neigh_set) < 2:
Expand Down Expand Up @@ -367,7 +371,7 @@ def setup_info(duthosts, rand_one_dut_hostname, tbinfo, request, topo_scenario):
# Disable BGP so that we don't keep on bouncing back mirror packets
# If we send TTL=1 packet we don't need this but in multi-asic TTL > 1

if 't2' in topo:
if 't2' in topo and 'lt2' not in topo and 'ft2' not in topo:
for dut_host in duthosts.frontend_nodes:
dut_host.command("sudo config bgp shutdown all")
dut_host.command("mkdir -p {}".format(DUT_RUN_DIR))
Expand All @@ -380,7 +384,7 @@ def setup_info(duthosts, rand_one_dut_hostname, tbinfo, request, topo_scenario):
yield setup_information

# Enable BGP again
if 't2' in topo:
if 't2' in topo and 'lt2' not in topo and 'ft2' not in topo:
for dut_host in duthosts.frontend_nodes:
dut_host.command("sudo config bgp startup all")
dut_host.command("rm -rf {}".format(DUT_RUN_DIR))
Expand Down Expand Up @@ -785,7 +789,7 @@ def send_and_check_mirror_packets(self,
src_port_set = set()
src_port_metadata_map = {}

if 't2' in setup['topo']:
if 't2' in setup['topo'] and 'lt2' not in setup['topo'] and 'ft2' not in setup['topo']:
if valid_across_namespace is True:
src_port_set.add(src_port)
src_port_metadata_map[src_port] = (None, 1)
Expand Down
2 changes: 1 addition & 1 deletion tests/everflow/test_everflow_ipv6.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from tests.common.dualtor.mux_simulator_control import toggle_all_simulator_ports_to_rand_selected_tor # noqa F401

pytestmark = [
pytest.mark.topology("t0", "t1", "t2", "m0")
pytest.mark.topology("t0", "t1", "t2", "lt2", "ft2", "m0", "m1", "m2", "m3")
]

EVERFLOW_V6_RULES = "ipv6_test_rules.yaml"
Expand Down
7 changes: 6 additions & 1 deletion tests/everflow/test_everflow_testbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from tests.common.dualtor.mux_simulator_control import toggle_all_simulator_ports_to_rand_selected_tor # noqa: F401

pytestmark = [
pytest.mark.topology("t0", "t1", "t2", "m0")
pytest.mark.topology("t0", "t1", "t2", "lt2", "ft2", "m0", "m1", "m2", "m3")
]

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -97,6 +97,11 @@ def dest_port_type(self, setup_info, setup_mirror_session, tbinfo, request, ersp
remote_dut.shell(remote_dut.get_vtysh_cmd_for_namespace(
f"vtysh -c \"config\" -c \"router bgp\" -c \"address-family {ip}\" -c \"redistribute static\"",
setup_info[request.param]["remote_namespace"]))
# For FT2, we only cover UP_STREAM direction as traffic is always coming from LT2
# and also going to LT2
if tbinfo['topo']['type'] == "ft2" and request.param == DOWN_STREAM:
pytest.skip("Skipping DOWN_STREAM test on FT2 topology.")

yield request.param

session_prefixes = setup_mirror_session["session_prefixes"] if erspan_ip_ver == 4 \
Expand Down