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

Requirements

This package has not only PyPi dependencies. It needs installation of PI: https://github.com/p4lang/PI

  1. Install PI and its dependencies using install_P4Runtime.sh script (this script comes from https://github.com/jafingerhut/p4-guide).
    cd scripts
    chmod +x install_P4Runtime.sh
    ./install_P4Runtime.sh

  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:
    ./autogen.sh
    ./configure --with-proto
    make
    make check
    [sudo] make install

  4. Install PI and its dependencies using install_P4Runtime.sh script (this script comes from https://github.com/jafingerhut/p4-guide).
    cd scripts
    chmod +x install_P4Runtime.sh
    ./install_P4Runtime.sh

  5. Clone PI and submodules
    git clone https://github.com/p4lang/PI
    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...]

Commands

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

load_config

Loads compiled program to a switch.

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

get_config

Downloads current program from a switch

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

table_update

Updates table entries

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

table_dump

Prints to the console information about table entries

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

Contact

Tomek Osiński < tomasz.osinski2@orange.com / osinstom@gmail.com >

Mateusz Kossakowski < mateusz.kossakowski@orange.com / mateusz.kossakowski.10@gmail.com >

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 details)

Uploaded Source

File details

Details for the file ovs-p4-0.0.6.tar.gz.

File metadata

  • Download URL: ovs-p4-0.0.6.tar.gz
  • Upload date:
  • Size: 32.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/20.7.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.2

File hashes

Hashes for ovs-p4-0.0.6.tar.gz
Algorithm Hash digest
SHA256 1b15527fcfc28f04528d0553f1597b9bec71ed88ab398ef96706ea43768b9d04
MD5 31533b7bab4e8792c6a650e41574dad5
BLAKE2b-256 70df10b09911d0e99b24c70e999fe5bf04f2da170a4b24ddc7fd9c274b024588

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page