From f4901a0e2f7947de8cedc110975a5bf59a5d766a Mon Sep 17 00:00:00 2001 From: vganesan-nokia <67648637+vganesan-nokia@users.noreply.github.com> Date: Fri, 9 Apr 2021 19:02:33 -0400 Subject: [PATCH] [voqinbandif]To support inband port as front panel port (#159) Signed-off-by: vedganes 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. --- sonic_platform_base/sonic_sfp/sfputilbase.py | 6 +++--- sonic_platform_base/sonic_sfp/sfputilhelper.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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)