CP-312083: Implement API for exposing received LLDP TLVs - #7231
Open
changlei-li wants to merge 4 commits into
Open
CP-312083: Implement API for exposing received LLDP TLVs#7231changlei-li wants to merge 4 commits into
changlei-li wants to merge 4 commits into
Conversation
Add a DynamicRO map(string, string) field that exposes the effective LLDP state (enabled/disabled/blocked) and the received neighbour TLVs (system_name, port_id, port_description) of the physical NIC. Pass it at the PIF_metrics create sites, show it via the xe CLI, and document the field in the LLDP design doc. Signed-off-by: Changlei Li <changlei.li@citrix.com>
Add lldp_rx (LLDP state plus neighbour fields) to the shared network stats. networkd parses `lldpcli -f json0 show neighbors` for the neighbour and `show interfaces` for the state (rx-and-tx is Enabled, otherwise Blocked when the driver is in the blocklist, else Disabled), and records both in /dev/shm/network_stats. Signed-off-by: Changlei Li <changlei.li@citrix.com>
changlei-li
marked this pull request as draft
August 18, 2026 09:42
Cover Lldp.parse_neighbors, parse_enabled_interfaces and state_of. Signed-off-by: Changlei Li <changlei.li@citrix.com>
changlei-li
force-pushed
the
private/changleli/lldp-neighbors
branch
from
August 18, 2026 09:48
1192a79 to
861910e
Compare
changlei-li
marked this pull request as ready for review
August 19, 2026 03:00
Member
Author
|
self test: The VLAN PIF shares PIF_metrices of its underlying physical PIF. If lldp_neighbor is inquired for a VLAN PIF, it will show the same lldp_neighbor with its underlying physical PIF. |
Monitor_dbcalls reads lldp_rx from the network stats and writes it to PIF_metrics.lldp_neighbor as a string map (state plus neighbour keys), with change detection to avoid redundant database writes. Signed-off-by: Changlei Li <changlei.li@citrix.com>
changlei-li
force-pushed
the
private/changleli/lldp-neighbors
branch
from
August 19, 2026 04:57
861910e to
a711edd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PIF_metrics.lldp_neighbor, Map (String, String), the received LLDP TLVs from the corresponding PIF
Example:
“state”: “enabled”, “system_name”: “EU1-ESWA04-7”, “port_id”: “ifname Eth1/8/3”, “port_description”: “genuk-37-13-nap/eth2_(nsec)”