Skip to content

Commit fa0aaa6

Browse files
author
Wirut Getbamrung
authored
[sonic_sfp]: add logical_to_asic dict (#141)
Add mapping of logical port names to ASIC instance on device that used platform.json
1 parent ed6392d commit fa0aaa6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

sonic_platform_base/sonic_sfp/sfputilbase.py

+2
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,8 @@ def read_porttab_mappings(self, porttabfile, asic_inst=0):
448448
else:
449449
physical_to_logical[fp_port_index].append(intf_name)
450450

451+
# Mapping of logical port names available on a system to ASIC instance
452+
self.logical_to_asic[intf_name] = asic_inst
451453
port_pos_in_file +=1
452454

453455
self.logical = logical

sonic_platform_base/sonic_sfp/sfputilhelper.py

+2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ def read_porttab_mappings(self, porttabfile, asic_inst=0):
8787
else:
8888
physical_to_logical[fp_port_index].append(intf_name)
8989

90+
# Mapping of logical port names available on a system to ASIC instance
91+
self.logical_to_asic[intf_name] = asic_inst
9092
port_pos_in_file +=1
9193

9294
self.logical = logical

0 commit comments

Comments
 (0)