Closed jhsmt closed 9 months ago
This PR is instended to address this issue. Please read it and see if it is missing anything you were hoping for: https://github.com/p4lang/pna/pull/127
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.
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?
@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.
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.
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.
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.