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

Dpdk Backend: Enable header stack dynamic index elimination #3375

Merged
merged 4 commits into from
Jun 9, 2022

Conversation

usha1830
Copy link
Contributor

@usha1830 usha1830 commented Jun 1, 2022

This PR enables midend pass HSIndexSimplifier to simplify header stack indices.
The dynamic index expression is replaced with series of if-statements with the dynamic index replaced with constant values based on the runtime value of index.

Tests added to cover the following expressions/statements

  • Assignment statements (on both sides as well)
  • Table keys
  • If condition expression
  • Switch expression
  • Function param
  • Binary operation
  • Unary Operation
  • Slice

@usha1830
Copy link
Contributor Author

usha1830 commented Jun 7, 2022

Fedora build is failing with this error

Error: fatal: unable to access 'https://github.com/p4lang/p4runtime.git/': Could not resolve host: github.com
 Unable to fetch in submodule path 'control-plane/p4runtime'; trying to directly fetch 7a322f35f0c80bf20bc7fcc96f9d1ab77e5fd07a:
 From https://github.com/p4lang/p4runtime
  * branch            7a322f35f0c80bf20bc7fcc96f9d1ab77e5fd07a -> FETCH_HEAD
 Submodule path 'control-plane/p4runtime': checked out '7a322f35f0c80bf20bc7fcc96f9d1ab77e5fd07a'
 Error: fatal: unable to access 'https://github.com/google/googletest.git/': Could not resolve host: github.com

@usha1830
Copy link
Contributor Author

usha1830 commented Jun 8, 2022

@mbudiu-vmw Could you please review this PR? This uses the midend pass HSIndexSimplifier for non-constant header stack index elimination.

The other PR which implements this transformation directly in DPDK backend is #3371. Please suggest if that should be used instead.

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