Giter VIP home page Giter VIP logo

p4pktgen

Introduction

p4pktgen is a tool for generating input packets and table entries for P4 programs that cover all paths of the program.

It supports programs written in either the P4_14 or P4_16 variants of the language, as long as the program can be compiled using the open source p4c-bm2-ss compiler (part of the p4c repository), compiled to a bmv2 JSON file for use with the simple_switch software switch (part of the behavioral-model repository).

It currently covers all combinations of execution paths through the parser and ingress control block, but ignores the egress control block. It runs the test cases in simple_switch to check that the packet follows the expected path of execution, and also writes out a data file describing the test cases, which should be useful in executing the test cases on other P4 implementations (additional work is required to adapt the test cases to run on other implementations).

Prerequisites

For installing p4c and simple_switch, there is a script by Andy Fingerhut. Make sure that simple_switch is in your path before running p4pktgen.

Note: this software has been developed and tested on Ubuntu 16.04 and likely requires changes to run on other operating systems.

Installing and running p4pktgen

Run p4pktgen's install script as follows:

% ./tools/install.sh

The basic command to run p4pktgen is as follows:

% p4pktgen <json file>

The flag -d prints additional debug information. The -h option gives help on other command line options available.

p4pktgen's Projects

p4pktgen icon p4pktgen

Automatic test case generator for P4 programs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.