Skip to content
/ rtsmith Public
forked from nyu-systems/rtsmith

P4Tools module to generate P4Runtime control-plane entries.

License

Notifications You must be signed in to change notification settings

zzmic/rtsmith

 
 

Repository files navigation

ControlPlaneSmith: Generating Random Control-Plane Configurations from P4 Programs

ControlPlaneSmith is a P4Tools module to fuzz P4 control-planes. ControlPlaneSmith is intended to stress-test the control-plane interface of a P4 target. ControlPlaneSmith can also be used by other P4 tools to produce an initial control-plane configuration.

ControlPlaneSmith takes as argument a P4 program, the P4 architecture, and the P4 target and produces a random control-plane configuration specific to the input program. Currently, this configuration is specified in the P4Runtime format in the form of a Protobuf Text Format file. In addition to this initial configuration, ControlPlaneSmith can also generate a timeseries of P4Runtime WriteRequests, which either insert a control-plane entry or update or delete an existing entry.

Building ControlPlaneSmith

ControlPlaneSmith is a P4Tools module, which itself is part of P4C. To be able to use ControlPlaneSmith, you first need to build P4C. Instructions can be found here.

After building P4C, you need link ControlPlaneSmith as a P4Tools module. The CI scripts describe a similar workflow. You will need to symlink ControlPlaneSmith into the modules directory, rerun CMake in your P4C build directory, then rebuild.

ln -sf rtsmith p4c/backends/p4tools/modules/
cd p4c/build
cmake ..
make

About

P4Tools module to generate P4Runtime control-plane entries.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 79.4%
  • Python 11.8%
  • CMake 8.8%