[P4-dev] Potential contributions to extern functionality
antonin at barefootnetworks.com
Thu Sep 27 04:19:44 EDT 2018
Yes, please try to submit your features as separate pull requests.
Also before submitting a patch, please ask yourself these questions:
- does it belong in the core library (bm_sim) and can be used by several /
most architectures, or is it architecture specific?
- does it slow down packet processing for P4 programs that do not utilize
the new feature?
- if adding a feature to simple_switch, it is something that is required by
the P4_16 v1model architecture - or at least compatible with it?
For example, 3) (timer) seems like a good candidate for the bmv2 core
library, providing that it is implemented in such a way that there is no
penalty for programs that do not require it.
Looking forward to review your PRs.
On Wed, Sep 26, 2018 at 11:53 AM Isaac Pedisich <iped at seas.upenn.edu> wrote:
> Dear All,
> Recently, we have made some small modifications (fewer than 200 lines) to
> the behavioral model's simple switch target to introduce a bit of new
> functionality, centered around easing the execution of arbitrary externs.
> We'd like to explore the options of giving these changes to the community.
> There are three pieces of functionality that these modifications
> implement. In brief, they are:
> 1) Packet serialization: We implemented a few functions to serialize an
> entire packet (including valid headers, or a manually specified set of
> headers) into a character array. We also implemented deserialization back
> into the packet and headers, so packets can be modified within an extern
> that expects to operate on packets as byte arrays.
> 2) Packet creation: We implemented functions to inject arbitrarily
> generated packets into various stages in the pipeline, allowing externs to
> generate entirely new packets.
> 3) Periodic extern-helper execution: This allowed extern functions to
> register a callback and interval to the switch. If the extern is declared
> in the P4 code, the callback is called every time the interval elapses.
> We would gladly work with the community to make the changes acceptable to
> you, if you feel that the changes would be as helpful to others as they
> have been to us.
> To facilitate merging, we are happy to submit these features as separate
> pull requests so they may be accepted independently of one another.
> Thank you.
> P4-dev mailing list
> P4-dev at lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev