mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-05 20:26:16 +02:00
[ONOS-7982] Remove P4Config
Change-Id: Ie5cb39da2f5aad7b097b7e4819fc3a1ea7129ed2
This commit is contained in:
parent
4747ecee33
commit
b81121fc21
@ -25,7 +25,6 @@ import org.onosproject.p4runtime.api.P4RuntimePipelineConfigClient;
|
||||
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 @@ final class PipelineConfigClientImpl implements P4RuntimePipelineConfigClient {
|
||||
.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();
|
||||
}
|
||||
|
||||
@ -8,8 +8,6 @@ PROTOS = [
|
||||
"p4data_proto",
|
||||
"p4runtime_proto",
|
||||
]
|
||||
] + [
|
||||
"@com_github_p4lang_pi//:p4config_proto",
|
||||
]
|
||||
|
||||
osgi_proto_jar(
|
||||
|
||||
@ -3,9 +3,6 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
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 @@ def generate_p4lang():
|
||||
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",
|
||||
)
|
||||
|
||||
@ -20,7 +20,7 @@ set -e
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user