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
fruffy
left a comment
There was a problem hiding this comment.
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.
Updated in commit 23
|
|
||
| ### 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.
We should consider making that module standalone or upstreaming it to PTF.
There was a problem hiding this comment.
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.
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.
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.
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: