Repository navigation
orchagent: copp: associate trap group only if trap action is copy or trap - #2830
Closed
prabhataravind wants to merge 0 commit into
Closed
prabhataravind wants to merge 0 commit into
prabhataravind wants to merge 0 commit into
Conversation
prabhataravind
force-pushed
the
master
branch
2 times, most recently
from
June 22, 2023 19:59
7e080ab to
e5f3abc
Compare
prabhataravind
marked this pull request as ready for review
June 23, 2023 21:08
Collaborator
|
@prabhataravind , please update the description as per the template. Also add VS tests |
dgsudharsan
requested changes
Jun 24, 2023
dgsudharsan
left a comment
Collaborator
There was a problem hiding this comment.
Please add UT and description.
The main use case of CoPP is to trap or copy and apply rate limiting. What usecase does this PR address? Is it drop? If you need to drop traffic, can't regular ACLs be used?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Associate trap group only if trap action is copy or trap.
Why I did it
When using SN4600 as a leaf fanout switch, LACP trap action needs to be changed from "TRAP" to "FORWARD". However this will return an error when creating the host interface as shown in the details section below. In addition, per saihostif definitions, SAI_HOSTIF_TRAP_ATTR_TRAP_GROUP is only valid if SAI_HOSTIF_TRAP_ATTR_PACKET_ACTION == SAI_PACKET_ACTION_TRAP or SAI_HOSTIF_TRAP_ATTR_PACKET_ACTION == SAI_PACKET_ACTION_COPY.
How I verified it
By setting LACP trap action to "FORWARD" and making sure no syncd/orchagent error is seen.
Details if related
ERR syncd#SDK: [SAI_UTILS.ERR] mlnx_sai_utils.c[1906]- sai_attribute_valid_condition_check: Attribute SAI_HOSTIF_TRAP_ATTR_TRAP_GROUP doesn't match a valid
conditions: {(SAI_HOSTIF_TRAP_ATTR_PACKET_ACTION : TRAP)
OR (SAI_HOSTIF_TRAP_ATTR_PACKET_ACTION : COPY)}
ERR syncd#SDK: [SAI_HOST_INTERFACE.ERR] mlnx_sai_host_interface.c[2039]- mlnx_create_hostif_trap: Failed attribs check
ERR syncd#SDK: :- sendApiResponse: api SAI_COMMON_API_CREATE failed in syncd mode: SAI_STATUS_FAILURE
ERR syncd#SDK: :- processQuadEvent: attr: SAI_HOSTIF_TRAP_ATTR_TRAP_TYPE: SAI_HOSTIF_TRAP_TYPE_LACP
ERR syncd#SDK: :- processQuadEvent: attr: SAI_HOSTIF_TRAP_ATTR_TRAP_GROUP: oid:0x11000000000baa
ERR syncd#SDK: :- processQuadEvent: attr: SAI_HOSTIF_TRAP_ATTR_PACKET_ACTION: SAI_PACKET_ACTION_FORWARD
ERR swss#orchagent: :- create: create status: SAI_STATUS_FAILURE
ERR swss#orchagent: :- applyAttributesToTrapIds: Failed to create trap 1, rv:-1
ERR swss#orchagent: :- trapGroupProcessTrapIdChange: Failed to set traps to trap group queue4_group1
ERR swss#orchagent: :- doTask: Processing copp task item failed, exiting.