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

PSA/eBPF: retrieve interface numbers from OS in PTF tests #3659

Merged
merged 9 commits into from
Nov 3, 2022

Conversation

osinstom
Copy link
Contributor

@osinstom osinstom commented Nov 3, 2022

Previously, we hardcoded interface numbers in PTF tests and P4 programs. However, PTF tests will fail if OS changes the numbering for some reason. I met this issue when running PTF tests for PSA/eBPF in Docker for Mac VM.

This PR modifies the PTF framework used for eBPF so that:

  • interface numbers are retrieved from OS based on a name and put in DP_PORTS dictonary
  • use PORTx macros to inject retrieved interface numbers to P4 programs
  • PTF test cases use the DP_PORTS dictonary to find a real interface number

@mihaibudiu mihaibudiu merged commit 0be113d into p4lang:main Nov 3, 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