Skip to content

Commit f4901a0

Browse files
[voqinbandif]To support inband port as front panel port (sonic-net#159)
Signed-off-by: vedganes <[email protected]> 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.
1 parent 872f0a3 commit f4901a0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

sonic_platform_base/sonic_sfp/sfputilbase.py

+3-3
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
18+
from sonic_py_common.interface import backplane_prefix, inband_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
@@ -498,8 +498,8 @@ def read_porttab_mappings(self, porttabfile, asic_inst=0):
498498
# so we use the port's position in the file (zero-based) as bcm_port
499499
portname = line.split()[0]
500500

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

505505
bcm_port = str(port_pos_in_file)

sonic_platform_base/sonic_sfp/sfputilhelper.py

+3-3
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
17+
from sonic_py_common.interface import backplane_prefix, inband_prefix
1818

1919
except ImportError as e:
2020
raise ImportError("%s - required module not found" % str(e))
@@ -127,8 +127,8 @@ def read_porttab_mappings(self, porttabfile, asic_inst=0):
127127
# so we use the port's position in the file (zero-based) as bcm_port
128128
portname = line.split()[0]
129129

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

134134
bcm_port = str(port_pos_in_file)

0 commit comments

Comments
 (0)