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

[design] Support for incremental parsing #17

Closed
chkim4142 opened this issue Oct 27, 2015 · 1 comment
Closed

[design] Support for incremental parsing #17

chkim4142 opened this issue Oct 27, 2015 · 1 comment
Milestone

Comments

@chkim4142
Copy link
Contributor

There has been concerns that allowing any parsers or control flows to call any other parsers or control flows (irrespective of whether they belong to ingress or egress) might lead to a P4 coding style that is supportable only a certain type of machines. If we want P4 to be widely applicable, we should error on the conservative side.

To enable both pipeline-style targets and CPU/NPU-style targets, the group felt the following approach would be reasonable. Note #1 and #2 below are already possible with the current P4 spec. Only #3 is a new feature.

  1. Allow exiting a parser through multiple exit points, each of which can lead to a different control flow
  2. Allow a control flow to call other sub-control flows. Although currently the egress must start with one pre-defined fixed entry point (which is "egress"), one can quickly branch out and call multiple sub-control flows from there.
  3. Allow a control flow to call a parser via resubmit() or continue_parsing(). The current spec doesn't define the semantics of resubmit() -- it doesn't tell whether resubmit() resets the parse pointer of the resubmitted packet to zero or retains the last position where parsing exited. We should make it clear (the former way) in the spec and should consider introducing another primitive action called continue_parsing(), which retains the last position where parsing stopped.
@chkim4142 chkim4142 added this to the p4-v1.2 milestone Oct 27, 2015
@chkim4142
Copy link
Contributor Author

This is one of the key motivations for P4_16. Separating architecture from language enables this.

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

No branches or pull requests

1 participant