Skip to content

Commit

Permalink
Add recycle port to the physical ignore list (sonic-net#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
Staphylo authored Dec 16, 2021
1 parent 8e06e7f commit 4b5aaf8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 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, 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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 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, 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))
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4b5aaf8

Please sign in to comment.