Once the build process is complete, start the simulator on the built reference pipeline using the following command:
./tools/dsc-sim-start.sh --p4_program flow_offload
At this point both the ASIC simulator and core application are running, and
the two uplink interfaces (uplink0 and uplink1) are exposed to Linux® as tap
interfaces (Eth1-1 and Eth1-2). Validate this by running show
commands such as the following:
pdsctl show lif
pdsctl show port status
As a part of the simulator startup, the dp-app process is started,
which reads the file /sw/nic/rudra/src/conf/flow_offload/config.json
. This file
contains instructions to create the flow with policy and route results, and to
populate specific entries into the tables. To view the file, run the command:
cat /sw/nic/rudra/src/conf/flow_offload/config.json
If desired you can expose the uplink interfaces outside the container, so you can run traffic tools from outside to inject packets to the uplinks, To do so, run the following commands on the host of the container:
cd $TTOP/src/github.com/pensando/sw/nic/
DSC_INSTANCE=<ssdk-dev-container-name> ./rudra/test/tools/setup-uplink-interfaces.sh
<ssdk-dev-container-name>
can be obtained via docker ps
.To stop the simulator environment, execute the dsc-sim-stop.sh script. This kills the processes including the ASIC simulator and pds core application:
./tools/dsc-sim-stop.sh
To restart the simulation environment, execute the dsc-sim-restart.sh script. This restarts all the processes including the ASIC simulator and pds core application, which is useful in recovering from scenarios such as a process crashing:
./tools/dsc-sim-restart.sh --p4_program flow_offload