Improve fabric.p4 to reduce pipeline resources and refactor pipeconf impl

This patch affects both the P4 pipeline implementation and the
Java pipeconf.

P4 PIPELINE
- Less tables and smarter use of metadata to reduce inter-tables
dependencies and favor parallel execution of tables.
- Removed unused actions / renamed existing ones to make forwarding
behavior clearer (e.g. ingress_port_vlan table)
- Remove co-existence of simple and hansed table. Hashed should be the
default one, but implementations that do not support action profiles
might compile fabric.p4 to use the simple one.
- Use @name annotations for match fields to make control plane
independent of table implementation.
- Use @hidden to avoid showing actions and table on the p4info that
cannot be controlled at runtime.
- First attempt to support double VLAN cross-connect (xconnect table).
- New design has been tested with "fabric-refactoring" branch of
fabric-p4test:
github.com/opennetworkinglab/fabric-p4test/tree/fabric-refactoring

JAVA PIPECONF
This patch brings a major refactoring that reflects the experience
gathered in the past months of working on fabric.p4 and reasoning on its
pipeconf implementation. Indeed, the FlowObjective API is
under-specified and sometimes ambiguous which makes the process of
creating and maintaining a pipeliner implementation tedious. This
refactoring brings a simplified implementation by removing unused/
unnecessary functionalities and by recognizing commonality when possible
(e.g. by means of abstract and utility classes). It also makes design
patterns more explicit and consistent. Overall, the goal is to reduce
technical debt and to make it easier to support new features as we
evolve fabric.p4

Changes include:
- Changes in pipeliner/interpreter to reflect new pipeline design.
- By default translate objective treatment to PiAction. This favors
debuggability of flow rules in ONOS.
- Support new NextObjective’s NextTreatment class.
- Remove lots of unused/unnecessary code (e.g. async callback handling
for pending objective install status in pipeliner as current
implementation was always returning success)
- Gather commonality in abstract classes and simplify implementation
for objective translator (filtering, forwarding, next)
- New implementation of ForwardingFunctionTypes (FFT) that looks at
criterion instance values along with their types (to avoid relying on
case-specific if-else conditions to recognize variants of an FFT)
- Adaptive translation of NextObjective based on presence of simple or
hashed table.
- Support DENY FilteringObjective

Also:
- Fix onos-p4-gen-constants to avoid generating conflicting
PiMatchFieldId variable names.
- Install Graphviz tools in p4vm to generate p4c graphs
- Generate p4c graphs by default when compiling fabric.p4
- Use more compact Hex string when printing PI values

Change-Id: Ife79e44054dc5bc48833f95d0551a7370150eac5
diff --git a/pipelines/fabric/src/main/resources/include/header.p4 b/pipelines/fabric/src/main/resources/include/header.p4
index df29408..f57e974 100644
--- a/pipelines/fabric/src/main/resources/include/header.p4
+++ b/pipelines/fabric/src/main/resources/include/header.p4
@@ -36,14 +36,14 @@
 header ethernet_t {
     mac_addr_t dst_addr;
     mac_addr_t src_addr;
-    bit<16> ether_type;
+    bit<16> eth_type;
 }
 
 header vlan_tag_t {
     bit<3> pri;
     bit<1> cfi;
     vlan_id_t vlan_id;
-    bit<16> ether_type;
+    bit<16> eth_type;
 }
 
 header mpls_t {
@@ -80,17 +80,9 @@
     bit<128> dst_addr;
 }
 
-header arp_t {
-    bit<16> hw_type;
-    bit<16> proto_type;
-    bit<8> hw_addr_len;
-    bit<8> proto_addr_len;
-    bit<16> opcode;
-}
-
 header tcp_t {
-    bit<16> src_port;
-    bit<16> dst_port;
+    bit<16> sport;
+    bit<16> dport;
     bit<32> seq_no;
     bit<32> ack_no;
     bit<4>  data_offset;
@@ -103,8 +95,8 @@
 }
 
 header udp_t {
-    bit<16> src_port;
-    bit<16> dst_port;
+    bit<16> sport;
+    bit<16> dport;
     bit<16> len;
     bit<16> checksum;
 }
@@ -139,8 +131,8 @@
     bit<32>           s1u_enb_addr;
     bit<32>           s1u_sgw_addr;
 #ifdef WITH_SPGW_PCC_GATING
-    bit<16>           l4_src_port;
-    bit<16>           l4_dst_port;
+    bit<16>           l4_sport;
+    bit<16>           l4_dport;
     pcc_gate_status_t pcc_gate_status;
     sdf_rule_id_t     sdf_rule_id;
     pcc_rule_id_t     pcc_rule_id;
@@ -150,17 +142,25 @@
 
 //Custom metadata definition
 struct fabric_metadata_t {
-    fwd_type_t fwd_type;
-    next_id_t next_id;
-    _BOOL pop_vlan_when_packet_in;
-    _BOOL is_multicast;
-    _BOOL is_controller_packet_out;
-    _BOOL clone_to_cpu;
-    bit<8> ip_proto;
-    bit<16> l4_src_port;
-    bit<16> l4_dst_port;
+    bit<16>       eth_type;
+    bit<16>       ip_eth_type;
+    vlan_id_t     vlan_id;
+    bit<3>        vlan_pri;
+    bit<1>        vlan_cfi;
+    mpls_label_t  mpls_label;
+    bit<8>        mpls_ttl;
+    _BOOL         skip_forwarding;
+    _BOOL         skip_next;
+    fwd_type_t    fwd_type;
+    next_id_t     next_id;
+    _BOOL         is_multicast;
+    _BOOL         is_controller_packet_out;
+    _BOOL         clone_to_cpu;
+    bit<8>        ip_proto;
+    bit<16>       l4_sport;
+    bit<16>       l4_dport;
 #ifdef WITH_SPGW
-    spgw_meta_t spgw;
+    spgw_meta_t   spgw;
 #endif // WITH_SPGW
 #ifdef WITH_INT
     int_metadata_t int_meta;
@@ -170,6 +170,9 @@
 struct parsed_headers_t {
     ethernet_t ethernet;
     vlan_tag_t vlan_tag;
+#ifdef WITH_XCONNECT
+    vlan_tag_t inner_vlan_tag;
+#endif // WITH_XCONNECT
     mpls_t mpls;
 #ifdef WITH_SPGW
     ipv4_t gtpu_ipv4;
@@ -182,7 +185,6 @@
 #ifdef WITH_IPV6
     ipv6_t ipv6;
 #endif // WITH_IPV6
-    arp_t arp;
     tcp_t tcp;
     udp_t udp;
     icmp_t icmp;