Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orchagent: copp: associate trap group only if trap action is copy or trap #2830

Closed
wants to merge 0 commits into from

Conversation

prabhataravind
Copy link
Contributor

@prabhataravind prabhataravind commented Jun 22, 2023

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.

@prabhataravind prabhataravind changed the title orchagent: copp: create trap group only if trap action is copy or trap orchagent: copp: associate trap group only if trap action is copy or trap Jun 22, 2023
@prabhataravind prabhataravind force-pushed the master branch 2 times, most recently from 7e080ab to e5f3abc Compare June 22, 2023 19:59
@prabhataravind prabhataravind marked this pull request as ready for review June 23, 2023 21:08
@prabhataravind prabhataravind requested a review from prsunny as a code owner June 23, 2023 21:08
@prsunny
Copy link
Collaborator

prsunny commented Jun 23, 2023

@prabhataravind , please update the description as per the template. Also add VS tests

@prsunny prsunny requested a review from dgsudharsan June 23, 2023 23:31
Copy link
Collaborator

@dgsudharsan dgsudharsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

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.

3 participants