Comments (4)
As far as I know there is no such primitive supported in either P4-14 or the behavioral model at the level of P4.
How multicast is done is a property of the architecture. If I recall correctly, in the behavioral model this is done by setting some special metadata fields and populating a hidden magic table from the control plane.
from p4c.
Would it be better to model this as an extern in P4-16? Say
extern broadcast(standard_metadata_t meta);
? There is already a similar extern
extern void mark_to_drop();
in v1model.p4
(which, on a side node, might be better modeled as
extern void mark_to_drop(standard_metadata_t meta)
).
from p4c.
We don't have much freedom in writing the v1model.p4, it has to match closely the way P4-14 works, including its switch model, and it also has to be quite close to the behavioral model. The only reason for the existence of v1model is to preserve backward compatibility with P4-14. The drop action from P4-14 is translated to mark_to_drop() - a more suitable name. This is probably not the same as setting the drop bit in the standard_metadata (you have to read the P4-14 spec to know what that bit does). There is no broadcast in P4-14.
We should not be writing P4-16 code for v1model.p4 at all, but since we don't have a standard model and a supporting behavioral model implementation, this is currently the only way to test the compiler end-to-end.
So perhaps you are suggesting to add "broadcast" to the standard model.
from p4c.
@mbudiu-vmw: I see, that makes sense.
from p4c.
Related Issues (20)
- RemoveUnusedDeclarations: inconsistency in when warnings are produced HOT 1
- RenameMap in inlining.cpp does not preserve the original variable name.
- Unused code in visitors HOT 12
- [P4Testgen] incorrect handling of `setInvalid()` called on headers in unions HOT 1
- Add merge queue support
- `test-p4c / test-ubuntu20 (Unity OFF)` is very slow
- Introduce modern CMake build style and Ninja to P4C
- Finding the block statement of apply section HOT 1
- Revisit Protobuf include directory policy
- Get rid of `dynamic_cast` in filtering enumerator HOT 10
- Query: How to get started with Contributions HOT 3
- Reduce proliferation of cstrings HOT 6
- Compiler Bug: duplicate primitive converter for modify_field at priority HOT 6
- "Could not infer a type for parameter..." error should be removed HOT 1
- Compiler Bug: Expression E write set already set HOT 4
- [Docs Improvement] Compiler source code organization
- Compiler Bug: Overwriting definitions at <MethodCallExpression>(22038)//<MethodCallExpression>(22017)//<BoolLiteral>(1718) HOT 5
- verifying the condition of if statement HOT 6
- Protobuf & Abseil compilation pollutes build with a lot of warnings HOT 1
- Use a preprocessor library instead of calling into cc. HOT 15
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 p4c.