tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

run_exercise.py error: argument --behavioral-exe

Open lululouisa opened this issue 3 years ago • 12 comments

when i tried to use simple_switch_mininet.py, there is always error about argument --behavioral_exe is required. What should i do ?

lululouisa avatar Oct 25 '22 02:10 lululouisa

Perhaps try using the Makefiles supplied with each exercise? Those provide all of the necessary arguments to other scripts like simple_switch_mininet.py. And you can generalize from there...

jnfoster avatar Oct 25 '22 02:10 jnfoster

To answer the specific question: you need to provide the path to the Bmv2 switch, which is usually the binary simple_switch.

jnfoster avatar Oct 25 '22 02:10 jnfoster

image yes, i add the argument about the BMv2 on the top of Makefile, but leider it doesnt work. image

lululouisa avatar Oct 25 '22 02:10 lululouisa

Sorry, i am not sure how to provide the path to the BMv2 switch. Yes, in original run_exercise.py for multiple switch, there is a default='simple_switch' in args part. However, i dont know how to add them into simple_switch_mininet.py

lululouisa avatar Oct 25 '22 02:10 lululouisa

Are you running an unmodified exercise that is currently checked into the latest version of this p4lang/tutorials repo? The directory name shown in your screen shot does not look like the directory name of anything in the repo.

jafingerhut avatar Oct 25 '22 02:10 jafingerhut

i rename them by myself. I clone the untils and vm to my local and tried a basic forwarding exercise now.

lululouisa avatar Oct 25 '22 03:10 lululouisa

I think what Andy is asking: can you try running make run on an unmodified tutorial exercise, like basic?

(Also, I remembered that the switch binary is probably simple_switch_grpc.)

jnfoster avatar Oct 25 '22 03:10 jnfoster

When i make run with original topology.json and original run_exericese.py (3hosts with 3 switches) on basic.p4, it works and ping sucessful.

lululouisa avatar Oct 25 '22 03:10 lululouisa

emmm, i tried both of simple_switch and simple_switch_grpc, however didnt work~~

lululouisa avatar Oct 25 '22 03:10 lululouisa

Good!

Obviously something has changed in going from the tutorial code to your custom program and the tutorial code... likely in the Makefile. if you can figure out what that is, you should be able to diagnose the issue.

jnfoster avatar Oct 25 '22 03:10 jnfoster

whether the p4runtime_lib necessary for basic forwarding?

lululouisa avatar Oct 25 '22 03:10 lululouisa

Yes.

jnfoster avatar Oct 25 '22 03:10 jnfoster