Skip to content

[Nexthop] Skip setting CREATE_ONLY next hop group attributes - #1605

Open
daria-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:skip-setting-create-only-next-hop-group
Open

[Nexthop] Skip setting CREATE_ONLY next hop group attributes#1605
daria-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:skip-setting-create-only-next-hop-group

Conversation

@daria-nexthop

Copy link
Copy Markdown
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

The HW agent SIGABRTs on warm boot in AgentFlowletSprayTest.VerifyEcmpRandomSpray and AgentLoadBalancerTestV6EcmpSpray.EcmpLoadBalanceFullHashCpuTraffic on Tomahawk6 platforms. SAI_NEXT_HOP_GROUP_ATTR_HIERARCHICAL_NEXTHOP is CREATE_ONLY in the SAI spec, and Broadcom 14.2 SAI doesn't implement a getter. On warm boot SaiStore::reload() falls back to the attribute's StdNullOptDefault, and SaiObject::checkAndSetAttribute sees nullopt != false and issues a set on a create only attribute, which returns NOT_SUPPORTED and hw agent aborts.

This change adds an IsCreateOnlyAttribute trait, specialised for HierarchicalNextHop. checkAndSetAttribute() no longer writes create-only attributes to hardware; instead, the store adopts the desired value in its cache, preserving the value programmed during object creation.

HashAlgorithm is included on spec grounds: it is also CREATE_ONLY, but it does not trigger this issue because Broadcom SAI implements its getter.

Test Plan

The tests now pass:

[ PASSED ] cold_boot.AgentFlowletSprayTest.VerifyEcmpRandomSpray (39999 ms)
[ PASSED ] warm_boot.AgentFlowletSprayTest.VerifyEcmpRandomSpray (37260 ms)
[ PASSED ] cold_boot.AgentLoadBalancerTestV6EcmpSpray.EcmpLoadBalanceFullHashCpuTraffic (21232 ms)
[ PASSED ] warm_boot.AgentLoadBalancerTestV6EcmpSpray.EcmpLoadBalanceFullHashCpuTraffic (19543 ms)

Signed-off-by: daria-nexthop <daria@nexthop.ai>
@daria-nexthop
daria-nexthop requested a review from a team as a code owner September 5, 2026 10:06
@meta-cla meta-cla Bot added the CLA Signed label Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant