Giter Site home page Giter Site logo

gengtianru123 / p4-build Goto Github PK

View Code? Open in Web Editor NEW

This project forked from p4lang/p4-build

0.0 0.0 0.0 46 KB

Infrastructure needed to generate, build and install the PD library for a given P4 program

Makefile 13.32% Shell 2.72% M4 22.57% C++ 57.95% C 2.68% Python 0.76%

p4-build's Introduction

p4-build

Infrastructure needed to generate, build and install the PD library for a given P4 program

Build Status

Dependencies

[bmv2] (https://github.com/p4lang/behavioral-model) with pdfixed needs to be installed. When compiling bmv2, pdfixed can be installed with --with-pdfixed.

The [bmv2 compiler] (https://github.com/p4lang/p4c-bm) also needs to be installed.

Building and installing the code

This repository is meant to be used to compile (and install) the PD library for a given P4 program. As a result the full absolute path to the P4 program, as well as the P4 program name, needs to be provided to configure. When running configure the folllowing environment variables need to be defined: P4_PATH, P4_NAME and possibly P4_PREFIX. You can run configure -h for more details.

1. ./autogen.sh
2. ./configure --with-bmv2 P4_NAME=<name of P4 program> P4_PATH=<absolute
path to P4 program> [P4_PREFIX=<prefix to use for PD APIs>]
3. make
4. make install

If P4_PREFIX is missing, we will use P4_NAME by default.

The following describes what can potentially be installed by this package, for a given P4 program for which P4_NAME=test.

.
├── bin
├── include
│   └── bmpd
│       └── test
│           └── pd
│               ├── pd_counters.h
│               ├── pd.h
│               ├── pd_learning.h
│               ├── pd_meters.h
│               ├── pd_mirroring.h
│               ├── pd_registers.h
│               ├── pd_rpc_server.h
│               ├── pd_tables.h
│               └── pd_types.h
├── lib
│   ├── bmpd
│   │   └── test
│   │       ├── libpd.a
│   │       ├── libpd.la
│   │       ├── libpd.so -> libpd.so.0.0.0
│   │       ├── libpd.so.0 -> libpd.so.0.0.0
│   │       ├── libpd.so.0.0.0
│   │       ├── libpdthrift.a
│   │       ├── libpdthrift.la
│   │       ├── libpdthrift.so -> libpdthrift.so.0.0.0
│   │       ├── libpdthrift.so.0 -> libpdthrift.so.0.0.0
│   │       └── libpdthrift.so.0.0.0
│   └── python2.7
│       └── site-packages
│           └── bmpd
│               └── test
│                   ├── p4_pd_rpc
│                   │   ├── constants.py
│                   │   ├── __init__.py
│                   │   ├── test.py
│                   │   ├── test-remote
│                   │   └── ttypes.py
│                   └── res_pd_rpc
│                       ├── constants.py
│                       ├── __init__.py
│                       └── ttypes.py
└── share
    └── bmpd
        └── test
            └── test.json

p4-build's People

Contributors

antoninbas 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.