p4lang / pna

Portable NIC Architecture
Apache License 2.0
54 stars 21 forks source link

PNA spec declares headers on deparser are RO #125

Closed jhsmt closed 5 months ago

jhsmt commented 7 months ago

Comparing PNA: https://p4.org/p4-spec/docs/pna-working-draft-html-version.html#sec-programmable-blocks vs PSA: https://p4.org/p4-spec/docs/PSA.html#sec-programmable-blocks ..

The deparser on PSA indicates headers are read/write whereas on PNA it is read-only.

We have a program that need to update ipv4 checksum on the deparser. While computing the checksum is allowed on the deparser (per https://p4.org/p4-spec/docs/pna-working-draft-html-version.html#sec-extern-restrictions), updating the computed value on a header is not. Is this the intended behavior?

jafingerhut commented 5 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

jhsmt commented 5 months ago

Closing based on #127