Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broadcast #103

Closed
smolkaj opened this issue Oct 13, 2016 · 4 comments
Closed

broadcast #103

smolkaj opened this issue Oct 13, 2016 · 4 comments

Comments

@smolkaj
Copy link
Member

smolkaj commented Oct 13, 2016

The architecture v1model.p4 does not currently seem to provide a primitive to broadcast packets.

@mihaibudiu
Copy link
Contributor

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.

@smolkaj
Copy link
Member Author

smolkaj commented Oct 14, 2016

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)

).

@mihaibudiu
Copy link
Contributor

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.

@smolkaj
Copy link
Member Author

smolkaj commented Oct 14, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants