Skip to content

Commit 4b5aaf8

Browse files
authored
Add recycle port to the physical ignore list (sonic-net#251)
1 parent 8e06e7f commit 4b5aaf8

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

sonic_platform_base/sonic_sfp/sfputilbase.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from natsort import natsorted
1616
from portconfig import get_port_config
1717
from sonic_py_common import device_info
18-
from sonic_py_common.interface import backplane_prefix, inband_prefix
18+
from sonic_py_common.interface import backplane_prefix, inband_prefix, recirc_prefix
1919

2020
from sonic_eeprom import eeprom_dts
2121
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):
499499
portname = line.split()[0]
500500

501501
# Ignore if this is an internal backplane interface and Inband interface
502-
if portname.startswith(backplane_prefix()) or portname.startswith(inband_prefix()):
502+
if portname.startswith((backplane_prefix(), inband_prefix(), recirc_prefix())):
503503
continue
504504

505505
bcm_port = str(port_pos_in_file)

sonic_platform_base/sonic_sfp/sfputilhelper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from natsort import natsorted
1515
from portconfig import get_port_config
1616
from sonic_py_common import device_info
17-
from sonic_py_common.interface import backplane_prefix, inband_prefix
17+
from sonic_py_common.interface import backplane_prefix, inband_prefix, recirc_prefix
1818

1919
except ImportError as e:
2020
raise ImportError("%s - required module not found" % str(e))
@@ -128,7 +128,7 @@ def read_porttab_mappings(self, porttabfile, asic_inst=0):
128128
portname = line.split()[0]
129129

130130
# Ignore if this is an internal backplane interface and Inband interface
131-
if portname.startswith(backplane_prefix()) or portname.startswith(inband_prefix()):
131+
if portname.startswith((backplane_prefix(), inband_prefix(), recirc_prefix())):
132132
continue
133133

134134
bcm_port = str(port_pos_in_file)

0 commit comments

Comments
 (0)