Skip to content

Commit

Permalink
Changes to support chip name change from innovium to marvell-teralynx (
Browse files Browse the repository at this point in the history
…#14330)

Adding the changes to support chip name change from Innovium to marvell-teralynx

Summary:
The chip name for innvium is changed to marvell-teralynx.
Same need to be modified in sonic-mgmt where we do conditional checks for different scripts.

This PR has dependencies on the below sonic-buildimage PR
sonic-net/sonic-buildimage#19829
  • Loading branch information
kbabujp authored Nov 25, 2024
1 parent a0e7e2d commit 37e533d
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 32 deletions.
8 changes: 5 additions & 3 deletions ansible/roles/test/files/acstests/everflow_policer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ def checkMirroredFlow(self):
if self.asic_type in ["mellanox"]:
import binascii
payload = binascii.unhexlify("0"*44) + str(payload) # Add the padding
elif self.asic_type in ["innovium"] or self.hwsku in ["rd98DX35xx_cn9131", "rd98DX35xx", "Nokia-7215-A1"]:
elif self.asic_type in ["marvell-teralynx"] or \
self.hwsku in ["rd98DX35xx_cn9131", "rd98DX35xx", "Nokia-7215-A1"]:
import binascii
payload = binascii.unhexlify("0"*24) + str(payload) # Add the padding

Expand Down Expand Up @@ -248,7 +249,7 @@ def checkMirroredFlow(self):
masked_exp_pkt.set_do_not_care_scapy(scapy.IP, "flags")
masked_exp_pkt.set_do_not_care_scapy(scapy.IP, "chksum")

if self.asic_type in ["innovium"]:
if self.asic_type in ["marvell-teralynx"]:
masked_exp_pkt.set_do_not_care_scapy(scapy.GRE, "seqnum_present")
if self.asic_type in ["marvell"]:
masked_exp_pkt.set_do_not_care_scapy(scapy.IP, "id")
Expand All @@ -270,7 +271,8 @@ def match_payload(pkt):
pkt = scapy.Ether(pkt).load
pkt = pkt[22:] # Mask the Mellanox specific inner header
pkt = scapy.Ether(pkt)
elif self.asic_type in ["innovium"] or self.hwsku in ["rd98DX35xx_cn9131", "rd98DX35xx", "Nokia-7215-A1"]:
elif self.asic_type in ["marvell-teralynx"] or \
self.hwsku in ["rd98DX35xx_cn9131", "rd98DX35xx", "Nokia-7215-A1"]:
pkt = scapy.Ether(pkt)[scapy.GRE].payload
pkt_str = str(pkt)
pkt = scapy.Ether(pkt_str[8:])
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/test/files/acstests/everflow_tb_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def sendReceive(self, pkt2send, src_port, destination_ports):
payload = str(scapy_pkt[scapy.GRE].payload)[22:]
if self.asic_type in ["barefoot"]:
payload = str(scapy_pkt[scapy.GRE].payload)[12:]
if self.asic_type in ["innovium"]:
if self.asic_type in ["marvell-teralynx"]:
payload = str(scapy_pkt[scapy.GRE].payload)[8:]

inner_pkt = scapy.Ether(payload)
Expand Down Expand Up @@ -270,4 +270,4 @@ def runTest(self):
(tests_passed, tests_total) = self.runEverflowTests()
print("Passed %d test of %d" % (tests_passed, tests_total))

assert(tests_passed == tests_total)
assert (tests_passed == tests_total)
2 changes: 0 additions & 2 deletions tests/common/innovium_data.py

This file was deleted.

2 changes: 2 additions & 0 deletions tests/common/marvell_teralynx_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def is_marvell_teralynx_device(dut):
return dut.facts["asic_type"] == "marvell-teralynx"
23 changes: 12 additions & 11 deletions tests/common/plugins/conditional_mark/tests_mark_conditions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ arp/test_neighbor_mac_noptf.py:

arp/test_unknown_mac.py:
skip:
reason: "Behavior on cisco-8000 & Innovium(Marvell) platform for unknown MAC is flooding rather than DROP, hence skipping."
reason: "Behavior on cisco-8000 & (Marvell) platform for unknown MAC is flooding rather than DROP, hence skipping."
conditions:
- "asic_type in ['cisco-8000','innovium']"
- "asic_type in ['cisco-8000','marvell-teralynx']"

arp/test_wr_arp.py:
skip:
Expand Down Expand Up @@ -295,17 +295,17 @@ decap/test_decap.py::test_decap[ttl=pipe, dscp=pipe, vxlan=set_unset]:
decap/test_decap.py::test_decap[ttl=pipe, dscp=uniform, vxlan=disable]:
skip:
conditions_logical_operator: or
reason: "Not supported on backend, broadcom before 202012 release, innovium platform. Skip 7260CX3 T1 topo in 202305 release"
reason: "Not supported on backend, broadcom before 202012 release, marvell-teralynx platform. Skip 7260CX3 T1 topo in 202305 release"
conditions:
- "(topo_name in ['t1-backend', 't0-backend']) or (asic_type in ['broadcom'] and release in ['201811', '201911']) or asic_type in ['innovium']"
- "(topo_name in ['t1-backend', 't0-backend']) or (asic_type in ['broadcom'] and release in ['201811', '201911']) or asic_type in ['marvell-teralynx']"
- "'7260CX3' in hwsku and release in ['202305'] and 't1' in topo_type"

decap/test_decap.py::test_decap[ttl=pipe, dscp=uniform, vxlan=set_unset]:
skip:
reason: "Not supported on backend, T2 topologies , broadcom platforms before 202012 release, innovium, x86_64-8111_32eh_o-r0 platform. Skip on mellanox dualtor setups for github issue #9646. Skip on 7260CX3 T1 topo in 202305 release"
reason: "Not supported on backend, T2 topologies , broadcom platforms before 202012 release, marvell-teralynx, x86_64-8111_32eh_o-r0 platform. Skip on mellanox dualtor setups for github issue #9646. Skip on 7260CX3 T1 topo in 202305 release"
conditions_logical_operator: or
conditions:
- "('t2' in topo_name) or (topo_name in ['t1-backend', 't0-backend']) or (asic_type in ['broadcom'] and release in ['201811', '201911']) or asic_type in ['innovium'] or platform in ['x86_64-8111_32eh_o-r0']"
- "('t2' in topo_name) or (topo_name in ['t1-backend', 't0-backend']) or (asic_type in ['broadcom'] and release in ['201811', '201911']) or asic_type in ['marvell-teralynx'] or platform in ['x86_64-8111_32eh_o-r0']"
- "https://github.com/sonic-net/sonic-mgmt/issues/9646 and 'dualtor' in topo_name and asic_type in ['mellanox']"
- "'7260CX3' in hwsku and release in ['202305'] and 't1' in topo_type"

Expand Down Expand Up @@ -1087,11 +1087,12 @@ ip/test_ip_packet.py:

ip/test_ip_packet.py::TestIPPacket::test_forward_ip_packet_with_0xffff_chksum_drop:
skip:
reason: "Broadcom, Cisco, Barefoot, Innovium and Marvell Asic will tolorate IP packets with 0xffff checksum
reason: "Broadcom, Cisco, Barefoot, and Marvell Asic will tolorate IP packets with 0xffff checksum
/ Skipping ip packet test since can't provide enough interfaces"
conditions_logical_operator: or
conditions:
- "asic_type in ['broadcom', 'cisco-8000', 'marvell', 'barefoot', 'innovium'] and asic_subtype not in ['broadcom-dnx']"

- "asic_type in ['broadcom', 'cisco-8000', 'marvell', 'barefoot', 'marvell-teralynx'] and asic_subtype not in ['broadcom-dnx']"
- "len(minigraph_interfaces) < 2 and len(minigraph_portchannels) < 2"

ip/test_ip_packet.py::TestIPPacket::test_forward_ip_packet_with_0xffff_chksum_tolerant:
Expand Down Expand Up @@ -1837,15 +1838,15 @@ sub_port_interfaces:
skip:
reason: "Unsupported platform or asic"
conditions:
- "is_multi_asic==True or asic_gen not in ['td2', 'spc1', 'spc2', 'spc3', 'spc4'] and asic_type not in ['barefoot','innovium']"
- "is_multi_asic==True or asic_gen not in ['td2', 'spc1', 'spc2', 'spc3', 'spc4'] and asic_type not in ['barefoot','marvell-teralynx']"

sub_port_interfaces/test_show_subinterface.py::test_subinterface_status[port]:
skip:
reason: "Unsupported platform or asic"
conditions_logical_operator: or
conditions:
- "asic_type in ['vs'] and https://github.com/sonic-net/sonic-buildimage/issues/19735"
- "is_multi_asic==True or asic_gen not in ['td2', 'spc1', 'spc2', 'spc3', 'spc4'] and asic_type not in ['barefoot','innovium']"
- "is_multi_asic==True or asic_gen not in ['td2', 'spc1', 'spc2', 'spc3', 'spc4'] and asic_type not in ['barefoot','marvell-teralynx']"

sub_port_interfaces/test_show_subinterface.py::test_subinterface_status[port_in_lag]:
skip:
Expand All @@ -1861,7 +1862,7 @@ sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_tunneling_be
conditions_logical_operator: or
conditions:
- "asic_type=='cisco-8000'"
- "is_multi_asic==True or asic_gen not in ['td2', 'spc1', 'spc2', 'spc3', 'spc4'] and asic_type not in ['barefoot','innovium']"
- "is_multi_asic==True or asic_gen not in ['td2', 'spc1', 'spc2', 'spc3', 'spc4'] and asic_type not in ['barefoot','marvell-teralynx']"

sub_port_interfaces/test_sub_port_interfaces.py::TestSubPorts::test_untagged_packet_not_routed[port_in_lag] :
skip:
Expand Down
4 changes: 2 additions & 2 deletions tests/common/system_utils/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from tests.common.mellanox_data import is_mellanox_device
from tests.common.errors import RunAnsibleModuleFail
from tests.common.cisco_data import is_cisco_device
from tests.common.innovium_data import is_innovium_device
from tests.common.marvell_teralynx_data import is_marvell_teralynx_device
from tests.common.helpers.constants import DEFAULT_NAMESPACE
logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -244,7 +244,7 @@ def _get_vendor_id(duthost):
vendor_id = "mlnx"
elif is_cisco_device(duthost):
vendor_id = "cisco"
elif is_innovium_device(duthost):
elif is_marvell_teralynx_device(duthost):
vendor_id = "invm"
else:
error_message = '"{}" does not currently support swap_syncd'.format(duthost.facts["asic_type"])
Expand Down
4 changes: 2 additions & 2 deletions tests/everflow/everflow_test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ def get_expected_mirror_packet(mirror_session, setup, duthost, direction, mirror
else:
payload = binascii.unhexlify("0" * 44) + bytes(payload)
if (
duthost.facts["asic_type"] in ["barefoot", "cisco-8000", "innovium"]
duthost.facts["asic_type"] in ["barefoot", "cisco-8000", "marvell-teralynx"]
or duthost.facts.get("platform_asic") in ["broadcom-dnx"]
or duthost.facts["hwsku"]
in ["rd98DX35xx", "rd98DX35xx_cn9131", "Nokia-7215-A1"]
Expand Down Expand Up @@ -893,7 +893,7 @@ def get_expected_mirror_packet(mirror_session, setup, duthost, direction, mirror
if duthost.facts["asic_type"] == 'marvell':
expected_packet.set_do_not_care_scapy(packet.IP, "id")
expected_packet.set_do_not_care_scapy(packet.GRE, "seqnum_present")
if duthost.facts["asic_type"] in ["cisco-8000", "innovium"] or \
if duthost.facts["asic_type"] in ["cisco-8000", "marvell-teralynx"] or \
duthost.facts.get("platform_asic") in ["broadcom-dnx"]:
expected_packet.set_do_not_care_scapy(packet.GRE, "seqnum_present")

Expand Down
2 changes: 1 addition & 1 deletion tests/everflow/test_everflow_testbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ def test_everflow_dscp_with_policer(
hostvars = everflow_dut.host.options['variable_manager']._hostvars[everflow_dut.hostname]

everflow_tolerance = 10
if vendor == 'innovium':
if vendor == 'marvell-teralynx':
everflow_tolerance = 11

rate_limit = 100
Expand Down
2 changes: 1 addition & 1 deletion tests/fib/test_fib.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def hash_keys(duthost):
hash_keys.remove('ip-proto')
if 'ingress-port' in hash_keys:
hash_keys.remove('ingress-port')
if duthost.facts['asic_type'] in ["innovium", "cisco-8000"]:
if duthost.facts['asic_type'] in ["marvell-teralynx", "cisco-8000"]:
if 'ip-proto' in hash_keys:
hash_keys.remove('ip-proto')
# remove the ingress port from multi asic platform
Expand Down
6 changes: 3 additions & 3 deletions tests/ipfwd/test_nhop_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from tests.common.helpers.assertions import pytest_require, pytest_assert
from tests.common.cisco_data import is_cisco_device
from tests.common.mellanox_data import is_mellanox_device, get_chip_type
from tests.common.innovium_data import is_innovium_device
from tests.common.marvell_teralynx_data import is_marvell_teralynx_device
from tests.common.vs_data import is_vs_device
from tests.common.utilities import wait_until
from tests.common.platform.device_utils import fanout_switch_port_lookup, toggle_one_link
Expand Down Expand Up @@ -356,7 +356,7 @@ def test_nhop_group_member_count(duthost, tbinfo, loganalyzer):
polling_interval = 1
sleep_time = 380
sleep_time_sync_before = 120
elif is_innovium_device(duthost):
elif is_marvell_teralynx_device(duthost):
default_max_nhop_paths = 3
polling_interval = 10
sleep_time = 120
Expand Down Expand Up @@ -414,7 +414,7 @@ def test_nhop_group_member_count(duthost, tbinfo, loganalyzer):
# Consider both available nhop_grp and nhop_grp_mem before creating nhop_groups
nhop_group_mem_count = int((nhop_group_mem_count) / default_max_nhop_paths * CISCO_NHOP_GROUP_FILL_PERCENTAGE)
nhop_group_count = min(nhop_group_mem_count, nhop_group_count)
elif is_innovium_device(duthost):
elif is_marvell_teralynx_device(duthost):
crm_stat = get_crm_info(duthost, asic)
nhop_group_count = crm_stat["available_nhop_grp"]
else:
Expand Down
6 changes: 3 additions & 3 deletions tests/qos/test_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from tests.common.utilities import wait_until
from tests.common.helpers.assertions import pytest_assert, pytest_require
from tests.common.fixtures.conn_graph_facts import conn_graph_facts # noqa F401
from tests.common.marvell_teralynx_data import is_marvell_teralynx_device
from tests.common.mellanox_data import is_mellanox_device, get_chip_type
from tests.common.innovium_data import is_innovium_device
from tests.common.plugins.loganalyzer.loganalyzer import LogAnalyzer
from tests.common.utilities import check_qos_db_fv_reference_with_table
from tests.common.utilities import skip_release
Expand Down Expand Up @@ -332,7 +332,7 @@ def setup_module(duthosts, rand_one_dut_hostname, request):

duthost = duthosts[rand_one_dut_hostname]
detect_buffer_model(duthost)
if not is_mellanox_device(duthost) and not is_innovium_device(duthost):
if not is_mellanox_device(duthost) and not is_marvell_teralynx_device(duthost):
load_lossless_headroom_data(duthost)
yield
return
Expand Down Expand Up @@ -2929,7 +2929,7 @@ def _check_port_buffer_info_and_return(dut_db_info, table, ids, port, expected_p
buffer_items_to_check_dict = {
"up": buffer_table_up, "down": buffer_table_down}

if is_innovium_device(duthost):
if is_marvell_teralynx_device(duthost):
buffer_items_to_check_dict["up"][KEY_2_LOSSLESS_QUEUE][3] = (
'BUFFER_QUEUE_TABLE', '5-7', '[BUFFER_PROFILE_TABLE:egress_lossy_profile]')
buffer_items_to_check_dict["down"][KEY_2_LOSSLESS_QUEUE][3] = (
Expand Down
4 changes: 2 additions & 2 deletions tests/saitests/py3/sai_qos_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3229,7 +3229,7 @@ def runTest(self):

print("pkts sent: %d, lower bound: %d, actual headroom pool watermark: %d, upper_bound: %d" % (
wm_pkt_num, expected_wm, hdrm_pool_wm, upper_bound_wm), file=sys.stderr)
if 'innovium' not in self.asic_type:
if 'marvell-teralynx' not in self.asic_type:
assert (expected_wm <= hdrm_pool_wm)
assert (hdrm_pool_wm <= upper_bound_wm)
if self.platform_asic and self.platform_asic == "broadcom-dnx":
Expand Down Expand Up @@ -3294,7 +3294,7 @@ def runTest(self):
self.src_client, self.buf_pool_roid)
sys.stderr.write('After PG headroom filled, actual headroom pool watermark {}, upper_bound {}\n'.format(
hdrm_pool_wm, upper_bound_wm))
if 'innovium' not in self.asic_type:
if 'marvell-teralynx' not in self.asic_type:
assert (expected_wm <= hdrm_pool_wm)
assert (hdrm_pool_wm <= upper_bound_wm)
# at this point headroom pool should be full. send few more packets to continue causing drops
Expand Down

0 comments on commit 37e533d

Please sign in to comment.