Comments (3)
Partially remembered and new comments regarding going to the P4 language design work group and extending the definitions of P4 tables to enable similar features.
- One of the motivations for making these externs is that extern calls can be made within expressions, including within the bodies of P4 actions, and we would like to enable the new extern lookup() calls to be performed within action bodies, among other places in the code.
Note that the P4 language spec has for all 1.x versions released since 2017 disallowed performing table_name.apply() calls within P4 action bodies. Or at least, it has said that P4 implementations need not support this, and the open source p4c compiler has always so far given an error message if you attempt to do so. See Appendix F of the P4_16 language specification, the last table, the row labeled "table", and the column labeled "action", where the cell contains the word "no". That is intended to mean "tables cannot be called (i.e. apply()'d) from within a P4 action".
- Another reason is that the P4 language design work group is, fairly reasonably, a conservative bunch, representing developers of multiple P4 target devices. Extending tables is possible, but is not a quick process. I certainly do not mind if some day P4 tables are extended with similar capabilities, but one way to convince a conservative group of folks that something is a good, solid, workable idea is to show that multiple targets can implement it, and any issues in its specification have been worked out. Defining new externs can be done in any P4 architecture, without changes to the P4 language specification, and is one way towards this.
from pna.
This seems related to this p4lang/p4c#2739
from pna.
This issue for the P4 language specification is tracking the possible addition of a list
type in the P4 language spec, which would be useful in enabling the p4c front end to perform type-checking on the const_entries
or entries
argument value of these proposed ExactMap
/ TernaryMap
externs. We can define these externs without that language feature, too, but then the P4 compiler back-ends would need to do all error-checking on the value of those constructor parameters.
Not a big deal to me either way, but if the list
type is added to the language spec and p4c relatively soon (e.g. before end of 2022 calendar year), I will update this PR to use that list
type for those parameters to these extern constructor calls.
from pna.
Related Issues (20)
- Any desire to define behavior of add_on_miss=true table WITHOUT data plane deletions of expired entries? HOT 2
- Create functionally correct example demonstrating IPsec encryption and decryption
- Full payload checksum
- Should PNA support resubmit operation? Also: document details of recirculate operation behavior
- What do crypto offsets apply to? Packet as parsed, or packet after deparsing?
- The types of the generics in crypto_accelerator extern maybe should be a static type instead of a generics
- Add text to PNA specification on encrypt/decrypt operations HOT 4
- Add XOR hash function(s)
- Address the issue of pipelines that can have packets "pass each other up" in the middle of the pipeline HOT 1
- Add text explaining how to delete entries from the dataplane, and describe `ExpireTimeProfileId_t`.
- Minor bug in IPsec example program
- Remove last remaining occurrences of HOST_TO_NET and NET_TO_HOST from spec
- Add glossary, and consider using "inline accelerator" consistently when referring to encrypt/decrypt block
- Devise an explicit convention to document which parts of pna.p4 are intended to be vendor-customizable vs. not
- Proposal for setting packets and bytes counter widths separately HOT 5
- Lack of documentation on the optional bytes counter increment parameter HOT 7
- Should it be possible to recirculate mirrored copies of a packet ? HOT 1
- How to pass an extern object instance of type X as a parameter to a method call that is a method of type X HOT 1
- PNA spec declares headers on deparser are RO HOT 2
- PNA/PSA extern restrictions HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pna.