-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added P4AP and P4RuntimeAP classes + Examples ( p4 branch ) #302
base: p4
Are you sure you want to change the base?
Conversation
Hi @davidcawork, I think the code does not work with Python 3. I encountered problems with indentation and Both
I think the error might be related to the
|
Hi @ramonfontes 😃, It is very likely that it will not work for Python 3, I was currently working on Python2 (2.7.12 At first I tried to work with the latest version of PI, but there were use cases in P4 that didn't work properly, I came to this issue because of similar problems, and I dropped the version because of that, so probably the operation depends on the difference of versions. Currently I'm using the versions that are listed in the installation of P4 tutorials, are these: BMV2_COMMIT="b447ac4c0cfd83e5e72a3cc6120251c1e91128ab" # August 10, 2019
PI_COMMIT="41358da0ff32c94fa13179b9cee0ab597c9ccbcc" # August 10, 2019
P4C_COMMIT="69e132d0d663e3408d740aaf8ed534ecefc88810" # August 10, 2019
PROTOBUF_COMMIT="v3.2.0"
GRPC_COMMIT="v1.3.2"
Just out of curiosity, you've done a mininet-wifi make install again to add the new Best, |
I'm following the installation steps described in https://github.com/jafingerhut/p4-guide/blob/master/bin/install-p4dev-v2.sh.
However, as Mininet is included in Yes, I did a
|
Perfect @ramonfontes , Here's what I'll do, I'll use the patch to get those versions and find out why it doesn't work there! Thanks a lot Ramon for the feedback. I leave this pull-request open to solve it :D |
Hi @ramonfontes ,
I leave a pull-request with the generic classes we were talking about to control the BMV2. The
P4AP
class is intended to contain all the common configuration parameters of the BMV2, and theP4RuntimeAP
class, which is a class that inherits from the previous one and adds configuration support via P4Runtime through the gRPC port.Additionally I have added a class (
Netns_mgmt
) to manage the execution of python code at runtime in different Netns. This means that the BMV2 managed by the P4RuntimeAP class, can be launched in its own Network namespace 😄. I have also developed some unit tests for the classNetns_mgmt
, you can see them here (github.com/davidcawork/TFG/blob/master/src/netns_mgmt/unit_test.py), I have not added them because I did not know very well where I could do it.Finally, I have added two extra P4 examples under the
/mininet-wifi/examples/p4/
directory where you can see more clearly the use and operation of the classes mentioned above.Best,