Bump version of P4Runtime to 1.0.0rc3 and P4 tools

Change-Id: I3082b4bd772d692830bd5af8e326a0fd5fb2f167
(cherry picked from commit 03ae0acdd8c1b778391c13093038b2e36bd183b2)
diff --git a/tools/build/bazel/p4lang_workspace.bzl b/tools/build/bazel/p4lang_workspace.bzl
index d4d966c..bc054fe 100644
--- a/tools/build/bazel/p4lang_workspace.bzl
+++ b/tools/build/bazel/p4lang_workspace.bzl
@@ -1,10 +1,10 @@
 load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
 
-P4RUNTIME_COMMIT = "028552d98b774301c51be0fe5bc97c9e95716759"
-PI_COMMIT = "36ca74fae69c8d0a142f8bfd2487bee72505cf48"
+P4RUNTIME_COMMIT = "a6f81ac53c6b56d75a9603690794196d67c5dc07"
+PI_COMMIT = "539e4624f16aac39f8890a6dfb11c65040e735ad"
 
-P4RUNTIME_SHA = "f335573ea971c21a1a298954039a27881b7337a03f4523321b6458eb0558644a"
-PI_SHA = "767476cf9232dc39f0115d1ffc38f9b81acec74da078c048f278804f325bf77e"
+P4RUNTIME_SHA = "28b79868bcfd61058cdd3f77a7a021a1add19154fa6717bf921a64cece32caf3"
+PI_SHA = "a16024972c15e6d35466996bbb748e4b7bef819c1c93f05a0f2228062736c35a"
 
 def generate_p4lang():
     http_archive(
diff --git a/tools/dev/mininet/bmv2.py b/tools/dev/mininet/bmv2.py
index 296d672..eafb482 100644
--- a/tools/dev/mininet/bmv2.py
+++ b/tools/dev/mininet/bmv2.py
@@ -17,7 +17,7 @@
 VALGRIND_PREFIX = 'valgrind --leak-check=yes'
 SWITCH_START_TIMEOUT = 5  # seconds
 BMV2_LOG_LINES = 5
-BMV2_DEFAULT_DEVICE_ID = 0
+BMV2_DEFAULT_DEVICE_ID = 1
 
 
 def parseBoolean(value):
diff --git a/tools/dev/p4vm/install-p4-tools.sh b/tools/dev/p4vm/install-p4-tools.sh
index 4f9582a..e3ccdcd 100755
--- a/tools/dev/p4vm/install-p4-tools.sh
+++ b/tools/dev/p4vm/install-p4-tools.sh
@@ -21,9 +21,9 @@
 BUILD_DIR=~/p4tools
 # in case BMV2_COMMIT value is updated, the same variable in
 # protocols/bmv2/thrift-api/BUCK file should also be updated
-BMV2_COMMIT="13370aaf9329fcb369a3ea3989722eb5f61c07f3"
-PI_COMMIT="7e94b025bac6db63bc8534e5dd21a008984e38bc"
-P4C_COMMIT="2d089af757212a057c6690998861ef67439305f4"
+BMV2_COMMIT="ae87b4d4523488ac935133b4aef437796ad1bbd1"
+PI_COMMIT="539e4624f16aac39f8890a6dfb11c65040e735ad"
+P4C_COMMIT="380830f6c26135d1d65e1312e3ba2da628c18145"
 PROTOBUF_COMMIT="tags/v3.2.0"
 GRPC_COMMIT="tags/v1.3.2"
 LIBYANG_COMMIT="v0.14-r1"
@@ -32,7 +32,7 @@
 NUM_CORES=`grep -c ^processor /proc/cpuinfo`
 
 # If false, build tools without debug features to improve throughput of BMv2 and
-# reduce CPU/memory footprint.
+# reduce CPU/memory footprint. Default is true.
 DEBUG_FLAGS=${DEBUG_FLAGS:-true}
 
 # Execute up to the given step (first argument), or all if not defined.
@@ -274,12 +274,8 @@
 
     ./autogen.sh
     # FIXME: re-enable --with-sysrepo when gNMI support becomes more stable
-    # ./configure --with-proto --with-sysrepo 'CXXFLAGS=-O0 -g'
-    if [ "${DEBUG_FLAGS}" = true ] ; then
-        ./configure --with-proto "CXXFLAGS=-O0 -g"
-    else
-        ./configure --with-proto
-    fi
+    # ./configure --with-proto --with-sysrepo
+    ./configure --with-proto --without-internal-rpc --without-cli
     make -j${NUM_CORES}
     sudo make install
     sudo ldconfig
@@ -293,9 +289,9 @@
 
     ./autogen.sh
     if [ "${DEBUG_FLAGS}" = true ] ; then
-        ./configure --with-pi --disable-elogger --without-nanomsg "CXXFLAGS=-O0 -g"
+        ./configure --with-pi --disable-elogger --without-nanomsg
     else
-        ./configure --with-pi --disable-logging-macros --disable-elogger --without-nanomsg
+        ./configure --with-pi --disable-elogger --without-nanomsg --disable-logging-macros
     fi
     make -j${NUM_CORES}
     sudo make install
@@ -304,14 +300,9 @@
     # Simple_switch_grpc target
     cd targets/simple_switch_grpc
     ./autogen.sh
-
-    if [ "${DEBUG_FLAGS}" = true ] ; then
-        ./configure --with-thrift "CXXFLAGS=-O0 -g"
-    else
-        ./configure --with-thrift
-    fi
+    ./configure --with-thrift
     # FIXME: re-enable --with-sysrepo when gNMI support becomes more stable
-    # ./configure --with-sysrepo --with-thrift 'CXXFLAGS=-O0 -g'
+    # ./configure --with-sysrepo --with-thrift
     make -j${NUM_CORES}
     sudo make install
     sudo ldconfig
@@ -329,7 +320,7 @@
 
     mkdir -p build
     cd build
-    cmake ..
+    cmake .. -DENABLE_EBPF=OFF
     make -j${NUM_CORES}
     sudo make install
     sudo ldconfig
diff --git a/tools/dev/p4vm/root-bootstrap.sh b/tools/dev/p4vm/root-bootstrap.sh
index cac34b7..cf90ea2 100755
--- a/tools/dev/p4vm/root-bootstrap.sh
+++ b/tools/dev/p4vm/root-bootstrap.sh
@@ -4,7 +4,7 @@
 VM_TYPE=${1:-dev}
 
 BAZEL_VER="0.15.2"
-BAZEL_DEB="bazel_${BAZEL_VER}-linux-x86_64.deb"
+BAZEL_SH="bazel-${BAZEL_VER}-installer-linux-x86_64.sh"
 # Create user sdn
 useradd -m -d /home/sdn -s /bin/bash sdn
 echo "sdn:rocks" | chpasswd
@@ -28,10 +28,8 @@
 
 DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
 
-wget https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VER}/${BAZEL_DEB}
 echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
 apt-get -y --no-install-recommends install \
-    ./${BAZEL_DEB} \
     avahi-daemon \
     bridge-utils \
     git \
@@ -59,12 +57,16 @@
 
 DEBIAN_FRONTEND=noninteractive apt-get -yq install wireshark
 
-rm -f ${BAZEL_DEB}
+# Install Bazel
+wget https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VER}/${BAZEL_SH}
+chmod +x ${BAZEL_SH}
+./${BAZEL_SH}
+rm -f ${BAZEL_SH}
 
+# Install pip and some python deps (others are defined in install-p4-tools.sh)
 curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
 python2.7 get-pip.py --force-reinstall
 rm -f get-pip.py
-
 pip install ipaddress
 
 tee -a /etc/ssh/sshd_config <<EOF