-
Notifications
You must be signed in to change notification settings - Fork 6
2) Running P7
After setting the topology generation script, we can run the file to create the necessary P7 files.
# cd /home/user/p7
# python3 main.py
Now, we need to set the files in the correct location.
# ./set_files.sh
Start Stratum. First, we set the generated CHASSIS_CONFIG file: Please refer to the official documentation to build and run stratum (https://github.com/stratum/stratum/blob/main/stratum/hal/bin/barefoot/README.build.md)
# export CHASSIS_CONFIG="/home/admin12/p7/p7_rnp/files/chassis_config.pb.txt"
# ./start-stratum.sh
In a different terminal, we can compile the P4 code and start the P4 runtime connection to fill the tables and send the P4.
The P4 code is in p4src/p7_default. Please compile and set all the json, conf, and binaries in p4src/output_dir/
Having all the files ready, we can start the p4runtime to send the P4 code and the configuration of the tables to the switch.
# cd /home/user/p7/p4src
# ./p4rt/start_p4runtime.sh
With all set, we can start testing the network.