Fixed p4-14 programs not working on BMv2

The hack to deparse the packet_in breaks when using MAC addressess that
have many leading zeros (like in Mininet).

Change-Id: I509d98a21247903105cfb7d4206f8cc1a74acd3b
diff --git a/tools/test/p4src/p4-14/include/parser.p4 b/tools/test/p4src/p4-14/include/parser.p4
index 0223297..f80620c 100644
--- a/tools/test/p4src/p4-14/include/parser.p4
+++ b/tools/test/p4src/p4-14/include/parser.p4
@@ -11,13 +11,19 @@
 header udp_t udp;
 
 parser start {
+    #ifdef __TOFINO_BUILD__
     // Hack to force deparsing of packet_in hdr.
     // We assume it's impossible to receive a pkt with the first 8 bits of etherType 0.
     // p4c-tofino complains when switching over 16 bits, i.e. the full etherType
+    // FIXME: This solution appears to be very brittle!!!
     return select(current(96, 8)) {
         0 : parse_pkt_in;
+    #else
+    return select(EGR_PORT_FIELD) {
+        CPU_PORT : parse_pkt_in;
         default  : default_parser;
     }
+    #endif
 }
 
 parser parse_pkt_in {