-
Notifications
You must be signed in to change notification settings - Fork 462
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
Replace unnecessary use of Scapy with ptf.pcap_writer in p4tc tests #5165
Replace unnecessary use of Scapy with ptf.pcap_writer in p4tc tests #5165
Conversation
This replacement allows the resulting test program to be licensed under Apache 2.0 license. Signed-off-by: Andy Fingerhut <andy.fingerhut@gmail.com>
@vbnogueira Please take a look at these changes, which are nearly identical to ones that I have made to bmv2 back end testing Python code in order to eliminate unnecessary uses of Scapy. If we do not do this, the Python files that import scapy must be licnesed as GPL-2.0-only. With these changes (assuming the tests still work -- waiting for CI test results now), the Python program can be licensed as Apache-2.0. Regarding the standalone program named |
…-code-in-p4tc-tests
Thank you for the heads up.
It is, but it's not very explicit.
Yes, we need to keep it, but I have no problem in changing the licence. [1] https://github.com/jafingerhut/p4c/blob/replace-scapy-with-apache-code-in-p4tc-tests/backends/tc/test_infra.py#L232 |
Running it locally will require using the latest version of the ptf package installed from https://github.com/p4lang/ptf source code. Using |
@vbnogueira Looks like all tests are passing in CI with these changes, except the Python formatter, which I will fix soon. If you get good local test results with the latest version of https://github.com/p4lang/ptf code, please approve the PR (unless you have other suggestions for changes). |
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
Signed-off-by: Andy Fingerhut <andy.fingerhut@gmail.com>
…-code-in-p4tc-tests
Signed-off-by: Andy Fingerhut <andy.fingerhut@gmail.com>
….com:jafingerhut/p4c into replace-scapy-with-apache-code-in-p4tc-tests
@vbnogueira Thanks for trying this out and approving. I will go ahead and merge given your approval and my testing. FYI, I have found a small enhancement to the ptf package that should enable even your but given that it has a few other PRs that must be approved and merged before we can merge that one, it might be a while before that gets in. |
I jumped the gun on my previous comment -- merging this must wait for an approval from a reviewer with write access. |
@@ -1,15 +1,7 @@ | |||
#!/usr/bin/env python3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vbnogueira Can we replace this code with the other utilities we are using?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fruffy It is currently used by the p4tc tests.
I have a way to update ptf and bf-pktpy with a few extra lines of code, such that we can relicense this send_packet file as Apache-2.0. I have those changes in this PR, but there are a couple of other PRs that must be approved and merged first before it can be merged: #5145
This replacement allows the resulting test program to be licensed under Apache 2.0 license.