Skip to content

Commit 15acb44

Browse files
Fix port mapping for new 4280 hwskus (sonic-net#18802)
Signed-off-by: Prabhat Aravind <[email protected]>
1 parent 2292ff8 commit 15acb44

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

ansible/module_utils/port_utils.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,24 @@ def get_port_alias_to_name_map(hwsku, asic_name=None):
409409
for i in range(1, 33):
410410
port_alias_to_name_map["etp%d" % i] = "Ethernet%d" % idx
411411
idx += 8
412+
elif hwsku in ["Mellanox-SN4280-O8C40", "Mellanox-SN4280-O8V40", "Mellanox-SN4280-C48"]:
413+
idx = 0
414+
for i in range(1, 13):
415+
port_alias_to_name_map["etp%da" % i] = "Ethernet%d" % idx
416+
idx += 4
417+
port_alias_to_name_map["etp%db" % i] = "Ethernet%d" % idx
418+
idx += 4
419+
for i in range(13, 21):
420+
port_alias_to_name_map["etp%d" % i] = "Ethernet%d" % idx
421+
idx += 8
422+
for i in range(21, 29):
423+
port_alias_to_name_map["etp%da" % i] = "Ethernet%d" % idx
424+
idx += 4
425+
port_alias_to_name_map["etp%db" % i] = "Ethernet%d" % idx
426+
idx += 4
427+
for i in range(29, 33):
428+
port_alias_to_name_map["etp%d" % i] = "Ethernet%d" % idx
429+
idx += 8
412430
elif hwsku == "Mellanox-SN5600-V256":
413431
split_alias_list = ["a", "b", "c", "d"]
414432
for i in range(1, 65):

0 commit comments

Comments
 (0)