Skip to content

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

Open
DendroLabs wants to merge 3 commits intosonic-net:masterfrom
DendroLabs:link-event-damping/yang-model
Open

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

Conversation

@DendroLabs
Copy link

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
Copy link

linux-foundation-easycla bot commented Mar 17, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

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
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@DendroLabs
Copy link
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
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

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.

2 participants