Skip to content

[Link Event Damping] Add YANG model for dampening configuration - #26231

Open
DendroLabs wants to merge 4 commits into
sonic-net:masterfrom
DendroLabs:link-event-damping/yang-model
Open

[Link Event Damping] Add YANG model for dampening configuration#26231
DendroLabs wants to merge 4 commits into
sonic-net:masterfrom
DendroLabs:link-event-damping/yang-model

Conversation

@DendroLabs

Copy link
Copy Markdown

Summary

Adds YANG model leaves to sonic-port.yang for the Link Event Damping feature (HLD: sonic-net/SONiC#1071).

New leaves in PORT_LIST:

  • link_event_damping_algorithm -- string: disabled | aied | aied-monitor (default: "disabled")
  • max_suppress_time -- uint32, seconds (default: 0)
  • decay_half_life -- uint32, seconds (default: 0)
  • suppress_threshold -- uint32, unitless penalty (default: 0)
  • reuse_threshold -- uint32, unitless penalty (default: 0)
  • flap_penalty -- uint32, unitless penalty (default: 0)

The aied-monitor mode is a SONiC-specific enhancement recommended by RFC 7196 ("Calculate But Do Not Damp"). It calculates penalties and emits syslog messages but does NOT suppress link events, allowing operators to safely tune parameters in production before enabling full dampening. No other NOS vendor has implemented this.

Related PRs:

Test plan

  • YANG model validation passes (pyang lint)
  • Config DB schema accepts all 6 new fields in PORT table
  • Default values are correct (algorithm="disabled", all others=0)
  • Pattern validation rejects invalid algorithm values
  • Existing sonic-buildimage CI passes (no regressions)

🤖 Generated with Claude Code

@linux-foundation-easycla

linux-foundation-easycla Bot commented Mar 17, 2026

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Adds 6 configuration leaves to the PORT_LIST in sonic-port.yang for
the link event dampening feature (sonic-net/SONiC#1071):
- link_event_damping_algorithm (disabled/aied/aied-monitor)
- max_suppress_time
- decay_half_life
- suppress_threshold
- reuse_threshold
- flap_penalty

The aied-monitor mode is a SONiC-specific enhancement recommended by
RFC 7196 that calculates penalties without suppressing events, allowing
safe parameter tuning in production.

Signed-off-by: DendroLabs <info@dendrolabs.com>
- Add must constraint: decay_half_life <= max_suppress_time
- Add must constraint: reuse_threshold <= suppress_threshold
- Add valid and invalid test cases for dampening parameters

Signed-off-by: DendroLabs <info@dendrolabs.com>
@DendroLabs
DendroLabs force-pushed the link-event-damping/yang-model branch from 9320e1f to 3c025e0 Compare March 17, 2026 15:56
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@DendroLabs

Copy link
Copy Markdown
Author

/easycla

When a must constraint has a custom error-message, libyang outputs
the custom message directly instead of the generic "Must condition
not satisfied". Change eStrKey from "Must" to "None" so the test
only checks for our custom error string.

Signed-off-by: DendroLabs <info@dendrolabs.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@DendroLabs

Copy link
Copy Markdown
Author

Hi @qiluo-msft @praveen-li — friendly ping on this YANG model PR. The sairedis side is moving forward (sonic-net/sonic-sairedis#1798 merged, sonic-net/sonic-sairedis#1935 open for review), and this is the buildimage piece needed for link event damping. CI was green when submitted. Would appreciate a review when you get a chance. Thanks!

prsunny
prsunny previously approved these changes Jun 9, 2026

@dgsudharsan dgsudharsan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you please add a sample configuration to sample_config_db.json as well as update Configuration.md?

@prsunny

prsunny commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

@DendroLabs, please address comment.

DendroLabs added a commit to DendroLabs/sonic-buildimage that referenced this pull request Jun 19, 2026
…elds

Address review feedback on sonic-net#26231: add a link event damping sample to
tests/files/sample_config_db.json and document the six new PORT
attributes in doc/Configuration.md.
@DendroLabs

Copy link
Copy Markdown
Author

Thanks @dgsudharsan, good call. I added a sample link event damping configuration to the Ethernet0 entry in tests/files/sample_config_db.json (algorithm aied with the industry default thresholds), and documented the six new PORT fields in doc/Configuration.md. Ready for another look.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

…elds

Address review feedback on sonic-net#26231: add a link event damping sample to
tests/files/sample_config_db.json and document the six new PORT
attributes in doc/Configuration.md.

Signed-off-by: DendroLabs <info@dendrolabs.com>
@DendroLabs
DendroLabs force-pushed the link-event-damping/yang-model branch from 70100fc to bc3488e Compare June 20, 2026 15:21
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

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.

4 participants