diff --git a/sonic_platform_base/sonic_sfp/sfputilbase.py b/sonic_platform_base/sonic_sfp/sfputilbase.py index 8de80302359b..9e3d30d1544d 100644 --- a/sonic_platform_base/sonic_sfp/sfputilbase.py +++ b/sonic_platform_base/sonic_sfp/sfputilbase.py @@ -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 @@ -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) diff --git a/sonic_platform_base/sonic_sfp/sfputilhelper.py b/sonic_platform_base/sonic_sfp/sfputilhelper.py index a18305b6695a..ece2885ddc33 100644 --- a/sonic_platform_base/sonic_sfp/sfputilhelper.py +++ b/sonic_platform_base/sonic_sfp/sfputilhelper.py @@ -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)) @@ -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)