Repository navigation
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Add six CREATE_AND_SET policer attributes to inc/saipolicer.h to support remarking packet DSCP and internal traffic class (TC) per metered color (Green, Yellow, Red), with a default sentinel value of 255 (disabled): - SAI_POLICER_ATTR_GREEN_PACKET_SET_DSCP - SAI_POLICER_ATTR_YELLOW_PACKET_SET_DSCP - SAI_POLICER_ATTR_RED_PACKET_SET_DSCP - SAI_POLICER_ATTR_GREEN_PACKET_SET_TC - SAI_POLICER_ATTR_YELLOW_PACKET_SET_TC - SAI_POLICER_ATTR_RED_PACKET_SET_TC Signed-off-by: Xunyan Li <xunyanl@google.com>
6fc570a to
26d693b
Compare
|
Hi @tjchadaga @kcudnik @AnandhiDhanabalan, I've updated the PR based on the review feedback and Thursday's OCP SAI community meeting discussion (dropped the _ACTION suffix and clarified interaction with egress ACL DSCP/TC rewrites in the description). Could you please take a look when you get a chance? Thanks! |
|
Add six
CREATE_AND_SETpolicer attributes toinc/saipolicer.hto remark packet DSCP and/or traffic class (TC) per metered color:SAI_POLICER_ATTR_GREEN_PACKET_SET_DSCPSAI_POLICER_ATTR_YELLOW_PACKET_SET_DSCPSAI_POLICER_ATTR_RED_PACKET_SET_DSCPSAI_POLICER_ATTR_GREEN_PACKET_SET_TCSAI_POLICER_ATTR_YELLOW_PACKET_SET_TCSAI_POLICER_ATTR_RED_PACKET_SET_TCEach attribute uses
sai_uint8_twith default255= disabled (matchingSAI_SWITCH_ATTR_MIRROR_TC). Valid values are0..63for DSCP (preserving ECN bits) and0 .. SAI_SWITCH_ATTR_QOS_MAX_NUMBER_OF_TRAFFIC_CLASSES - 1for TC.How is this different from existing QoS map and ACL remark actions?
SAI_POLICER_ATTR_{GREEN,YELLOW,RED}_PACKET_ACTIONonly controls packet disposition (FORWARD,DROP, etc.) and cannot remark DSCP or TC.SAI_QOS_MAP_TYPE_TC_AND_COLOR_TO_DSCPmaps apply uniformly to all traffic on a port for a given(TC, color)pair, whereas per-policer attributes allow different ACL-attached policers on the same port to remark out-of-profile (Yellow/Red) or in-profile (Green) flows to distinct target DSCPs/TCs while leaving unpoliced flows untouched.SAI_ACL_ENTRY_ATTR_ACTION_SET_DSCPandSAI_ACL_ENTRY_ATTR_ACTION_SET_TCapply unconditionally to all packets matching the ACL entry regardless of metered color. When a per-color policer DSCP/TC action is enabled (!= 255) on an ACL-attached policer (SAI_ACL_ENTRY_ATTR_ACTION_SET_POLICER), it takes precedence over the unconditional ACLSET_DSCP/SET_TCaction for packets of that color. Across stages, if an ingress-policed packet later matches an egress ACL (SAI_ACL_STAGE_EGRESS), an egressSET_DSCPruns later in the pipeline and overwrites the DSCP set by the ingress policer, whereas an egressSET_TCruns after egress queue selection (already determined by the ingress policer'sSET_TC) and only affects post-queue egress QoS maps.