Gap
A WRED_PROFILE exposes only the WRED drop thresholds per color; ECN marking reuses those same thresholds. There is no way to ECN-mark at a lower queue depth than where WRED starts dropping — i.e. no "mark before drop" knee, a common ECN/DCQCN tuning need.
Current behaviour
WRED_PROFILE has ecn, {green,yellow,red}_{min,max}_threshold, {green,yellow,red}_drop_probability, wred_*_enable. ECN marking follows the drop thresholds; the marking knee cannot be set independently.
SAI support
SAI_WRED_ATTR_ECN_{GREEN,YELLOW,RED}_{MIN,MAX}_THRESHOLD
SAI_WRED_ATTR_ECN_{GREEN,YELLOW,RED}_MARK_PROBABILITY
SAI_SWITCH_ATTR_ECN_ECT_THRESHOLD_ENABLE (gates whether ECT traffic honours the independent ECN thresholds vs the WRED drop thresholds)
Proposed solution
Add optional WRED_PROFILE fields ecn_{green,yellow,red}_{min,max}_threshold and ecn_{green,yellow,red}_mark_probability, program the matching SAI_WRED_ATTR_ECN_* attributes in qosorch, and enable SAI_SWITCH_ATTR_ECN_ECT_THRESHOLD_ENABLE when configured. Fields are optional → existing profiles unaffected (backward compatible); programming is capability-driven and best-effort → unsupported platforms keep current behaviour.
Components
sonic-net/sonic-swss — qosorch (WredMapHandler)
sonic-net/sonic-buildimage — sonic-wred-profile YANG + tests
Validated on a Broadcom Tomahawk5 (TH5) testbed (ECN marking curve programmed below the WRED drop curve in the ASIC).
Gap
A
WRED_PROFILEexposes only the WRED drop thresholds per color; ECN marking reuses those same thresholds. There is no way to ECN-mark at a lower queue depth than where WRED starts dropping — i.e. no "mark before drop" knee, a common ECN/DCQCN tuning need.Current behaviour
WRED_PROFILEhasecn,{green,yellow,red}_{min,max}_threshold,{green,yellow,red}_drop_probability,wred_*_enable. ECN marking follows the drop thresholds; the marking knee cannot be set independently.SAI support
SAI_WRED_ATTR_ECN_{GREEN,YELLOW,RED}_{MIN,MAX}_THRESHOLDSAI_WRED_ATTR_ECN_{GREEN,YELLOW,RED}_MARK_PROBABILITYSAI_SWITCH_ATTR_ECN_ECT_THRESHOLD_ENABLE(gates whether ECT traffic honours the independent ECN thresholds vs the WRED drop thresholds)Proposed solution
Add optional
WRED_PROFILEfieldsecn_{green,yellow,red}_{min,max}_thresholdandecn_{green,yellow,red}_mark_probability, program the matchingSAI_WRED_ATTR_ECN_*attributes in qosorch, and enableSAI_SWITCH_ATTR_ECN_ECT_THRESHOLD_ENABLEwhen configured. Fields are optional → existing profiles unaffected (backward compatible); programming is capability-driven and best-effort → unsupported platforms keep current behaviour.Components
sonic-net/sonic-swss— qosorch (WredMapHandler)sonic-net/sonic-buildimage—sonic-wred-profileYANG + testsValidated on a Broadcom Tomahawk5 (TH5) testbed (ECN marking curve programmed below the WRED drop curve in the ASIC).