feat(lldp-mib): add SNMP subagent handlers for lldpPortConfigTable, lldpStats scalars, lldpStatsTxPortTable, lldpStatsRxPortTable#378
Closed
shongal-uai wants to merge 2 commits into
Conversation
… lldpStatsTxPortTable, lldpStatsRxPortTable (UPSW-LLDP-GAP-005)
|
Collaborator
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
Author
|
Closing for now — will revisit when upstream fix is prioritized (UPSW-LLDP-GAP-005). |
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.
Problem
In the current `sonic_ax_impl/mibs/ieee802_1ab.py` implementation, the following LLDP-MIB subtrees have no registered handler and return empty responses:
Verified on `upscaleai-202511` (Mellanox SN5610, 130 ports): `snmpwalk 1.0.8802.1.1.2.1.1.7` and `snmpwalk 1.0.8802.1.1.2.1.2` return no data.
Fix
`src/sonic_ax_impl/mibs/ieee802_1ab.py`
Adds four new handler classes:
`src/sonic_ax_impl/main.py`
Registers the four new handler classes in the MIB instance map.
Test evidence
fanout7 — upscaleai-202511 (Mellanox SN5610, 130 ports)
Without patch (base image):
```
snmpwalk -v2c -c public 1.0.8802.1.1.2.1.1.7 # endOfMibView
snmpwalk -v2c -c public 1.0.8802.1.1.2.1.2 # endOfMibView
```
Automated test result: 15 tests xfail (UPSW-LLDP-GAP-005)
With patch applied:
```
snmpwalk -v2c -c public 1.0.8802.1.1.2.1.1.7 # → 130 rows (lldpPortConfigAdminStatus per port)
snmpwalk -v2c -c public 1.0.8802.1.1.2.1.2.1 # → Timeticks scalar
snmpwalk -v2c -c public 1.0.8802.1.1.2.1.2.6 # → 130 rows (TX frames per port)
snmpwalk -v2c -c public 1.0.8802.1.1.2.1.2.7 # → 780 rows (6 RX columns × 130 ports)
```
Automated test result: 15 xpassed, 0 failed
Note: `lldpStatistics` scalars (`lldpStatsRemTablesInserts`, `Deletes`, `Drops`, `Ageouts`) are also used as varbinds in `lldpRemTablesChange` SNMP trap notifications — the notification implementation (upscale-ai-network/ucli#351) reads these counters from `LLDP_LOC_COUNTERS` and includes them in each trap PDU.
Data availability note
`lldpPortConfigTable` reads admin status from `APPL_DB LLDP_ENTRY_TABLE` (present on any SONiC build with lldpd running). `lldpStats*` counters read from `APPL_DB LLDP_LOC_COUNTERS` (written by lldpd-syncd). Both sources are present on standard SONiC builds.
References
Made with Cursor