GithubHelp home page GithubHelp logo

5abeel / networking-recipe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ipdk-io/networking-recipe

0.0 0.0 0.0 618 KB

IPDK Networking Recipe (P4 Control Plane)

License: Apache License 2.0

Shell 5.92% C++ 25.26% C 12.55% CMake 29.98% P4 26.29%

networking-recipe's Introduction

IPDK Networking Recipe (P4 Control Plane)

Overview

The IPDK Networking Recipe (originally P4-OVS Split Architecture) modularizes P4-OVS and reduces coupling between its components, making the code easier to maintain and more suitable for upstreaming. It moves the P4-specific components of the integrated architecture of P4-OVS to a separate process called infrap4d.

Networking Recipe Architecture

infrap4d

Infrap4d integrates Stratum, the Kernel Monitor (krnlmon), Switch Abstraction Interface (SAI), Table Driven Interface (TDI), and a P4 target driver into a separate process (daemon).

Infrap4d Architecture

Stratum

Stratum is an open-source silicon-independent switch operating system. It is a component of Infrap4d that provides the P4Runtime and gNMI/Openconfig capabilities for P4 flow rule offloads and port configuration offloads. Stratum is augmented with a new tdi platform layer that processes P4rt and gNMI requests and interacts with the underlying P4 target driver through TDI. A new ipdk platform layer provides IPDK-specific replacements for several TDI modules that allow it to handle configuration differences between IPUs and the switches for which Stratum was developed.

Table Driven Interface (TDI)

TDI (Table Driven Interface) provides a target-agnostic interface to the driver for a P4-programmable device. It is a set of APIs that enable configuration and management of P4 programmable and fixed functions of a backend device in a uniform and dynamic way. Different targets like bmv2 and P4-DPDK can choose to implement their own backends for different P4 and non-P4 objects but can share a common TDI. Stratum talks to the target-specific driver through the TDI front-end interface.

Kernel Monitor (krnlmon)

The Kernel Monitor receives RFC 3549 messages from the Linux Kernel over a Netlink socket when changes are made to the kernel networking data structures. It listens for network events (link, address, neighbor, route, tunnel, etc.) and issues calls to update the P4 tables via SAI and TDI. The kernel monitor is an optional component of infrap4d.

Switch Abstraction Interface (SAI)

Switch Abstraction Interface (SAI) defines a vendor-independent interface for switching ASICs.

Interfaces

P4Runtime

The P4Runtime API is a control plane specification for managing the data plane elements of a device defined or described by a P4 program.

gNMI

gRPC Network Management Interface (gNMI) is a gRPC-based protocol to manage network devices.

Clients

  1. ovs-p4rt: A library (C++ with a C interface) that allows ovs-vswitchd and ovsdb-server to communicate with the P4Runtime Server in infrap4d via gRPC. It is used to program (insert/modify/delete) P4 forwarding tables in the pipeline.

  2. p4rt-ctl: A Python-based P4Runtime client which talks to the P4Runtime Server in infrap4d via gRPC, to program the P4 pipeline and insert/delete P4 table entries.

  3. gnmi_cli: A gRPC-based C++ network management interface client to handle port configurations and program fixed functions in the P4 pipeline.

Download

To download the source code for the Networking Recipe:

git clone --recursive https://github.com/ipdk-io/networking-recipe
cd networking-recipe
git submodule update init

Targets

The IPDK Networking Recipe can be built to support different targets. See the target-specific instructions for information on how to set up, build, and use a particular target.

Target Instructions
dpdk IPDK Networking Recipe for DPDK
tofino IPDK Networking Recipe for Tofino

make-all.sh

The make-all.sh script provides a convenient way to build the Networking Recipe for a specific target.

./make-all.sh [--ovs] -target <target>

General options

Parameter Value Description
--prefix path Path to the directory in which build artifacts should be installed. Sets the CMAKE_INSTALL_DIR CMake variable. Default value is ./install.
--sde-install path Path to install directory for the target driver (SDE). Sets the SDE_INSTALL_DIR CMake variable. Defaults to the value of the SDE_INSTALL environment variable.
--target target Target to build for (dpdk or tofino). Sets the DPDK_TARGET or TOFINO_TARGET CMake variable. Currently defaults to tofino.

Parameter names may be abbreviated to any shorter form as long as it is unique.

Developer options

Parameter Value Description
--clean Remove main build and install directories, then build.
--debug Build with debug configuration.
--dep-install path Path to an optional install directory for dependency libraries. Sets the DEPEND_INSTALL_DIR CMake variable. Defaults to the value of the DEPEND_INSTALL environment variable.
--develop Create separate build and install trees for OVS (ovs/build and ovs/install). The --clean option does not remove these directories. This allows you to do a clean build of the non-OVS code without having to rebuild OVS.
--no-ovs Disable support for Open vSwitch (OvS).
--ovs Enable support for Open vSwitch (OvS).

These options are primarily of interest to developers working on the recipe.

Note

The build files, CMake variables, environment variables, and make-all script are under active development and are expected to change.

networking-recipe's People

Contributors

ffoulkes avatar nupuruttarwar avatar n-sandeep avatar 5abeel avatar mgaravin avatar dandaly avatar koushik-kopanati avatar vsureshkumarp 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.