Giter Club home page Giter Club logo

Comments (4)

mihaibudiu avatar mihaibudiu commented on June 17, 2024

As far as I know there is no such primitive supported in either P4-14 or the behavioral model at the level of P4.
How multicast is done is a property of the architecture. If I recall correctly, in the behavioral model this is done by setting some special metadata fields and populating a hidden magic table from the control plane.

from p4c.

smolkaj avatar smolkaj commented on June 17, 2024

Would it be better to model this as an extern in P4-16? Say

extern broadcast(standard_metadata_t meta);

? There is already a similar extern

extern void mark_to_drop();

in v1model.p4 (which, on a side node, might be better modeled as

extern void mark_to_drop(standard_metadata_t meta)

).

from p4c.

mihaibudiu avatar mihaibudiu commented on June 17, 2024

We don't have much freedom in writing the v1model.p4, it has to match closely the way P4-14 works, including its switch model, and it also has to be quite close to the behavioral model. The only reason for the existence of v1model is to preserve backward compatibility with P4-14. The drop action from P4-14 is translated to mark_to_drop() - a more suitable name. This is probably not the same as setting the drop bit in the standard_metadata (you have to read the P4-14 spec to know what that bit does). There is no broadcast in P4-14.

We should not be writing P4-16 code for v1model.p4 at all, but since we don't have a standard model and a supporting behavioral model implementation, this is currently the only way to test the compiler end-to-end.

So perhaps you are suggesting to add "broadcast" to the standard model.

from p4c.

smolkaj avatar smolkaj commented on June 17, 2024

@mbudiu-vmw: I see, that makes sense.

from p4c.

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.