Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mellanox] Add support for new hwsku of SN5600 #12848

Merged
merged 1 commit into from
Jun 10, 2024
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
2 changes: 1 addition & 1 deletion ansible/group_vars/sonic/variables
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ broadcom_jr2_hwskus: ['Arista-7800R3-48CQ2-C48', 'Arista-7800R3-48CQM2-C48']
mellanox_spc1_hwskus: [ 'ACS-MSN2700', 'ACS-MSN2740', 'ACS-MSN2100', 'ACS-MSN2410', 'ACS-MSN2010', 'Mellanox-SN2700', 'Mellanox-SN2700-A1', 'Mellanox-SN2700-D48C8','Mellanox-SN2700-D40C8S8', 'Mellanox-SN2700-A1-D48C8']
mellanox_spc2_hwskus: [ 'ACS-MSN3700', 'ACS-MSN3700C', 'ACS-MSN3800', 'Mellanox-SN3800-D112C8' , 'ACS-MSN3420']
mellanox_spc3_hwskus: [ 'ACS-MSN4700', 'Mellanox-SN4700-O28', 'ACS-MSN4600', 'ACS-MSN4600C', 'ACS-MSN4410', 'Mellanox-SN4600C-D112C8', 'Mellanox-SN4600C-C64', 'Mellanox-SN4700-O8C48', 'Mellanox-SN4700-O8V48', 'ACS-SN4280']
mellanox_spc4_hwskus: [ 'ACS-SN5600' ]
mellanox_spc4_hwskus: [ 'ACS-SN5600' , 'Mellanox-SN5600-V256']
mellanox_hwskus: "{{ mellanox_spc1_hwskus + mellanox_spc2_hwskus + mellanox_spc3_hwskus + mellanox_spc4_hwskus }}"
mellanox_dualtor_hwskus: [ 'Mellanox-SN4600C-C64' ]

Expand Down
7 changes: 7 additions & 0 deletions ansible/module_utils/port_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,13 @@ def get_port_alias_to_name_map(hwsku, asic_name=None):
for i in range(1, 33):
port_alias_to_name_map["etp%d" % i] = "Ethernet%d" % idx
idx += 8
elif hwsku == "Mellanox-SN5600-V256":
split_alias_list = ["a", "b", "c", "d"]
for i in range(1, 65):
for idx, split_alias in enumerate(split_alias_list):
alias = "etp{}{}".format(i, split_alias)
eth_name = "Ethernet{}".format((i - 1) * 8 + idx * 2)
port_alias_to_name_map[alias] = eth_name
elif hwsku == "Arista-7060DX5-32":
for i in range(1, 33):
port_alias_to_name_map["Ethernet%d/1" % i] = "Ethernet%d" % ((i - 1) * 8)
Expand Down
2 changes: 1 addition & 1 deletion tests/common/mellanox_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
SPC2_HWSKUS = ["ACS-MSN3700", "ACS-MSN3700C", "ACS-MSN3800", "Mellanox-SN3800-D112C8", "ACS-MSN3420"]
SPC3_HWSKUS = ["ACS-MSN4700", "Mellanox-SN4700-O28", "ACS-MSN4600C", "ACS-MSN4410", "ACS-MSN4600",
"Mellanox-SN4600C-D112C8", "Mellanox-SN4600C-C64"]
SPC4_HWSKUS = ["ACS-SN5600"]
SPC4_HWSKUS = ["ACS-SN5600", "Mellanox-SN5600-V256"]
SWITCH_HWSKUS = SPC1_HWSKUS + SPC2_HWSKUS + SPC3_HWSKUS + SPC4_HWSKUS

PSU_CAPABILITIES = [
Expand Down
10 changes: 4 additions & 6 deletions tests/saitests/py3/sai_qos_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3123,7 +3123,7 @@ def runTest(self):
self.sai_thrift_port_tx_enable(self.dst_client, self.asic_type, self.uniq_dst_ports)
sys.exit("Too many pkts needed to trigger pfc: %d" % (pkt_cnt))
assert (recv_counters[sidx_dscp_pg_tuples[i][2]] >
recv_counters_bases[sidx_dscp_pg_tuples[i][0]][sidx_dscp_pg_tuples[i][2]])
recv_counters_bases[sidx_dscp_pg_tuples[i][0]][sidx_dscp_pg_tuples[i][2]])
print("%d packets for sid: %d, pg: %d to trigger pfc" % (
pkt_cnt, self.src_port_ids[sidx_dscp_pg_tuples[i][0]], sidx_dscp_pg_tuples[i][2] - 2),
file=sys.stderr)
Expand Down Expand Up @@ -5046,7 +5046,7 @@ def runTest(self):

if pkts_num_fill_min:
assert (q_wm_res[queue] == 0)
elif 'cisco-8000' in asic_type or "ACS-SN5600" in hwsku:
elif 'cisco-8000' in asic_type or "SN5600" in hwsku:
assert (q_wm_res[queue] <= (margin + 1) * cell_size)
else:
if platform_asic and platform_asic == "broadcom-dnx":
Expand Down Expand Up @@ -5366,8 +5366,7 @@ def runTest(self):
file=sys.stderr,
)
assert (buffer_pool_wm <= (expected_wm + upper_bound_margin) * cell_size)
assert ((expected_wm - lower_bound_margin)
* cell_size <= buffer_pool_wm)
assert ((expected_wm - lower_bound_margin) * cell_size <= buffer_pool_wm)

pkts_num = pkts_inc

Expand Down Expand Up @@ -5561,8 +5560,7 @@ def runTest(self):
if 'cisco-8000' in asic_type:
# Queue is always the inner_dscp due to the TC_TO_QUEUE_MAP redirection
queue = inner_dscp
assert (fill_leakout_plus_one(self, src_port_id,
dst_port_id, pkt, queue, asic_type))
assert (fill_leakout_plus_one(self, src_port_id, dst_port_id, pkt, queue, asic_type))
num_pkts = pkts_num_trig_pfc - pkts_num_margin - 1
send_packet(self, src_port_id, pkt, num_pkts)
print("Sending {} packets to port {}".format(num_pkts, src_port_id), file=sys.stderr)
Expand Down
Loading