[P4-dev] Potential contributions to extern functionality
iped at seas.upenn.edu
Wed Sep 26 14:51:56 EDT 2018
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev