Open danyork opened 5 years ago
I think I figured out the issue, and a workaround... but not how to fix the code long-term.
It seems like the p4lang/p4app
image on Docker Hub has been updated recently with (I am guessing) a new version of the p4 language which deprecates something used in the simple_router.p4app
. Looking at the list of image tags at https://hub.docker.com/r/p4lang/p4app/tags I decided to try using the legacy
image from 10 months ago.
For a quick test, I went into p4app
and changed line 16 from:
P4APP_IMAGE=${P4APP_IMAGE:-p4lang/p4app:latest}
to:
P4APP_IMAGE=${P4APP_IMAGE:-p4lang/p4app:legacy}
I then ran ./p4pp run examples/simple_router.p4app
and... IT WORKED! I found myself at the mininet
prompt where I could start to poke around.
So the issue is that p4app
is pulling down p4lang/p4app:latest
... BUT... :latest
is no longer compatible with the code.
The solution seems to me to be to update examples/simple_router.p4app
to use whatever are the latest commands required by the :latest
Docker image.
(Unfortunately I am brand new to P4 so I don't know that I can help here.)
Referring to https://github.com/p4lang/p4c/issues/1845
this function now requires a parameter. Change both calls to mark_to_drop()
(12,35) to mark_to_drop(standard_metadata)
and you should be able to run the program as usual.
Hi. Just cloned this repo to my MacBook Pro running MacOS 10.14.5. I have Docker 2.0.0.3 (31259) installed and it is working fine for other containers.
I copied
p4app
to/usr/local/bin
. But when I try to follow the example and do:p4app examples/simple_router.p4app
I get a compile failure and a command prompt back. Here is my complete error message:
Not sure what to do next. I've also tried running from the local directory (i.e.
./p4app
) with the same result. I've removed the docker image and tried having it pull it again. All gets the same error.