Running the Behavioral Model - 2022.2 English - UG1308

Vitis Networking P4 User Guide (UG1308)

Document ID
UG1308
Version
2022.2 English
Revision

The behavioral model uses the .json output provided by the P4 compiler and provides two applications:

p4bm-vitisnet
This is an application which models the data plane. It consumes the .json file and implements the packet processing behavior defined by the corresponding P4 program.
p4bm-vitisnet-cli
This is an application which models the control plane. It provides a command line interface (CLI) used to manage the data plane (p4bm-vitisnet).
These applications are used together to carry out behavioral modeling. Typical usage is as follows:
  • The p4bm-vitisnet process is launched (usually as a background task), specifying a .json file as an input.
  • The p4bm-vitisnet-cli process is launched, which connects to p4bm-vitisnet via a socket interface.
  • Management commands are issued at the CLI to interact with the model, for example, add table entries, trigger traffic flow, etc.

To simplify usage and enable the use of scripts for controlling the model, a third application called run-p4bm-vitisnet is also provided. This application is simply a wrapper around p4bm-vitisnet and p4bm-vitisnet-cli that also accepts a script containing commands which are submitted to p4bm-vitisnet-cli.

For the socket connections involved, the default port used is 9090, which can be overridden with a user specified value.