Hi all, We are submitting the following patches on this list for your review. These patches contain changes to add support for P4 in OVS.
An earlier, proof-of-concept, implementation has been developed and published in SIGCOMM this year: http://pisces.cs.princeton.edu/papers/sigcomm16-pisces.pdf. Now, our plan is to add this to the upstream OVS. As a first step, we are providing support for adding new fields in OVS using P4. This includes augmenting the flow struct, in OVS, with new fields; extending the miniflow_strcut function to parse these fields; and match-action tables to operate on these fields. To understand the overall structure of the P4/OVS compiler, please read our paper above, but, in short, there are two parts to it. The first part is based on the p4c-behavioral repository (https://github.com/p4lang/p4c-behavioral) from the p4lang organization, and the second part is the changes made in the OVS repository, itself. The following patches are for the p4c-behavioral repository. In p4c-behavioral one can generate target-specific code for different backends. It allows you to specify these backends as a plugin. These patches create a new plugin, called OVS, in p4c-behavioral. The current changes are for the userspace OVS implementation which can run with DPDK. To test these changes, you can run the following command: $ ./p4c-behavioral <p4 program> --gen-dir <output directory> --plugin ovs --- Cian Ferriter (1): Add 'hash.c.h' file to support P4 based hash calculation Muhammad Shahbaz (1): adding OVS plugin .../linux/compat/include/linux/openvswitch.h.h | 63 +++ p4c_bm/plugin/ovs/inc/include/openvswitch/flow.h.h | 31 + .../ovs/inc/include/openvswitch/meta-flow.h.h | 74 +++ .../plugin/ovs/inc/include/openvswitch/packets.h.h | 93 +++ .../plugin/ovs/inc/include/openvswitch/types.h.h | 34 ++ p4c_bm/plugin/ovs/inc/lib/dp-packet.h.h | 46 ++ p4c_bm/plugin/ovs/inc/lib/flow.c.h | 625 +++++++++++++++++++++ p4c_bm/plugin/ovs/inc/lib/hash.c.h | 51 ++ p4c_bm/plugin/ovs/inc/lib/match.c.h | 58 ++ p4c_bm/plugin/ovs/inc/lib/meta-flow.c.h | 226 ++++++++ p4c_bm/plugin/ovs/inc/lib/nx-match.c.h | 60 ++ p4c_bm/plugin/ovs/inc/lib/odp-execute.c.h | 130 +++++ p4c_bm/plugin/ovs/inc/lib/odp-util.c.h | 251 +++++++++ p4c_bm/plugin/ovs/inc/lib/packets.c.h | 63 +++ p4c_bm/plugin/ovs/inc/lib/packets.h.h | 51 ++ .../plugin/ovs/inc/ofproto/ofproto-dpif-sflow.c.h | 34 ++ .../plugin/ovs/inc/ofproto/ofproto_dpif_sflow.c.h | 33 ++ p4c_bm/smart.py | 77 +++ 18 files changed, 2000 insertions(+) create mode 100644 p4c_bm/plugin/ovs/inc/datapath/linux/compat/include/linux/openvswitch.h.h create mode 100644 p4c_bm/plugin/ovs/inc/include/openvswitch/flow.h.h create mode 100644 p4c_bm/plugin/ovs/inc/include/openvswitch/meta-flow.h.h create mode 100644 p4c_bm/plugin/ovs/inc/include/openvswitch/packets.h.h create mode 100644 p4c_bm/plugin/ovs/inc/include/openvswitch/types.h.h create mode 100644 p4c_bm/plugin/ovs/inc/lib/dp-packet.h.h create mode 100644 p4c_bm/plugin/ovs/inc/lib/flow.c.h create mode 100644 p4c_bm/plugin/ovs/inc/lib/hash.c.h create mode 100644 p4c_bm/plugin/ovs/inc/lib/match.c.h create mode 100644 p4c_bm/plugin/ovs/inc/lib/meta-flow.c.h create mode 100644 p4c_bm/plugin/ovs/inc/lib/nx-match.c.h create mode 100644 p4c_bm/plugin/ovs/inc/lib/odp-execute.c.h create mode 100644 p4c_bm/plugin/ovs/inc/lib/odp-util.c.h create mode 100644 p4c_bm/plugin/ovs/inc/lib/packets.c.h create mode 100644 p4c_bm/plugin/ovs/inc/lib/packets.h.h create mode 100644 p4c_bm/plugin/ovs/inc/ofproto/ofproto-dpif-sflow.c.h create mode 100644 p4c_bm/plugin/ovs/inc/ofproto/ofproto_dpif_sflow.c.h -- 2.7.4 (Apple Git-66) _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev