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 OVS repository. The C (macro) code generated
by the OVS plugin in the p4c-behavioral repository, is called at different
locations within the OVS repository. The following patches add the necessary
changes needed to consume the generated code in OVS. The current changes are
for the userspace OVS implementation which can run with DPDK.

To test these changes, you can build OVS as follows (but make sure that
p4-hlir---https://github.com/p4lang/p4-hlir, and p4c-behavioral are installed):

$ ./boot.sh
$ ./configure --with-dpdk=$DPDK_BUILD p4inputfile=<p4 program>
$ make

---
Cian Ferriter (1):
  flow: P4 based hash calculation on IP and Ethernet headers

Muhammad Shahbaz (1):
  adding P4 support

 acinclude.m4                                      |  17 +++
 build-aux/extract-ofp-actions                     |   4 +-
 build-aux/extract-ofp-fields                      |  99 ++++++++++-----
 configure.ac                                      |   1 +
 datapath/linux/compat/include/linux/openvswitch.h |  10 ++
 include/automake.mk                               |   1 +
 include/openvswitch/flow.h                        |   8 ++
 include/openvswitch/meta-flow.h                   |   5 +
 include/openvswitch/packets.h                     |   6 +
 include/openvswitch/types.h                       |   6 +
 include/p4/automake.mk                            |   3 +
 include/p4/examples/l2_switch.p4                  |  89 ++++++++++++++
 include/p4/examples/simple_router.p4              | 143 ++++++++++++++++++++++
 lib/automake.mk                                   |   4 +-
 lib/dp-packet.h                                   |  10 ++
 lib/dpif-netdev.c                                 |   2 +-
 lib/flow.c                                        |  76 ++++++------
 lib/flow.h                                        |   6 +
 lib/match.c                                       |  46 +++++++
 lib/meta-flow.c                                   |  24 ++++
 lib/nx-match.c                                    |   6 +
 lib/odp-execute.c                                 |  12 ++
 lib/odp-util.c                                    |  97 ++++++++++++++-
 lib/packets.c                                     |   6 +
 lib/packets.h                                     |   6 +
 ofproto/ofproto-dpif-sflow.c                      |   6 +
 26 files changed, 616 insertions(+), 77 deletions(-)
 create mode 100644 include/p4/automake.mk
 create mode 100644 include/p4/examples/l2_switch.p4
 create mode 100644 include/p4/examples/simple_router.p4

--
2.7.4 (Apple Git-66)
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to