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

Do not configure LLDP on recirc ports #7909

Merged
merged 2 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 3 additions & 3 deletions dockers/docker-lldp/lldpmgrd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ try:

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

Expand Down Expand Up @@ -131,9 +131,9 @@ class LldpManager(daemon_base.DaemonBase):
"""
port_desc = None

# Skip inband interface prefixes. These are recycle ports exposed in PORT_TABLE for
# Skip recirc and 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()):
if port_name.startswith(inband_prefix()) or port_name.startswith(recirc_prefix()):
return

# Retrieve all entires for this port from the Port table
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 @@ -14,7 +14,8 @@
"Vlan": "Vlan",
"Loopback": "Loopback",
"Ethernet-Backplane": "Ethernet-BP",
"Ethernet-Inband": "Ethernet-IB"
"Ethernet-Inband": "Ethernet-IB",
"Ethernet-Recirc": "Ethernet-Rec"
}

VLAN_SUB_INTERFACE_SEPARATOR = '.'
Expand Down Expand Up @@ -55,6 +56,12 @@ def inband_prefix():
"""
return SONIC_INTERFACE_PREFIXES["Ethernet-Inband"]

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

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