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

Making sure that the latest P4Runtime spec is compatible with P4_16 v1.2.2 #389

Closed
antoninbas opened this issue Apr 28, 2022 · 6 comments
Closed
Labels
p4-language-compatibility An issue related to compatibility between P4_16 language spec and P4Runtime API spec

Comments

@antoninbas
Copy link
Member

P4Runtime v1.3 recommends using version v1.2.1 of the P4_16 language.
P4_16 v1.2.2 was released in May 2021, with the following changes: https://p4.org/p4-spec/docs/P4-16-v1.2.2.html#sec-summary-of-changes-made-in-version-122. Some of these changes do have an impact on P4Runtime or could have an impact on P4Runtime:

  • Added support for generic structures: P4Info includes information about structure definitions and maps each structure type by name to its definition. This information is used by P4Runtime when sending a value for that structure type. With support for generic structures, we need to make sure that the generate P4Info is correct, and if necessary update the spec or at least update https://github.com/p4lang/p4runtime/blob/main/docs/v1/guidance-for-generating-p4info.md.
  • Added support for additional enumeration types: we need to check if there is anything we are not currently covering in P4Info / P4Runtime.
  • Added support for 0-width bitstrings and varbits: not sure if there is any impact for us

So unless I am mistaken, it's primarily 2 items that we have to look into. Would be great to tackle this before the P4Runtime v1.4 release.

cc @smolkaj @jafingerhut @jonathan-dilorenzo

@smolkaj
Copy link
Member

smolkaj commented Apr 28, 2022

That seems reasonable. Agreed it would be nice to upgrade to v1.2.2

@jfingerh
Copy link

jfingerh commented Nov 6, 2022

@jameschoi I will ping you on several public p4runtime issues to call your attention to them. For others, sorry for the comment noise.

@antoninbas
Copy link
Member Author

At the moment the latest version is P4_16 v1.2.3, so that should be the new target for P4Runtime v1.4
P4_16 v1.2.4 should come fairly soon, but it is likely to include a significant change (initial entries support) that may have a large impact on P4Runtime. So we probably want to tie P4Runtime v1.4 to P4_16 v1.2.3, and address "initial entries" post v1.4 release.

cc @chrispsommers @jafingerhut

@jafingerhut
Copy link
Contributor

I have created a separate issues for this new feature mentioned above in Version 1.2.2 of the language spec that might have an impact on the P4Runtime API definition:

It seems like a good idea to create separate issues for each of the other 2 features mentioned above, too, so that each can make progress independently of the others.

@jafingerhut
Copy link
Contributor

I have also created two more separate issues on particular extensions to the P4_16 language spec, with the object of deciding what the P4Runtime API specification should say about them:

@jafingerhut jafingerhut added the p4-language-compatibility An issue related to compatibility between P4_16 language spec and P4Runtime API spec label Aug 15, 2023
@jafingerhut
Copy link
Contributor

I am closing this issue, since the following issues currently open as of 2024-Jan-12 are tracking all of the remaining new P4_16 language features added in v1.2.2 of the spec that are not yet explicitly addressed in the latest P4Runtime API specification:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4-language-compatibility An issue related to compatibility between P4_16 language spec and P4Runtime API spec
Projects
None yet
Development

No branches or pull requests

4 participants