-
Notifications
You must be signed in to change notification settings - Fork 888
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
Properly setting up P4D2_2017 with native installation of required software #39
Comments
For anyone else having the same problem. So because the logs indicated lack of primitives that obviously do exist in simple_switch, I checked the target being used. I edited the following line in switch_args.append('--behavioral-exe "%s"' % 'simple_switch') to switch_args.append('--behavioral-exe "%s"' % '~/behavioral-model/targets/simple_switch/simple_switch') Meaning, I made it point to my local copy of bmv2. The first line appears at several places and you'll have to change it everywhere if you plan to use all Mininet topologies. The same has to be done for the compiler, obviously. Line 118 becomes: rv = run_command('~/p4c/build/p4c-bm2-ss %s' % ' '.join(compiler_args)) I had already updated the compiler directory, but I forgot about this (now fairly obvious) issue. |
If the problem was using an older binary of simple_switch, you can also get
whatever version of the p4lang/behavioral-model source code you want from
Github, follow its build instructions, and then use 'sudo make install' to
install its version of simple_switch binary into /usr/local/bin
Andy
…On Fri, Jun 9, 2017 at 12:18 PM, Rui Miguel ***@***.***> wrote:
For anyone else having the same problem.
So because the logs indicated lack of primitives that obviously do exist
in *simple_switch*, I checked the target being used. I edited the
following line:
switch_args.append('--behavioral-exe "%s"' % 'simple_switch')
to
switch_args.append('--behavioral-exe "%s"' % '~/behavioral-model/targets/simple_switch/simple_switch')
Meaning, I made it point to my local copy of bmv2. The first line appears
at several places and you'll have to change it everywhere if you plan to
use all Mininet topologies. The same has to be done for the compiler,
obviously. Line 118 becomes:
rv = run_command('~/p4c/build/p4c-bm2-ss %s' % ' '.join(compiler_args))
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGsPV6NrY18HLcRhFIEL11Yq3Qucks1ks5sCZqLgaJpZM4N0PvG>
.
|
@jafingerhut I usually keep non-essential executables in my workspace and I was unaware I had placed a simple_switch binary elsewhere on my Ubuntu folders, hence the problem. Anyway, thanks for the tip! :) |
The VM image came with a pre-installed version of simple_switch, installed under /usr/local/bin. If you want to use the image with the latest version of bmv2, the correct solution is indeed to build it and re-install it, as @jafingerhut suggested. You can also install it to a local directory and update your PATH accordingly, but I don't think that's worth the trouble. All the software that was shipped inside the VM image should be compatible. The only case where you would experience an issue IMO is if you try to update one component (e.g. p4c), without updating the rest (e.g. bmv2). That's probably what you did here. |
Added draft 'Start-here.ipynb' directory
Since P4D2_2017 seemed to provide an environment to run P4-16 programs, I've been trying the examples in P4D2_2017 with native installation of the required software, but I can't get the solutions to run.
The log file reads:
My own code ran well (sort of, see below) until I modified a (previously empty) TopIngress like this:
I previously encountered problems running my program when using varbits (see the end of this message) and subparsers (in this case, it complained about unknown primitive
assign_header
).I've tried replacing the code with a table that matches on the ingress_port and sets the egress_port since that approach is closer to P4-14, but it still yields the same error.
The error logged with varbits was:
The text was updated successfully, but these errors were encountered: