Skip to content

Commit 973affc

Browse files
[voq/inbandif] Support for inband port as regular port (#6477)
Changes in this PR are to make LLDP to consider Inband port and to avoid regular port handling on Inband port.
1 parent aa63c71 commit 973affc

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

dockers/docker-lldp/lldpmgrd

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ try:
2222

2323
from sonic_py_common import daemon_base
2424
from swsscommon import swsscommon
25+
from sonic_py_common.interface import inband_prefix
2526
except ImportError as err:
2627
raise ImportError("%s - required module not found" % str(err))
2728

@@ -94,6 +95,11 @@ class LldpManager(daemon_base.DaemonBase):
9495
"""
9596
port_desc = None
9697

98+
# Skip inband interface prefixes. These are recycle ports exposed in PORT_TABLE for
99+
# asic-to-asic communication in VOQ based chassis system. We do not configure LLDP on these.
100+
if port_name.startswith(inband_prefix()):
101+
return
102+
97103
# Retrieve all entires for this port from the Port table
98104
port_table = swsscommon.Table(self.config_db, swsscommon.CFG_PORT_TABLE_NAME)
99105
(status, fvp) = port_table.get(port_name)

platform/vs/docker-sonic-vs/start.sh

+10
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@ fi
9090
if [ "$conn_chassis_db" == "1" ]; then
9191
if [ -f /usr/share/sonic/virtual_chassis/coreportindexmap.ini ]; then
9292
cp /usr/share/sonic/virtual_chassis/coreportindexmap.ini /usr/share/sonic/hwsku/
93+
94+
pushd /usr/share/sonic/hwsku
95+
96+
# filter available front panel ports in coreportindexmap.ini
97+
[ -f coreportindexmap.ini.orig ] || cp coreportindexmap.ini coreportindexmap.ini.orig
98+
for p in $(ip link show | grep -oE "eth[0-9]+" | grep -v eth0); do
99+
grep ^$p: coreportindexmap.ini.orig
100+
done > coreportindexmap.ini
101+
102+
popd
93103
fi
94104
fi
95105

src/sonic-py-common/sonic_py_common/interface.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"PortChannel": "PortChannel",
1414
"Vlan": "Vlan",
1515
"Loopback": "Loopback",
16-
"Ethernet-Backplane": "Ethernet-BP"
16+
"Ethernet-Backplane": "Ethernet-BP",
17+
"Ethernet-Inband": "Ethernet-IB"
1718
}
1819

1920
VLAN_SUB_INTERFACE_SEPARATOR = '.'
@@ -48,6 +49,12 @@ def loopback_prefix():
4849
"""
4950
return SONIC_INTERFACE_PREFIXES["Loopback"]
5051

52+
def inband_prefix():
53+
"""
54+
Retrieves the SONIC recycle port inband interface name prefix.
55+
"""
56+
return SONIC_INTERFACE_PREFIXES["Ethernet-Inband"]
57+
5158
def get_interface_table_name(interface_name):
5259
"""Get table name by interface_name prefix
5360
"""

0 commit comments

Comments
 (0)