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

Remove unncessary v1model include in P4 test programs - fix up programs that use v1model externs. #3608

Merged
merged 6 commits into from
Oct 25, 2022

Conversation

fruffy
Copy link
Collaborator

@fruffy fruffy commented Oct 24, 2022

This PR depends on #3606 for ref files. Fixes #3517. Instead of converting all of the programs to v1model this PR only converts the programs that use v1model externs.

@fruffy fruffy changed the title Remove unncessary v1model include in P4 test programs - fix up others. Remove unncessary v1model include in P4 test programs - fix up programs that use v1model externs. Oct 24, 2022
Copy link
Contributor

@mihaibudiu mihaibudiu left a comment

Choose a reason for hiding this comment

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

This PR does not include the reference outputs

@fruffy
Copy link
Collaborator Author

fruffy commented Oct 24, 2022

Yes, will update after #3606. #3591 should probably be merged before #3606, otherwise ref files will need to be updated, too.

@@ -1,6 +1,7 @@
#include <core.p4>
#define V1MODEL_VERSION 20180101
Copy link
Contributor

Choose a reason for hiding this comment

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

I admit I am a bit fuzzy on this V1MODEL_VERSION variable that was used here, and do not know how to check whether removing it is a good idea or a bad idea in the test programs where you have removed it. Any advice you might provide on helping guide my thinking about when this V1MODEL_VERSION is supposed to be used, vs. not?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe this variable is added automatically by toP4 here whenever v1model.p4 is included.

Copy link
Contributor

@jafingerhut jafingerhut left a comment

Choose a reason for hiding this comment

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

LGTM, with a minor question in there that I do not know how to answer, but I would guess you have looked into it more closely than I have.

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.

Fix up broken BMv2 programs
4 participants