Comments (3)
I have created a new test case for this example. The problem is not the global action, but the copy-in copy-out of the fat structure. It looks like we generate incorrect code for assignment between structures. Ideally the compiler should figure out that it does not need to do structure copying at all, but we have some work to do to achieve that. Here is the generated code:
control IngressI(inout H hdr, inout M meta, inout standard_metadata_t smeta) {
standard_metadata_t smeta_0;
action drop_0() {
smeta_0.drop = 1w1;
smeta = smeta_0;
}
...
}
The bmv2 back-end is not very robust yet.
from p4c.
I have submitted a fix which makes this compile. I have not checked that it runs correctly. It's still inefficient.
from p4c.
I can confirm that this compiles now.
from p4c.
Related Issues (20)
- Improves P4c's community standard HOT 3
- Acronym capitalization: P4C vs p4c HOT 7
- Add a table of contents to the README HOT 1
- Compiler Bug: multiple table applications in one expression HOT 2
- PNA and PSA DPDK tests should not be run by `check-p4` target HOT 13
- Crash when the result of a `MethodCallStatement` is unused and resolves to a compile-time constant HOT 1
- issues while trying to install nikss-cli for the psa-ebpf backend HOT 3
- Create a new, smaller frontend HOT 4
- Inquiry Regarding Tools and Methods for Generating Abstract Syntax Trees (AST) from P4 Code HOT 9
- include of file mm_malloc.h breaks build for Ubuntu aarch64 systems HOT 4
- Merge IR::Type::Bits::get and IR::getBitType
- Compile with -Ofast and -march=native by default? HOT 3
- Clean up ebpfProgram.cpp and ebpfBackEnd.cpp
- `p4c` should prohibit different controllable entities having the same control-plane name HOT 3
- Wrong error message when arbitrary-precision int is shifted by runtime value
- Consider a centralized repository for dependency management? HOT 8
- Constant folding of bit width expressions is no longer complete
- Fix broken Ubuntu 18.04 test by pinning Boost dependencies using FetchContent
- Result of extern function call used in switch expression is incorrectly marked as a compile-time constant
- Emit the initial default action of a table in the P4Info file.
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.