Skip to content

[code sync] Merge code from sonic-net/sonic-swss:202511 to 202601#241

Merged
mssonicbld merged 2 commits into
Azure:202601from
mssonicbld:sonicbld/202601-merge
Jun 20, 2026
Merged

[code sync] Merge code from sonic-net/sonic-swss:202511 to 202601#241
mssonicbld merged 2 commits into
Azure:202601from
mssonicbld:sonicbld/202601-merge

Conversation

@mssonicbld

Copy link
Copy Markdown
Collaborator
* 6c052911 - (origin/202511) [pfcwdorch]: Clean up PFC_WD_TABLE_INSTORM on PFC watchdog stop (#4685) (2026-06-20) [mssonicbld]<br>```

mssonicbld and others added 2 commits June 20, 2026 08:13
**What I did**

Clean up the stale `PFC_WD_TABLE_INSTORM:<port>` entry in APPL_DB when PFC watchdog is stopped on a port. In `PfcWdSwOrch::unregisterFromWdDb()`, the per-queue cleanup loop already removed the COUNTERS_DB watchdog fields; this change additionally drops each queue's field from the port's `INSTORM` hash so the table is consistent once watchdog is stopped.

**Why I did it**

When PFC watchdog is stopped on a port while one or more of its queues are in storm, the per-queue fields under `PFC_WD_TABLE_INSTORM:<port>` were left behind (e.g. `PFC_WD_TABLE_INSTORM:Ethernet20` -> `{'3':'storm','4':'storm'}`) with no active storm.

The stale row is replayed on warm boot: on startup, pfcwdorch drains the `APP_PFC_WD_TABLE` consumer, reads the stale in-storm queues, and re-enters the storm handler even though no storm exists.

**How I verified it**

- `pfcwd start` on a port, inject a storm so the queue is detected as stormed and `PFC_WD_TABLE_INSTORM:<port>` is populated.
- `pfcwd stop <port>`; confirm `sonic-db-cli APPL_DB HGETALL PFC_WD_TABLE_INSTORM:<port>` returns `{}`.
- Warm restart swss with no active storm; confirm the port no longer comes up in `show pfcwd stats` as stormed.

**Details if related**

Related to #1691, which addresses the same stale in-storm state for warm-reboot but also bundles a broader portsorch/big-red-switch refactor and has remained unmerged since 2021. This PR is a minimal, self-contained fix for the pfcwd-stop case only.

Fixes #4667

Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
@mssonicbld mssonicbld requested a review from kperumalbfn as a code owner June 20, 2026 03:03
@mssonicbld mssonicbld merged commit 4f2e43e into Azure:202601 Jun 20, 2026
5 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