Skip to content

Survive pfc watchdog storm action across warm-reboot#794

Merged
wendani merged 24 commits intosonic-net:masterfrom
wendani:pfcwd_wb_master
Apr 8, 2019
Merged

Survive pfc watchdog storm action across warm-reboot#794
wendani merged 24 commits intosonic-net:masterfrom
wendani:pfcwd_wb_master

Conversation

@wendani
Copy link
Contributor

@wendani wendani commented Feb 16, 2019

What I did

Why I did it
When the PFC storm is ongoing before warm-reboot is issued, make sure the ASIC after warm-reboot is in the consistent state where storm action remains installed as it was in the ASIC until the normal restore criteria runs properly and kicks in to take charge of the dictation.

How I verified it
Tested on brcm dut

Details if related
Prerequiste: PFC watchdog must be set enabled by default to start running automatically when SONiC boots up. #795

Depend on:
schema table name change: sonic-net/sonic-swss-common#266
multi-fields hdel: sonic-net/sonic-swss-common#267

Downstream changes:
In accordance with schema table name change: sonic-net/sonic-utilities#475
sonic-net/sonic-mgmt#866

Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
@wendani wendani changed the title Survive pfc watchdog and storm actions across warm-reboot Survive pfc watchdog and storm action across warm-reboot Feb 16, 2019
@wendani wendani changed the title Survive pfc watchdog and storm action across warm-reboot Survive pfc watchdog storm action across warm-reboot Feb 16, 2019
Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As comments

Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
PFC_WD_TABLE keyspace

Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
@wendani wendani requested a review from qiluo-msft March 1, 2019 21:44
wendani added 2 commits March 2, 2019 01:55
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
…ler>:: with this to shorten the code length

Signed-off-by: Wenda Ni <wenni@microsoft.com>
@qiluo-msft qiluo-msft dismissed their stale review March 26, 2019 05:00

Unblocked, one minor issue remains.

wendani added 2 commits April 1, 2019 17:29
…ch<DropHandler,

ForwardHandler>:: with this to shorten the code length

Signed-off-by: Wenda Ni <wenni@microsoft.com>
Signed-off-by: Wenda Ni <wenni@microsoft.com>
@wendani wendani merged commit e329dbd into sonic-net:master Apr 8, 2019
yxieca pushed a commit that referenced this pull request Apr 8, 2019
* Survive PFC watchdog and storm action in warm-reboot

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Remove logs used for debugging

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Add queue index check before taking storm action during warm-reboot

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Correct log message

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Log storm event for all storm actions not only drop action

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Address review comments

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Address the situation that stoi() may throw an exception

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Fine-gran handling of stoi exceptions

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Shift temporarily to STATE_DB

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Add debugging symbols

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Revert "Shift temporarily to STATE_DB"

This reverts commit 1027cc1.

* Orthogonalize pfc wd table names

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Implement doTask for the new Consumer, which subscribes to APPL_DB
PFC_WD_TABLE keyspace

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Clean up and touch-ups

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Delete multiple fields in one hdel call

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Refactor codes with multi-fields hdel

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Address comments: remove unnecessary catch blocks for stoi() call

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Use RedisClient to do hset (previous through Table hset)

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Remove debugging symbols

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Address review comments: Replace PfcWdSwOrch<DropHandler, ForwardHandler>:: with this to shorten the code length

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Address review comments: Refactor existing codes to replace PfcWdSwOrch<DropHandler,
ForwardHandler>:: with this to shorten the code length

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Remove unused variable to correct compile error

Signed-off-by: Wenda Ni <wenni@microsoft.com>
stcheng pushed a commit to stcheng/sonic-swss that referenced this pull request Jun 26, 2019
INTF_NAME entry is needed besides INTF_NAME|PREFIX
This change is introduced in commit 185e9a1 sonic-net#794

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
stcheng pushed a commit to stcheng/sonic-swss that referenced this pull request Jun 26, 2019
INTF_NAME entry is needed besides INTF_NAME|PREFIX
This change is introduced in commit 185e9a1 sonic-net#794

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
stcheng pushed a commit to stcheng/sonic-swss that referenced this pull request Jun 26, 2019
INTF_NAME entry is needed besides INTF_NAME|PREFIX
This change is introduced in commit 185e9a1 sonic-net#794

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
stcheng added a commit that referenced this pull request Jun 27, 2019
INTF_NAME entry is needed besides INTF_NAME|PREFIX
This change is introduced in commit 185e9a1 #794

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
add kvm to platforms which do not support syseeprom db and check for the 'read_syseeprom_db' method availibilty to avoid same issue on other platforms
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
* Survive PFC watchdog and storm action in warm-reboot

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Remove logs used for debugging

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Add queue index check before taking storm action during warm-reboot

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Correct log message

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Log storm event for all storm actions not only drop action

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Address review comments

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Address the situation that stoi() may throw an exception

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Fine-gran handling of stoi exceptions

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Shift temporarily to STATE_DB

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Add debugging symbols

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Revert "Shift temporarily to STATE_DB"

This reverts commit 1027cc1.

* Orthogonalize pfc wd table names

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Implement doTask for the new Consumer, which subscribes to APPL_DB
PFC_WD_TABLE keyspace

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Clean up and touch-ups

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Delete multiple fields in one hdel call

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Refactor codes with multi-fields hdel

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Address comments: remove unnecessary catch blocks for stoi() call

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Use RedisClient to do hset (previous through Table hset)

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Remove debugging symbols

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Address review comments: Replace PfcWdSwOrch<DropHandler, ForwardHandler>:: with this to shorten the code length

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Address review comments: Refactor existing codes to replace PfcWdSwOrch<DropHandler,
ForwardHandler>:: with this to shorten the code length

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Remove unused variable to correct compile error

Signed-off-by: Wenda Ni <wenni@microsoft.com>
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
INTF_NAME entry is needed besides INTF_NAME|PREFIX
This change is introduced in commit 185e9a1 sonic-net#794

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
jianyuewu pushed a commit to jianyuewu/sonic-swss that referenced this pull request Dec 24, 2025
…rectors feature. (sonic-net#794)

 Improve go language SWIG wrapper: add exception mapping and enable directors feature.

#### Work item tracking
Microsoft ADO (number only): 24117097

#### Why I did it
Go language not support c++ exception.
Class inheritance information missing in go wrapper.

#### How I did it
Add exception handler to mapping c++ exception to go panic.
Enable directors feature to convert c++ class inheritance information to go wrapper class inheritance information.

#### How to verify it
Pass all UT and E2E test cases.

#### 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

#### Description for the changelog
 Improve go language SWIG wrapper: add exception mapping and enable directors feature.

#### 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/wiki/Configuration.
-->

#### A picture of a cute animal (not mandatory but encouraged)
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.

3 participants