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

Support annotations for actions params and match keys. (#463) #491

Conversation

sethfowler
Copy link
Contributor

This PR implements P4Runtime serializer support for annotations on action parameters and match keys.

I had to make KeyElement implement IAnnotated; this is just an oversight of the current code, since KeyElement already contains a list of annotations.

@sethfowler sethfowler self-assigned this Apr 17, 2017
@@ -938,6 +940,7 @@ class P4RuntimeSerializer {
auto paramName = controlPlaneName(actionParam);
param->set_id(index++);
param->set_name(paramName);
addAnnotations(param, annotations);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is incorrect, it picks up the action's annotations, not the parameter's annotations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, you're right. Fixing now.

@sethfowler sethfowler force-pushed the seth/support-annotations-for-actions-params-and-match-keys branch from 8dea55a to ca9d25b Compare April 17, 2017 22:37
@sethfowler
Copy link
Contributor Author

@antoninbas OK, it's fixed.

@sethfowler sethfowler merged commit 8ca1c07 into p4lang:master Apr 17, 2017
@sethfowler sethfowler deleted the seth/support-annotations-for-actions-params-and-match-keys branch April 17, 2017 23:18
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

Successfully merging this pull request may close these issues.

2 participants