Skip to main content

The package contains a P4Runtime server for P4 capable ovs switch and a ovs-p4ctl command line tool for monitoring and administering

Project description


This package has not only PyPi dependencies. It needs installation of PI:

  1. Install PI and its dependencies using script (this script comes from
    cd scripts
    chmod +x

  2. Copy from this repository p4runtime.proto file to folder PI/proto/p4runtime/proto/p4/v1
    cp <path to ovs-p4 repository>/proto/p4runtime.proto <path to PI>/proto/p4runtime/proto/p4/v1

  3. Run PI installation once again:
    ./configure --with-proto
    make check
    [sudo] make install

  4. Install PI and its dependencies using script (this script comes from
    cd scripts
    chmod +x

  5. Clone PI and submodules
    git clone
    cd PI
    git submodule update --init --recursive

Install PI according to its own instructions (including grpc, protobuf, etc.).
Probably before protobuf installation you will have to install following dependencies on your own:
sudo apt-get --yes install autoconf automake libtool curl make g++ unzip
sudo apt-get --yes install zlib1g-dev
sudo apt-get --yes install cmake g++ git automake libtool libgc-dev bison flex libfl-dev libgmp-dev libboost-dev libboost-iostreams-dev libboost-graph-dev llvm pkg-config python python-scapy python-ipaddr python-ply tcpdump

P4Runtime server - ovs-p4srv

The ovs-p4srv P4Runtime server translates requests from P4Runtime to oko switch CLI commands.

How to run?

Run following command:

user@hostname:~$ ovs-p4srv

Command line tool - ovs-p4ctl

The ovs-p4ctl program is a command line tool for monitoring and administering oko switch via P4Runtime.

How to use?

The tool can be used as follows:

user@hostname:~$ ovs-p4ctl [command] [args...]


Every command requires at least one argument --pipeline-id - an identifier of a programme.
Switch can have multiple programs.


Loads compiled program to a switch.

Arguments: --pipeline-id | --p4info-path | --config-path


Downloads current program from a switch

Arguments: --pipeline-id | --response-type | --show | --p4info-path | --config-path


Updates table entries

Arguments: --pipeline-id | --p4info-path | --entry


Prints to the console information about table entries

Arguments: --pipeline-id | --p4info-path | --table


Tomek Osiński < / >

Mateusz Kossakowski < / >

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovs-p4-0.0.6.tar.gz (32.1 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page