Skip to content

Commit

Permalink
[sonic_sfp]: add logical_to_asic dict (sonic-net#141)
Browse files Browse the repository at this point in the history
Add mapping of logical port names to ASIC instance on device that used platform.json
  • Loading branch information
Wirut Getbamrung authored Nov 26, 2020
1 parent ed6392d commit fa0aaa6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sonic_platform_base/sonic_sfp/sfputilbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,8 @@ def read_porttab_mappings(self, porttabfile, asic_inst=0):
else:
physical_to_logical[fp_port_index].append(intf_name)

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

self.logical = logical
Expand Down
2 changes: 2 additions & 0 deletions sonic_platform_base/sonic_sfp/sfputilhelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def read_porttab_mappings(self, porttabfile, asic_inst=0):
else:
physical_to_logical[fp_port_index].append(intf_name)

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

self.logical = logical
Expand Down

0 comments on commit fa0aaa6

Please sign in to comment.