Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[voq/inbandif] Support for inband port as regular port #6477

Merged
merged 4 commits into from
Apr 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions dockers/docker-lldp/lldpmgrd
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ try:

from sonic_py_common import daemon_base
from swsscommon import swsscommon
from sonic_py_common.interface import inband_prefix
except ImportError as err:
raise ImportError("%s - required module not found" % str(err))

Expand Down Expand Up @@ -94,6 +95,11 @@ class LldpManager(daemon_base.DaemonBase):
"""
port_desc = None

# Skip inband interface prefixes. These are recycle ports exposed in PORT_TABLE for
# asic-to-asic communication in VOQ based chassis system. We do not configure LLDP on these.
if port_name.startswith(inband_prefix()):
return

# Retrieve all entires for this port from the Port table
port_table = swsscommon.Table(self.config_db, swsscommon.CFG_PORT_TABLE_NAME)
(status, fvp) = port_table.get(port_name)
Expand Down
10 changes: 10 additions & 0 deletions platform/vs/docker-sonic-vs/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ fi
if [ "$conn_chassis_db" == "1" ]; then
if [ -f /usr/share/sonic/virtual_chassis/coreportindexmap.ini ]; then
cp /usr/share/sonic/virtual_chassis/coreportindexmap.ini /usr/share/sonic/hwsku/

pushd /usr/share/sonic/hwsku

# filter available front panel ports in coreportindexmap.ini
[ -f coreportindexmap.ini.orig ] || cp coreportindexmap.ini coreportindexmap.ini.orig
for p in $(ip link show | grep -oE "eth[0-9]+" | grep -v eth0); do
grep ^$p: coreportindexmap.ini.orig
done > coreportindexmap.ini

popd
fi
fi

Expand Down
9 changes: 8 additions & 1 deletion src/sonic-py-common/sonic_py_common/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"PortChannel": "PortChannel",
"Vlan": "Vlan",
"Loopback": "Loopback",
"Ethernet-Backplane": "Ethernet-BP"
"Ethernet-Backplane": "Ethernet-BP",
"Ethernet-Inband": "Ethernet-IB"
}

VLAN_SUB_INTERFACE_SEPARATOR = '.'
Expand Down Expand Up @@ -48,6 +49,12 @@ def loopback_prefix():
"""
return SONIC_INTERFACE_PREFIXES["Loopback"]

def inband_prefix():
"""
Retrieves the SONIC recycle port inband interface name prefix.
"""
return SONIC_INTERFACE_PREFIXES["Ethernet-Inband"]

def get_interface_table_name(interface_name):
"""Get table name by interface_name prefix
"""
Expand Down