Code Monkey home page Code Monkey logo

pi's Introduction

PI LIBRARY REPOSITORY

Build Status

This repository has submodules; after cloning it you should run git submodule update --init --recursive.

See examples for how to use the PI.

Dependencies

  • libjudy-dev
  • libreadline-dev

Building p4runtime.proto

To include p4runtime.proto in the build, please run configure with --with-proto.

PI CLI

For now the PI CLI supports an experimental version of table_add and table_delete. Because these two functions have been implemented in the bmv2 PI implementation, you can test the PI CLI with the bmv2 simple_switch. Assuming bmv2 is installed on your system, build the PI and the CLI with ./configure --with-bmv2 && make. You can then experiment with the following commands:

simple_switch tests/testdata/simple_router.json  // to start the switch
./CLI/pi_CLI_bmv2 tests/testdata/simple_router.json  // to start the CLI
PI CLI> assign_device 0 0 -- port=9090  // 0 0 : device id + config id
PI CLI> table_add ipv4_lpm 10.0.0.1/24 => set_nhop 10.0.0.1 1
PI CLI> table_dump ipv4_lpm
PI CLI> table_delete ipv4_lpm <handle returned by table_add>

Contributing

All contributed code must pass the style checker, which can be run with ./tools/check_style.sh. If the style checker fails because of a C file, you can format this C file with ./tools/clang_format_check.py -s Google -i <file>.

pi's People

Contributors

antoninbas avatar wmohsin avatar sethfowler avatar melshabani avatar teverman avatar aghaffarkhah avatar chenxinming05 avatar yyetim avatar

Watchers

Roshan Sedar avatar

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.