Repository navigation
[snmpagent][rfc1213] Optimize ipRouteNextHop default-route lookup - #373
vpandian-nokia wants to merge 2 commits into
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
163fe96 to
50a662f
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@qiluo-msft This PR is a follow-up optimization of Changes in this PR:
Would appreciate your review when you have a chance. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@deepak-singhal0408: The relevant sonic-mgmt SNMP tests passed for this change. I would appreciate a reviewer taking a look and, if everything looks good, helping approve the PR. |
|
@qiluo-msft Gentle follow-up on this PR when you have a chance. The relevant sonic-mgmt SNMP tests have passed, and the change is ready for review. Please let me know if any additional information is needed. |
Signed-off-by: Vijay Pandian <vijayaragavan.pandian@nokia.com>
2411e71 to
bb82431
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks! ---Powered by SONiC BuildBot
|
Select the first valid IPv4 nexthop for RFC1213 ipRouteNextHop while skipping invalid and IPv6 tokens. Add unit tests for IPv6-only and IPv6-then-IPv4 nexthop lists. Signed-off-by: Vijay Pandian <vijayaragavan.pandian@nokia.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Hi @deepak-singhal0408 @qiluo-msft — Latest update:
CI is green on Ready for review/merge. |
What I did
Optimized
ipRouteNextHophandling inrfc1213.pyto avoid scanning all route keys inAPPL_DB, while preserving RFC1213 default-route behavior.ROUTE_TABLE:*scan + filter with direct lookup ofROUTE_TABLE:0.0.0.0/0.strip()+ invalid-token handling).route_listis updated only after successful IPv4 nexthop parse.tests/test_rfc1213.pyfor direct lookup path, invalid-token fallback, and IPv6/IPv4 nexthop cases.How I did it
Modified
NextHopUpdater.update_data()to:ROUTE_TABLE:0.0.0.0/0fromAPPL_DB.nexthopfield from the returned route entry.How to verify it
tests/test_rfc1213.pyROUTE_TABLE:0.0.0.0/0direct lookup + IPv4-only nexthop filter)snmpwalk 1.3.6.1.2.1.4.21.1.7returnsNo Such Instancein <200ms (stable across repeated polls)0.0.0.0/0via valid IPv4 nexthop):snmpwalk/getreturns expected IPv4 nexthop in <200msNo Such Instance- Which release branch to backport (provide reason below if selected)
Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type: N/A (optimization; no backport requested)
- Tested branch
- Test result
tests/test_rfc1213.pypassedNo Such Instance, fast response)Description for the changelog
Optimize SNMP
ipRouteNextHopdefault-route lookup by replacing full route-table scan with directROUTE_TABLE:0.0.0.0/0query and improving IPv4 nexthop parsing robustness.