Skip to content

[202511][portsorch] Guard LAG member learning mode transitions - #4902

Draft
zedzean wants to merge 2 commits into
sonic-net:202511from
zedzean:review/lag-member-learning-guard-pinned
Draft

zedzean wants to merge 2 commits into
sonic-net:202511from
zedzean:review/lag-member-learning-guard-pinned

Conversation

@zedzean

@zedzean zedzean commented Sep 18, 2026

Copy link
Copy Markdown

What I did

  • Temporarily set the LAG bridge-port learning mode to DROP while an enabled member rejoins the LAG, then restore the configured mode.
  • Limit the guard to the affected broadcom/M2-W6520-48C8QC platform.
  • Verify transitions with GET/SET/GET and retry recoverable failures with bounded backoff.
  • Preserve newer desired state, isolate recovery per LAG, and retain terminal failures for explicit recovery.
  • Add focused unit coverage for scope, retries, task ownership, recovery, deletion, and per-LAG isolation.

Why I did it

The affected SAI sequence enables learning on the physical port shortly before adding it back to the LAG. Traffic in that interval can generate FDB events for a bridge-port object that is immediately removed, leaving FDB state out of sync. DROP prevents learning and unknown-source forwarding during that interval.

Related reports:

Review status

This review-only draft is intentionally based on d43da0182493e4d15ffac5f620ba03622e8b9b62 to preserve exact source equivalence. It is 13 commits behind the current 202511 tip and is not intended to merge as-is.

Validation

  • git diff --check passes.
  • The compare contains one DCO-signed commit and eight intended SWSS files.
  • Unit tests are included but were not executed locally because a SONiC Linux build environment is unavailable.

Temporarily set the LAG bridge port learning mode to DROP while an enabled member rejoins the LAG, then restore its configured mode. Verify transitions, retry recoverable failures, and retain failed work for explicit recovery.

Add focused unit coverage for platform scope, retries, queue ownership, recovery, deletion, and per-LAG isolation.

Signed-off-by: Zaahir Syed <44662240+zedzean@users.noreply.github.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

Preserve and advance configuration retries while LAG deletion is blocked, let newer desired state replace obsolete retry targets, and synchronize desired mode after successful or terminal retry outcomes. Add deterministic regression coverage and remove the timing-sensitive queue coalescing test.

Signed-off-by: Zaahir Syed <zaahir@cloudflare.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

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