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

Use psabpf-ctl register command in PTF tests #3337

Merged
merged 4 commits into from
May 19, 2022

Conversation

kmateuszssak
Copy link
Contributor

  • Add register_get and register_set commands to PTF tests.
  • Use key param name in singular form (key is a list of fields).

@@ -97,7 +97,7 @@ control ingress(inout headers hdr,
if (tmp.srcAddr < (bit<32>)5) {
tmp.srcAddr = (bit<32>)5;
} else {
tmp.srcAddr = tmp.srcAddr + 10;
tmp.dstAddr = tmp.dstAddr + 13;
Copy link
Contributor

Choose a reason for hiding this comment

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

this hardwired constant is a bit weird. It probably should be a const or #define, and perhaps documented.

@kmateuszssak
Copy link
Contributor Author

@mbudiu-vmw Yes, they look weird but we don't have a mechanism that allow us to share const values between Python PTF tests and P4 test programs. I added a comment. Maybe it will help a bit.

@mihaibudiu mihaibudiu merged commit d7a99ba into p4lang:main May 19, 2022
github-sajan pushed a commit to github-sajan/p4c that referenced this pull request May 26, 2022
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