Skip to content

Fix build errors in branch 201712#1775

Merged
lguohan merged 5 commits intosonic-net:201712from
cytsai0409:201712
Jun 9, 2018
Merged

Fix build errors in branch 201712#1775
lguohan merged 5 commits intosonic-net:201712from
cytsai0409:201712

Conversation

@cytsai0409
Copy link
Copy Markdown
Contributor

- What I did
Patch #1755, #1666 and #1633 from master branch to 201712 branch

- How I did it
Patch the files in #1755, #1666 and #1633

- How to verify it
Locally patch these files and build image, verify the build process is finished successfully

- Description for the changelog
Fix build errors in branch 201712

sonic added 2 commits June 8, 2018 17:21
@lguohan lguohan merged commit 6453b3a into sonic-net:201712 Jun 9, 2018
patrickmacarthur pushed a commit to patrickmacarthur/sonic-buildimage that referenced this pull request Dec 11, 2025
…min-up (sonic-net#1775)

<!--
Please make sure you've read and understood our contributing guidelines:
     https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

** Make sure all your commits include a signature generated with `git
commit -s` **

If this is a bug fix, make sure your description includes "fixes #xxxx",
or
     "closes #xxxx" or "resolves #xxxx"

     Please provide the following information:
-->

#### Why I did it
To avoid having ref count issues when the port speed is change from 400g
to 100g we have to generate the scheduler only on the ports which are
admin-up

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

#### How I did it
This PR modifies the QoS configuration template for VoQ chassis to
conditionally apply scheduler configuration only on admin-up ports,
addressing reference count issues during port speed changes (e.g., 400g
to 100g).

Key Changes
Introduces SYSTEM_PORT_ACTIVE array to track admin-up ports based on
DEVICE_NEIGHBOR presence
Conditionally adds scheduler config for queues 3 and 4 on admin-up ports
only
Changes queues 0, 1, 2, 5, 6 to only be generated for admin-up ports
instead of all ports
Updates sample QoS output files to reflect the new configuration
structure
#### How to verify it

<!--
If PR needs to be backported, then the PR must be tested against the
base branch and the earliest backport release branch and provide tested
image version on these two branches. For example, if the PR is requested
for master, 202211 and 202012, then the requester needs to provide test
results on master and 202012.
-->

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

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
- [ ] 202211

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

<!--
- Please provide tested image version
- e.g.
- [x] 20201231.100
-->

- [ ] <!-- image version 1 -->
- [ ] <!-- image version 2 -->

#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->

<!--
Ensure to add label/tag for the feature raised. example - PR#2174 under
sonic-utilities repo. where, Generic Config and Update feature has been
labelled as GCU.
-->

#### Link to config_db schema for YANG module changes
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on
https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md
-->

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

---------

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
mssonicbld added a commit that referenced this pull request Feb 25, 2026
…tically (#25609)

#### Why I did it
src/sonic-sairedis
```
* c7a61be0 - (HEAD -> 202511, origin/202511) Fix switch stat counters by using get_stats_ext instead of get_stats (#1775) (3 hours ago) [mssonicbld]
* 4f1d7d99 - Revert "Temp workaround for sonic-buildimage issue 23387 (#1629)" (#1758) (13 hours ago) [mssonicbld]
* 7c5f17d2 - [ci] Install redis from Debian (#1778) (24 hours ago) [mssonicbld]
* ec4a54d5 - Fix dash meter COUNTERS_DB keys to use VID instead of RID (#1750) (4 days ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
mssonicbld added a commit to mssonicbld/sonic-buildimage that referenced this pull request Mar 17, 2026
… 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 <sonicbld@microsoft.com>
mssonicbld added a commit that referenced this pull request Mar 17, 2026
… image (#26217)

#### 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
- [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 <sonicbld@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants