|
34 | 34 | from tests.common.sai_validation.sonic_db import start_db_monitor, wait_for_n_keys, stop_db_monitor |
35 | 35 | from tests.common.validation.sai.acl_validation import validate_acl_asicdb_entries |
36 | 36 | from tests.common.utilities import is_ipv4_address |
| 37 | +from tests.common.utilities import is_ipv6_only_topology |
37 | 38 | from tests.common.dualtor.dual_tor_utils import show_muxcable_status |
38 | 39 | from tests.common.fixtures.duthost_utils import is_multi_binding_acl_enabled # noqa: F401 |
39 | 40 |
|
|
97 | 98 | "ipv6": "20c0:a800::11ac:d765:2523:e5e4" |
98 | 99 | } |
99 | 100 |
|
| 101 | +# Below T1 V6 topo IPs are announced to DUT by annouce_route.py |
| 102 | +# IPv4 addrs are placeholders only |
| 103 | +DOWNSTREAM_DST_IP_V6_TOPO = { |
| 104 | + "ipv4": "192.168.0.253", |
| 105 | + "ipv6": "2064:100:0::C0A8:0000:14" |
| 106 | +} |
| 107 | +DOWNSTREAM_IP_TO_ALLOW_V6_TOPO = { |
| 108 | + "ipv4": "192.168.0.252", |
| 109 | + "ipv6": "2064:100:0::C0A8:0000:1" |
| 110 | +} |
| 111 | +DOWNSTREAM_IP_TO_BLOCK_V6_TOPO = { |
| 112 | + "ipv4": "192.168.0.251", |
| 113 | + "ipv6": "2064:100:0::C0A8:0000:9" |
| 114 | +} |
| 115 | + |
100 | 116 | # Below M0_L3 IPs are announced to DUT by annouce_route.py, it point to neighbor mx |
101 | 117 | DOWNSTREAM_DST_IP_M0_L3 = { |
102 | 118 | "ipv4": "192.168.1.65", |
@@ -343,6 +359,15 @@ def setup(duthosts, ptfhost, rand_selected_dut, rand_selected_front_end_dut, ran |
343 | 359 | DOWNSTREAM_DST_IP = DOWNSTREAM_DST_IP_M0_L3 |
344 | 360 | DOWNSTREAM_IP_TO_ALLOW = DOWNSTREAM_IP_TO_ALLOW_M0_L3 |
345 | 361 | DOWNSTREAM_IP_TO_BLOCK = DOWNSTREAM_IP_TO_BLOCK_M0_L3 |
| 362 | + elif is_ipv6_only_topology(tbinfo): |
| 363 | + if tbinfo['topo']['type'] in ['t0']: |
| 364 | + DOWNSTREAM_DST_IP = DOWNSTREAM_DST_IP_VLAN |
| 365 | + DOWNSTREAM_IP_TO_ALLOW = DOWNSTREAM_IP_TO_ALLOW_VLAN |
| 366 | + DOWNSTREAM_IP_TO_BLOCK = DOWNSTREAM_IP_TO_BLOCK_VLAN |
| 367 | + else: |
| 368 | + DOWNSTREAM_DST_IP = DOWNSTREAM_DST_IP_V6_TOPO |
| 369 | + DOWNSTREAM_IP_TO_ALLOW = DOWNSTREAM_IP_TO_ALLOW_V6_TOPO |
| 370 | + DOWNSTREAM_IP_TO_BLOCK = DOWNSTREAM_IP_TO_BLOCK_V6_TOPO |
346 | 371 | elif tbinfo['topo']['type'] in ['t0']: |
347 | 372 | try: |
348 | 373 | vlan_config = tbinfo['topo']['properties']['topology']['DUT']['vlan_configs']['default_vlan_config'] |
@@ -1050,7 +1075,7 @@ def check_rule_counters(self, duthost): |
1050 | 1075 | return True |
1051 | 1076 |
|
1052 | 1077 | logger.info('Wait all rule counters are ready') |
1053 | | - return wait_until(60, 2, 0, self.check_rule_counters_internal, duthost) |
| 1078 | + return wait_until(120, 2, 0, self.check_rule_counters_internal, duthost) |
1054 | 1079 |
|
1055 | 1080 | def check_rule_counters_internal(self, duthost): |
1056 | 1081 | for asic_id in duthost.get_frontend_asic_ids(): |
@@ -1252,6 +1277,11 @@ def test_dest_ip_match_forwarded(self, setup, direction, ptfadapter, |
1252 | 1277 | rule_id = 33 if vlan_name == "Vlan1000" else 2 |
1253 | 1278 | logging.info("topo: {} vlan_config: {} vlan_name: {} rule_id: {} ".format( |
1254 | 1279 | setup["topo"], setup["vlan_config"], vlan_name, rule_id)) |
| 1280 | + elif "-v6-" in setup["topo_name"]: |
| 1281 | + if setup["topo"] in ['t0']: |
| 1282 | + rule_id = 34 |
| 1283 | + else: |
| 1284 | + rule_id = 38 |
1255 | 1285 | else: |
1256 | 1286 | rule_id = 2 |
1257 | 1287 | else: |
@@ -1280,6 +1310,11 @@ def test_dest_ip_match_dropped(self, setup, direction, ptfadapter, |
1280 | 1310 | rule_id = 32 if vlan_name == "Vlan1000" else 15 |
1281 | 1311 | logging.info("topo: {} vlan_config: {} vlan_name: {} rule_id: {} ".format( |
1282 | 1312 | setup["topo"], setup["vlan_config"], vlan_name, rule_id)) |
| 1313 | + elif "-v6-" in setup["topo_name"]: |
| 1314 | + if setup["topo"] in ['t0']: |
| 1315 | + rule_id = 35 |
| 1316 | + else: |
| 1317 | + rule_id = 39 |
1283 | 1318 | else: |
1284 | 1319 | rule_id = 15 |
1285 | 1320 | else: |
|
0 commit comments