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

Initial version of PINS P4RT App HLD #826

Merged
merged 5 commits into from
Feb 16, 2022
Merged

Conversation

rhalstea
Copy link
Contributor

High level design document for the PINS P4RT application.

@ghost
Copy link

ghost commented Jul 30, 2021

CLA assistant check
All CLA requirements met.

@rhalstea rhalstea marked this pull request as draft July 30, 2021 16:26
Copy link
Contributor Author

@rhalstea rhalstea left a comment

Choose a reason for hiding this comment

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

Thanks Venkatesan

doc/pins/p4rt_app_hld.md Outdated Show resolved Hide resolved
doc/pins/p4rt_app_hld.md Outdated Show resolved Hide resolved
@rhalstea
Copy link
Contributor Author

Hi @qiluo-msft,

Did you have a chance to take a look at this? Based on the PINS upstream tracker (#841) your username is associated with this HLD.

Thanks,
Robert

@rhalstea rhalstea marked this pull request as ready for review October 14, 2021 18:02
Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

As comments


## P4RT Application High-Level Design

The P4RT application is responsible for implementing the [P4Runtime Specification](https://p4lang.github.io/p4runtime/spec/v1.3.0/P4Runtime-Spec.html) as a gRPC service. The application will run in its own Docker container. A controller (or multiple controllers) can connect as clients to the gRPC service, and write P4 table entries that correspond to SAI tables (specified by a P4 program). These entries are intended for the ASIC database, but following the SONiC architecture, the P4RT application will translate/format the gRPC request and write its output into the APPL_DB. From there, the P4Orch (TODO: reference OA HLD) handles the request.
Copy link
Contributor

@qiluo-msft qiluo-msft Oct 18, 2021

Choose a reason for hiding this comment

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

How heavy is the communication through APPL_DB? I mean entry size, the frequency of writing. Do you need the channel keep strict time order? #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

P4RT app will program whatever the controller tells it. The requests are pretty much 1-to-1. So the communication through APPL_DB will depend on how many routes and/or ACLs are needed.

We don't need to keep any strict time order. However, for each request the P4Orch should send a response back when it's done.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this flow in diagram "each request the P4Orch should send a response back when it's done" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since P4RT App only interacts with the P4Orch through the RedisDBs it was left out, but it's a good point that the response path wasn't very clear. Added the P4Orch to the diagram per your suggestion.

doc/pins/p4rt_app_hld.md Outdated Show resolved Hide resolved
doc/pins/p4rt_app_hld.md Outdated Show resolved Hide resolved
doc/pins/p4rt_app_hld.md Outdated Show resolved Hide resolved

## APPL DB Schema High-Level Design

P4RT application introduces new tables that are written to APPL_DB for the tables it intends to program via the P4Orch. The schema of the P4RT tables and other details are captured in the P4RT DB Schema HLD.
Copy link
Contributor

@qiluo-msft qiluo-msft Oct 18, 2021

Choose a reason for hiding this comment

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

Could you provide the link to "P4RT DB Schema HLD"? Reminder that we also need Yang model defined for new schema. #Pending

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a TODO since the other PINS HLDs are still under review, and I can't point to any permanent location. Here's a link: #840

Not sure if there is a better way to handle this?

@rhalstea
Copy link
Contributor Author

Thanks @qiluo-msft,

I addressed the comments do you mind having a second look and letting me know if more clarification is needed?

@rhalstea
Copy link
Contributor Author

Thanks again @qiluo-msft, any more concerns?

@prsunny prsunny merged commit 09454a3 into sonic-net:master Feb 16, 2022
@prsunny prsunny deleted the p4rt_hld branch February 16, 2022 19:17
ntoorchi pushed a commit to pins/SONiC that referenced this pull request Aug 11, 2022
* High level design document for the PINS P4RT application.
@zhangyanzhao
Copy link
Collaborator

@rhalstea Robert, can you please help to add the code PRs into this HLD PR by referring to #806 ? Thanks.

@rhalstea
Copy link
Contributor Author

@zhangyanzhao not sure I understand the ask about #806 ... Are you looking for the HLD doc itself to point to the PRs? For example: sonic-net/sonic-buildimage#9083 and sonic-net/sonic-pins#1?

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.

7 participants