ipdk icon indicating copy to clipboard operation
ipdk copied to clipboard

Cannot set pipeline with ovs-p4ctl command

Open mestery opened this issue 4 years ago • 8 comments

I'm trying to set a pipeline per the instructions and running into some issues:

root@ubuntu2004:~/examples/simple_l3# ovs-p4ctl set-pipe ovs-br1 /root/examples/simple_l3/simple_l3.pb.bin /root/examples/simple_l3/p4Info.txt
Error: P4Runtime RPC error (INVALID_ARGUMENT): Unknown format for p4_device_config.
root@ubuntu2004:~/examples/simple_l3#

I've created the pipeline file with the following commands:

root@ubuntu2004:~/examples/simple_l3# p4c --arch psa --target dpdk --output $OUTPUT_DIR/pipe --p4runtime-files $OUTPUT_DIR/p4Info.txt --bf-rt-schema $OUTPUT_DIR/bf-rt.json --context $OUTPUT_DIR/pipe/context.json $OUTPUT_DIR/simple_l3.p4
root@ubuntu2004:~/examples/simple_l3# ovs_pipeline_builder --p4c_conf_file=simple_l3.conf --bf_pipeline_config_binary_file=simple_l3.pb.bin

Note that I had to modify the simple_l3.pb.bin file because it had a bunch of unprintable characters in it. Perhaps this is part of the problem?

mestery avatar Dec 22 '21 18:12 mestery

Don't modify the .bin file!!! It is a binary although it looks like a concatenated text file but is a grpc proto binary I believe.. 😃

stolsma avatar Dec 22 '21 18:12 stolsma

Also you need to follow the steps of the README in order (first virtio interface create, then pushing .bin file and last the p4runtime table filling commands) because else you will get a error when pushing the .bin file to the ovs daemon

stolsma avatar Dec 22 '21 18:12 stolsma

OK, without modifying the file by hand, I now see this error:

root@ubuntu2004:~/examples/simple_l3# ovs-p4ctl set-pipe br0 /root/examples/simple_l3/simple_l3.pb.bin /root/examples/simple_l3/p4Info.txt
Error: P4Runtime RPC error (INTERNAL): 'bf_pal_device_add(device, &device_profile)' failed with error message: Internal error.
root@ubuntu2004:~/examples/simple_l3#

mestery avatar Dec 22 '21 19:12 mestery

BTW: Here is what I am trying to accomplish:

  1. Run P4-OVS on the VM itself, not inside a container.
  2. Start some containers without networking.
  3. Use ova-docker to add some ports to OVS and the containers.
  4. Program P4 pipeline in P4-OVS so the containers can communicate with each other.

I think this is a simpler approach and makes the bar to entry to IPDK easier so folks can kick the tires a bit.

mestery avatar Dec 22 '21 19:12 mestery

Yep, thats the error I was talking about! You need to stop the p4-ovs daemons and follow the readme from the start!

Start some containers without networking. Use ova-docker to add some ports to OVS and the containers. Program P4 pipeline in P4-OVS so the containers can communicate with each other.

This will not work because that code path is not implemented yet in p4-ovs! Only what is described in the readme is implemented!

So as I already mentioned a couple of times, containers connected to p4-ovs will not work yet...

stolsma avatar Dec 22 '21 19:12 stolsma

OK, thanks for clarifying. I think we can get containers working after the holidays. :)

mestery avatar Dec 22 '21 19:12 mestery

Don't get your hopes up to high! A lot of code needs to be written to get this going... The code base is at only 10% is my gut feeling...

stolsma avatar Dec 22 '21 19:12 stolsma

hello, friend! Did you solve this problem? I am facing the same problem.

RogueCHU avatar Jun 15 '23 13:06 RogueCHU