[ONOS-7982] Remove P4Config
Change-Id: Ie5cb39da2f5aad7b097b7e4819fc3a1ea7129ed2
(cherry picked from commit b81121fc2162de37dec87d19bdd928ff3ab5e099)
diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/PipelineConfigClientImpl.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/PipelineConfigClientImpl.java
index f9aa5e7..3b628b4 100644
--- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/PipelineConfigClientImpl.java
+++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/PipelineConfigClientImpl.java
@@ -25,7 +25,6 @@
import org.onosproject.p4runtime.ctl.utils.PipeconfHelper;
import org.slf4j.Logger;
import p4.config.v1.P4InfoOuterClass;
-import p4.tmp.P4Config;
import p4.v1.P4RuntimeOuterClass.ForwardingPipelineConfig;
import p4.v1.P4RuntimeOuterClass.GetForwardingPipelineConfigRequest;
import p4.v1.P4RuntimeOuterClass.GetForwardingPipelineConfigResponse;
@@ -140,20 +139,12 @@
.newBuilder()
.setCookie(pipeconf.fingerprint())
.build();
- // FIXME: This is specific to PI P4Runtime implementation and should be
- // moved to driver.
- final P4Config.P4DeviceConfig p4DeviceConfigMsg = P4Config.P4DeviceConfig
- .newBuilder()
- .setExtras(P4Config.P4DeviceConfig.Extras.getDefaultInstance())
- .setReassign(true)
- .setDeviceData(deviceData != null
- ? ByteString.copyFrom(deviceData)
- : ByteString.EMPTY)
- .build();
return ForwardingPipelineConfig
.newBuilder()
.setP4Info(p4Info)
- .setP4DeviceConfig(p4DeviceConfigMsg.toByteString())
+ .setP4DeviceConfig(deviceData != null
+ ? ByteString.copyFrom(deviceData)
+ : ByteString.EMPTY)
.setCookie(cookieMsg)
.build();
}
diff --git a/protocols/p4runtime/proto/BUILD b/protocols/p4runtime/proto/BUILD
index fc4e42e..a00dd64 100644
--- a/protocols/p4runtime/proto/BUILD
+++ b/protocols/p4runtime/proto/BUILD
@@ -8,8 +8,6 @@
"p4data_proto",
"p4runtime_proto",
]
-] + [
- "@com_github_p4lang_pi//:p4config_proto",
]
osgi_proto_jar(
diff --git a/tools/build/bazel/p4lang_workspace.bzl b/tools/build/bazel/p4lang_workspace.bzl
index fba260e..82d9a80 100644
--- a/tools/build/bazel/p4lang_workspace.bzl
+++ b/tools/build/bazel/p4lang_workspace.bzl
@@ -3,9 +3,6 @@
P4RUNTIME_VER = "1.0.0"
P4RUNTIME_SHA = "667464bd369b40b58dc9552be2c84e190a160b6e77137b735bd86e5b81c6adc0"
-PI_COMMIT = "539e4624f16aac39f8890a6dfb11c65040e735ad"
-PI_SHA = "a16024972c15e6d35466996bbb748e4b7bef819c1c93f05a0f2228062736c35a"
-
def generate_p4lang():
http_archive(
name = "com_github_p4lang_p4runtime",
@@ -14,12 +11,3 @@
strip_prefix = "p4runtime-%s/proto" % P4RUNTIME_VER,
build_file = "//tools/build/bazel:p4runtime_BUILD",
)
-
- # Needed for PI/proto/p4/tmp/p4config.proto
- http_archive(
- name = "com_github_p4lang_pi",
- urls = ["https://github.com/p4lang/PI/archive/%s.zip" % PI_COMMIT],
- sha256 = PI_SHA,
- strip_prefix = "PI-%s/proto" % PI_COMMIT,
- build_file = "//tools/build/bazel:pi_BUILD",
- )
diff --git a/tools/dev/p4vm/install-p4-tools.sh b/tools/dev/p4vm/install-p4-tools.sh
index 204ffbd..62ecad5 100755
--- a/tools/dev/p4vm/install-p4-tools.sh
+++ b/tools/dev/p4vm/install-p4-tools.sh
@@ -20,7 +20,7 @@
set -x
BMV2_COMMIT="8c6f852867c4a80b7c51c23db3419e1137f5038d"
-PI_COMMIT="9f6c1f23843b99fb582a9b893be628e5ae820b53"
+PI_COMMIT="f9a5c6c74f7dcde382e27c63af2fe5dffc755364"
P4C_COMMIT="74bcfa32a6c782bc9a3c4c29d5656519dee4dfdb"
# p4c seems to break when using protobuf versions newer than 3.2.0