From 4b5aaf8887658a6e89a54672583f8bc1b32574a4 Mon Sep 17 00:00:00 2001 From: Samuel Angebault Date: Thu, 16 Dec 2021 11:37:24 +0100 Subject: [PATCH] Add recycle port to the physical ignore list (#251) --- sonic_platform_base/sonic_sfp/sfputilbase.py | 4 ++-- sonic_platform_base/sonic_sfp/sfputilhelper.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sonic_platform_base/sonic_sfp/sfputilbase.py b/sonic_platform_base/sonic_sfp/sfputilbase.py index 9e3d30d15..760ababa1 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, inband_prefix + from sonic_py_common.interface import backplane_prefix, inband_prefix, recirc_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 @@ -499,7 +499,7 @@ def read_porttab_mappings(self, porttabfile, asic_inst=0): portname = line.split()[0] # Ignore if this is an internal backplane interface and Inband interface - if portname.startswith(backplane_prefix()) or portname.startswith(inband_prefix()): + if portname.startswith((backplane_prefix(), inband_prefix(), recirc_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 ece2885dd..ee70fe563 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, inband_prefix + from sonic_py_common.interface import backplane_prefix, inband_prefix, recirc_prefix except ImportError as e: raise ImportError("%s - required module not found" % str(e)) @@ -128,7 +128,7 @@ def read_porttab_mappings(self, porttabfile, asic_inst=0): portname = line.split()[0] # Ignore if this is an internal backplane interface and Inband interface - if portname.startswith(backplane_prefix()) or portname.startswith(inband_prefix()): + if portname.startswith((backplane_prefix(), inband_prefix(), recirc_prefix())): continue bcm_port = str(port_pos_in_file)