apanda / ddc-p4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Steps to execute a program in Tofino:

  1. Navigate to the SDE PATH :
     cd ~/bf-sde-8.x.x
  1. Set the env variables :
     . ./set_sde.bash
  1. Build the p4 program using the command :
     ./p4_build ddc/ddc.p4
  1. Load the p4 program, and run the control plane API code using :
     "cd ddc/CP"
     "./run.sh"

Command to execute upon tofino reboot

     cd ~/bf-sde-8.x.x
     . ./set_sde.bash
     sudo ./install/bin/bf_kdrv_mod_load $SDE_INSTALL

Steps to execute a program in Netronome Nic:

  1. Load the nfp kernel module :
     sudo modprobe nfp nfp_pf_netdev=0 nfp_dev_cpp=1
  1. Start the run-time environment :
     sudo systemctl start nfp-sdk6-rte
     sudo systemctl start nfp-sdk6-rte-debug
  1. Build the program using the below command :
     sudo nfp4build -s AMDA0096-0001:0 -l lithium -o <prog_name>.nffw -p nfp-build -4 <prog_name>.p4 
  1. Load the firmware using the command :
     sudo nfp-nffw load -s <prog_name>.nffw
  1. Load the design on the nic :
     sudo rtecli design-load -f <prog_name>.nffw -p nfp-build/pif_design.json -c user_config.json

Now you must see the vf interfaces in ifconfig.

Primitives for programmable switches are summarized in net-prog-model

Primitives for smart-nics are summarized in nic-prog-model

About


Languages

Language:P4 70.8%Language:C 26.6%Language:Makefile 2.6%Language:Shell 0.1%