Skip to content

[orchagent] CoPP neighbor miss trap and enhancements #3624

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rminnikanti
Copy link

@rminnikanti rminnikanti commented Apr 22, 2025

What I did

  • Added neighbor_miss trap type support
  • enum capability query for hostif trap type in copporch.cpp
  • Added hw_status field to COPP_TRAP_TABLE table in state_db

PR Dependencies

Why I did it

HLD: sonic-net/SONiC#1943

How I verified it

Verified with test_copp.py DVS test

Signed-off-by: Ravi Minnikanti [email protected]

@rminnikanti rminnikanti requested a review from prsunny as a code owner April 22, 2025 14:34
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny requested a review from prabhataravind April 22, 2025 23:56
What I did
* Added neighbor_miss trap type support
* enum capability query for hostif trap type
* Added trap hw_status field to state_db

HLD: sonic-net/SONiC#1943

Signed-off-by: Ravi Minnikanti <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rminnikanti
Copy link
Author

@prsunny @kcudnik PR check compilation failing because of dependency on sonic-swss-common PR - sonic-net/sonic-swss-common#1010
Can you please suggest if there is a way to run PR checks with dependencies?

@kcudnik
Copy link
Contributor

kcudnik commented Apr 25, 2025

there is no way to run code without dependency checked in, technically you could modify azure pipeline to pull swss common at specific commit, compile it and then build against that, but this is not standard approach and it would break everything else

@rminnikanti
Copy link
Author

Thank you for your response. Can the dependency PR be merged to allow the PR checks to run on this PR?
dependency - sonic-net/sonic-swss-common#1010

};

const vector<sai_hostif_trap_type_t> default_supported_trap_ids = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

As mentioned in the HLD, It is better to install the trap if the query API isn't available. This would ensure we do not have to edit this in the future

Copy link
Author

Choose a reason for hiding this comment

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

Hi @dgsudharsan,

The default_supported_trap_ids list ensures backward compatibility. It includes all currently known traps used by orchagent, except for "neighbor_miss". This ensures that all existing trap configurations are pushed to the SAI, even if the query API isn't available. It also prevents orchagent from throwing exceptions in cases where the vendor SAI does not support "neighbor_miss" and using a different method to handle neighbor_miss traffic.

In summary, all current traps are pushed to SAI even if query API is not available only neighbor_miss and future traps need query API availability.

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.

4 participants