[trim]: Add Packet Trimming Asym DSCP to OA#3705
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@nazariig could you resolve the conflicts |
6bdedb1 to
2709cc6
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
2709cc6 to
10211ef
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| { | ||
| return ((pgRefCount > 0) || (iBufProfListRefCount > 0) || (eBufProfListRefCount)) ? true : false; | ||
| } | ||
|
|
There was a problem hiding this comment.
we could keep all the counts as private and have methods to set/get. Would be clean to set/get by one method instead of direct access
There was a problem hiding this comment.
Currently not all egress buffer profiles are added to profile list. Could you please check?
https://github.com/sonic-net/sonic-buildimage/pull/22869/files
There was a problem hiding this comment.
we could keep all the counts as private and have methods to set/get. Would be clean to set/get by one method instead of direct access
@kperumalbfn Getter/Setter is a way of doing business logic encapsulation. In this case it is redundant and won't provide any benefits. That was the reason for omitting the implementation
There was a problem hiding this comment.
Currently not all egress buffer profiles are added to profile list. Could you please check?
https://github.com/sonic-net/sonic-buildimage/pull/22869/files
The current implementation relies on application db events, meaning all buffer profiles are processed in a single place - bufferorch. Please elaborate on how this relates to the current validation case ?
| { | ||
| auto &map = cfg.fieldValueMap; | ||
|
|
||
| const auto &cit = map.find(BUFFER_PORT_INGRESS_PROFILE_LIST_PROFILE_LIST); |
There was a problem hiding this comment.
Does bufferorch use ingress/egress buffer profile list for trim eligible validation?
There was a problem hiding this comment.
@kperumalbfn validation is currently implemented for the next cases:
- Buffer Profile is attached to either Ingress PG or Ingress/Egress Buffer Profile List and user tries to set trimming eligibility
- Buffer Profile is configured as trimming eligible and user tries to attach it either to Ingress PG or Ingress/Egress Buffer Profile list
In both cases the error will be generated.
This guarantees that trimming eligible Buffer Profile can be used only with the Queue objects.
|
|
||
| inline bool isTrimmingProhibited() const | ||
| { | ||
| return ((pgRefCount > 0) || (iBufProfListRefCount > 0) || (eBufProfListRefCount)) ? true : false; |
There was a problem hiding this comment.
Can we avoid this refcount to determine the trim eligibility?
There was a problem hiding this comment.
if possible, buffer_profile-->buffer_pool(check ingress/egress)?
There was a problem hiding this comment.
Can we avoid this refcount to determine the trim eligibility?
@kperumalbfn currently the most reliable way. Checking counter value is a low cost operation comparing to collection iteration/search
There was a problem hiding this comment.
if possible, buffer_profile-->buffer_pool(check ingress/egress)?
@kperumalbfn Buffer Profile to Buffer Pool relation check (resolveFieldRefArray) is implemented as part of:
task_process_status BufferOrch::processPriorityGroup(KeyOpFieldsValuesTuple &tuple)
task_process_status BufferOrch::processIngressBufferProfileList(KeyOpFieldsValuesTuple &tuple)
task_process_status BufferOrch::processEgressBufferProfileList(KeyOpFieldsValuesTuple &tuple)
Trimming eligibility validation serves different purposes and takes place long after this check, so it is not relevant
There was a problem hiding this comment.
Why not using the pools that the buffer profiles reference? That will be much easier to maintain.
| SWSS_LOG_ERROR("Failed to set switch trimming TC value in SAI"); | ||
| return false; | ||
| } | ||
|
|
There was a problem hiding this comment.
nit: empty new lines, pls check
There was a problem hiding this comment.
@kperumalbfn new line is added after if statement. No extra spaces are observed. Please elaborate on the issue
| } | ||
| else | ||
| { | ||
| SWSS_LOG_WARN("Skip setting switch trimming TC value for symmetric DSCP mode"); |
There was a problem hiding this comment.
@kperumalbfn the implementation is by design. If the user tries to set TC value while operating in symmetric DSCP mode, SWSS will save the new value to cache and print the warning message. Later on if the mode will be switched to asymmetric, the cached value will be set to SAI.
The warning message is printed only once - in case if a new (differs from the value stored in the cache) TC value is configured.
That helps to maintain the minimal informative level while avoiding the log pollution (in case user/controller sets the same value for multiple times).
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
a169dde to
837fb98
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
prsunny
left a comment
There was a problem hiding this comment.
approving for merge. Code reviewed by SMEs
|
hi @nazariig , do you mind to help create a manual cherry pick to 202412 for this PR? |
|
@r12f Here is the PR Azure/sonic-swss.msft#105 |
|
Cherry-pick PR to 202505: #3765 |
DEPENDS: [trim]: Add Packet Trimming Asym DSCP to VS lib sonic-sairedis#1610 [trim]: Add Packet Trimming to OA sonic-net#3594 HLD: sonic-net/SONiC#1988 What I did Implemented Packet Trimming Asymmetric DSCP feature Why I did it Implementation is done according to the Packet Trimming Asymmetric DSCP HLD
|
Cherry-pick PR to msft-202506: Azure/sonic-swss.msft#120 |
DEPENDS: [trim]: Add Packet Trimming Asym DSCP to VS lib sonic-sairedis#1610 [trim]: Add Packet Trimming to OA sonic-net#3594 HLD: sonic-net/SONiC#1988 What I did Implemented Packet Trimming Asymmetric DSCP feature Why I did it Implementation is done according to the Packet Trimming Asymmetric DSCP HLD
DEPENDS: [trim]: Add Packet Trimming Asym DSCP to VS lib sonic-sairedis#1610 [trim]: Add Packet Trimming to OA sonic-net#3594 HLD: sonic-net/SONiC#1988 What I did Implemented Packet Trimming Asymmetric DSCP feature Why I did it Implementation is done according to the Packet Trimming Asymmetric DSCP HLD
DEPENDS: [trim]: Add Packet Trimming Asym DSCP to VS lib sonic-sairedis#1610 [trim]: Add Packet Trimming to OA sonic-net#3594 HLD: sonic-net/SONiC#1988 What I did Implemented Packet Trimming Asymmetric DSCP feature Why I did it Implementation is done according to the Packet Trimming Asymmetric DSCP HLD Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
DEPENDS: [trim]: Add Packet Trimming Asym DSCP to VS lib sonic-sairedis#1610 [trim]: Add Packet Trimming to OA sonic-net#3594 HLD: sonic-net/SONiC#1988 What I did Implemented Packet Trimming Asymmetric DSCP feature Why I did it Implementation is done according to the Packet Trimming Asymmetric DSCP HLD Signed-off-by: Baorong Liu <96146196+baorliu@users.noreply.github.com>
Signed-off-by: Nazarii Hnydyn nazariig@nvidia.com
DEPENDS:
HLD: sonic-net/SONiC#1988
What I did
Why I did it
How I verified it
Details if related
A picture of a cute animal (not mandatory but encouraged)