|
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", |
@@ -350,6 +366,15 @@ def setup(duthosts, ptfhost, rand_selected_dut, rand_selected_front_end_dut, ran |
350 | 366 | DOWNSTREAM_DST_IP = DOWNSTREAM_DST_IP_M0_L3 |
351 | 367 | DOWNSTREAM_IP_TO_ALLOW = DOWNSTREAM_IP_TO_ALLOW_M0_L3 |
352 | 368 | DOWNSTREAM_IP_TO_BLOCK = DOWNSTREAM_IP_TO_BLOCK_M0_L3 |
| 369 | + elif is_ipv6_only_topology(tbinfo): |
| 370 | + if tbinfo['topo']['type'] in ['t0']: |
| 371 | + DOWNSTREAM_DST_IP = DOWNSTREAM_DST_IP_VLAN |
| 372 | + DOWNSTREAM_IP_TO_ALLOW = DOWNSTREAM_IP_TO_ALLOW_VLAN |
| 373 | + DOWNSTREAM_IP_TO_BLOCK = DOWNSTREAM_IP_TO_BLOCK_VLAN |
| 374 | + else: |
| 375 | + DOWNSTREAM_DST_IP = DOWNSTREAM_DST_IP_V6_TOPO |
| 376 | + DOWNSTREAM_IP_TO_ALLOW = DOWNSTREAM_IP_TO_ALLOW_V6_TOPO |
| 377 | + DOWNSTREAM_IP_TO_BLOCK = DOWNSTREAM_IP_TO_BLOCK_V6_TOPO |
353 | 378 | elif tbinfo['topo']['type'] in ['t0']: |
354 | 379 | try: |
355 | 380 | vlan_config = tbinfo['topo']['properties']['topology']['DUT']['vlan_configs']['default_vlan_config'] |
@@ -1064,7 +1089,7 @@ def check_rule_counters(self, duthost): |
1064 | 1089 | return True |
1065 | 1090 |
|
1066 | 1091 | logger.info('Wait all rule counters are ready') |
1067 | | - return wait_until(60, 2, 0, self.check_rule_counters_internal, duthost) |
| 1092 | + return wait_until(120, 2, 0, self.check_rule_counters_internal, duthost) |
1068 | 1093 |
|
1069 | 1094 | def check_rule_counters_internal(self, duthost): |
1070 | 1095 | for asic_id in duthost.get_frontend_asic_ids(): |
@@ -1266,6 +1291,11 @@ def test_dest_ip_match_forwarded(self, setup, direction, ptfadapter, |
1266 | 1291 | rule_id = 33 if vlan_name == "Vlan1000" else 2 |
1267 | 1292 | logging.info("topo: {} vlan_config: {} vlan_name: {} rule_id: {} ".format( |
1268 | 1293 | setup["topo"], setup["vlan_config"], vlan_name, rule_id)) |
| 1294 | + elif "-v6-" in setup["topo_name"]: |
| 1295 | + if setup["topo"] in ['t0']: |
| 1296 | + rule_id = 34 |
| 1297 | + else: |
| 1298 | + rule_id = 38 |
1269 | 1299 | else: |
1270 | 1300 | rule_id = 2 |
1271 | 1301 | else: |
@@ -1294,6 +1324,11 @@ def test_dest_ip_match_dropped(self, setup, direction, ptfadapter, |
1294 | 1324 | rule_id = 32 if vlan_name == "Vlan1000" else 15 |
1295 | 1325 | logging.info("topo: {} vlan_config: {} vlan_name: {} rule_id: {} ".format( |
1296 | 1326 | setup["topo"], setup["vlan_config"], vlan_name, rule_id)) |
| 1327 | + elif "-v6-" in setup["topo_name"]: |
| 1328 | + if setup["topo"] in ['t0']: |
| 1329 | + rule_id = 35 |
| 1330 | + else: |
| 1331 | + rule_id = 39 |
1297 | 1332 | else: |
1298 | 1333 | rule_id = 15 |
1299 | 1334 | else: |
|
0 commit comments