-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add docs on using pmm (packet manipulation module) bf_pktpy, and option to select pmm by env variable #213
Add docs on using pmm (packet manipulation module) bf_pktpy, and option to select pmm by env variable #213
Conversation
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
The CI failures here cannot have anything to do with the changes, since they are only fixing a typo in a comment and top-level README doc changes. See #212 for one way to update CI to pass. |
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
…-using-bf-pktpy
…tf into add-docs-on-using-bf-pktpy
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
These changes have been tested by passing all p4c tests, with some additional changes to p4c that cause it to use bf-pktpy as the ptf's packet manipulation module, instead of the default scapy. See here: p4lang/p4c#5145 |
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
…capy Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
…tf into add-docs-on-using-bf-pktpy
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
…tf into add-docs-on-using-bf-pktpy
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.
I would consider making bf_pktpy the default with the next release?
if getattr(args, pmm_key): | ||
# Then use the value from the command line option. | ||
config[pmm_key] = getattr(args, pmm_key) | ||
else: |
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.
elif?
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.
Updated in commit 23
@@ -72,6 +72,94 @@ yum install tcpdump | |||
apt-get install tcpdump | |||
``` | |||
|
|||
### Using `bf_pktpy` as an alternate packet manipulation module | |||
|
|||
The Python module `bf_pktpy` is included as part of the |
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.
We should consider making that module standalone or upstreaming it to PTF.
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.
I have a temporary repo with only the bf_pkpy code by itself here, and it does allow one to pip install it just fine in my testing: https://github.com/jafingerhut/bf-pktpy
I don't have a big opinion on whether open-p4studio should be modified to install it from a new https://github.com/p4lang/bf-pktpy repo, or if we end up with 2 copies of it.
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.
I think it is easiest to vendor it as part of ptf, because it is specially built for this use case.
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.
Are you thinking an arrangement where pip install ptf
installs code such that you can then do import ptf
and/or import bf_pktpy
?
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.
Yes, partially for convenience. Partially because bf_pktpy is specialized towards PTF and this coupling makes sure its functionality is scoped for PTF-style use cases.
Signed-off-by: Andy Fingerhut <andy.fingerhut@gmail.com>
It is expected that these PRs are approved and merged before this one: