Bumped version of P4Runtime and P4 tools for dev VM

+fixed protobuf version according to p4c documentation.

Change-Id: I16471b70b9b2ebc0e0a30c733f1e6ce47d40e30b
diff --git a/bucklets/grpc.bucklet b/bucklets/grpc.bucklet
index f8fe579..a9e8926 100644
--- a/bucklets/grpc.bucklet
+++ b/bucklets/grpc.bucklet
@@ -9,8 +9,10 @@
 GRPC_PLUGIN_BASE_URL = "https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java"
 
 PROTOC_SHA1S = {
+    "protoc-3.0.2-linux-x86_64.zip":"779ed606f524eb2c8c116b0fce7a3bc6507769e7",
+    "protoc-3.0.2-osx-x86_64.zip":"f71d97affca4ffe32747772539c0bcbf76c9dc9b",
     "protoc-3.2.0-linux-x86_64.zip":"f418d246d183a534d9bd749e614f639a55f6829b",
-    "protoc-3.2.0-osx-x86_64.zip":"81f4fac3200ba2cb12a98df0a9ee4d1c584e9210"
+    "protoc-3.2.0-osx-x86_64.zip":"81f4fac3200ba2cb12a98df0a9ee4d1c584e9210",
 }
 
 GRPC_JAVA_SHA1S = {
diff --git a/drivers/p4runtime/proto/BUCK b/drivers/p4runtime/proto/BUCK
index f547699..5ef002b 100644
--- a/drivers/p4runtime/proto/BUCK
+++ b/drivers/p4runtime/proto/BUCK
@@ -2,16 +2,10 @@
     '//bucklets/grpc.bucklet'
 )
 
-COMPILE_DEPS = [
-    '//lib:CORE_DEPS',
-    '//lib:GRPC_1.3',
-    '//lib:protobuf-java-3.2.0',
-]
-
-P4RT_PROTOC_VER = '3.2.0'
+P4RT_PROTOC_VER = '3.0.2'
 P4RT_GRPC_VER = '1.3.0'
 
-PI_COMMIT = '99aaf492036b1ecb195d40d5e05d48aea881fbc8'
+PI_COMMIT = 'f110570ca0c8ddc5feaf5028b08a0f477ceb4eea'
 PI_BASEURL = 'https://github.com/p4lang/PI.git'
 
 # Wondering which .proto files to build? Check p4runtime's Makefile:
@@ -24,12 +18,20 @@
     '/proto/p4/tmp/p4config.proto',
 ]
 
+COMPILE_DEPS = [
+'//lib:CORE_DEPS',
+'//incubator/grpc-dependencies:grpc-core-repkg-' + P4RT_GRPC_VER,
+'//lib:grpc-stub-' + P4RT_GRPC_VER,
+'//lib:grpc-protobuf-' + P4RT_GRPC_VER,
+'//lib:protobuf-java-' + P4RT_PROTOC_VER,
+]
+
 genrule(
     name = 'p4lang-pi-repo-' + PI_COMMIT,
     bash = 'git clone --quiet ' + PI_BASEURL + ' $OUT > /dev/null && '
-            + 'cd $OUT && '
-            + 'git checkout --quiet -b buck-build ' + PI_COMMIT + ' > /dev/null && '
-            + 'git submodule update --quiet --init --recursive > /dev/null',
+    + 'cd $OUT && '
+    + 'git checkout --quiet -b buck-build ' + PI_COMMIT + ' > /dev/null && '
+    + 'git submodule update --quiet --init --recursive > /dev/null',
     out = 'repo',
 )
 
diff --git a/incubator/protobuf-dependencies/BUCK b/incubator/protobuf-dependencies/BUCK
index 01222cd..b7705de 100644
--- a/incubator/protobuf-dependencies/BUCK
+++ b/incubator/protobuf-dependencies/BUCK
@@ -1,3 +1,4 @@
 include_defs('//bucklets/grpc.bucklet')
 
+fetch_protoc(version = '3.0.2')
 fetch_protoc(version = '3.2.0')
\ No newline at end of file
diff --git a/lib/BUCK b/lib/BUCK
index 69f5dff..fff5916 100644
--- a/lib/BUCK
+++ b/lib/BUCK
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Fri, 23 Jun 2017 05:52:13 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Mon, 10 Jul 2017 20:01:19 GMT. Do not edit this file manually. *****
 # ***** Use onos-lib-gen *****
 
 pass_thru_pom(
@@ -1372,6 +1372,15 @@
 )
 
 remote_jar (
+  name = 'protobuf-java-3.0.2',
+  out = 'protobuf-java-3.0.2.jar',
+  url = 'mvn:com.google.protobuf:protobuf-java:jar:3.0.2',
+  sha1 = 'ee55e8e697d10b6643d77bb1f686bac3b9ba8579',
+  maven_coords = 'com.google.protobuf:protobuf-java:3.0.2',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
   name = 'protobuf-java-3.2.0',
   out = 'protobuf-java-3.2.0.jar',
   url = 'mvn:com.google.protobuf:protobuf-java:jar:3.2.0',
diff --git a/lib/deps.json b/lib/deps.json
index f3f3e62..5751bc9 100644
--- a/lib/deps.json
+++ b/lib/deps.json
@@ -249,6 +249,7 @@
     "grpc-netty-1.3.0": "mvn:io.grpc:grpc-netty:1.3.0",
     "grpc-auth-1.3.0": "mvn:io.grpc:grpc-auth:1.3.0",
     "protobuf-java-3.3.0": "mvn:com.google.protobuf:protobuf-java:3.3.0",
+    "protobuf-java-3.0.2": "mvn:com.google.protobuf:protobuf-java:3.0.2",
     "protobuf-java-3.2.0": "mvn:com.google.protobuf:protobuf-java:3.2.0",
     "grpc-testing-1.3.0": "mvn:io.grpc:grpc-testing:1.3.0",
     "grpc-testing-proto-1.3.0": "mvn:io.grpc:grpc-testing-proto:1.3.0",
diff --git a/tools/dev/bin/onos-setup-p4-dev b/tools/dev/bin/onos-setup-p4-dev
index f3a1992..f3573a1 100755
--- a/tools/dev/bin/onos-setup-p4-dev
+++ b/tools/dev/bin/onos-setup-p4-dev
@@ -15,9 +15,9 @@
 set -e
 
 BUILD_DIR=~/p4tools
-BMV2_COMMIT="487ee8f907153d93d4806f3e9e209ed9cb668c2b"
-PI_COMMIT="d7418b386e2301f82c1330a1d2dca131ef7b4fe3"
-P4C_COMMIT="80db63762314494b313f39c40067b3d3416007d3"
+BMV2_COMMIT="41c1f2ed487ff086a1d582069e8bc68cab8ffdb0"
+PI_COMMIT="f110570ca0c8ddc5feaf5028b08a0f477ceb4eea"
+P4C_COMMIT="adce375fd961a9e467c7e77ad1bef647ef28e5e8"
 P4C_BM_COMMIT="8f4abeaa6f8374aaf95ea2aacfc2b750069391b5"
 PROTOBUF_COMMIT="tags/v3.0.2"
 GRPC_COMMIT="tags/v1.3.0"
diff --git a/tools/dev/mininet/bmv2.py b/tools/dev/mininet/bmv2.py
index 64be413..e1d51a5 100644
--- a/tools/dev/mininet/bmv2.py
+++ b/tools/dev/mininet/bmv2.py
@@ -13,7 +13,7 @@
 
 BMV2_TARGET = 'simple_switch_grpc'
 ONOS_ROOT = os.environ["ONOS_ROOT"]
-INIT_BMV2_JSON = '%s/tools/test/p4src/p4-16/p4c-out/empty.json' % ONOS_ROOT
+CPU_PORT = 255
 
 
 class ONOSBmv2Switch(Switch):
@@ -118,12 +118,11 @@
         if self.debugger:
             args.append('--debugger')
         args.append('-L%s' % self.loglevel)
-
-        args.append(INIT_BMV2_JSON)
+        args.append('--no-p4')
 
         # gRPC target-specific options.
         args.append('--')
-        args.append('--enable-swap')
+        args.append('--cpu-port %d' % CPU_PORT)
         args.append('--grpc-server-addr 0.0.0.0:%d' % self.grpcPort)
 
         bmv2cmd = " ".join(args)