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

[p4orch]: PINS Extension tables support #2506

Merged
merged 6 commits into from
Dec 6, 2022
Merged

[p4orch]: PINS Extension tables support #2506

merged 6 commits into from
Dec 6, 2022

Conversation

svshah-intel
Copy link
Contributor

High Level Design: sonic-net/SONiC#1088

This PR is for changes in sonic-swss repo
This changes include,

  • New managers in P4Orch
    • tables_definition manager – consumes tables definition from P4RT App, derives necessary state in order to process extension table entries
    • ext_tables manager – consumes extension table entries, deserialize/validate based on table definition state created earlier. Prepare and call generic SAI Extension API calls
  • new function vector introduced getSaiObject – to be used by all P4Orch managers to assist get object-type/key value pair based on referee parameters in extension table entries
    • Mainly L3 object support implemented currently. Others can be implemented in future as deemed necessary
  • A new timer added to collect counters from extension entries. Only those extension entries are visited that are programmed with counter object
  • Initialization code added in orchagent for generic_programmable SAI APIs
  • Pytest code added for example of vipv4 table, a simple match of dst-address and action of set_nexthop_id
    • New files – tables_definition.py, viplb.py and test_viplb.py. Pytest to be run against test_viplb.py

Not covered in this commit,

  • meter
  • CRM
  • batching

Signed-off-by: svshah-intel shitanshu.shah@intel.com

@zhangyanzhao
Copy link
Collaborator

@prsunny would you please help on the review?Thanks.

@svshah-intel
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 2506 in repo sonic-net/sonic-swss

orchagent/p4orch/mirror_session_manager.cpp Outdated Show resolved Hide resolved


std::string
BitwidthToDatatype (int bitwidth)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Maybe move all these util functions into a different file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you don't mind, I would like to address this in a different commit. With more support added for things like meter, crm, batching etc..

orchagent/p4orch/tables_definition_manager.cpp Outdated Show resolved Hide resolved
orchagent/p4orch/tables_definition_manager.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@mint570 mint570 left a comment

Choose a reason for hiding this comment

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

Looks good to me after fixing the unit test.

@mint570
Copy link
Contributor

mint570 commented Nov 23, 2022

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 2506 in repo sonic-net/sonic-swss

@prsunny
Copy link
Collaborator

prsunny commented Nov 28, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@svshah-intel
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@svshah-intel
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@svshah-intel
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zhangyanzhao
Copy link
Collaborator

@prsunny can you please help to check if this can be merged? You are the maintainer of this repo. Thanks.

@prsunny prsunny merged commit b8521cc into sonic-net:master Dec 6, 2022
StormLiangMS pushed a commit that referenced this pull request Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants