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

PNA/PSA extern restrictions #126

Closed
jhsmt opened this issue Dec 21, 2023 · 6 comments
Closed

PNA/PSA extern restrictions #126

jhsmt opened this issue Dec 21, 2023 · 6 comments

Comments

@jhsmt
Copy link

jhsmt commented Dec 21, 2023

There's very likely a hardware-centric reason as to why the restrictions specified in:
https://p4.org/p4-spec/docs/pna-working-draft-html-version.html#sec-extern-restrictions
exist. If someone could educate me on what that is, I would appreciate it.
Of course in s/ware it doesnt make sense to have such restrictions - but to write a "portable P4 program" we'll need to adhere to specified restrictions.

@jafingerhut
Copy link
Collaborator

This PR is instended to address this issue. Please read it and see if it is missing anything you were hoping for: #127

@jhsmt
Copy link
Author

jhsmt commented Jan 31, 2024

I dont think #127 resolves this. It was more a question, as an example: Why is checksum extern only applicable on MainParser and MainDeparser. See Table 2 in the doc.

@jafingerhut
Copy link
Collaborator

I believe it is accurate to say that the primary reason it was documented that way was because PSA defines it that way, which goes back to v1model, which is probably heavily influence by Tofino.

The proposed PR removes that restriction. Is that not what you were hoping for?

@jhsmt
Copy link
Author

jhsmt commented Feb 1, 2024

@jafingerhut, it may provide the answer - but i am not following how making headers r/w in the deparser maps to that referenced table. I think my question is a lot more basic: Why those restrictions in that table? From a s/w pov it doesnt seem to make a lot of sense but there may be reasons given how h/w blocks are built.

@jafingerhut
Copy link
Collaborator

You ask: "Why those restrictions in that table?"

My answer: "I believe it is accurate to say that the primary reason it was documented that way was because PSA defines it that way, which goes back to v1model, which is probably heavily influence by Tofino."

Does that answer make sense?

If we remove the restriction in that table where the Checksum and InternetChecksum externs can be instantiated, is that what you are hoping will change? Because the PR does change that table in that way.

@jhsmt
Copy link
Author

jhsmt commented Feb 2, 2024

Does the

You ask: "Why those restrictions in that table?"

My answer: "I believe it is accurate to say that the primary reason it was documented that way was because PSA defines it that way, which goes back to v1model, which is probably heavily influence by Tofino."

Does that answer make sense?

Yes - i was more asking on the "why" is it so. Probably Tofino, but what is feature or limitation that makes it so.

If we remove the restriction in that table where the Checksum and InternetChecksum externs can be instantiated, is that what you are hoping will change? Because the PR does change that table in that way.

You are right - let me close this.

@jhsmt jhsmt closed this as completed Feb 2, 2024
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

No branches or pull requests

2 participants