Skip to content

Commit

Permalink
[voqinbandif]To support inband port as front panel port (#159)
Browse files Browse the repository at this point in the history
Signed-off-by: vedganes <vedavinayagam.ganesan@nokia.com>

Inband port is avaialable in PORT table. But regular port handlings are
not applicable for Inband port. Changes in this PR for avoiding regular
port handling on Inband port.
  • Loading branch information
vganesan-nokia authored Apr 9, 2021
1 parent 872f0a3 commit f4901a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions sonic_platform_base/sonic_sfp/sfputilbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from natsort import natsorted
from portconfig import get_port_config
from sonic_py_common import device_info
from sonic_py_common.interface import backplane_prefix
from sonic_py_common.interface import backplane_prefix, inband_prefix

from sonic_eeprom import eeprom_dts
from .sff8472 import sff8472InterfaceId # Dot module supports both Python 2 and Python 3 using explicit relative import methods
Expand Down Expand Up @@ -498,8 +498,8 @@ def read_porttab_mappings(self, porttabfile, asic_inst=0):
# so we use the port's position in the file (zero-based) as bcm_port
portname = line.split()[0]

# Ignore if this is an internal backplane interface
if portname.startswith(backplane_prefix()):
# Ignore if this is an internal backplane interface and Inband interface
if portname.startswith(backplane_prefix()) or portname.startswith(inband_prefix()):
continue

bcm_port = str(port_pos_in_file)
Expand Down
6 changes: 3 additions & 3 deletions sonic_platform_base/sonic_sfp/sfputilhelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from natsort import natsorted
from portconfig import get_port_config
from sonic_py_common import device_info
from sonic_py_common.interface import backplane_prefix
from sonic_py_common.interface import backplane_prefix, inband_prefix

except ImportError as e:
raise ImportError("%s - required module not found" % str(e))
Expand Down Expand Up @@ -127,8 +127,8 @@ def read_porttab_mappings(self, porttabfile, asic_inst=0):
# so we use the port's position in the file (zero-based) as bcm_port
portname = line.split()[0]

# Ignore if this is an internal backplane interface
if portname.startswith(backplane_prefix()):
# Ignore if this is an internal backplane interface and Inband interface
if portname.startswith(backplane_prefix()) or portname.startswith(inband_prefix()):
continue

bcm_port = str(port_pos_in_file)
Expand Down

0 comments on commit f4901a0

Please sign in to comment.