Skip to content

[action] [PR:26014] BROADCOM_LEGACY_SAI_COMPAT: Fix sai_get_stats_ext crash on TH1 legacy image#26217

Merged
mssonicbld merged 1 commit intosonic-net:202511from
mssonicbld:cherry/202511/26014
Mar 17, 2026
Merged

[action] [PR:26014] BROADCOM_LEGACY_SAI_COMPAT: Fix sai_get_stats_ext crash on TH1 legacy image#26217
mssonicbld merged 1 commit intosonic-net:202511from
mssonicbld:cherry/202511/26014

Conversation

@mssonicbld
Copy link
Copy Markdown
Collaborator

Why I did it

On Arista 7060cx (BCM56960/Tomahawk-1) running the broadcom-legacy image, syncd crashes inside sai_get_stats_ext during FlexCounter polling for switch objects. The legacy SAI binary does not support sai_get_stats_ext for switch objects on TH1.

Root cause: sonic-sairedis PR #1775 set use_sai_stats_ext = true for COUNTER_TYPE_SWITCH in FlexCounter::createCounterContext(). This is needed for TH5 but causes a crash on TH1 with the legacy SAI binary.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Add SAI_STATS_EXT_SWITCH_SUPPORTED=0 to sai.profile for all Arista 7060cx HWSKUs (BCM56960/Tomahawk-1). The runtime guard in syncd (sonic-sairedis PR #1789) reads this key and sets use_sai_stats_ext = false for switch counter contexts on this platform.

Files changed:

  • device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S/sai.profile
  • device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/sai.profile
  • device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/sai.profile
  • device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q24C8/sai.profile
  • device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-T96C8/sai.profile

How to verify it

  1. Build a broadcom-legacy SONiC image for Arista 7060cx
  2. Boot the device and enable FlexCounter for switch objects
  3. Confirm syncd does not crash during FlexCounter polling
  4. Confirm switch counter stats are still collected (via non-ext path)

Which release branch to backport (provide reason below if selected)

These are bug fixes for broadcom-legacy platform (TH1). The crashes are present in 202511.

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Tested branch (Please provide the tested image version)

  • 20251110.15 (broadcom-legacy, Arista 7060cx)

Description for the changelog

BROADCOM_LEGACY_SAI_COMPAT: Add sai.profile key to disable sai_get_stats_ext for switch objects on Arista 7060cx (TH1) to prevent syncd crash during FlexCounter polling on broadcom-legacy image.

Link to config_db schema for YANG module changes

N/A — sai.profile change only, no config_db schema impact.

A picture of a cute animal (not mandatory but encouraged)

🐧

Signed-off-by: Sonic Build Admin [email protected]

… image

#### Why I did it

On Arista 7060cx (BCM56960/Tomahawk-1) running the broadcom-legacy image, syncd crashes inside `sai_get_stats_ext` during FlexCounter polling for switch objects. The legacy SAI binary does not support `sai_get_stats_ext` for switch objects on TH1.

Root cause: sonic-sairedis PR sonic-net#1775 set `use_sai_stats_ext = true` for `COUNTER_TYPE_SWITCH` in `FlexCounter::createCounterContext()`. This is needed for TH5 but causes a crash on TH1 with the legacy SAI binary.

##### Work item tracking
- Microsoft ADO **(number only)**:

#### How I did it

Add `SAI_STATS_EXT_SWITCH_SUPPORTED=0` to `sai.profile` for all Arista 7060cx HWSKUs (BCM56960/Tomahawk-1). The runtime guard in syncd (sonic-sairedis PR sonic-net#1789) reads this key and sets `use_sai_stats_ext = false` for switch counter contexts on this platform.

Files changed:
- `device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S/sai.profile`
- `device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/sai.profile`
- `device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/sai.profile`
- `device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q24C8/sai.profile`
- `device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-T96C8/sai.profile`

#### How to verify it

1. Build a broadcom-legacy SONiC image for Arista 7060cx
2. Boot the device and enable FlexCounter for switch objects
3. Confirm syncd does not crash during FlexCounter polling
4. Confirm switch counter stats are still collected (via non-ext path)

#### Which release branch to backport (provide reason below if selected)

These are bug fixes for broadcom-legacy platform (TH1). The crashes are present in 202511.

- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
- [x] 202511

#### Tested branch (Please provide the tested image version)

- [x] <!-- image version 1 --> 20251110.15 (broadcom-legacy, Arista 7060cx)

#### Description for the changelog

BROADCOM_LEGACY_SAI_COMPAT: Add sai.profile key to disable sai_get_stats_ext for switch objects on Arista 7060cx (TH1) to prevent syncd crash during FlexCounter polling on broadcom-legacy image.

#### Link to config_db schema for YANG module changes

N/A — sai.profile change only, no config_db schema impact.

#### A picture of a cute animal (not mandatory but encouraged)

🐧

Signed-off-by: Sonic Build Admin <[email protected]>
@mssonicbld
Copy link
Copy Markdown
Collaborator Author

Original PR: #26014

@mssonicbld
Copy link
Copy Markdown
Collaborator Author

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit 56e88c2 into sonic-net:202511 Mar 17, 2026
18 checks passed
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