Git Product home page Git Product logo

Comments (1)

antoninbas avatar antoninbas commented on July 20, 2024

Hi,

I think the rest of the bullet point you are referring to pretty much explains what we mean by target independent:

The new code is target independent. While the original p4c-behavioral assumed a fixed abstract switch model with 2 pipelines (ingress and egress), bmv2 makes no such assumption and can be used to represent many switch architectures. Three different -although similar- such architectures can be found in the targets/ directory. If you are a networking company interested in programming your device (parser, macth-action pipeline, deparser) with P4, you can use bmv2 to reproduce the behavior of your device.

What we mean by "bmv2 is target independent" is that the bmv2 library can be used to simulate many switch architectures, so long as these architectures follow the "P4 paradigm" (i.e. packet processing is essentially done by parser / match-action pipeline / deparser). It has nothing to do with the architecture on which you run the software switch. bmv2 is meant to be run on a x86 system but can be used to reproduce the behavior of a P4-programmable ASIC or NIC.

Your question shows some confusion on several points. The title is "is P4 really device independent?" but your question concerns bmv2. Our claim is that P4 is device independent: different devices such as an ASIC, a NIC, a FPGA or a software switch can be programmed using P4. However, for each of these devices, you need a P4 compiler to map the P4 code to a valid device configuration. bmv2 can be seen as one more software switch that can run P4 programs. It has its own compiler (p4c-bm) which compiles P4 programs to a JSON representation which is understood by bmv2. The two big differences about bmv2 are:

  • it is supposed to be a "reference platform": speed is not a priority, but all P4 features should be supported, and supported correctly.
  • it can simulate any hardware target (with some limited C++ coding)

I invite you to look at some of the 2nd P4 workshop presentations to find out more about the P4 ecosystem (http://p4.org/p4-workshop-2/). For example, Xilinx had a presentation on compiling P4 to FPGA. We look forward to being able to run P4 programs on GPUs, but somebody would have to contribute a P4 -> CUDA compiler.

from behavioral-model.

Related Issues (20)

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.