Comments (2)
This code is written in C for legacy reasons. It was "copied over" years ago from the previous version of the behavioral model: https://github.com/p4lang/p4factory/tree/master/modules/BMI. There was no strong reason to rewrite this code at the time (although I think it may have been marginally improved over time), as it was working and this is a part of the code that is both essential and hard to test in an automatic way.
That being said, I think rewriting this code in C++ and taking a more modern approach (I would say the select-based approach is probably a bit obsolete now) is a great idea. While I will not work on this, I would be happy to review such a change.
I would say that if anyone wants to work on this, please do not start any implementation work until first presenting your proposed approach here and getting some sort of consensus. I would be fine with something that is based on Boost Asio.
Before approving such a change, and because we don't have automated tests for the I/O code, I would expect the following:
- a performance comparison of the current approach and the new proposed approach using this benchmark: https://github.com/p4lang/behavioral-model/blob/main/docs/performance.md#running-the-benchmark. The new approach should yield at least the same throughput.
- a successful test run of the p4c PTF test suite using the modified bmv2 + veths for packet I/O. Assuming there is such a thing... cc @fruffy
from behavioral-model.
a successful test run of the p4c PTF test suite using the modified bmv2 + veths for packet I/O. Assuming there is such a thing... cc @fruffy
It depends... we do not have many static PTF tests available in the suite, but P4Testgen generates PTF tests for all the BMv2 programs with each CI run. That can be used for testing at least.
from behavioral-model.
Related Issues (20)
- Can BMv2 interfaces be bound to virtual network cards of two virtual machines? How should this be done specifically? HOT 2
- Can I get the index of a value in the register by custom_lib? HOT 4
- import thrift
- TCP packets seem not to be processed correctly by bmv2 HOT 2
- Problem using multicast in runtime HOT 1
- Empty action-parameter vector is always accessed in ActionFnEntry::execute HOT 3
- How to build behavioral-model on the MacOS(Apple M1 Pro(13.5)) HOT 1
- How to track fileds of metadata with p4dbg? HOT 2
- Approximate conversion of bmv2 p4 performance to hardware performance HOT 3
- Applying the same table twice HOT 2
- Required to set forwarding pipeline before using the dataplane for streaming packets HOT 10
- Update project to require C++17 HOT 9
- Race conditions when passing in a BMv2 JSON config HOT 12
- To Add PNA support into BMv2. HOT 5
- How to build simple_switch / simple_switch_grpc on Ubuntu 24.04 ? HOT 4
- Race conditions when processing packet in the egress pipeline. HOT 6
- Heap Buffer Overflow when installing many table entries HOT 1
- CMake support HOT 2
- Queue metadata with multiqueue HOT 2
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 behavioral-model.