diff --git a/.bazelignore b/.bazelignore new file mode 100644 index 00000000000..4ea82e8d97f --- /dev/null +++ b/.bazelignore @@ -0,0 +1 @@ +web/gui2/node_modules diff --git a/.bazelrc b/.bazelrc index e3d266a8a78..5faf22a0f75 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,30 +1,28 @@ # By default, we build and run ONOS using the Bazel-provided remote JDK. The # specific JDK version is defined in tools/build/jdk/BUILD. # -# If you prefer to use your locally installed JDK, replace the --javabase and -# --host_javabase arguments with the following lines. ABSOLUTE_JAVABASE should -# point to the "JAVA_HOME" of your JDK. +# If you prefer to use your locally installed JDK use local_java_repositoy +# in the WORKSPACE file. # -# build --javabase=@bazel_tools//tools/jdk:absolute_javabase -# build --host_javabase=@bazel_tools//tools/jdk:absolute_javabase -# build --define=ABSOLUTE_JAVABASE= -# build --define=RUN_WITH_ABSOLUTE_JAVABASE=true +# https://bazel.build/docs/bazel-and-java -build --javabase=@org_onosproject_onos//tools/build/jdk:default_jdk -build --host_javabase=@org_onosproject_onos//tools/build/jdk:default_jdk +# Builds using remotejdk_11, executes using remotejdk_11 or local_jdk +build --java_language_version=11 +build --java_runtime_version=remotejdk_11 +build --tool_java_language_version=11 +build --tool_java_runtime_version=remotejdk_11 -build --java_toolchain=@org_onosproject_onos//tools/build/jdk:default_toolchain -build --host_java_toolchain=@org_onosproject_onos//tools/build/jdk:default_toolchain - -build --host_force_python=PY2 +build --host_force_python=PY3 build --nouse_ijars build --experimental_strict_action_env +# For external/io_grpc_grpc_java/core/src/main/java/io/grpc/internal/RetriableStream.java +build --javacopt="-Xep:GuardedBy:WARN -Xep:ComparableType:WARN -Xep:ReturnValueIgnored:OFF" + # intellij-bazel plugin needs this build --incompatible_new_actions_api=false build --incompatible_generated_protos_in_virtual_imports=false -build --incompatible_depset_union=false # For bazelbuild/rules_nodejs build --define=angular_ivy_enabled=True diff --git a/.bazelversion b/.bazelversion index 4a36342fcab..91e1ea48a9a 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -3.0.0 +6.0.0-pre.20220421.3 \ No newline at end of file diff --git a/.gitreview b/.gitreview index 328aec64cad..2fa2f86fbc9 100644 --- a/.gitreview +++ b/.gitreview @@ -3,4 +3,4 @@ host=gerrit.onosproject.org port=29418 project=onos.git defaultremote=origin -defaultbranch=master +defaultbranch=onos-2.5 diff --git a/BUILD b/BUILD index 4ec3f7e1d5a..a2530c5e99e 100644 --- a/BUILD +++ b/BUILD @@ -20,7 +20,7 @@ profiles([ "minimal", "seba", "stratum", - "tost", + "sdfabric", "sona", ]) @@ -35,7 +35,7 @@ filegroup( ":minimal_profile": extensions("minimal") + apps("minimal"), ":seba_profile": extensions("seba") + apps("seba"), ":stratum_profile": extensions("stratum") + apps("stratum"), - ":tost_profile": extensions("tost") + apps("tost"), + ":sdfabric_profile": extensions("sdfabric") + apps("sdfabric"), ":sona_profile": extensions("sona") + apps("sona"), "//conditions:default": extensions() + apps(), }), @@ -77,7 +77,7 @@ genrule( ":minimal_profile": apps("minimal"), ":seba_profile": apps("seba"), ":stratum_profile": apps("stratum"), - ":tost_profile": apps("tost"), + ":sdfabric_profile": apps("sdfabric"), ":sona_profile": apps("sona"), "//conditions:default": apps(), }), @@ -184,6 +184,11 @@ buildifier( "./web/gui2/node_modules/@angular/bazel/src/esm5.bzl", "./web/gui2/node_modules/@bazel/typescript/internal/common/tsconfig.bzl", "./web/gui2/node_modules/@bazel/typescript/internal/common/compilation.bzl", + "./web/gui2/node_modules/@bazel/rollup/rollup_bundle.bzl", + "./web/gui2/node_modules/@bazel/typescript/internal/ts_project.bzl", + "./web/gui2/node_modules/@bazel/typescript/internal/build_defs.bzl", + "./web/gui2/node_modules/@bazel/protractor/protractor_web_test.bzl", + "./web/gui2/node_modules/@bazel/typescript/third_party/github.com/bazelbuild/bazel/src/main/protobuf/BUILD.bazel", ], mode = "check", ) @@ -195,6 +200,10 @@ buildifier( "./web/gui2/node_modules/@angular/bazel/src/esm5.bzl", "./web/gui2/node_modules/@bazel/typescript/internal/common/tsconfig.bzl", "./web/gui2/node_modules/@bazel/typescript/internal/common/compilation.bzl", + "./web/gui2/node_modules/@bazel/typescript/internal/ts_project.bzl", + "./web/gui2/node_modules/@bazel/typescript/internal/build_defs.bzl", + "./web/gui2/node_modules/@bazel/protractor/protractor_web_test.bzl", + "./web/gui2/node_modules/@bazel/typescript/third_party/github.com/bazelbuild/bazel/src/main/protobuf/BUILD.bazel", ], mode = "fix", ) diff --git a/Dockerfile b/Dockerfile index f4fb78443e8..6a168c57aa8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,23 @@ +# Copyright 2015-present Open Networking Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# With this dockerfile you can build a ONOS Docker container + ARG JOBS=2 ARG PROFILE=default -ARG TAG=11.0.8-11.41.23 -ARG JAVA_PATH=/usr/lib/jvm/zulu11-ca-amd64 +ARG TAG=11.0.13-11.52.13 +ARG JAVA_PATH=/usr/lib/jvm/zulu11 # First stage is the build environment. # zulu-openjdk images are based on Ubuntu. @@ -10,7 +26,6 @@ FROM azul/zulu-openjdk:${TAG} as builder ENV BUILD_DEPS \ ca-certificates \ zip \ - python \ python3 \ git \ bzip2 \ @@ -21,7 +36,7 @@ RUN apt-get update && apt-get install -y ${BUILD_DEPS} # Install Bazelisk, which will download the version of bazel specified in # .bazelversion -RUN curl -L -o bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.5.0/bazelisk-linux-amd64 +RUN curl -L -o bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64 RUN chmod +x bazelisk && mv bazelisk /usr/bin # Build-stage environment variables @@ -36,16 +51,15 @@ WORKDIR ${ONOS_ROOT} # Build ONOS using the JDK pre-installed in the base image, instead of the # Bazel-provided remote one. By doing wo we make sure to build with the most # updated JDK, including bug and security fixes, independently of the Bazel -# version. +# version. NOTE that WORKSPACE-docker file defines dockerjdk ARG JOBS ARG JAVA_PATH ARG PROFILE -RUN bazelisk build onos \ +RUN cat WORKSPACE-docker >> WORKSPACE && bazelisk build onos \ --jobs ${JOBS} \ --verbose_failures \ - --javabase=@bazel_tools//tools/jdk:absolute_javabase \ - --host_javabase=@bazel_tools//tools/jdk:absolute_javabase \ - --define=ABSOLUTE_JAVABASE=${JAVA_PATH} \ + --java_runtime_version=dockerjdk_11 \ + --tool_java_runtime_version=dockerjdk_11 \ --define profile=${PROFILE} # We extract the tar in the build environment to avoid having to put the tar in diff --git a/README.md b/README.md index 3d911437d02..47371fdf11b 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,6 @@ The following packages are required: * zip * curl * unzip -* python2.7 * python3 (needed by Bazel) ### Build ONOS from source @@ -136,8 +135,7 @@ through pull requests on GitHub. To contribute to ONOS, please refer to [Sample Gerrit Workflow](https://wiki.onosproject.org/display/ONOS/Sample+Gerrit+Workflow). It -should includes most of the things you'll need to get your contribution started! - +should include most of the things you'll need to get your contribution started! ## More information diff --git a/WORKSPACE b/WORKSPACE index 2e11e8411e2..e70e347f5f9 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -42,8 +42,8 @@ load("//tools/build/bazel:local_jar.bzl", "local_atomix", "local_jar", "local_ya # Use this to build against locally built Atomix #local_atomix( -# path = "/Users/tom/atomix", -# version = "3.0.8-SNAPSHOT", +# path = "/home/sdn/atomix", +# version = "3.1.12-SNAPSHOT", #) # Use this to build against locally built YANG tools @@ -124,9 +124,9 @@ load("//tools/build/bazel:gnoi_workspace.bzl", "generate_gnoi") generate_gnoi() # For GUI2 build -RULES_NODEJS_VERSION = "1.6.0" +RULES_NODEJS_VERSION = "2.3.2" -RULES_NODEJS_SHA256 = "f9e7b9f42ae202cc2d2ce6d698ccb49a9f7f7ea572a78fd451696d03ef2ee116" +RULES_NODEJS_SHA256 = "b3521b29c7cb0c47a1a735cce7e7e811a4f80d8e3720cf3a1b624533e4bb7cb6" load("//tools/build/bazel:topo_workspace.bzl", "generate_topo_device") @@ -161,6 +161,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "npm_install" # because "selenium-webdriver" which is required for "ng e2e" cannot be installed. node_repositories( node_repositories = { + "10.16.0-linux_arm64": ("node-v10.16.0-linux-arm64.tar.gz", "node-v10.16.0-linux-arm64", "2d84a777318bc95dd2a201ab8d700aea7e20641b3ece0c048399398dc645cbd7"), "10.16.0-darwin_amd64": ("node-v10.16.0-darwin-x64.tar.gz", "node-v10.16.0-darwin-x64", "6c009df1b724026d84ae9a838c5b382662e30f6c5563a0995532f2bece39fa9c"), "10.16.0-linux_amd64": ("node-v10.16.0-linux-x64.tar.xz", "node-v10.16.0-linux-x64", "1827f5b99084740234de0c506f4dd2202a696ed60f76059696747c34339b9d48"), "10.16.0-windows_amd64": ("node-v10.16.0-win-x64.zip", "node-v10.16.0-win-x64", "aa22cb357f0fb54ccbc06b19b60e37eefea5d7dd9940912675d3ed988bf9a059"), @@ -185,9 +186,6 @@ npm_install( # Install any Bazel rules which were extracted earlier by the npm_install rule. # Versions are set in web/gui2-fw-lib/package.json -load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies") - -install_bazel_dependencies() RULES_WEBTESTING_VERSION = "0.3.3" diff --git a/WORKSPACE-docker b/WORKSPACE-docker new file mode 100644 index 00000000000..d9c9b4695f2 --- /dev/null +++ b/WORKSPACE-docker @@ -0,0 +1,16 @@ + +# Appended by the Dockerfiles to help bazel finding the local path of +# the Azul jvm. When we build docker images we use the jvm available +# in the base image to compile ONOS. In order to do that we have to +# provide the absolute path by using the local_java_repository. + +# local_java_repository for docker based builds +load("@bazel_tools//tools/jdk:local_java_repository.bzl", "local_java_repository") + +ABSOLUTE_JAVABASE = "/usr/lib/jvm/zulu11" + +local_java_repository( + name = "dockerjdk", + version = "11", + java_home = ABSOLUTE_JAVABASE, +) diff --git a/apps/artemis/BUILD b/apps/artemis/BUILD index 763a5350c37..10692dd0c87 100755 --- a/apps/artemis/BUILD +++ b/apps/artemis/BUILD @@ -3,7 +3,7 @@ COMPILE_DEPS = CORE_DEPS + JACKSON + NETTY + CLI + [ "@okio//jar", "@commons_net//jar", "@io_socket_client//jar", - "@json//jar", + "@minimal_json//jar", "@engine_io_client//jar", "@io_netty_netty//jar", "@io_netty_netty_transport//jar", @@ -18,7 +18,7 @@ COMPILE_DEPS = CORE_DEPS + JACKSON + NETTY + CLI + [ BUNDLES = [ "@commons_net//jar", "@io_socket_client//jar", - "@json//jar", + "@minimal_json//jar", "@engine_io_client//jar", "//apps/artemis:onos-apps-artemis", "//apps/routing-api:onos-apps-routing-api", diff --git a/apps/artemis/src/main/java/org/onosproject/artemis/ArtemisPacketProcessor.java b/apps/artemis/src/main/java/org/onosproject/artemis/ArtemisPacketProcessor.java index d4cae92449d..ce2be248544 100644 --- a/apps/artemis/src/main/java/org/onosproject/artemis/ArtemisPacketProcessor.java +++ b/apps/artemis/src/main/java/org/onosproject/artemis/ArtemisPacketProcessor.java @@ -16,7 +16,7 @@ package org.onosproject.artemis; import io.netty.channel.ChannelHandlerContext; -import org.json.JSONObject; +import com.eclipsesource.json.JsonObject; import org.onosproject.artemis.impl.objects.ArtemisMessage; /** @@ -37,5 +37,5 @@ public interface ArtemisPacketProcessor { * * @param msg BGP Update message */ - void processMonitorPacket(JSONObject msg); + void processMonitorPacket(JsonObject msg); } diff --git a/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisConfig.java b/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisConfig.java index 9d188ddd622..813ad16ad47 100644 --- a/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisConfig.java +++ b/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisConfig.java @@ -19,8 +19,7 @@ import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.google.common.collect.Streams; -import org.json.JSONArray; -import org.json.JSONException; +import com.eclipsesource.json.JsonArray; import org.onlab.packet.IpAddress; import org.onlab.packet.IpPrefix; import org.onosproject.core.ApplicationId; @@ -392,15 +391,11 @@ protected Map>> paths() { * 50 friendly anycaster announcing our prefix * 100+i BGP hijack type i (0 <= i <=2) */ - int checkPath(JSONArray path) { + int checkPath(JsonArray path) { // TODO add MOAS check ArrayList asnPath = new ArrayList<>(); - for (int i = 0; i < path.length(); i++) { - try { - asnPath.add(path.getInt(i)); - } catch (JSONException e) { - log.warn("checkPath", e); - } + for (int i = 0; i < path.size(); i++) { + asnPath.add(path.get(i).asInt()); } // reverse the list to get path starting from origin Collections.reverse(asnPath); diff --git a/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisDeaggregatorImpl.java b/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisDeaggregatorImpl.java index a26ae309c81..8d61e9a5bc2 100644 --- a/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisDeaggregatorImpl.java +++ b/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisDeaggregatorImpl.java @@ -23,7 +23,7 @@ import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.util.CharsetUtil; -import org.json.JSONObject; +import com.eclipsesource.json.JsonObject; import org.onlab.packet.IpAddress; import org.onlab.packet.IpPrefix; import org.onlab.packet.TpPort; @@ -415,7 +415,7 @@ public void processMoasPacket(ArtemisMessage msg, ChannelHandlerContext ctx) { } @Override - public void processMonitorPacket(JSONObject msg) { + public void processMonitorPacket(JsonObject msg) { } } diff --git a/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisDetectorImpl.java b/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisDetectorImpl.java index 02f9cd291a7..205df9ee501 100644 --- a/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisDetectorImpl.java +++ b/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisDetectorImpl.java @@ -16,10 +16,8 @@ package org.onosproject.artemis.impl; -import org.apache.commons.lang.exception.ExceptionUtils; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; +import com.eclipsesource.json.JsonObject; +import com.eclipsesource.json.JsonArray; import org.onlab.packet.IpPrefix; import org.onosproject.artemis.ArtemisDetector; import org.onosproject.artemis.ArtemisEventListener; @@ -70,30 +68,26 @@ protected void deactivate() { void handleArtemisEvent(ArtemisEvent event) { // If an instance was deactivated, check whether we need to roll back the upgrade. if (event.type().equals(ArtemisEvent.Type.BGPUPDATE_ADDED)) { - JSONObject take = (JSONObject) event.subject(); + JsonObject take = (JsonObject) event.subject(); log.info("Received information about monitored prefix " + take.toString()); artemisService.getConfig().ifPresent(config -> config.monitoredPrefixes().forEach(artemisPrefix -> { - try { - IpPrefix prefix = artemisPrefix.prefix(), receivedPrefix; + IpPrefix prefix = artemisPrefix.prefix(), receivedPrefix; - receivedPrefix = IpPrefix.valueOf(take.getString("prefix")); + receivedPrefix = IpPrefix.valueOf(take.get("prefix").asString()); - if (prefix.contains(receivedPrefix)) { - JSONArray path = take.getJSONArray("path"); + if (prefix.contains(receivedPrefix)) { + JsonArray path = take.get("path").asArray(); - int state = artemisPrefix.checkPath(path); - if (state >= 100) { - log.info("BGP Hijack detected; pushing prefix for hijack Deaggregation"); - eventDispatcher.post(new ArtemisEvent(ArtemisEvent.Type.HIJACK_ADDED, - receivedPrefix)); - } else { - log.info("BGP Update is legit"); - } + int state = artemisPrefix.checkPath(path); + if (state >= 100) { + log.info("BGP Hijack detected; pushing prefix for hijack Deaggregation"); + eventDispatcher.post(new ArtemisEvent(ArtemisEvent.Type.HIJACK_ADDED, + receivedPrefix)); + } else { + log.info("BGP Update is legit"); } - } catch (JSONException e) { - log.error(ExceptionUtils.getFullStackTrace(e)); } }) ); diff --git a/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisMonitorImpl.java b/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisMonitorImpl.java index b05044839a2..14eb3d4cb35 100755 --- a/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisMonitorImpl.java +++ b/apps/artemis/src/main/java/org/onosproject/artemis/impl/ArtemisMonitorImpl.java @@ -17,7 +17,7 @@ import com.google.common.collect.Sets; import io.netty.channel.ChannelHandlerContext; -import org.json.JSONObject; +import com.eclipsesource.json.JsonObject; import org.onlab.packet.IpPrefix; import org.onosproject.artemis.ArtemisMonitor; import org.onosproject.artemis.ArtemisPacketProcessor; @@ -79,7 +79,7 @@ public void processMoasPacket(ArtemisMessage msg, ChannelHandlerContext ctx) { } @Override - public void processMonitorPacket(JSONObject msg) { + public void processMonitorPacket(JsonObject msg) { // TODO: in future maybe store the BGP Update message and propagate it to the cluster instead of Events eventDispatcher.post(new ArtemisEvent(ArtemisEvent.Type.BGPUPDATE_ADDED, msg)); } diff --git a/apps/artemis/src/main/java/org/onosproject/artemis/impl/monitors/ExaBgpMonitors.java b/apps/artemis/src/main/java/org/onosproject/artemis/impl/monitors/ExaBgpMonitors.java index d6453603be2..fd0e9c17189 100644 --- a/apps/artemis/src/main/java/org/onosproject/artemis/impl/monitors/ExaBgpMonitors.java +++ b/apps/artemis/src/main/java/org/onosproject/artemis/impl/monitors/ExaBgpMonitors.java @@ -17,8 +17,7 @@ import io.socket.client.IO; import io.socket.client.Socket; -import org.json.JSONException; -import org.json.JSONObject; +import com.eclipsesource.json.JsonObject; import org.onlab.packet.IpPrefix; import org.onosproject.artemis.ArtemisPacketProcessor; import org.onosproject.artemis.Monitors; @@ -48,14 +47,10 @@ public ExaBgpMonitors(IpPrefix prefix, String host, ArtemisPacketProcessor packe * socket.io onConnect event handler. */ private void onConnect() { - try { - JSONObject parameters = new JSONObject(); - parameters.put("prefix", this.prefix); + JsonObject parameters = new JsonObject(); + parameters.set("prefix", this.prefix.toString()); - socket.emit("exa_subscribe", parameters); - } catch (JSONException e) { - log.warn("onConenct()", e); - } + socket.emit("exa_subscribe", parameters); } /** @@ -64,10 +59,8 @@ private void onConnect() { * @param args exabgp message */ private void onExaMessage(Object[] args) { - JSONObject message = (JSONObject) args[0]; - - try { - if (message.getString("type").equals("A")) { + JsonObject message = (JsonObject) args[0]; + if (message.get("type").asString().equals("A")) { // Example of BGP Update message: // { // "path":[65001], @@ -87,9 +80,6 @@ private void onExaMessage(Object[] args) { // Append synchronized message to message list in memory. packetProcessor.processMonitorPacket(message); } - } catch (JSONException e) { - log.warn("onExaMessage()", e); - } } @Override diff --git a/apps/artemis/src/main/java/org/onosproject/artemis/impl/monitors/RipeMonitors.java b/apps/artemis/src/main/java/org/onosproject/artemis/impl/monitors/RipeMonitors.java index 52025c9b947..b08308315e6 100644 --- a/apps/artemis/src/main/java/org/onosproject/artemis/impl/monitors/RipeMonitors.java +++ b/apps/artemis/src/main/java/org/onosproject/artemis/impl/monitors/RipeMonitors.java @@ -17,8 +17,7 @@ import io.socket.client.IO; import io.socket.client.Socket; -import org.json.JSONException; -import org.json.JSONObject; +import com.eclipsesource.json.JsonObject; import org.onlab.packet.IpPrefix; import org.onosproject.artemis.ArtemisPacketProcessor; import org.onosproject.artemis.Monitors; @@ -48,22 +47,18 @@ public RipeMonitors(IpPrefix prefix, String host, ArtemisPacketProcessor packetP * socket.io onConnect event handler. */ private void onConnect() { - try { - socket.emit("ping"); - - JSONObject parameters = new JSONObject(); - parameters.put("origin", (Object) null); - parameters.put("type", (Object) null); - parameters.put("moreSpecific", true); - parameters.put("lessSpecific", false); - parameters.put("peer", (Object) null); - parameters.put("host", this.host); - parameters.put("prefix", this.prefix); - - socket.emit("ris_subscribe", parameters); - } catch (JSONException e) { - log.warn("onConnect()", e); - } + socket.emit("ping"); + + JsonObject parameters = new JsonObject(); + parameters.set("origin", ""); + parameters.set("type", ""); + parameters.set("moreSpecific", true); + parameters.set("lessSpecific", false); + parameters.set("peer", ""); + parameters.set("host", this.host); + parameters.set("prefix", this.prefix.toString()); + + socket.emit("ris_subscribe", parameters); } @Override @@ -83,34 +78,31 @@ public void setPrefix(IpPrefix prefix) { * @param args RIS message */ private void onRisMessage(Object[] args) { - try { - JSONObject message = (JSONObject) args[0]; - if (message.getString("type").equals("A")) { - // Example of BGP Update message: - // { - // "timestamp":1488044022.97, - // "prefix":"101.1.46.0/24", - // "host":"rrc21", - // "next_hop":"37.49.236.246", - // "peer":"37.49.236.246", - // "path":[2613,25091,9318,9524], - // "type":"A" - // } - - // We want to keep only prefix and path in memory. - message.remove("community"); - message.remove("timestamp"); - message.remove("next_hop"); - message.remove("peer"); - message.remove("type"); - message.remove("host"); - - // Append synchronized message to message list in memory. - packetProcessor.processMonitorPacket(message); - } - } catch (JSONException e) { - log.error("onRisMessage()", e); + JsonObject message = (JsonObject) args[0]; + if (message.get("type").asString().equals("A")) { + // Example of BGP Update message: + // { + // "timestamp":1488044022.97, + // "prefix":"101.1.46.0/24", + // "host":"rrc21", + // "next_hop":"37.49.236.246", + // "peer":"37.49.236.246", + // "path":[2613,25091,9318,9524], + // "type":"A" + // } + + // We want to keep only prefix and path in memory. + message.remove("community"); + message.remove("timestamp"); + message.remove("next_hop"); + message.remove("peer"); + message.remove("type"); + message.remove("host"); + + // Append synchronized message to message list in memory. + packetProcessor.processMonitorPacket(message); } + socket.emit("ping"); } diff --git a/apps/cpman/app/src/main/java/org/onosproject/cpman/gui/CpmanViewMessageHandler.java b/apps/cpman/app/src/main/java/org/onosproject/cpman/gui/CpmanViewMessageHandler.java index 873d23dfddc..b3c1038f5a5 100644 --- a/apps/cpman/app/src/main/java/org/onosproject/cpman/gui/CpmanViewMessageHandler.java +++ b/apps/cpman/app/src/main/java/org/onosproject/cpman/gui/CpmanViewMessageHandler.java @@ -100,6 +100,7 @@ protected void populateChart(ChartModel cm, ObjectNode payload) { DeviceId deviceId = DeviceId.deviceId(uri); if (cpms.availableResourcesSync(localNodeId, CONTROL_MESSAGE).contains(deviceId.toString())) { Map data = generateMatrix(cpms, cs, deviceId); + @SuppressWarnings("FromTemporalAccessor") LocalDateTime ldt = LocalDateTime.from(Instant.ofEpochMilli(timestamp * MILLI_CONV_UNIT)); populateMetrics(cm, data, ldt, NUM_OF_DATA_POINTS); diff --git a/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java index 73250101371..6cd70de8c0a 100644 --- a/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java +++ b/apps/dhcprelay/app/src/main/java/org/onosproject/dhcprelay/Dhcp4HandlerImpl.java @@ -52,6 +52,7 @@ import org.onosproject.net.Host; import org.onosproject.net.HostId; import org.onosproject.net.HostLocation; +import org.onosproject.net.Port; import org.onosproject.net.behaviour.Pipeliner; import org.onosproject.net.device.DeviceService; import org.onosproject.net.flow.DefaultTrafficSelector; @@ -1086,15 +1087,21 @@ private void writeResponseDhcpRecord(Ethernet ethernet, log.warn("Failed to determine where to send {}", dhcpPayload.getPacketType()); return; } - Interface outIface = outInterface.get(); + ConnectPoint location = outIface.connectPoint(); + if (!location.port().hasName()) { + location = translateSwitchPort(location); + } + VlanId vlanId = getVlanIdFromRelayAgentOption(dhcpPayload); if (vlanId == null) { vlanId = outIface.vlan(); } + MacAddress macAddress = MacAddress.valueOf(dhcpPayload.getClientHardwareAddress()); HostId hostId = HostId.hostId(macAddress, vlanId); + DhcpRecord record = dhcpRelayStore.getDhcpRecord(hostId).orElse(null); if (record == null) { record = new DhcpRecord(HostId.hostId(macAddress, vlanId)); @@ -1439,9 +1446,14 @@ private void handleDhcpAck(Ethernet ethernetPacketAck, DHCP dhcpPayload) { log.warn("Can't find output interface for dhcp: {}", dhcpPayload); return; } - Interface outIface = outInterface.get(); - HostLocation hostLocation = new HostLocation(outIface.connectPoint(), System.currentTimeMillis()); + + ConnectPoint location = outIface.connectPoint(); + if (!location.port().hasName()) { + location = translateSwitchPort(location); + } + + HostLocation hostLocation = new HostLocation(location, System.currentTimeMillis()); MacAddress macAddress = MacAddress.valueOf(dhcpPayload.getClientHardwareAddress()); VlanId vlanId = getVlanIdFromRelayAgentOption(dhcpPayload); if (vlanId == null) { @@ -1993,4 +2005,14 @@ private DhcpServerInfo findServerInfoFromServer(boolean directConnFlag, ConnectP } return foundServerInfo; } + + /* Connect point coming from interfaces do not have port name + we use the device service as translation service */ + private ConnectPoint translateSwitchPort(ConnectPoint connectPoint) { + Port devicePort = deviceService.getPort(connectPoint); + if (devicePort != null) { + return new ConnectPoint(connectPoint.deviceId(), devicePort.number()); + } + return connectPoint; + } } diff --git a/apps/faultmanagement/fm-gui2-lib/BUILD.bazel b/apps/faultmanagement/fm-gui2-lib/BUILD.bazel index 66967777663..2a3fa358088 100644 --- a/apps/faultmanagement/fm-gui2-lib/BUILD.bazel +++ b/apps/faultmanagement/fm-gui2-lib/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "fm-gui2-lib", srcs = glob( include = [ @@ -28,14 +28,18 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/apps/inbandtelemetry/api/src/main/java/org/onosproject/inbandtelemetry/api/IntIntent.java b/apps/inbandtelemetry/api/src/main/java/org/onosproject/inbandtelemetry/api/IntIntent.java index 8ce9d0f5dac..69d538c415a 100644 --- a/apps/inbandtelemetry/api/src/main/java/org/onosproject/inbandtelemetry/api/IntIntent.java +++ b/apps/inbandtelemetry/api/src/main/java/org/onosproject/inbandtelemetry/api/IntIntent.java @@ -16,6 +16,7 @@ package org.onosproject.inbandtelemetry.api; import com.google.common.annotations.Beta; +import com.google.common.base.Objects; import org.onosproject.net.behaviour.inbandtelemetry.IntMetadataType; import org.onosproject.net.flow.DefaultTrafficSelector; import org.onosproject.net.flow.TrafficSelector; @@ -175,6 +176,27 @@ public static Builder builder() { return new Builder(); } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntIntent intIntent = (IntIntent) o; + return Objects.equal(selector, intIntent.selector) && + Objects.equal(metadataTypes, intIntent.metadataTypes) && + headerType == intIntent.headerType && + Objects.equal(reportTypes, intIntent.reportTypes) && + telemetryMode == intIntent.telemetryMode; + } + + @Override + public int hashCode() { + return Objects.hashCode(selector, metadataTypes, headerType, reportTypes, telemetryMode); + } + /** * An IntIntent builder. */ @@ -246,7 +268,6 @@ public IntIntent.Builder withTelemetryMode(TelemetryMode telemetryMode) { * @return an IntIntent */ public IntIntent build() { - checkArgument(!selector.criteria().isEmpty(), "Empty selector cannot match any flow."); checkNotNull(headerType, "Header type cannot be null."); checkArgument(!reportTypes.isEmpty(), "Report types cannot be empty."); checkNotNull(telemetryMode, "Telemetry mode cannot be null."); diff --git a/apps/inbandtelemetry/impl/src/main/java/org/onosproject/inbandtelemetry/impl/SimpleIntManager.java b/apps/inbandtelemetry/impl/src/main/java/org/onosproject/inbandtelemetry/impl/SimpleIntManager.java index 25d6a50e30f..bf7dc184bca 100644 --- a/apps/inbandtelemetry/impl/src/main/java/org/onosproject/inbandtelemetry/impl/SimpleIntManager.java +++ b/apps/inbandtelemetry/impl/src/main/java/org/onosproject/inbandtelemetry/impl/SimpleIntManager.java @@ -44,6 +44,8 @@ import org.onosproject.net.device.DeviceEvent; import org.onosproject.net.device.DeviceListener; import org.onosproject.net.device.DeviceService; +import org.onosproject.net.flow.DefaultTrafficSelector; +import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.host.HostEvent; import org.onosproject.net.host.HostListener; import org.onosproject.net.host.HostService; @@ -70,6 +72,7 @@ import java.util.Set; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; @@ -77,6 +80,8 @@ import java.util.stream.Collectors; import static com.google.common.base.Preconditions.checkNotNull; +import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; +import static org.onlab.util.Tools.groupedThreads; import static org.slf4j.LoggerFactory.getLogger; /** @@ -150,6 +155,8 @@ public IntReportConfig createConfig() { } }; + protected ExecutorService eventExecutor; + @Activate public void activate() { @@ -204,6 +211,10 @@ public void activate() { // Bootstrap config for already existing devices. triggerAllDeviceConfigure(); + // Bootstrap core event executor before adding listener + eventExecutor = newSingleThreadScheduledExecutor(groupedThreads( + "onos/int", "events-%d", log)); + hostService.addListener(hostListener); deviceService.addListener(deviceListener); @@ -254,6 +265,8 @@ public void deactivate() { deviceService.getDevices().forEach(d -> cleanupDevice(d.id())); netcfgService.removeListener(appConfigListener); netcfgRegistry.unregisterConfigFactory(intAppConfigFactory); + eventExecutor.shutdownNow(); + eventExecutor = null; log.info("Deactivated"); } @@ -501,30 +514,34 @@ private IntObjective getIntObjective(IntIntent intent) { private class InternalHostListener implements HostListener { @Override public void event(HostEvent event) { - final DeviceId deviceId = event.subject().location().deviceId(); - triggerDeviceConfigure(deviceId); + eventExecutor.execute(() -> { + final DeviceId deviceId = event.subject().location().deviceId(); + triggerDeviceConfigure(deviceId); + }); } } private class InternalDeviceListener implements DeviceListener { @Override public void event(DeviceEvent event) { - switch (event.type()) { - case DEVICE_ADDED: - case DEVICE_UPDATED: - case DEVICE_REMOVED: - case DEVICE_SUSPENDED: - case DEVICE_AVAILABILITY_CHANGED: - case PORT_ADDED: - case PORT_UPDATED: - case PORT_REMOVED: - triggerDeviceConfigure(event.subject().id()); - return; - case PORT_STATS_UPDATED: - return; - default: - log.warn("Unknown device event type {}", event.type()); - } + eventExecutor.execute(() -> { + switch (event.type()) { + case DEVICE_ADDED: + case DEVICE_UPDATED: + case DEVICE_REMOVED: + case DEVICE_SUSPENDED: + case DEVICE_AVAILABILITY_CHANGED: + case PORT_ADDED: + case PORT_UPDATED: + case PORT_REMOVED: + triggerDeviceConfigure(event.subject().id()); + return; + case PORT_STATS_UPDATED: + return; + default: + log.warn("Unknown device event type {}", event.type()); + } + }); } } @@ -578,30 +595,56 @@ private class IntAppConfigListener implements NetworkConfigListener { @Override public void event(NetworkConfigEvent event) { - switch (event.type()) { - case CONFIG_ADDED: - case CONFIG_UPDATED: - event.config() - .map(config -> (IntReportConfig) config) - .ifPresent(config -> { - IntDeviceConfig intDeviceConfig = IntDeviceConfig.builder() - .withMinFlowHopLatencyChangeNs(config.minFlowHopLatencyChangeNs()) - .withCollectorPort(config.collectorPort()) - .withCollectorIp(config.collectorIp()) - .enabled(true) - .build(); - setConfig(intDeviceConfig); - }); - break; - // TODO: Support removing INT config. - default: - break; - } + eventExecutor.execute(() -> { + if (event.configClass() == IntReportConfig.class) { + switch (event.type()) { + case CONFIG_ADDED: + case CONFIG_UPDATED: + event.config() + .map(config -> (IntReportConfig) config) + .ifPresent(config -> { + IntDeviceConfig intDeviceConfig = IntDeviceConfig.builder() + .withMinFlowHopLatencyChangeNs(config.minFlowHopLatencyChangeNs()) + .withCollectorPort(config.collectorPort()) + .withCollectorIp(config.collectorIp()) + .enabled(true) + .build(); + setConfig(intDeviceConfig); + + // For each watched subnet, we install two INT rules. + // One match on the source, another match on the destination. + intentMap.clear(); + config.watchSubnets().forEach(subnet -> { + IntIntent.Builder intIntentBuilder = IntIntent.builder() + .withReportType(IntIntent.IntReportType.TRACKED_FLOW) + .withReportType(IntIntent.IntReportType.DROPPED_PACKET) + .withReportType(IntIntent.IntReportType.CONGESTED_QUEUE) + .withTelemetryMode(IntIntent.TelemetryMode.POSTCARD); + if (subnet.prefixLength() == 0) { + // Special case, match any packet + installIntIntent(intIntentBuilder + .withSelector(DefaultTrafficSelector.emptySelector()) + .build()); + } else { + TrafficSelector selector = DefaultTrafficSelector.builder() + .matchIPSrc(subnet) + .build(); + installIntIntent(intIntentBuilder.withSelector(selector).build()); + selector = DefaultTrafficSelector.builder() + .matchIPDst(subnet) + .build(); + installIntIntent(intIntentBuilder.withSelector(selector).build()); + } + }); + }); + break; + // TODO: Support removing INT config. + default: + break; + } + } + }); } - @Override - public boolean isRelevant(NetworkConfigEvent event) { - return event.configClass() == IntReportConfig.class; - } } } diff --git a/apps/inbandtelemetry/impl/src/test/java/org/onosproject/inbandtelemetry/impl/SimpleIntManagerTest.java b/apps/inbandtelemetry/impl/src/test/java/org/onosproject/inbandtelemetry/impl/SimpleIntManagerTest.java index 566ed2b1fe6..7fddf3cbb49 100644 --- a/apps/inbandtelemetry/impl/src/test/java/org/onosproject/inbandtelemetry/impl/SimpleIntManagerTest.java +++ b/apps/inbandtelemetry/impl/src/test/java/org/onosproject/inbandtelemetry/impl/SimpleIntManagerTest.java @@ -22,11 +22,13 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; +import com.google.common.util.concurrent.MoreExecutors; import org.easymock.Capture; import org.easymock.EasyMock; import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.onlab.junit.TestUtils; import org.onlab.packet.IpAddress; import org.onlab.packet.IpPrefix; import org.onlab.packet.TpPort; @@ -35,6 +37,7 @@ import org.onosproject.core.ApplicationId; import org.onosproject.core.CoreService; import org.onosproject.inbandtelemetry.api.IntIntent; +import org.onosproject.inbandtelemetry.api.IntIntentId; import org.onosproject.mastership.MastershipService; import org.onosproject.net.ConnectPoint; import org.onosproject.net.DefaultDevice; @@ -58,6 +61,7 @@ import org.onosproject.net.flow.DefaultTrafficSelector; import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.host.HostService; +import org.onosproject.store.service.ConsistentMap; import org.onosproject.store.service.StorageService; import org.onosproject.store.service.TestStorageService; @@ -65,6 +69,7 @@ import java.io.InputStream; import java.util.List; import java.util.Map; +import java.util.Set; import static org.easymock.EasyMock.anyObject; import static org.easymock.EasyMock.createNiceMock; @@ -77,6 +82,7 @@ import static org.easymock.EasyMock.verify; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import static org.onlab.junit.TestTools.assertAfter; import static org.onosproject.net.behaviour.inbandtelemetry.IntProgrammable.IntFunctionality.POSTCARD; import static org.onosproject.net.behaviour.inbandtelemetry.IntProgrammable.IntFunctionality.SINK; import static org.onosproject.net.behaviour.inbandtelemetry.IntProgrammable.IntFunctionality.SOURCE; @@ -90,12 +96,14 @@ public class SimpleIntManagerTest { private static final int MIN_FLOW_HOP_LATENCY_CHANGE_NS = 32; private static final String INT_REPORT_CONFIG_KEY = "report"; private static final DeviceId DEVICE_ID = DeviceId.deviceId("device:leaf1"); + private static final String WATCHED_SUBNET_1 = "192.168.10.0/24"; + private static final String WATCHED_SUBNET_2 = "192.168.20.0/24"; private static final TrafficSelector FLOW_SELECTOR1 = DefaultTrafficSelector.builder() - .matchIPDst(IpPrefix.valueOf("192.168.10.0/24")) + .matchIPDst(IpPrefix.valueOf(WATCHED_SUBNET_1)) .matchVlanId(VlanId.vlanId((short) 10)) .build(); private static final TrafficSelector FLOW_SELECTOR2 = DefaultTrafficSelector.builder() - .matchIPDst(IpPrefix.valueOf("192.168.20.0/24")) + .matchIPDst(IpPrefix.valueOf(WATCHED_SUBNET_2)) .matchVlanId(VlanId.vlanId((short) 20)) .build(); private static final Device DEFAULT_DEVICE = @@ -145,6 +153,7 @@ public void setup() throws IOException { manager.hostService = hostService; manager.netcfgService = networkConfigService; manager.netcfgRegistry = networkConfigRegistry; + manager.eventExecutor = MoreExecutors.newDirectExecutorService(); expect(coreService.registerApplication(APP_NAME)) .andReturn(APP_ID).anyTimes(); @@ -182,6 +191,49 @@ public void testPushIntAppConfig() throws IOException { IntDeviceConfig expectedConfig = createIntDeviceConfig(); IntDeviceConfig actualConfig = manager.getConfig(); assertEquals(expectedConfig, actualConfig); + + // Install watch subnets via netcfg + // In the report-config.json, there are 3 subnets we want to watch + // For subnet 0.0.0.0/0, the IntManager will create only one IntIntent with an empty selector. + Set expectedIntIntents = Sets.newHashSet(); + ConsistentMap intentMap = TestUtils.getField(manager, "intentMap"); + IntIntent.Builder baseIntentBuilder = IntIntent.builder() + .withReportType(IntIntent.IntReportType.TRACKED_FLOW) + .withReportType(IntIntent.IntReportType.DROPPED_PACKET) + .withReportType(IntIntent.IntReportType.CONGESTED_QUEUE) + .withTelemetryMode(IntIntent.TelemetryMode.POSTCARD); + + // Watch IP Src == subnet 1 + TrafficSelector expectedSelector = DefaultTrafficSelector.builder() + .matchIPSrc(IpPrefix.valueOf(WATCHED_SUBNET_1)) + .build(); + expectedIntIntents.add(baseIntentBuilder.withSelector(expectedSelector).build()); + // Watch IP Dst == subnet 1 + expectedSelector = DefaultTrafficSelector.builder() + .matchIPDst(IpPrefix.valueOf(WATCHED_SUBNET_1)) + .build(); + expectedIntIntents.add(baseIntentBuilder.withSelector(expectedSelector).build()); + // Watch IP Src == subnet 2 + expectedSelector = DefaultTrafficSelector.builder() + .matchIPSrc(IpPrefix.valueOf(WATCHED_SUBNET_2)) + .build(); + expectedIntIntents.add(baseIntentBuilder.withSelector(expectedSelector).build()); + // Watch IP Dst == subnet 2 + expectedSelector = DefaultTrafficSelector.builder() + .matchIPDst(IpPrefix.valueOf(WATCHED_SUBNET_2)) + .build(); + expectedIntIntents.add(baseIntentBuilder.withSelector(expectedSelector).build()); + // Any packets + expectedSelector = DefaultTrafficSelector.emptySelector(); + expectedIntIntents.add(baseIntentBuilder.withSelector(expectedSelector).build()); + + // The INT intent installation order can be random, so we need to collect + // all expected INT intents and check if actual intent exists. + assertAfter(50, 100, () -> assertEquals(5, intentMap.size())); + intentMap.entrySet().forEach(entry -> { + IntIntent actualIntIntent = entry.getValue().value(); + assertTrue(expectedIntIntents.contains(actualIntIntent)); + }); } @Test diff --git a/apps/inbandtelemetry/impl/src/test/resources/report-config.json b/apps/inbandtelemetry/impl/src/test/resources/report-config.json index c0c1ca26e6e..366aeab9dbb 100644 --- a/apps/inbandtelemetry/impl/src/test/resources/report-config.json +++ b/apps/inbandtelemetry/impl/src/test/resources/report-config.json @@ -1,5 +1,10 @@ { "collectorIp": "10.0.0.1", "collectorPort": 32766, - "minFlowHopLatencyChangeNs": 32 + "minFlowHopLatencyChangeNs": 32, + "watchSubnets": [ + "0.0.0.0/0", + "192.168.10.0/24", + "192.168.20.0/24" + ] } \ No newline at end of file diff --git a/apps/inbandtelemetry/intApp-gui2/intApp/BUILD.bazel b/apps/inbandtelemetry/intApp-gui2/intApp/BUILD.bazel index aecef14c246..dd62c0897b0 100644 --- a/apps/inbandtelemetry/intApp-gui2/intApp/BUILD.bazel +++ b/apps/inbandtelemetry/intApp-gui2/intApp/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "intapp-gui2-lib", srcs = glob( include = [ @@ -28,14 +28,18 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/apps/k8s-networking/BUILD b/apps/k8s-networking/BUILD index 9729e56dfef..d56a43f2d65 100644 --- a/apps/k8s-networking/BUILD +++ b/apps/k8s-networking/BUILD @@ -3,7 +3,7 @@ BUNDLES = [ "//apps/k8s-networking/app:onos-apps-k8s-networking-app", "@commons_net//jar", "@jersey_client//jar", - "@json//jar", + "@minimal_json//jar", "@k8s_client//jar", "@k8s_model//jar", "@okhttp//jar", diff --git a/apps/k8s-networking/app/BUILD b/apps/k8s-networking/app/BUILD index 87c974e6715..df84aaf0960 100644 --- a/apps/k8s-networking/app/BUILD +++ b/apps/k8s-networking/app/BUILD @@ -6,7 +6,7 @@ COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + CLI + REST + [ "//apps/k8s-networking/api:onos-apps-k8s-networking-api", "@commons_net//jar", "@jersey_client//jar", - "@json//jar", + "@minimal_json//jar", "@k8s_client//jar", "@k8s_model//jar", "@okhttp//jar", diff --git a/apps/k8s-networking/app/src/main/java/org/onosproject/k8snetworking/impl/K8sOpenstackIntegrationHandler.java b/apps/k8s-networking/app/src/main/java/org/onosproject/k8snetworking/impl/K8sOpenstackIntegrationHandler.java index a631c627176..0a1c5dea3cf 100644 --- a/apps/k8s-networking/app/src/main/java/org/onosproject/k8snetworking/impl/K8sOpenstackIntegrationHandler.java +++ b/apps/k8s-networking/app/src/main/java/org/onosproject/k8snetworking/impl/K8sOpenstackIntegrationHandler.java @@ -16,8 +16,7 @@ package org.onosproject.k8snetworking.impl; import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; -import org.json.JSONException; -import org.json.JSONObject; +import com.eclipsesource.json.JsonObject; import org.onosproject.cluster.ClusterService; import org.onosproject.cluster.LeadershipService; import org.onosproject.cluster.NodeId; @@ -129,20 +128,15 @@ private void setCniPtNodeRules(K8sNode k8sNode, boolean install) { String jsonString = ""; - try { - jsonString = new JSONObject() - .put(K8S_NODE_IP, k8sNodeIp) - .put(POD_GW_IP, gatewayIp) - .put(POD_CIDR, podCidr) - .put(SERVICE_CIDR, SERVICE_IP_CIDR_DEFAULT) - .put(OS_K8S_INT_PORT_NAME, osK8sIntPortName) - .put(K8S_INT_OS_PORT_MAC, k8sIntOsPortMac) - .toString(); - log.info("push integration configuration {}", jsonString); - } catch (JSONException e) { - log.error("Failed to generate JSON string"); - return; - } + jsonString = new JsonObject() + .set(K8S_NODE_IP, k8sNodeIp) + .set(POD_GW_IP, gatewayIp) + .set(POD_CIDR, podCidr) + .set(SERVICE_CIDR, SERVICE_IP_CIDR_DEFAULT) + .set(OS_K8S_INT_PORT_NAME, osK8sIntPortName) + .set(K8S_INT_OS_PORT_MAC, k8sIntOsPortMac) + .toString(); + log.info("push integration configuration {}", jsonString); HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic(ONOS_USERNAME, ONOS_PASSWORD); @@ -169,17 +163,12 @@ private void setCniPtNodePortRules(K8sNode k8sNode, boolean install) { String jsonString = ""; - try { - jsonString = new JSONObject() - .put(K8S_NODE_IP, k8sNodeIp) - .put(SERVICE_CIDR, SERVICE_IP_CIDR_DEFAULT) - .put(OS_K8S_EXT_PORT_NAME, osK8sExtPortName) - .toString(); - log.info("push integration configuration {}", jsonString); - } catch (JSONException e) { - log.error("Failed to generate JSON string"); - return; - } + jsonString = new JsonObject() + .set(K8S_NODE_IP, k8sNodeIp) + .set(SERVICE_CIDR, SERVICE_IP_CIDR_DEFAULT) + .set(OS_K8S_EXT_PORT_NAME, osK8sExtPortName) + .toString(); + log.info("push integration configuration {}", jsonString); HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic(ONOS_USERNAME, ONOS_PASSWORD); diff --git a/apps/mcast/impl/src/main/java/org/onosproject/mcast/impl/DistributedMcastRoutesStore.java b/apps/mcast/impl/src/main/java/org/onosproject/mcast/impl/DistributedMcastRoutesStore.java index 2d861048277..6dc6c3d28b0 100644 --- a/apps/mcast/impl/src/main/java/org/onosproject/mcast/impl/DistributedMcastRoutesStore.java +++ b/apps/mcast/impl/src/main/java/org/onosproject/mcast/impl/DistributedMcastRoutesStore.java @@ -94,7 +94,6 @@ public void activate() { @Deactivate public void deactivate() { mcastRib.removeListener(mcastRouteListener); - mcastRib.destroy(); log.info("Stopped"); } diff --git a/apps/roadm/web/roadm-gui/BUILD.bazel b/apps/roadm/web/roadm-gui/BUILD.bazel index dd6bd335ff8..b489b624603 100644 --- a/apps/roadm/web/roadm-gui/BUILD.bazel +++ b/apps/roadm/web/roadm-gui/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "roadm-gui", srcs = glob( include = [ @@ -28,14 +28,18 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteStore.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteStore.java index 5eaa898c1ed..2171fcb49b8 100644 --- a/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteStore.java +++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/RouteStore.java @@ -37,6 +37,13 @@ public interface RouteStore extends Store routes); + /** * Removes the given route from the store. * @@ -44,6 +51,13 @@ public interface RouteStore extends Store routes); + /** * Replaces the all the routes for a prefix * with the given route. @@ -78,6 +92,14 @@ default void replaceRoute(Route route) { // TODO think about including route table info Collection getRoutesForNextHop(IpAddress ip); + /** + * Returns all routes that point to any of the given next hops IP addresses. + * + * @param nextHops next hops IP addresses + * @return collection of routes sets + */ + Collection getRoutesForNextHops(Collection nextHops); + /** * Returns the set of routes in the default route table for the given prefix. * diff --git a/apps/route-service/api/src/test/java/org/onosproject/routeservice/RouteStoreAdapter.java b/apps/route-service/api/src/test/java/org/onosproject/routeservice/RouteStoreAdapter.java index 117a98bf785..1ede0fb221b 100644 --- a/apps/route-service/api/src/test/java/org/onosproject/routeservice/RouteStoreAdapter.java +++ b/apps/route-service/api/src/test/java/org/onosproject/routeservice/RouteStoreAdapter.java @@ -30,11 +30,21 @@ public void updateRoute(Route route) { } + @Override + public void updateRoutes(Collection routes) { + + } + @Override public void removeRoute(Route route) { } + @Override + public void removeRoutes(Collection routes) { + + } + @Override public void replaceRoute(Route route) { @@ -55,6 +65,11 @@ public Collection getRoutesForNextHop(IpAddress ip) { return null; } + @Override + public Collection getRoutesForNextHops(Collection nextHops) { + return null; + } + @Override public RouteSet getRoutes(IpPrefix prefix) { return null; diff --git a/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/DefaultResolvedRouteStore.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/DefaultResolvedRouteStore.java index 725a7a98d13..51ef8c75541 100644 --- a/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/DefaultResolvedRouteStore.java +++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/DefaultResolvedRouteStore.java @@ -17,7 +17,6 @@ package org.onosproject.routeservice.impl; import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Maps; import com.googlecode.concurrenttrees.common.KeyValuePair; import com.googlecode.concurrenttrees.radix.node.concrete.DefaultByteArrayNodeFactory; import com.googlecode.concurrenttrees.radixinverted.ConcurrentInvertedRadixTree; @@ -121,7 +120,7 @@ public RouteTable() { routeTable = new ConcurrentInvertedRadixTree<>( new DefaultByteArrayNodeFactory()); - alternativeRoutes = Maps.newHashMap(); + alternativeRoutes = new ConcurrentHashMap<>(); } /** @@ -133,7 +132,6 @@ public RouteTable() { public RouteEvent update(ResolvedRoute route, Set alternatives) { Set immutableAlternatives = checkAlternatives(route, alternatives); - synchronized (this) { ResolvedRoute oldRoute = routeTable.put(createBinaryString(route.prefix()), route); Set oldRoutes = alternativeRoutes.put(route.prefix(), immutableAlternatives); @@ -153,7 +151,6 @@ public RouteEvent update(ResolvedRoute route, Set alternatives) { } return null; - } } /** @@ -181,18 +178,16 @@ private Set checkAlternatives(ResolvedRoute route, Set alternatives = alternativeRoutes.remove(prefix); + ResolvedRoute route = routeTable.getValueForExactKey(key); + Set alternatives = alternativeRoutes.remove(prefix); - if (route != null) { - routeTable.remove(key); - return new RouteEvent(RouteEvent.Type.ROUTE_REMOVED, route, alternatives); - } - return null; + if (route != null) { + routeTable.remove(key); + return new RouteEvent(RouteEvent.Type.ROUTE_REMOVED, route, alternatives); } + return null; } /** diff --git a/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteManager.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteManager.java index 72d5453fe6f..25a74ae77b0 100644 --- a/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteManager.java +++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteManager.java @@ -19,6 +19,7 @@ import com.google.common.collect.ImmutableList; import org.onlab.packet.IpAddress; import org.onlab.packet.IpPrefix; +import org.onlab.util.PredictableExecutor; import org.onosproject.cluster.ClusterService; import org.onosproject.net.Host; import org.onosproject.net.host.HostEvent; @@ -32,7 +33,6 @@ import org.onosproject.routeservice.RouteInfo; import org.onosproject.routeservice.RouteListener; import org.onosproject.routeservice.RouteService; -import org.onosproject.routeservice.RouteSet; import org.onosproject.routeservice.RouteStore; import org.onosproject.routeservice.RouteStoreDelegate; import org.onosproject.routeservice.RouteTableId; @@ -45,16 +45,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.annotation.concurrent.GuardedBy; import java.util.Collection; -import java.util.Comparator; -import java.util.HashMap; import java.util.Map; -import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.concurrent.BlockingQueue; -import java.util.concurrent.Executor; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadFactory; @@ -71,6 +67,8 @@ public class RouteManager implements RouteService, RouteAdminService { private final Logger log = LoggerFactory.getLogger(getClass()); + private static final int DEFAULT_BUCKETS = 0; + private RouteStoreDelegate delegate = new InternalRouteStoreDelegate(); private InternalHostListener hostListener = new InternalHostListener(); @@ -90,18 +88,21 @@ public class RouteManager implements RouteService, RouteAdminService { private RouteMonitor routeMonitor; - @GuardedBy(value = "this") - private Map listeners = new HashMap<>(); + protected RouteResolver routeResolver; + + private Map listeners = new ConcurrentHashMap<>(); private ThreadFactory threadFactory; - protected Executor hostEventExecutor = newSingleThreadExecutor( - groupedThreads("rm-event-host", "%d", log)); + protected PredictableExecutor hostEventExecutors; @Activate protected void activate() { routeMonitor = new RouteMonitor(this, clusterService, storageService); + routeResolver = new RouteResolver(this, hostService); threadFactory = groupedThreads("onos/route", "listener-%d", log); + hostEventExecutors = new PredictableExecutor(DEFAULT_BUCKETS, groupedThreads("onos/route-manager", + "event-host-%d", log)); resolvedRouteStore = new DefaultResolvedRouteStore(); @@ -110,15 +111,14 @@ protected void activate() { routeStore.getRouteTables().stream() .flatMap(id -> routeStore.getRoutes(id).stream()) - .forEach(this::resolve); + .forEach(routeSet -> routeResolver.resolve(routeSet)); } @Deactivate protected void deactivate() { routeMonitor.shutdown(); - synchronized (this) { - listeners.values().forEach(ListenerQueue::stop); - } + routeResolver.shutdown(); + listeners.values().forEach(ListenerQueue::stop); routeStore.unsetDelegate(delegate); hostService.removeListener(hostListener); @@ -136,8 +136,9 @@ protected void deactivate() { */ @Override public void addListener(RouteListener listener) { - synchronized (this) { - log.debug("Synchronizing current routes to new listener"); + log.debug("Synchronizing current routes to new listener"); + ListenerQueue listenerQueue = listeners.compute(listener, (key, value) -> { + // Create listener regardless the existence of a previous value ListenerQueue l = createListenerQueue(listener); resolvedRouteStore.getRouteTables().stream() .map(resolvedRouteStore::getRoutes) @@ -145,21 +146,18 @@ public void addListener(RouteListener listener) { .map(route -> new RouteEvent(RouteEvent.Type.ROUTE_ADDED, route, resolvedRouteStore.getAllRoutes(route.prefix()))) .forEach(l::post); - - listeners.put(listener, l); - - l.start(); - log.debug("Route synchronization complete"); - } + return l; + }); + // Start draining the events + listenerQueue.start(); + log.debug("Route synchronization complete"); } @Override public void removeListener(RouteListener listener) { - synchronized (this) { - ListenerQueue l = listeners.remove(listener); - if (l != null) { - l.stop(); - } + ListenerQueue l = listeners.remove(listener); + if (l != null) { + l.stop(); } } @@ -171,16 +169,10 @@ public void removeListener(RouteListener listener) { private void post(RouteEvent event) { if (event != null) { log.debug("Sending event {}", event); - synchronized (this) { - listeners.values().forEach(l -> l.post(event)); - } + listeners.values().forEach(l -> l.post(event)); } } - private Collection reformatRoutes(Collection routeSets) { - return routeSets.stream().flatMap(r -> r.routes().stream()).collect(Collectors.toList()); - } - @Override public Collection getRouteTables() { return routeStore.getRouteTables(); @@ -190,24 +182,11 @@ public Collection getRouteTables() { public Collection getRoutes(RouteTableId id) { return routeStore.getRoutes(id).stream() .map(routeSet -> new RouteInfo(routeSet.prefix(), - resolvedRouteStore.getRoute(routeSet.prefix()).orElse(null), resolveRouteSet(routeSet))) + resolvedRouteStore.getRoute(routeSet.prefix()).orElse(null), + routeResolver.resolveRouteSet(routeSet))) .collect(Collectors.toList()); } - private Set resolveRouteSet(RouteSet routeSet) { - return routeSet.routes().stream() - .map(this::tryResolve) - .collect(Collectors.toSet()); - } - - private ResolvedRoute tryResolve(Route route) { - ResolvedRoute resolvedRoute = resolve(route); - if (resolvedRoute == null) { - resolvedRoute = new ResolvedRoute(route, null, null); - } - return resolvedRoute; - } - @Override public Collection getResolvedRoutes(RouteTableId id) { return resolvedRouteStore.getRoutes(id); @@ -225,22 +204,14 @@ public Collection getAllResolvedRoutes(IpPrefix prefix) { @Override public void update(Collection routes) { - synchronized (this) { - routes.forEach(route -> { - log.debug("Received update {}", route); - routeStore.updateRoute(route); - }); - } + log.debug("Received update {}", routes); + routeStore.updateRoutes(routes); } @Override public void withdraw(Collection routes) { - synchronized (this) { - routes.forEach(route -> { - log.debug("Received withdraw {}", route); - routeStore.removeRoute(route); - }); - } + log.debug("Received withdraw {}", routes); + routeStore.removeRoutes(routes); } @Override @@ -250,48 +221,14 @@ public Route longestPrefixMatch(IpAddress ip) { .orElse(null); } - private ResolvedRoute resolve(Route route) { - hostService.startMonitoringIp(route.nextHop()); - Set hosts = hostService.getHostsByIp(route.nextHop()); - - return hosts.stream().findFirst() - .map(host -> new ResolvedRoute(route, host.mac(), host.vlan())) - .orElse(null); - } - - private ResolvedRoute decide(ResolvedRoute route1, ResolvedRoute route2) { - return Comparator.comparing(ResolvedRoute::nextHop) - .compare(route1, route2) <= 0 ? route1 : route2; - } - - private void store(ResolvedRoute route, Set alternatives) { + void store(ResolvedRoute route, Set alternatives) { post(resolvedRouteStore.updateRoute(route, alternatives)); } - private void remove(IpPrefix prefix) { + void remove(IpPrefix prefix) { post(resolvedRouteStore.removeRoute(prefix)); } - private void resolve(RouteSet routes) { - if (routes.routes() == null) { - // The routes were removed before we got to them, nothing to do - return; - } - Set resolvedRoutes = routes.routes().stream() - .map(this::resolve) - .filter(Objects::nonNull) - .collect(Collectors.toSet()); - - Optional bestRoute = resolvedRoutes.stream() - .reduce(this::decide); - - if (bestRoute.isPresent()) { - store(bestRoute.get(), resolvedRoutes); - } else { - remove(routes.prefix()); - } - } - private void hostUpdated(Host host) { hostChanged(host); } @@ -301,12 +238,8 @@ private void hostRemoved(Host host) { } private void hostChanged(Host host) { - synchronized (this) { - host.ipAddresses().stream() - .flatMap(ip -> routeStore.getRoutesForNextHop(ip).stream()) - .map(route -> routeStore.getRoutes(route.prefix())) - .forEach(this::resolve); - } + routeStore.getRoutesForNextHops(host.ipAddresses()) + .forEach(routeSet -> routeResolver.resolve(routeSet)); } /** @@ -377,10 +310,10 @@ private class InternalRouteStoreDelegate implements RouteStoreDelegate { public void notify(InternalRouteEvent event) { switch (event.type()) { case ROUTE_ADDED: - resolve(event.subject()); + routeResolver.resolve(event.subject()); break; case ROUTE_REMOVED: - resolve(event.subject()); + routeResolver.resolve(event.subject()); break; default: break; @@ -399,11 +332,11 @@ public void event(HostEvent event) { case HOST_UPDATED: case HOST_MOVED: log.trace("Scheduled host event {}", event); - hostEventExecutor.execute(() -> hostUpdated(event.subject())); + hostEventExecutors.execute(() -> hostUpdated(event.subject()), event.subject().id().hashCode()); break; case HOST_REMOVED: log.trace("Scheduled host event {}", event); - hostEventExecutor.execute(() -> hostRemoved(event.subject())); + hostEventExecutors.execute(() -> hostRemoved(event.subject()), event.subject().id().hashCode()); break; default: break; diff --git a/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteMonitor.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteMonitor.java index ede60db15ac..1ee7daa4a0f 100644 --- a/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteMonitor.java +++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteMonitor.java @@ -35,6 +35,7 @@ import java.time.Duration; import java.util.Collection; +import java.util.concurrent.ExecutorService; import java.util.concurrent.ScheduledExecutorService; import java.util.stream.Collectors; @@ -65,6 +66,9 @@ public class RouteMonitor { private final ScheduledExecutorService reaperExecutor = newSingleThreadScheduledExecutor(groupedThreads("route/reaper", "", log)); + private final ExecutorService eventExecutor = newSingleThreadScheduledExecutor(groupedThreads( + "onos/routemonitor", "events-%d", log)); + /** * Creates a new route monitor. * @@ -94,6 +98,8 @@ public RouteMonitor(RouteAdminService routeService, public void shutdown() { stopProcessing(); clusterService.removeListener(clusterListener); + eventExecutor.shutdownNow(); + reaperExecutor.shutdownNow(); asyncLock.unlock(); } @@ -145,31 +151,38 @@ private class InternalClusterListener implements ClusterEventListener { @Override public void event(ClusterEvent event) { - switch (event.type()) { - case INSTANCE_DEACTIVATED: - NodeId id = event.subject().id(); - log.info("Node {} deactivated", id); - - // DistributedLock is introduced to guarantee that minority nodes won't try to remove - // routes that originated from majority nodes. - // Adding 15 seconds retry for the leadership election to be completed. - asyncLock.tryLock(Duration.ofSeconds(15)).whenComplete((result, error) -> { - if (result != null && result.isPresent()) { - log.debug("Lock obtained. Put {} into removal queue", id); - queue.addOne(id); - asyncLock.unlock(); - } else { - log.debug("Fail to obtain lock. Do not remove routes from {}", id); - } - }); - break; - case INSTANCE_ADDED: - case INSTANCE_REMOVED: - case INSTANCE_ACTIVATED: - case INSTANCE_READY: - default: - break; - } + eventExecutor.execute(() -> { + if (event.instanceType() == ClusterEvent.InstanceType.STORAGE) { + log.debug("Skipping cluster event for {}", event.subject().id().id()); + return; + } + + switch (event.type()) { + case INSTANCE_DEACTIVATED: + NodeId id = event.subject().id(); + log.info("Node {} deactivated", id); + + // DistributedLock is introduced to guarantee that minority nodes won't try to remove + // routes that originated from majority nodes. + // Adding 15 seconds retry for the leadership election to be completed. + asyncLock.tryLock(Duration.ofSeconds(15)).whenComplete((result, error) -> { + if (result != null && result.isPresent()) { + log.debug("Lock obtained. Put {} into removal queue", id); + queue.addOne(id); + asyncLock.unlock(); + } else { + log.debug("Fail to obtain lock. Do not remove routes from {}", id); + } + }); + break; + case INSTANCE_ADDED: + case INSTANCE_REMOVED: + case INSTANCE_ACTIVATED: + case INSTANCE_READY: + default: + break; + } + }); } } } diff --git a/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteResolver.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteResolver.java new file mode 100644 index 00000000000..5925904e505 --- /dev/null +++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteResolver.java @@ -0,0 +1,123 @@ +/* + * Copyright 2019-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.routeservice.impl; + +import org.onlab.util.PredictableExecutor; +import org.onosproject.net.Host; +import org.onosproject.net.host.HostService; +import org.onosproject.routeservice.ResolvedRoute; +import org.onosproject.routeservice.Route; +import org.onosproject.routeservice.RouteSet; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Comparator; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; + +import static org.onlab.util.Tools.groupedThreads; + +/** + * Resolves routes in multi-thread fashion. + */ +class RouteResolver { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + private static final int DEFAULT_BUCKETS = 0; + private RouteManager routeManager; + private HostService hostService; + protected PredictableExecutor routeResolvers; + + /** + * Creates a new route resolver. + * + * @param routeManager route service + * @param hostService host service + */ + RouteResolver(RouteManager routeManager, HostService hostService) { + this.routeManager = routeManager; + this.hostService = hostService; + routeResolvers = new PredictableExecutor(DEFAULT_BUCKETS, groupedThreads("onos/route-resolver", + "route-resolver-%d", log)); + } + + /** + * Shuts down the route resolver. + */ + void shutdown() { + routeResolvers.shutdown(); + } + + private ResolvedRoute tryResolve(Route route) { + ResolvedRoute resolvedRoute = resolve(route); + if (resolvedRoute == null) { + resolvedRoute = new ResolvedRoute(route, null, null); + } + return resolvedRoute; + } + + // Used by external reads + Set resolveRouteSet(RouteSet routeSet) { + return routeSet.routes().stream() + .map(this::tryResolve) + .collect(Collectors.toSet()); + } + + // Used by external reads and by resolvers + ResolvedRoute resolve(Route route) { + hostService.startMonitoringIp(route.nextHop()); + Set hosts = hostService.getHostsByIp(route.nextHop()); + + return hosts.stream().findFirst() + .map(host -> new ResolvedRoute(route, host.mac(), host.vlan())) + .orElse(null); + } + + private ResolvedRoute decide(ResolvedRoute route1, ResolvedRoute route2) { + return Comparator.comparing(ResolvedRoute::nextHop) + .compare(route1, route2) <= 0 ? route1 : route2; + } + + private void resolveInternal(RouteSet routes) { + if (routes.routes() == null) { + // The routes were removed before we got to them, nothing to do + return; + } + + Set resolvedRoutes = routes.routes().stream() + .map(this::resolve) + .filter(Objects::nonNull) + .collect(Collectors.toSet()); + + Optional bestRoute = resolvedRoutes.stream() + .reduce(this::decide); + + if (bestRoute.isPresent()) { + routeManager.store(bestRoute.get(), resolvedRoutes); + } else { + routeManager.remove(routes.prefix()); + } + } + + // Offload to the resolvers using prefix hashcode as hint + // TODO Remove RouteManager reference using PickyCallable + void resolve(RouteSet routes) { + routeResolvers.execute(() -> resolveInternal(routes), routes.prefix().hashCode()); + } +} diff --git a/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DefaultRouteTable.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DefaultRouteTable.java index f052f04d492..2bacf07747f 100644 --- a/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DefaultRouteTable.java +++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DefaultRouteTable.java @@ -18,6 +18,7 @@ import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.concurrent.ExecutorService; @@ -43,6 +44,7 @@ import org.onosproject.store.service.StorageService; import org.onosproject.store.service.Versioned; + import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkNotNull; @@ -132,6 +134,14 @@ public void update(Route route) { routes.put(route.prefix().toString(), new RawRoute(route)); } + @Override + public void update(Collection routesAdded) { + Map> computedRoutes = new HashMap<>(); + computeRoutesToAdd(routesAdded).forEach((prefix, routes) -> computedRoutes.computeIfAbsent( + prefix, k -> Sets.newHashSet(routes))); + routes.putAll(computedRoutes); + } + @Override public void remove(Route route) { getRoutes(route.prefix()) @@ -144,6 +154,14 @@ public void remove(Route route) { }); } + @Override + public void remove(Collection routesRemoved) { + Map> computedRoutes = new HashMap<>(); + computeRoutesToRemove(routesRemoved).forEach((prefix, routes) -> computedRoutes.computeIfAbsent( + prefix, k -> Sets.newHashSet(routes))); + routes.removeAll(computedRoutes); + } + @Override public void replace(Route route) { routes.replaceValues(route.prefix().toString(), Sets.newHashSet(new RawRoute(route))); @@ -180,6 +198,54 @@ public Collection getRoutesForNextHop(IpAddress nextHop) { .collect(Collectors.toSet()); } + @Override + public Collection getRoutesForNextHops(Collection nextHops) { + // First create a reduced snapshot of the store iterating one time the map + Map> filteredRouteStore = new HashMap<>(); + routes.stream() + .map(Map.Entry::getValue) + .filter(r -> nextHops.contains(IpAddress.valueOf(r.nextHop()))) + .forEach(r -> filteredRouteStore.computeIfAbsent(r.prefix, k -> { + // We need to get all the routes because the resolve logic + // will use the alternatives as well + Versioned> routeSet = routes.get(k); + if (routeSet != null) { + return routeSet.value(); + } + return null; + })); + // Return the collection of the routeSet we have to resolve + return filteredRouteStore.entrySet().stream() + .map(entry -> new RouteSet(id, IpPrefix.valueOf(entry.getKey()), + entry.getValue().stream().map(RawRoute::route).collect(Collectors.toSet()))) + .collect(Collectors.toSet()); + } + + private Map> computeRoutesToAdd(Collection routesAdded) { + Map> computedRoutes = new HashMap<>(); + routesAdded.forEach(route -> { + Collection tempRoutes = computedRoutes.computeIfAbsent( + route.prefix().toString(), k -> Sets.newHashSet()); + tempRoutes.add(new RawRoute(route)); + }); + return computedRoutes; + } + + private Map> computeRoutesToRemove(Collection routesRemoved) { + Map> computedRoutes = new HashMap<>(); + routesRemoved.forEach(route -> getRoutes(route.prefix()) + .routes() + .stream() + .filter(r -> r.equals(route)) + .findAny() + .ifPresent(matchRoute -> { + Collection tempRoutes = computedRoutes.computeIfAbsent( + matchRoute.prefix().toString(), k -> Sets.newHashSet()); + tempRoutes.add(new RawRoute(matchRoute)); + })); + return computedRoutes; + } + private class RouteTableListener implements MultimapEventListener { diff --git a/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DistributedRouteStore.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DistributedRouteStore.java index efdb79268ef..f2661a10409 100644 --- a/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DistributedRouteStore.java +++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/DistributedRouteStore.java @@ -17,6 +17,7 @@ package org.onosproject.routeservice.store; import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Sets; import org.onlab.packet.IpAddress; import org.onlab.packet.IpPrefix; import org.onlab.util.KryoNamespace; @@ -37,11 +38,13 @@ import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.stream.Collectors; import static org.onlab.util.Tools.groupedThreads; @@ -115,11 +118,27 @@ public void updateRoute(Route route) { getDefaultRouteTable(route).update(route); } + @Override + public void updateRoutes(Collection routes) { + Map> computedTables = computeRouteTablesFromRoutes(routes); + computedTables.forEach( + ((routeTableId, routesToAdd) -> getDefaultRouteTable(routeTableId).update(routesToAdd)) + ); + } + @Override public void removeRoute(Route route) { getDefaultRouteTable(route).remove(route); } + @Override + public void removeRoutes(Collection routes) { + Map> computedTables = computeRouteTablesFromRoutes(routes); + computedTables.forEach( + ((routeTableId, routesToRemove) -> getDefaultRouteTable(routeTableId).remove(routesToRemove)) + ); + } + @Override public void replaceRoute(Route route) { getDefaultRouteTable(route).replace(route); @@ -145,6 +164,15 @@ public Collection getRoutesForNextHop(IpAddress ip) { return getDefaultRouteTable(ip).getRoutesForNextHop(ip); } + @Override + public Collection getRoutesForNextHops(Collection nextHops) { + Map> computedTables = computeRouteTablesFromIps(nextHops); + return computedTables.entrySet().stream() + .map(entry -> getDefaultRouteTable(entry.getKey()).getRoutesForNextHops(entry.getValue())) + .flatMap(Collection::stream) + .collect(Collectors.toList()); + } + @Override public RouteSet getRoutes(IpPrefix prefix) { return getDefaultRouteTable(prefix.address()).getRoutes(prefix); @@ -170,6 +198,30 @@ private RouteTable getDefaultRouteTable(IpAddress ip) { return routeTables.getOrDefault(routeTableId, EmptyRouteTable.instance()); } + private RouteTable getDefaultRouteTable(RouteTableId routeTableId) { + return routeTables.getOrDefault(routeTableId, EmptyRouteTable.instance()); + } + + private Map> computeRouteTablesFromRoutes(Collection routes) { + Map> computedTables = new HashMap<>(); + routes.forEach(route -> { + RouteTableId routeTableId = (route.prefix().address().isIp4()) ? IPV4 : IPV6; + Set tempRoutes = computedTables.computeIfAbsent(routeTableId, k -> Sets.newHashSet()); + tempRoutes.add(route); + }); + return computedTables; + } + + private Map> computeRouteTablesFromIps(Collection ipAddresses) { + Map> computedTables = new HashMap<>(); + ipAddresses.forEach(ipAddress -> { + RouteTableId routeTableId = (ipAddress.isIp4()) ? IPV4 : IPV6; + Set tempIpAddresses = computedTables.computeIfAbsent(routeTableId, k -> Sets.newHashSet()); + tempIpAddresses.add(ipAddress); + }); + return computedTables; + } + private class InternalRouteStoreDelegate implements RouteStoreDelegate { @Override public void notify(InternalRouteEvent event) { diff --git a/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/EmptyRouteTable.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/EmptyRouteTable.java index 8bee10e3823..9201c1aa8d1 100644 --- a/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/EmptyRouteTable.java +++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/EmptyRouteTable.java @@ -51,11 +51,21 @@ public void update(Route route) { } + @Override + public void update(Collection routes) { + + } + @Override public void remove(Route route) { } + @Override + public void remove(Collection routes) { + + } + @Override public void replace(Route route) { @@ -81,6 +91,11 @@ public Collection getRoutesForNextHop(IpAddress nextHop) { return Collections.emptyList(); } + @Override + public Collection getRoutesForNextHops(Collection nextHops) { + return Collections.emptyList(); + } + @Override public void shutdown() { diff --git a/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/LocalRouteStore.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/LocalRouteStore.java index 04b0f380309..c286ab136c7 100644 --- a/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/LocalRouteStore.java +++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/LocalRouteStore.java @@ -16,6 +16,7 @@ package org.onosproject.routeservice.store; +import com.google.common.collect.Sets; import com.googlecode.concurrenttrees.common.KeyValuePair; import com.googlecode.concurrenttrees.radix.node.concrete.DefaultByteArrayNodeFactory; import com.googlecode.concurrenttrees.radixinverted.ConcurrentInvertedRadixTree; @@ -35,6 +36,7 @@ import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -81,11 +83,27 @@ public void updateRoute(Route route) { getDefaultRouteTable(route).update(route); } + @Override + public void updateRoutes(Collection routes) { + Map> computedTables = computeRouteTablesFromRoutes(routes); + computedTables.forEach( + ((routeTableId, routesToAdd) -> getDefaultRouteTable(routeTableId).update(routesToAdd)) + ); + } + @Override public void removeRoute(Route route) { getDefaultRouteTable(route).remove(route); } + @Override + public void removeRoutes(Collection routes) { + Map> computedTables = computeRouteTablesFromRoutes(routes); + computedTables.forEach( + ((routeTableId, routesToRemove) -> getDefaultRouteTable(routeTableId).remove(routesToRemove)) + ); + } + @Override public void replaceRoute(Route route) { getDefaultRouteTable(route).replace(route); @@ -110,6 +128,15 @@ public Collection getRoutesForNextHop(IpAddress ip) { return getDefaultRouteTable(ip).getRoutesForNextHop(ip); } + @Override + public Collection getRoutesForNextHops(Collection nextHops) { + Map> computedTables = computeRouteTablesFromIps(nextHops); + return computedTables.entrySet().stream() + .map(entry -> getDefaultRouteTable(entry.getKey()).getRoutesForNextHops(entry.getValue())) + .flatMap(Collection::stream) + .collect(Collectors.toList()); + } + @Override public RouteSet getRoutes(IpPrefix prefix) { return getDefaultRouteTable(prefix.address()).getRoutes(prefix); @@ -124,6 +151,30 @@ private RouteTable getDefaultRouteTable(IpAddress ip) { return routeTables.get(routeTableId); } + private RouteTable getDefaultRouteTable(RouteTableId routeTableId) { + return routeTables.get(routeTableId); + } + + private Map> computeRouteTablesFromRoutes(Collection routes) { + Map> computedTables = new HashMap<>(); + routes.forEach(route -> { + RouteTableId routeTableId = (route.prefix().address().isIp4()) ? IPV4 : IPV6; + Set tempRoutes = computedTables.computeIfAbsent(routeTableId, k -> Sets.newHashSet()); + tempRoutes.add(route); + }); + return computedTables; + } + + private Map> computeRouteTablesFromIps(Collection ipAddresses) { + Map> computedTables = new HashMap<>(); + ipAddresses.forEach(ipAddress -> { + RouteTableId routeTableId = (ipAddress.isIp4()) ? IPV4 : IPV6; + Set tempIpAddresses = computedTables.computeIfAbsent(routeTableId, k -> Sets.newHashSet()); + tempIpAddresses.add(ipAddress); + }); + return computedTables; + } + /** * Route table into which routes can be placed. */ @@ -162,6 +213,17 @@ public void update(Route route) { } } + /** + * Adds or updates the routes in the route table. + * + * @param routes routes to update + */ + public void update(Collection routes) { + synchronized (this) { + routes.forEach(this::update); + } + } + /** * Removes the route from the route table. * @@ -179,6 +241,17 @@ public void remove(Route route) { } } + /** + * Adds or updates the routes in the route table. + * + * @param routes routes to update + */ + public void remove(Collection routes) { + synchronized (this) { + routes.forEach(this::remove); + } + } + /** * Replace the route in the route table. */ @@ -199,6 +272,28 @@ public Collection getRoutesForNextHop(IpAddress ip) { .collect(Collectors.toSet()); } + /** + * Returns the routes pointing to the next hops. + * + * @param ips next hops IP addresses + * @return routes for the next hop + */ + public Collection getRoutesForNextHops(Collection ips) { + // First create a reduced snapshot of the store iterating one time the map + Map> filteredRouteStore = new HashMap<>(); + routes.values().stream() + .filter(r -> ips.contains(r.nextHop())) + .forEach(r -> { + Collection tempRoutes = filteredRouteStore.computeIfAbsent( + r.prefix(), k -> Sets.newHashSet()); + tempRoutes.add(r); + }); + // Return the collection of the routeSet we have to resolve + return filteredRouteStore.entrySet().stream() + .map(entry -> new RouteSet(id, entry.getKey(), entry.getValue())) + .collect(Collectors.toSet()); + } + public RouteSet getRoutes(IpPrefix prefix) { Route route = routes.get(prefix); if (route != null) { diff --git a/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteStoreImpl.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteStoreImpl.java index edd22c3ffa2..f5c9d04aa3a 100644 --- a/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteStoreImpl.java +++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteStoreImpl.java @@ -140,11 +140,21 @@ public void updateRoute(Route route) { currentRouteStore.updateRoute(route); } + @Override + public void updateRoutes(Collection routes) { + currentRouteStore.updateRoutes(routes); + } + @Override public void removeRoute(Route route) { currentRouteStore.removeRoute(route); } + @Override + public void removeRoutes(Collection routes) { + currentRouteStore.removeRoutes(routes); + } + @Override public void replaceRoute(Route route) { currentRouteStore.replaceRoute(route); @@ -165,6 +175,11 @@ public Collection getRoutesForNextHop(IpAddress ip) { return currentRouteStore.getRoutesForNextHop(ip); } + @Override + public Collection getRoutesForNextHops(Collection ips) { + return currentRouteStore.getRoutesForNextHops(ips); + } + @Override public RouteSet getRoutes(IpPrefix prefix) { return currentRouteStore.getRoutes(prefix); diff --git a/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteTable.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteTable.java index 130654b24d7..fddd116038d 100644 --- a/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteTable.java +++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteTable.java @@ -36,6 +36,13 @@ public interface RouteTable { */ void update(Route route); + /** + * Adds the routes to the route table. + * + * @param routes routes + */ + void update(Collection routes); + /** * Removes a route from the route table. * @@ -43,6 +50,13 @@ public interface RouteTable { */ void remove(Route route); + /** + * Removes the routes from the route table. + * + * @param routes routes + */ + void remove(Collection routes); + /** * Replaces a route in the route table. * @@ -80,6 +94,14 @@ public interface RouteTable { */ Collection getRoutesForNextHop(IpAddress nextHop); + /** + * Returns all routes that have the given next hops. + * + * @param nextHops next hops IP addresses + * @return collection of routes sets + */ + Collection getRoutesForNextHops(Collection nextHops); + /** * Releases route table resources held locally. */ diff --git a/apps/route-service/app/src/test/java/org/onosproject/routeservice/impl/RouteManagerTest.java b/apps/route-service/app/src/test/java/org/onosproject/routeservice/impl/RouteManagerTest.java index 3c025724af2..d075b323292 100644 --- a/apps/route-service/app/src/test/java/org/onosproject/routeservice/impl/RouteManagerTest.java +++ b/apps/route-service/app/src/test/java/org/onosproject/routeservice/impl/RouteManagerTest.java @@ -19,7 +19,7 @@ import java.util.Collection; import java.util.Collections; -import com.google.common.util.concurrent.MoreExecutors; +import com.google.common.collect.Lists; import org.junit.Before; import org.junit.Test; import org.onlab.packet.Ip4Address; @@ -30,6 +30,7 @@ import org.onlab.packet.IpPrefix; import org.onlab.packet.MacAddress; import org.onlab.packet.VlanId; +import org.onlab.util.PredictableExecutor; import org.onosproject.routeservice.ResolvedRoute; import org.onosproject.routeservice.Route; import org.onosproject.routeservice.RouteEvent; @@ -65,6 +66,7 @@ import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.reset; import static org.easymock.EasyMock.verify; +import static org.onlab.util.Tools.groupedThreads; /** * Unit tests for the route manager. @@ -104,7 +106,6 @@ public void setUp() throws Exception { routeManager = new TestRouteManager(); routeManager.hostService = hostService; - routeManager.hostEventExecutor = MoreExecutors.directExecutor(); routeManager.clusterService = createNiceMock(ClusterService.class); replay(routeManager.clusterService); @@ -130,6 +131,11 @@ public void setUp() throws Exception { routeManager.routeStore = routeStore; routeManager.activate(); + routeManager.hostEventExecutors = new PredictableExecutor( + 0, groupedThreads("onos/route-manager-test", "event-host-%d"), true); + routeManager.routeResolver.routeResolvers = new PredictableExecutor( + 0, groupedThreads("onos/route-resolver-test", "route-resolver-%d"), true); + routeManager.addListener(routeListener); } @@ -142,16 +148,16 @@ private void setUpHostService() { hostService.addListener(anyObject(HostListener.class)); expectLastCall().andDelegateTo(new TestHostService()).anyTimes(); - Host host1 = createHost(MAC1, V4_NEXT_HOP1); + Host host1 = createHost(MAC1, Collections.singletonList(V4_NEXT_HOP1)); expectHost(host1); - Host host2 = createHost(MAC2, V4_NEXT_HOP2); + Host host2 = createHost(MAC2, Collections.singletonList(V4_NEXT_HOP2)); expectHost(host2); - Host host3 = createHost(MAC3, V6_NEXT_HOP1); + Host host3 = createHost(MAC3, Collections.singletonList(V6_NEXT_HOP1)); expectHost(host3); - Host host4 = createHost(MAC4, V6_NEXT_HOP2); + Host host4 = createHost(MAC4, Collections.singletonList(V6_NEXT_HOP2)); expectHost(host4); replay(hostService); @@ -176,13 +182,13 @@ private void expectHost(Host host) { * Creates a host with the given parameters. * * @param macAddress MAC address - * @param ipAddress IP address + * @param ipAddresses IP addresses * @return new host */ - private Host createHost(MacAddress macAddress, IpAddress ipAddress) { + private Host createHost(MacAddress macAddress, Collection ipAddresses) { return new DefaultHost(ProviderId.NONE, HostId.NONE, macAddress, VlanId.NONE, new HostLocation(CP1, 1), - Sets.newHashSet(ipAddress)); + Sets.newHashSet(ipAddresses)); } /** @@ -343,12 +349,19 @@ private void verifyDelete(Route route, ResolvedRoute removedResolvedRoute) { @Test public void testAsyncRouteAdd() { Route route = new Route(Route.Source.STATIC, V4_PREFIX1, V4_NEXT_HOP1); + // 2nd route for the same nexthop + Route route2 = new Route(Route.Source.STATIC, V4_PREFIX2, V4_NEXT_HOP2); + // 3rd route with no valid nexthop + Route route3 = new Route(Route.Source.STATIC, V6_PREFIX1, V6_NEXT_HOP1); + // Host service will reply with no hosts when asked reset(hostService); expect(hostService.getHostsByIp(anyObject(IpAddress.class))).andReturn( Collections.emptySet()).anyTimes(); hostService.startMonitoringIp(V4_NEXT_HOP1); + hostService.startMonitoringIp(V4_NEXT_HOP2); + hostService.startMonitoringIp(V6_NEXT_HOP1); expectLastCall().anyTimes(); replay(hostService); @@ -356,7 +369,7 @@ public void testAsyncRouteAdd() { // the host is not known replay(routeListener); - routeManager.update(Collections.singleton(route)); + routeManager.update(Lists.newArrayList(route, route2, route3)); verify(routeListener); @@ -365,15 +378,21 @@ public void testAsyncRouteAdd() { ResolvedRoute resolvedRoute = new ResolvedRoute(route, MAC1); routeListener.event(event(RouteEvent.Type.ROUTE_ADDED, resolvedRoute, null, Sets.newHashSet(resolvedRoute), null)); + ResolvedRoute resolvedRoute2 = new ResolvedRoute(route2, MAC1); + routeListener.event(event(RouteEvent.Type.ROUTE_ADDED, resolvedRoute2, null, + Sets.newHashSet(resolvedRoute2), null)); replay(routeListener); - Host host = createHost(MAC1, V4_NEXT_HOP1); + Host host = createHost(MAC1, Lists.newArrayList(V4_NEXT_HOP1, V4_NEXT_HOP2)); // Set up the host service with a host reset(hostService); expect(hostService.getHostsByIp(V4_NEXT_HOP1)).andReturn( Collections.singleton(host)).anyTimes(); hostService.startMonitoringIp(V4_NEXT_HOP1); + expect(hostService.getHostsByIp(V4_NEXT_HOP2)).andReturn( + Collections.singleton(host)).anyTimes(); + hostService.startMonitoringIp(V4_NEXT_HOP2); expectLastCall().anyTimes(); replay(hostService); diff --git a/apps/routing/fpm/app/src/main/java/org/onosproject/routing/fpm/FpmManager.java b/apps/routing/fpm/app/src/main/java/org/onosproject/routing/fpm/FpmManager.java index 6b6df43e1e2..41f31032841 100644 --- a/apps/routing/fpm/app/src/main/java/org/onosproject/routing/fpm/FpmManager.java +++ b/apps/routing/fpm/app/src/main/java/org/onosproject/routing/fpm/FpmManager.java @@ -830,6 +830,11 @@ private class InternalClusterListener implements ClusterEventListener { @Override public void event(ClusterEvent event) { clusterEventExecutor.execute(() -> { + if (event.instanceType() == ClusterEvent.InstanceType.STORAGE) { + log.debug("Skipping cluster event for {}", event.subject().id().id()); + return; + } + log.info("Receives ClusterEvent {} for {}", event.type(), event.subject().id()); switch (event.type()) { case INSTANCE_READY: diff --git a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkDeviceManager.java b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkDeviceManager.java index 21ba3b92991..d64b5b810ad 100644 --- a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkDeviceManager.java +++ b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkDeviceManager.java @@ -142,7 +142,7 @@ public List getPortDeltaStatistics(DeviceId deviceId) { public PortStatistics getStatisticsForPort(DeviceId deviceId, PortNumber portNumber) { checkNotNull(deviceId, DEVICE_NULL); - checkNotNull(deviceId, PORT_NUMBER_NULL); + checkNotNull(portNumber, PORT_NUMBER_NULL); // TODO not supported at the moment. return null; } @@ -151,7 +151,7 @@ public PortStatistics getStatisticsForPort(DeviceId deviceId, public PortStatistics getDeltaStatisticsForPort(DeviceId deviceId, PortNumber portNumber) { checkNotNull(deviceId, DEVICE_NULL); - checkNotNull(deviceId, PORT_NUMBER_NULL); + checkNotNull(portNumber, PORT_NUMBER_NULL); // TODO not supported at the moment. return null; } diff --git a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowObjectiveManager.java b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowObjectiveManager.java index 0a5a509a5d8..b4c84b6ee55 100644 --- a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowObjectiveManager.java +++ b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowObjectiveManager.java @@ -26,6 +26,7 @@ import org.apache.commons.lang3.tuple.Pair; import org.onlab.osgi.ServiceDirectory; import org.onlab.util.KryoNamespace; +import org.onosproject.core.ApplicationId; import org.onosproject.incubator.net.virtual.AbstractVnetService; import org.onosproject.incubator.net.virtual.NetworkId; import org.onosproject.incubator.net.virtual.VirtualNetworkFlowObjectiveStore; @@ -248,6 +249,12 @@ public List getPendingFlowObjectives() { return pendingFlowObjectives; } + @Override + public void purgeAll(DeviceId deviceId, ApplicationId appId) { + // TODO: purge queued flow objectives? + pipeliners.get(deviceId).purgeAll(appId); + } + private boolean queueFwdObjective(DeviceId deviceId, ForwardingObjective fwd) { boolean queued = false; synchronized (pendingForwards) { @@ -695,6 +702,11 @@ public void next(NextObjective nextObjective) { nextObjective.context().ifPresent(context -> context.onSuccess(nextObjective)); } + @Override + public void purgeAll(ApplicationId appId) { + flowRuleService.purgeFlowRules(deviceId, appId); + } + @Override public List getNextMappings(NextGroup nextGroup) { // Default single table pipeline does not use nextObjectives or groups diff --git a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowRuleManager.java b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowRuleManager.java index 012f3b6dc1d..e2e743af7e5 100644 --- a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowRuleManager.java +++ b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkFlowRuleManager.java @@ -133,6 +133,11 @@ public int getFlowRuleCount() { return store.getFlowRuleCount(networkId()); } + @Override + public FlowEntry getFlowEntry(FlowRule flowRule) { + return store.getFlowEntry(networkId(), flowRule); + } + @Override public Iterable getFlowEntries(DeviceId deviceId) { return store.getFlowEntries(networkId(), deviceId); diff --git a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkIntentManager.java b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkIntentManager.java index f4c1137e234..475bf6e75c7 100644 --- a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkIntentManager.java +++ b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkIntentManager.java @@ -16,6 +16,7 @@ package org.onosproject.incubator.net.virtual.impl; +import com.google.common.collect.ImmutableSet; import org.onlab.util.Tools; import org.onosproject.incubator.net.virtual.NetworkId; import org.onosproject.incubator.net.virtual.VirtualNetworkIntent; @@ -33,6 +34,7 @@ import org.onosproject.incubator.net.virtual.impl.intent.phase.VirtualIntentProcessPhase; import org.onosproject.incubator.net.virtual.impl.intent.VirtualIntentProcessor; import org.onosproject.incubator.net.virtual.impl.intent.VirtualIntentSkipped; +import org.onosproject.core.ApplicationId; import org.onosproject.net.ConnectPoint; import org.onosproject.net.DeviceId; import org.onosproject.net.Port; @@ -222,6 +224,18 @@ public Iterable getIntents() { return intentStore.getIntents(networkId); } + @Override + public Iterable getIntentsByAppId(ApplicationId id) { + ImmutableSet.Builder builder = ImmutableSet.builder(); + for (Intent intent : intentStore.getIntents(networkId)) { + if (intent.appId().equals(id)) { + builder.add(intent); + } + } + + return builder.build(); + } + @Override public void addPending(IntentData intentData) { checkNotNull(intentData, INTENT_NULL); diff --git a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkMastershipManager.java b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkMastershipManager.java index 57c0774c9fa..29899528ebc 100644 --- a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkMastershipManager.java +++ b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkMastershipManager.java @@ -204,6 +204,11 @@ public void balanceRoles() { Futures.getUnchecked(balanceRolesFuture); } + @Override + public void demote(NodeId instance, DeviceId deviceId) { + throw new UnsupportedOperationException("VN mastership does not support promote api."); + } + public class InternalDelegate implements MastershipStoreDelegate { @Override public void notify(MastershipEvent event) { diff --git a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkMeterManager.java b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkMeterManager.java index 9ec530b8aaf..e98734ddab4 100644 --- a/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkMeterManager.java +++ b/apps/virtual/app/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkMeterManager.java @@ -30,6 +30,7 @@ import org.onosproject.net.DeviceId; import org.onosproject.net.meter.DefaultMeter; import org.onosproject.net.meter.Meter; +import org.onosproject.net.meter.MeterCellId; import org.onosproject.net.meter.MeterEvent; import org.onosproject.net.meter.MeterFailReason; import org.onosproject.net.meter.MeterFeatures; @@ -39,6 +40,7 @@ import org.onosproject.net.meter.MeterListener; import org.onosproject.net.meter.MeterOperation; import org.onosproject.net.meter.MeterRequest; +import org.onosproject.net.meter.MeterScope; import org.onosproject.net.meter.MeterService; import org.onosproject.net.meter.MeterState; import org.onosproject.net.meter.MeterStoreDelegate; @@ -49,6 +51,7 @@ import org.slf4j.Logger; import java.util.Collection; +import java.util.Collections; import java.util.Map; import java.util.Set; import java.util.function.Function; @@ -139,11 +142,16 @@ public Meter submit(MeterRequest request) { @Override public void withdraw(MeterRequest request, MeterId meterId) { + withdraw(request, (MeterCellId) meterId); + } + + @Override + public void withdraw(MeterRequest request, MeterCellId meterCellId) { Meter.Builder mBuilder = DefaultMeter.builder() .forDevice(request.deviceId()) .fromApp(request.appId()) .withBands(request.bands()) - .withId(meterId) + .withCellId(meterCellId) .withUnit(request.unit()); if (request.isBurst()) { @@ -158,6 +166,11 @@ public void withdraw(MeterRequest request, MeterId meterId) { @Override public Meter getMeter(DeviceId deviceId, MeterId id) { + return getMeter(deviceId, (MeterCellId) id); + } + + @Override + public Meter getMeter(DeviceId deviceId, MeterCellId id) { MeterKey key = MeterKey.key(deviceId, id); return store.getMeter(networkId(), key); } @@ -168,6 +181,11 @@ public Collection getMeters(DeviceId deviceId) { .filter(m -> m.deviceId().equals(deviceId)).collect(Collectors.toList()); } + @Override + public Collection getMeters(DeviceId deviceId, MeterScope scope) { + return Collections.emptyList(); + } + @Override public Collection getAllMeters() { return store.getAllMeters(networkId()); diff --git a/apps/yang-gui/yang-gui2-lib/BUILD.bazel b/apps/yang-gui/yang-gui2-lib/BUILD.bazel index 2ba37148cb6..38d2e14a069 100644 --- a/apps/yang-gui/yang-gui2-lib/BUILD.bazel +++ b/apps/yang-gui/yang-gui2-lib/BUILD.bazel @@ -14,9 +14,10 @@ limitations under the License. """ +load("@npm//@bazel/typescript:index.bzl", "ts_library") + package(default_visibility = ["//:__subpackages__"]) -load("@npm_angular_bazel//:index.bzl", "ng_module") load("@io_bazel_rules_sass//:defs.bzl", "sass_binary") sass_binary( @@ -39,7 +40,7 @@ sass_binary( src = ":lib/yangdetails/yangdetails.theme.scss", ) -ng_module( +ts_library( name = "yang-gui2-lib", srcs = glob( include = [ @@ -49,18 +50,21 @@ ng_module( "**/*.spec.ts", ], ), - assets = [ + angular_assets = [ ":yangtable-styles", ":yangdetails-styles", ":yangtable-theme", ":yangdetails-theme", + "//web/gui2-fw-lib:extra_css", ] + glob([ "**/*.html", ]), tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/cli/src/main/java/org/onosproject/cli/NodesListCommand.java b/cli/src/main/java/org/onosproject/cli/NodesListCommand.java index ac6a5ec19d9..da769504507 100644 --- a/cli/src/main/java/org/onosproject/cli/NodesListCommand.java +++ b/cli/src/main/java/org/onosproject/cli/NodesListCommand.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import org.apache.karaf.shell.api.action.Command; import org.apache.karaf.shell.api.action.lifecycle.Service; +import org.onlab.packet.IpAddress; import org.onosproject.cluster.ClusterAdminService; import org.onosproject.cluster.ControllerNode; import org.onosproject.core.Version; @@ -70,9 +71,10 @@ private JsonNode json(ClusterAdminService service, List nodes) { for (ControllerNode node : nodes) { ControllerNode.State nodeState = service.getState(node.id()); Version nodeVersion = service.getVersion(node.id()); + IpAddress nodeIp = node.ip(); ObjectNode newNode = mapper.createObjectNode() .put("id", node.id().toString()) - .put("ip", node.ip().toString()) + .put("ip", nodeIp != null ? nodeIp.toString() : node.host()) .put("tcpPort", node.tcpPort()) .put("self", node.equals(self)); if (nodeState != null) { diff --git a/cli/src/main/java/org/onosproject/cli/StorageNodesListCommand.java b/cli/src/main/java/org/onosproject/cli/StorageNodesListCommand.java index 7cbf61930e2..4687139b472 100644 --- a/cli/src/main/java/org/onosproject/cli/StorageNodesListCommand.java +++ b/cli/src/main/java/org/onosproject/cli/StorageNodesListCommand.java @@ -25,6 +25,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import org.apache.karaf.shell.api.action.Command; import org.apache.karaf.shell.api.action.lifecycle.Service; +import org.onlab.packet.IpAddress; import org.onosproject.cluster.ClusterAdminService; import org.onosproject.cluster.Node; @@ -58,9 +59,10 @@ private JsonNode json(List nodes) { ObjectMapper mapper = new ObjectMapper(); ArrayNode result = mapper.createArrayNode(); for (Node node : nodes) { + IpAddress nodeIp = node.ip(); ObjectNode newNode = mapper.createObjectNode() .put("id", node.id().toString()) - .put("ip", node.ip().toString()) + .put("ip", nodeIp != null ? nodeIp.toString() : node.host()) .put("host", node.host()) .put("tcpPort", node.tcpPort()); result.add(newNode); diff --git a/cli/src/main/java/org/onosproject/cli/app/ApplicationCommand.java b/cli/src/main/java/org/onosproject/cli/app/ApplicationCommand.java index 67bd6bad3fe..0571fb2aa4a 100644 --- a/cli/src/main/java/org/onosproject/cli/app/ApplicationCommand.java +++ b/cli/src/main/java/org/onosproject/cli/app/ApplicationCommand.java @@ -21,19 +21,13 @@ import org.apache.karaf.shell.api.action.Completion; import org.apache.karaf.shell.api.action.lifecycle.Service; import org.onosproject.app.ApplicationAdminService; -import org.onosproject.app.ApplicationService; import org.onosproject.cli.AbstractShellCommand; import org.onosproject.core.Application; import org.onosproject.core.ApplicationId; -import org.onosproject.core.VersionService; -import org.osgi.service.component.annotations.Reference; -import org.osgi.service.component.annotations.ReferenceCardinality; import java.io.IOException; import java.net.URL; -import java.util.Iterator; import java.util.List; -import java.util.Set; import java.util.stream.Collectors; /** @@ -49,12 +43,8 @@ public class ApplicationCommand extends AbstractShellCommand { static final String ACTIVATE = "activate"; static final String DEACTIVATE = "deactivate"; static final String DOWNLOAD = "download"; - - @Reference(cardinality = ReferenceCardinality.MANDATORY) - protected VersionService versionService; - @Argument(index = 0, name = "command", - description = "Command name (install|activate|deactivate|uninstall|download|installreg)", + description = "Command name (install|activate|deactivate|uninstall|download)", required = true) @Completion(ApplicationCommandCompleter.class) String command = null; @@ -90,31 +80,11 @@ protected void doExecute() { // Installs the application from input of the specified URL private boolean installApp(ApplicationAdminService service, String url) { - try { if ("-".equals(url)) { service.install(System.in); - } else if (url.contains("oar")) { - service.install(new URL(url).openStream()); } else { - Set app = get(ApplicationService.class) - .getRegisteredApplications(); - if (app.isEmpty()) { - System.out.println("Could Not Install " + url); - return false; - } - Iterator iterator = app.iterator(); - Application recent = null; - while (iterator.hasNext()) { - Application application = iterator.next(); - if (recent == null && application.id().name().equals(url)) { - recent = application; - } else if (application.version().compareTo(recent.version()) > 0 && - application.id().name().equals(url)) { - recent = application; - } - } - service.install(recent.imageUrl().openStream()); + service.install(new URL(url).openStream()); } } catch (IOException e) { error("Unable to get URL: %s", url); diff --git a/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java b/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java index 03409d0f371..5984603b0dc 100644 --- a/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java +++ b/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java @@ -58,20 +58,13 @@ public int complete(Session session, CommandLine commandLine, List candi ApplicationService service = get(ApplicationService.class); Iterator it = service.getApplications().iterator(); SortedSet strings = delegate.getStrings(); - if ("install".equals(cmd)) { - it = service.getRegisteredApplications().iterator(); - while (it.hasNext()) { - strings.add(it.next().id().name()); - } - } else { - while (it.hasNext()) { - Application app = it.next(); - ApplicationState state = service.getState(app.id()); - if ("uninstall".equals(cmd) || "download".equals(cmd) || - ("activate".equals(cmd) && state == INSTALLED) || - ("deactivate".equals(cmd) && state == ACTIVE)) { - strings.add(app.id().name()); - } + while (it.hasNext()) { + Application app = it.next(); + ApplicationState state = service.getState(app.id()); + if ("uninstall".equals(cmd) || "download".equals(cmd) || + ("activate".equals(cmd) && state == INSTALLED) || + ("deactivate".equals(cmd) && state == ACTIVE)) { + strings.add(app.id().name()); } } diff --git a/cli/src/main/java/org/onosproject/cli/app/ApplicationsListCommand.java b/cli/src/main/java/org/onosproject/cli/app/ApplicationsListCommand.java index 806449e954e..0832f8ca7b2 100644 --- a/cli/src/main/java/org/onosproject/cli/app/ApplicationsListCommand.java +++ b/cli/src/main/java/org/onosproject/cli/app/ApplicationsListCommand.java @@ -61,24 +61,16 @@ public class ApplicationsListCommand extends AbstractShellCommand { @Option(name = "-n", aliases = "--name", description = "Sort by application ID name") private boolean sortByName = false; - - @Option(name = "-r", aliases = "--regapps", description = "Get Registered Apps for Runtime Version") - private boolean getRegisteredApps = false; - @Override protected void doExecute() { ApplicationService service = get(ApplicationService.class); - List apps; - if (getRegisteredApps) { - apps = newArrayList(service.getRegisteredApplications()); - } else { - apps = newArrayList(service.getApplications()); - } + List apps = newArrayList(service.getApplications()); if (sortByName) { apps.sort(Comparator.comparing(app -> app.id().name())); } else { Collections.sort(apps, Comparators.APP_COMPARATOR); } + if (outputJson()) { print("%s", json(service, apps)); } else { diff --git a/cli/src/main/java/org/onosproject/cli/net/MeterAddCommand.java b/cli/src/main/java/org/onosproject/cli/net/MeterAddCommand.java index 3e71ad98f30..4ddf91de049 100644 --- a/cli/src/main/java/org/onosproject/cli/net/MeterAddCommand.java +++ b/cli/src/main/java/org/onosproject/cli/net/MeterAddCommand.java @@ -28,6 +28,7 @@ import org.onosproject.net.meter.DefaultMeterRequest; import org.onosproject.net.meter.Meter; import org.onosproject.net.meter.MeterRequest; +import org.onosproject.net.meter.MeterScope; import org.onosproject.net.meter.MeterService; import static com.google.common.base.Strings.isNullOrEmpty; @@ -45,9 +46,8 @@ public class MeterAddCommand extends AbstractShellCommand { private Meter.Unit unit; private Set bands = new HashSet<>(); - private Long rate; - private Long burstSize; - + private MeterScope scope; + private Long index; @Option(name = "-bd", aliases = "--bandDrop", description = "Assign band DROP to this meter", @@ -59,6 +59,16 @@ public class MeterAddCommand extends AbstractShellCommand { required = false, multiValued = false) private boolean hasBandRemark = false; + @Option(name = "-by", aliases = "--bandYel", + description = "Assign band MARK_YELLOW to this meter", + required = false, multiValued = false) + private boolean hasBandYel = false; + + @Option(name = "-bre", aliases = "--bandRed", + description = "Assign band MARK_RED to this meter", + required = false, multiValued = false) + private boolean hasBandRed = false; + @Option(name = "-up", aliases = "--unitPkts", description = "Assign unit Packets per Second to this meter", required = false, multiValued = false) @@ -69,18 +79,31 @@ public class MeterAddCommand extends AbstractShellCommand { required = false, multiValued = false) private boolean hasKbps = false; + @Option(name = "-ub", aliases = "--unitBytes", + description = "Assign unit Bytes per Second to this meter", + required = false, multiValued = false) + private boolean hasBytes = false; + @Option(name = "-ib", aliases = "--isBurst", description = "Set meter applicable only to burst", required = false, multiValued = false) private boolean isBurst = false; @Option(name = "-b", aliases = "--bandwidth", description = "Bandwidth", - required = false, multiValued = false) - private String bandwidthString = null; + required = false, multiValued = true) + private String[] bandwidthString = null; @Option(name = "-bs", aliases = "--burstSize", description = "Burst size", + required = false, multiValued = true) + private String[] burstSizeString = null; + + @Option(name = "-sc", aliases = "--scope", description = "Scope", required = false, multiValued = false) - private String burstSizeString = null; + private String scopeString = null; + + @Option(name = "-id", aliases = "--index", description = "Index", + required = false, multiValued = false) + private String indexString = null; @Argument(index = 0, name = "uri", description = "Device ID", required = true, multiValued = false) @@ -93,53 +116,110 @@ private void checkOptions() { // check units if (hasPkts) { unit = Meter.Unit.PKTS_PER_SEC; - } else { + } else if (hasKbps) { unit = Meter.Unit.KB_PER_SEC; + } else if (hasBytes) { + unit = Meter.Unit.BYTES_PER_SEC; } - // check rate (does not take into account if it is kbps or pkts) - if (!isNullOrEmpty(bandwidthString)) { - rate = Long.parseLong(bandwidthString); - } else { - rate = 500L; + int numBands = 0; + if (hasBandDrop) { + numBands++; + } + if (hasBandRemark) { + numBands++; + } + if (hasBandYel) { + numBands++; + } + if (hasBandRed) { + numBands++; } - // burst size - if (!isNullOrEmpty(burstSizeString)) { - burstSize = Long.parseLong(burstSizeString); - } else { - burstSize = 0L; + long[] rates = new long[numBands]; + long[] bursts = new long[numBands]; + // check rate (does not take into account if it is kbps or pkts) + if (bandwidthString != null && bandwidthString.length == numBands && + burstSizeString != null && burstSizeString.length == numBands) { + for (int i = 0; i < bandwidthString.length; i++) { + rates[i] = 500L; + bursts[i] = 0L; + if (!isNullOrEmpty(bandwidthString[i])) { + rates[i] = Long.parseLong(bandwidthString[i]); + } + if (!isNullOrEmpty(burstSizeString[i])) { + bursts[i] = Long.parseLong(burstSizeString[i]); + } + } + } else if (bandwidthString != null && bandwidthString.length < numBands && + burstSizeString != null && burstSizeString.length < numBands) { + for (int i = 0; i < numBands; i++) { + rates[i] = 500L; + bursts[i] = 0L; + if (i < bandwidthString.length && !isNullOrEmpty(bandwidthString[i])) { + rates[i] = Long.parseLong(bandwidthString[i]); + } + if (i < burstSizeString.length && !isNullOrEmpty(burstSizeString[i])) { + bursts[i] = Long.parseLong(burstSizeString[i]); + } + } } // Create bands + int i = 0; if (hasBandDrop) { Band band = DefaultBand.builder() .ofType(Band.Type.DROP) - .withRate(rate) - .burstSize(burstSize) + .withRate(rates[i]) + .burstSize(bursts[i]) .build(); bands.add(band); + i++; } if (hasBandRemark) { Band band = DefaultBand.builder() .ofType(Band.Type.REMARK) - .withRate(rate) - .burstSize(burstSize) + .withRate(rates[i]) + .burstSize(bursts[i]) .build(); bands.add(band); + i++; } + if (hasBandYel) { + Band band = DefaultBand.builder() + .ofType(Band.Type.MARK_YELLOW) + .withRate(rates[i]) + .burstSize(bursts[i]) + .build(); + bands.add(band); + i++; + } + if (hasBandRed) { + Band band = DefaultBand.builder() + .ofType(Band.Type.MARK_RED) + .withRate(rates[i]) + .burstSize(bursts[i]) + .build(); + bands.add(band); + } + // default band is drop if (bands.size() == 0) { Band band = DefaultBand.builder() .ofType(Band.Type.DROP) - .withRate(rate) - .burstSize(burstSize) + .withRate(500L) + .burstSize(0L) .build(); bands.add(band); } + if (!isNullOrEmpty(scopeString)) { + scope = MeterScope.of(scopeString); + } - + if (!isNullOrEmpty(indexString) && scope != null) { + index = Long.parseLong(indexString); + } } @Override @@ -151,22 +231,32 @@ protected void doExecute() { checkOptions(); - MeterRequest.Builder builder = DefaultMeterRequest.builder() .forDevice(deviceId) .fromApp(coreService.registerApplication(appId)) .withUnit(unit) .withBands(bands); - if (isBurst) { builder = builder.burst(); } + // Scope is by default global but we can still provide the index + // otherwise we can specify both scope and index or let the meter + // service allocate the meter for us. User defined index requires + // the user defined mode being active. + if (scope != null) { + builder = builder.withScope(scope); + } + + if (index != null) { + builder = builder.withIndex(index); + } + MeterRequest request = builder.add(); Meter m = service.submit(request); - log.info("Requested meter with id {}: {}", m.id().toString(), m.toString()); - print("Requested meter with id %s: %s", m.id().toString(), m.toString()); + log.info("Requested meter with cellId {}: {}", m.meterCellId().toString(), m.toString()); + print("Requested meter with cellId %s: %s", m.meterCellId().toString(), m.toString()); } } diff --git a/cli/src/main/java/org/onosproject/cli/net/MeterRemoveCommand.java b/cli/src/main/java/org/onosproject/cli/net/MeterRemoveCommand.java index 6c3f1bb597a..941c910dcb2 100644 --- a/cli/src/main/java/org/onosproject/cli/net/MeterRemoveCommand.java +++ b/cli/src/main/java/org/onosproject/cli/net/MeterRemoveCommand.java @@ -18,19 +18,21 @@ import org.apache.karaf.shell.api.action.Argument; import org.apache.karaf.shell.api.action.Command; import org.apache.karaf.shell.api.action.Completion; +import org.apache.karaf.shell.api.action.Option; import org.apache.karaf.shell.api.action.lifecycle.Service; import org.onosproject.cli.AbstractShellCommand; import org.onosproject.core.CoreService; import org.onosproject.net.DeviceId; -import org.onosproject.net.meter.Band; -import org.onosproject.net.meter.DefaultBand; import org.onosproject.net.meter.DefaultMeterRequest; -import org.onosproject.net.meter.Meter; +import org.onosproject.net.meter.MeterCellId; import org.onosproject.net.meter.MeterId; import org.onosproject.net.meter.MeterRequest; +import org.onosproject.net.meter.MeterScope; import org.onosproject.net.meter.MeterService; +import org.onosproject.net.pi.model.PiMeterId; +import org.onosproject.net.pi.runtime.PiMeterCellId; -import java.util.Collections; +import static com.google.common.base.Strings.isNullOrEmpty; /** * Remove existing meter from device. @@ -45,9 +47,13 @@ public class MeterRemoveCommand extends AbstractShellCommand { @Completion(DeviceIdCompleter.class) private String uri = null; - @Argument(index = 1, name = "meterId", description = "Meter ID hexadecimal value", + @Argument(index = 1, name = "index", description = "Index", required = true, multiValued = false) - private String meterIdstr = null; + private String indexString = null; + + @Option(name = "-sc", aliases = "--scope", description = "Scope", + required = false, multiValued = false) + private String scopeString = null; private final String appId = "org.onosproject.cli.meterCmd"; @@ -57,19 +63,27 @@ protected void doExecute() { CoreService coreService = get(CoreService.class); DeviceId deviceId = DeviceId.deviceId(uri); - MeterId meterId = MeterId.meterId(Long.parseLong(meterIdstr, 16)); - Band b = new DefaultBand(Band.Type.DROP, 0L, 0L, (short) 0); + MeterScope scope = MeterScope.globalScope(); + if (!isNullOrEmpty(scopeString)) { + scope = MeterScope.of(scopeString); + } + + MeterCellId meterCellId; + long index = Long.parseLong(indexString); + if (scope.equals(MeterScope.globalScope())) { + meterCellId = MeterId.meterId(index); + } else { + meterCellId = PiMeterCellId.ofIndirect(PiMeterId.of(scope.id()), index); + } MeterRequest.Builder builder = DefaultMeterRequest.builder() .forDevice(deviceId) - .withBands(Collections.singleton(b)) - .withUnit(Meter.Unit.PKTS_PER_SEC) .fromApp(coreService.registerApplication(appId)); MeterRequest meterRequest = builder.remove(); - service.withdraw(meterRequest, meterId); - log.info("Requested meter removal: {}", meterRequest.toString()); + service.withdraw(builder.remove(), meterCellId); - print("Requested meter removal: %s", meterRequest.toString()); + log.info("Requested meter {} removal: {}", meterCellId.toString(), meterRequest.toString()); + print("Requested meter %s removal: %s", meterCellId.toString(), meterRequest.toString()); } } diff --git a/cli/src/main/java/org/onosproject/cli/net/MetersListCommand.java b/cli/src/main/java/org/onosproject/cli/net/MetersListCommand.java index 4fe3590815b..c5e7fbf9833 100644 --- a/cli/src/main/java/org/onosproject/cli/net/MetersListCommand.java +++ b/cli/src/main/java/org/onosproject/cli/net/MetersListCommand.java @@ -15,16 +15,20 @@ */ package org.onosproject.cli.net; -import com.google.common.collect.Collections2; import org.apache.karaf.shell.api.action.Argument; import org.apache.karaf.shell.api.action.Command; import org.apache.karaf.shell.api.action.Completion; +import org.apache.karaf.shell.api.action.Option; import org.apache.karaf.shell.api.action.lifecycle.Service; import org.onosproject.cli.AbstractShellCommand; import org.onosproject.net.DeviceId; import org.onosproject.net.meter.Meter; +import org.onosproject.net.meter.MeterCellId; import org.onosproject.net.meter.MeterId; +import org.onosproject.net.meter.MeterScope; import org.onosproject.net.meter.MeterService; +import org.onosproject.net.pi.model.PiMeterId; +import org.onosproject.net.pi.runtime.PiMeterCellId; import java.util.Collection; @@ -43,35 +47,60 @@ public class MetersListCommand extends AbstractShellCommand { @Completion(DeviceIdCompleter.class) String uri = null; - @Argument(index = 1, name = "meter", description = "Meter ID", + @Argument(index = 1, name = "index", description = "Index", required = false, multiValued = false) - String meterstr = null; + private String indexString = null; - MeterId meterId = null; + @Option(name = "-sc", aliases = "--scope", description = "Scope", + required = false, multiValued = false) + private String scopeString = null; + + MeterScope meterScope; + Long index; + MeterCellId meterCellId; @Override protected void doExecute() { - if (!isNullOrEmpty(meterstr)) { - meterId = MeterId.meterId(Long.parseLong(meterstr)); + if (!isNullOrEmpty(scopeString)) { + meterScope = MeterScope.of(scopeString); } - MeterService service = get(MeterService.class); + if (!isNullOrEmpty(indexString)) { + index = Long.parseLong(indexString); + if (meterScope == null) { + meterScope = MeterScope.globalScope(); + } + } - if (meterId != null && uri != null) { - Meter m = service.getMeter(DeviceId.deviceId(uri), meterId); - if (m != null) { - print("%s", m); - } else { - error("Meter %s not found for device %s", meterId, uri); + if (index != null) { + if (meterScope != null && meterScope.equals(MeterScope.globalScope())) { + meterCellId = MeterId.meterId(index); + } else if (meterScope != null) { + meterCellId = PiMeterCellId.ofIndirect(PiMeterId.of(meterScope.id()), index); } + } + + MeterService service = get(MeterService.class); + + Collection meters; + if (isNullOrEmpty(uri)) { + meters = service.getAllMeters(); + printMeters(meters); } else { - Collection meters = service.getAllMeters(); - if (uri == null) { + if (meterCellId != null) { + Meter m = service.getMeter(DeviceId.deviceId(uri), meterCellId); + if (m != null) { + print("%s", m); + } else { + error("Meter %s not found for device %s", meterCellId, uri); + } + } else if (meterScope != null) { + meters = service.getMeters(DeviceId.deviceId(uri), meterScope); printMeters(meters); } else { - printMeters(Collections2.filter(meters, - m -> m.deviceId().equals(DeviceId.deviceId(uri)))); + meters = service.getMeters(DeviceId.deviceId(uri)); + printMeters(meters); } } } diff --git a/cli/src/main/java/org/onosproject/cli/net/PartitionsSnapshotCommand.java b/cli/src/main/java/org/onosproject/cli/net/PartitionsSnapshotCommand.java new file mode 100644 index 00000000000..02ecab376f8 --- /dev/null +++ b/cli/src/main/java/org/onosproject/cli/net/PartitionsSnapshotCommand.java @@ -0,0 +1,47 @@ +/* + * Copyright 2015-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onosproject.cli.net; + +import org.apache.karaf.shell.api.action.Command; +import org.apache.karaf.shell.api.action.Option; +import org.apache.karaf.shell.api.action.lifecycle.Service; +import org.onosproject.cli.AbstractShellCommand; +import org.onosproject.cluster.PartitionId; +import org.onosproject.store.primitives.PartitionAdminService; + +/** + * Command to force a snapshot of the partitions. + */ +@Service +@Command(scope = "onos", name = "snapshot-partitions", + description = "Force snapshot partitions") +public class PartitionsSnapshotCommand extends AbstractShellCommand { + + @Option(name = "-p", aliases = "--partition", + description = "The partition to snapshot", + required = false, multiValued = false) + private Integer partitionId; + + @Override + protected void doExecute() { + PartitionAdminService partitionAdminService = get(PartitionAdminService.class); + if (partitionId != null) { + partitionAdminService.snapshot(PartitionId.from(partitionId)); + } else { + partitionAdminService.snapshot(); + } + } +} diff --git a/core/api/src/main/java/org/onosproject/app/ApplicationService.java b/core/api/src/main/java/org/onosproject/app/ApplicationService.java index 0f2d155add4..aa6b8e6ca68 100644 --- a/core/api/src/main/java/org/onosproject/app/ApplicationService.java +++ b/core/api/src/main/java/org/onosproject/app/ApplicationService.java @@ -91,7 +91,10 @@ default InputStream getApplicationArchive(ApplicationId appId) { * Returns the set of all installed applications. * * @return set of apps putside the build/core environment + * + * @deprecated since onos-2.5 */ + @Deprecated default Set getRegisteredApplications() { return ImmutableSet.of(); } diff --git a/core/api/src/main/java/org/onosproject/cluster/ClusterEvent.java b/core/api/src/main/java/org/onosproject/cluster/ClusterEvent.java index 6d905b2a44d..d4ec6785b27 100644 --- a/core/api/src/main/java/org/onosproject/cluster/ClusterEvent.java +++ b/core/api/src/main/java/org/onosproject/cluster/ClusterEvent.java @@ -55,6 +55,25 @@ public enum Type { INSTANCE_DEACTIVATED } + public enum InstanceType { + /** + * Signifies that the event refers to an ONOS instance. + */ + ONOS, + + /** + * Signifies that the event refers to an Atomix instance. + */ + STORAGE, + + /** + * Signifies that the event refers to an Unknown instance. + */ + UNKNOWN + } + + private final InstanceType instanceType; + /** * Creates an event of a given type and for the specified instance and the * current time. @@ -63,7 +82,7 @@ public enum Type { * @param instance cluster device subject */ public ClusterEvent(Type type, ControllerNode instance) { - super(type, instance); + this(type, instance, InstanceType.UNKNOWN); } /** @@ -74,13 +93,47 @@ public ClusterEvent(Type type, ControllerNode instance) { * @param time occurrence time */ public ClusterEvent(Type type, ControllerNode instance, long time) { + this(type, instance, time, InstanceType.UNKNOWN); + } + + /** + * Creates an event of a given type and for the specified instance and the + * current time. + * + * @param type cluster event type + * @param instance cluster device subject + * @param instanceType instance type + */ + public ClusterEvent(Type type, ControllerNode instance, InstanceType instanceType) { + super(type, instance); + this.instanceType = instanceType; + } + + /** + * Creates an event of a given type and for the specified device and time. + * + * @param type device event type + * @param instance event device subject + * @param time occurrence time + * @param instanceType instance type + */ + public ClusterEvent(Type type, ControllerNode instance, long time, InstanceType instanceType) { super(type, instance, time); + this.instanceType = instanceType; } + /** + * Returns the instance type subject. + * + * @return instance type subject or UNKNOWN if the event is not instance type specific. + */ + public InstanceType instanceType() { + return instanceType; + } @Override public int hashCode() { - return Objects.hash(type(), subject(), time()); + return Objects.hash(type(), subject(), time(), instanceType()); } @Override @@ -92,7 +145,8 @@ public boolean equals(Object obj) { final ClusterEvent other = (ClusterEvent) obj; return Objects.equals(this.type(), other.type()) && Objects.equals(this.subject(), other.subject()) && - Objects.equals(this.time(), other.time()); + Objects.equals(this.time(), other.time()) && + Objects.equals(this.instanceType(), other.instanceType()); } return false; } @@ -103,6 +157,7 @@ public String toString() { .add("type", type()) .add("subject", subject()) .add("time", time()) + .add("instanceType", instanceType()) .toString(); } diff --git a/core/api/src/main/java/org/onosproject/cluster/LeadershipAdminService.java b/core/api/src/main/java/org/onosproject/cluster/LeadershipAdminService.java index fe9868a043f..bac18ad9aff 100644 --- a/core/api/src/main/java/org/onosproject/cluster/LeadershipAdminService.java +++ b/core/api/src/main/java/org/onosproject/cluster/LeadershipAdminService.java @@ -54,4 +54,15 @@ public interface LeadershipAdminService { * @return mapping from topic to leadership info. */ Map getLeaderBoard(); + + /** + * Attempts to demote a node to the bottom of the candidate list. It is not allowed + * to demote the current leader + * + * @param topic leadership topic + * @param nodeId identifier of node to be demoted + * @return {@code true} if nodeId is now the bottom candidate. This method returns {@code false} + * if {@code nodeId} is not one of the candidates for the topic or if it is the leader. + */ + boolean demote(String topic, NodeId nodeId); } diff --git a/core/api/src/main/java/org/onosproject/cluster/LeadershipStore.java b/core/api/src/main/java/org/onosproject/cluster/LeadershipStore.java index 0953e3898b8..ebc6b4cb88b 100644 --- a/core/api/src/main/java/org/onosproject/cluster/LeadershipStore.java +++ b/core/api/src/main/java/org/onosproject/cluster/LeadershipStore.java @@ -16,6 +16,7 @@ package org.onosproject.cluster; import java.util.Map; + import org.onosproject.store.Store; /** @@ -79,4 +80,15 @@ public interface LeadershipStore extends Store getLeaderships(); + + /** + * Attempts to demote a node to the bottom of the candidate list. It is not allowed + * to demote the current leader + * + * @param topic leadership topic + * @param nodeId identifier of node to be demoted + * @return {@code true} if nodeId is now the bottom candidate. This method returns {@code false} + * if {@code nodeId} is not one of the candidates for the topic or if it is the leader. + */ + boolean demote(String topic, NodeId nodeId); } \ No newline at end of file diff --git a/core/api/src/main/java/org/onosproject/mastership/MastershipAdminService.java b/core/api/src/main/java/org/onosproject/mastership/MastershipAdminService.java index 8e0679bb0a7..9af5e2f2837 100644 --- a/core/api/src/main/java/org/onosproject/mastership/MastershipAdminService.java +++ b/core/api/src/main/java/org/onosproject/mastership/MastershipAdminService.java @@ -58,4 +58,13 @@ default void setRoleSync(NodeId instance, DeviceId deviceId, MastershipRole role */ void balanceRoles(); + /** + * Attempts to demote a node to the bottom of the backup list. It is not allowed + * to demote the current master + * + * @param instance controller instance identifier + * @param deviceId device identifier + */ + void demote(NodeId instance, DeviceId deviceId); + } diff --git a/core/api/src/main/java/org/onosproject/mastership/MastershipStore.java b/core/api/src/main/java/org/onosproject/mastership/MastershipStore.java index 7f43a15e971..6a9fbf8b9a8 100644 --- a/core/api/src/main/java/org/onosproject/mastership/MastershipStore.java +++ b/core/api/src/main/java/org/onosproject/mastership/MastershipStore.java @@ -129,4 +129,13 @@ public interface MastershipStore extends Store 0) { + id = string.substring(0, nameIdx - 1); + cp = string.substring(nameIdx); + } else if (nameIdx < 0) { + id = string.substring(0, idx); + cp = string.substring(idx + 1); + } checkArgument(!cp.isEmpty(), SEP_NO_VALUE); return new ConnectPoint(DeviceId.deviceId(id), PortNumber.fromString(cp)); diff --git a/core/api/src/main/java/org/onosproject/net/PipelineTraceableHitChain.java b/core/api/src/main/java/org/onosproject/net/PipelineTraceableHitChain.java index 4eb26b56063..6e5f566f867 100644 --- a/core/api/src/main/java/org/onosproject/net/PipelineTraceableHitChain.java +++ b/core/api/src/main/java/org/onosproject/net/PipelineTraceableHitChain.java @@ -17,7 +17,6 @@ package org.onosproject.net; import com.google.common.collect.Lists; -import org.onosproject.net.flow.TrafficSelector; import java.util.List; import java.util.Objects; @@ -25,11 +24,11 @@ /** * Class to represent the pipeline hit chain and the result of the pipeline processing. */ -public class PipelineTraceableHitChain { +public final class PipelineTraceableHitChain { private ConnectPoint outputPort; private List hitChain; - private TrafficSelector egressPacket; + private PipelineTraceablePacket egressPacket; // By default packets are dropped private boolean dropped = true; @@ -42,10 +41,10 @@ private PipelineTraceableHitChain() { * * @param output the output connect point * @param hits the hits in the pipeline (flows, groups and other abstractions) - * @param packet the selector representing the final packet + * @param packet the traceable packet representing the final packet */ public PipelineTraceableHitChain(ConnectPoint output, List hits, - TrafficSelector packet) { + PipelineTraceablePacket packet) { this.outputPort = output; this.hitChain = hits; this.egressPacket = packet; @@ -65,7 +64,7 @@ public static PipelineTraceableHitChain emptyHitChain() { * * @return the connect point */ - public ConnectPoint getOutputPort() { + public ConnectPoint outputPort() { return outputPort; } @@ -83,7 +82,7 @@ public void setOutputPort(ConnectPoint outputPort) { * * @return flows and groups that matched. */ - public List getHitChain() { + public List hitChain() { return hitChain; } @@ -113,9 +112,9 @@ public void removeDataPlaneEntity(DataPlaneEntity dataPlaneEntity) { /** * Returns the egress packet after traversing the pipeline. * - * @return the selector representing the packet infos + * @return the traceable packet representing the packet infos */ - public TrafficSelector getEgressPacket() { + public PipelineTraceablePacket egressPacket() { return egressPacket; } @@ -124,7 +123,7 @@ public TrafficSelector getEgressPacket() { * * @param egressPacket the egress packet */ - public void setEgressPacket(TrafficSelector egressPacket) { + public void setEgressPacket(PipelineTraceablePacket egressPacket) { this.egressPacket = egressPacket; } @@ -164,7 +163,7 @@ public boolean equals(Object obj) { if (obj instanceof PipelineTraceableHitChain) { PipelineTraceableHitChain that = (PipelineTraceableHitChain) obj; return Objects.equals(this.outputPort, that.outputPort) && - Objects.equals(this.hitChain, that.getHitChain()) && + Objects.equals(this.hitChain, that.hitChain) && Objects.equals(this.egressPacket, that.egressPacket) && Objects.equals(this.dropped, that.dropped); } diff --git a/core/api/src/main/java/org/onosproject/net/PipelineTraceableInput.java b/core/api/src/main/java/org/onosproject/net/PipelineTraceableInput.java index 2403c5ee88a..8df5d95c467 100644 --- a/core/api/src/main/java/org/onosproject/net/PipelineTraceableInput.java +++ b/core/api/src/main/java/org/onosproject/net/PipelineTraceableInput.java @@ -20,7 +20,6 @@ import com.google.common.collect.Maps; import org.onosproject.core.GroupId; import org.onosproject.net.flow.FlowEntry; -import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.group.Group; import java.util.List; @@ -29,20 +28,29 @@ /** * Represents the input of the pipeline traceable processing. */ -public class PipelineTraceableInput { +public final class PipelineTraceableInput { // Input state for the traceable behavior - TrafficSelector ingressPacket; - ConnectPoint ingressPort; + private PipelineTraceablePacket ingressPacket; + private ConnectPoint ingressPort; // List here all possible device state using // possibly an optimized reference - List flows = Lists.newArrayList(); - Map groups = Maps.newHashMap(); + private List flows = Lists.newArrayList(); + private Map groups = Maps.newHashMap(); + private List deviceState; - public PipelineTraceableInput(TrafficSelector ingressPacket, ConnectPoint ingressPort, + /** + * Builds a pipeline traceable input. + * + * @param ingressPacket the input packet + * @param ingressPort the input port + * @param deviceState the device state + */ + public PipelineTraceableInput(PipelineTraceablePacket ingressPacket, ConnectPoint ingressPort, List deviceState) { this.ingressPacket = ingressPacket; this.ingressPort = ingressPort; + this.deviceState = deviceState; processDeviceState(deviceState); } @@ -62,7 +70,7 @@ private void processDeviceState(List deviceState) { * * @return the ingress packet */ - public TrafficSelector ingressPacket() { + public PipelineTraceablePacket ingressPacket() { return ingressPacket; } @@ -75,6 +83,15 @@ public ConnectPoint ingressPort() { return ingressPort; } + /** + * Getter for the device state. + * + * @return the device state + */ + public List deviceState() { + return deviceState; + } + /** * Getter for the flows. * @@ -99,7 +116,7 @@ public Map groups() { * @param groupId the group id * @return the group, otherwise null. */ - public Group getGroup(GroupId groupId) { + public Group groupById(GroupId groupId) { return groups.get(groupId); } diff --git a/core/api/src/main/java/org/onosproject/net/PipelineTraceableMetadata.java b/core/api/src/main/java/org/onosproject/net/PipelineTraceableMetadata.java new file mode 100644 index 00000000000..2c92afcf78c --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/PipelineTraceableMetadata.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net; + +/** + * Stores traceable processing metadata. + */ +public interface PipelineTraceableMetadata { + +} diff --git a/core/api/src/main/java/org/onosproject/net/PipelineTraceableOutput.java b/core/api/src/main/java/org/onosproject/net/PipelineTraceableOutput.java index 21a98194dd1..66a18c098f7 100644 --- a/core/api/src/main/java/org/onosproject/net/PipelineTraceableOutput.java +++ b/core/api/src/main/java/org/onosproject/net/PipelineTraceableOutput.java @@ -74,7 +74,7 @@ private PipelineTraceableOutput(String log, List hitC * * @return the log message */ - public String getLog() { + public String log() { return log; } @@ -83,7 +83,7 @@ public String getLog() { * * @return the pipeline hit chains */ - public List getHitChains() { + public List hitChains() { return hitChains; } @@ -92,7 +92,7 @@ public List getHitChains() { * * @return the pipeline traceable result */ - public PipelineTraceableResult getResult() { + public PipelineTraceableResult result() { return result; } @@ -105,6 +105,16 @@ public static PipelineTraceableOutput.Builder builder() { return new PipelineTraceableOutput.Builder(); } + /** + * Returns a new builder initialized with the traceable output. + * + * @param pipelineTraceableOutput the output used for the initialization + * @return an initialized builder + */ + public static PipelineTraceableOutput.Builder builder(PipelineTraceableOutput pipelineTraceableOutput) { + return new PipelineTraceableOutput.Builder(pipelineTraceableOutput); + } + /** * Builder of pipeline traceable entities. */ @@ -114,6 +124,15 @@ public static final class Builder { private List hitChains = Lists.newArrayList(); private PipelineTraceableResult result = PipelineTraceableResult.SUCCESS; + private Builder() { + } + + private Builder(PipelineTraceableOutput traceableOutput) { + appendToLog("\n" + traceableOutput.log()); + setResult(traceableOutput.result()); + traceableOutput.hitChains().forEach(this::addHitChain); + } + /** * Appends a message to the log. * @@ -128,7 +147,7 @@ public Builder appendToLog(String message) { return this; } - private Builder setResult(PipelineTraceableResult result) { + public Builder setResult(PipelineTraceableResult result) { // Do not override original failure if (this.result == PipelineTraceableResult.SUCCESS) { this.result = result; diff --git a/core/api/src/main/java/org/onosproject/net/PipelineTraceablePacket.java b/core/api/src/main/java/org/onosproject/net/PipelineTraceablePacket.java new file mode 100644 index 00000000000..ffa2063b735 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/PipelineTraceablePacket.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net; + +import org.onosproject.net.flow.TrafficSelector; + +import java.util.Objects; + +/** + * Represents a traceable packet composed by a traffic selector and metadata. + */ +public final class PipelineTraceablePacket { + + // stores metadata associated with the packet + private PipelineTraceableMetadata metadata; + // representation of the packet + private TrafficSelector packet; + + /** + * Builds a traceable packet without metadata. + * Note this can be used for legacy device like ofdpa. + * + * @param packet the packet selector + */ + public PipelineTraceablePacket(TrafficSelector packet) { + this.packet = packet; + } + + /** + * Builds a traceable packet with metadata. + * @param packet the packet selector + * @param metadata the packet metadata + */ + public PipelineTraceablePacket(TrafficSelector packet, PipelineTraceableMetadata metadata) { + this.packet = packet; + this.metadata = metadata; + } + + /** + * Getter for the metadata. + * + * @return the packet metadata + */ + public PipelineTraceableMetadata metadata() { + return metadata; + } + + /** + * Getter for the packet selector. + * + * @return the packet selector + */ + public TrafficSelector packet() { + return packet; + } + + @Override + public int hashCode() { + return Objects.hash(metadata, packet); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj instanceof PipelineTraceablePacket) { + PipelineTraceablePacket that = (PipelineTraceablePacket) obj; + return Objects.equals(this.metadata, that.metadata) && + Objects.equals(this.packet, that.packet); + } + return false; + } + + @Override + public String toString() { + return "PipelineTraceablePacket{" + + "metadata=" + metadata + + ", packet=" + packet + + '}'; + } +} diff --git a/core/api/src/main/java/org/onosproject/net/PortNumber.java b/core/api/src/main/java/org/onosproject/net/PortNumber.java index 9d1d7b78295..54c35fb6008 100644 --- a/core/api/src/main/java/org/onosproject/net/PortNumber.java +++ b/core/api/src/main/java/org/onosproject/net/PortNumber.java @@ -227,6 +227,15 @@ public boolean hasName() { } private String decodeLogicalPort() { + Logical logical = LOGICAL.get().get(number); + if (logical != null) { + // enum name + return logical.toString(); + } + return String.format("%s", UnsignedLongs.toString(number)); + } + + private String decodeLogicalPortExtended() { Logical logical = LOGICAL.get().get(number); if (logical != null) { // enum name @@ -250,7 +259,7 @@ private static boolean isAsciiDecimal(char c) { @Override public String toString() { if (isLogical()) { - return decodeLogicalPort(); + return decodeLogicalPortExtended(); } else if (hasName()) { // named port if (number == NO_DISPLAY_NUMBER) { @@ -264,11 +273,27 @@ public String toString() { } } + // toString method that does not use the name. + // if it is a logical port will use either the enum or the number + // else if it has a name returns just the number + // else it does not have a name, it returns the number because name == number + public String toStringWithoutName() { + if (isLogical()) { + return decodeLogicalPort(); + } + // Either named port or port without name + return UnsignedLongs.toString(number); + } + @Override public int hashCode() { return Long.hashCode(number); } + public int hashCodeExtended() { + return Objects.hashCode(number, hasName() ? name : 0); + } + @Override public boolean equals(Object obj) { if (this == obj) { diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java b/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java index 6f497e736e2..bd4af6cf685 100644 --- a/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java +++ b/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java @@ -17,6 +17,7 @@ import java.util.List; +import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; import org.onosproject.net.driver.HandlerBehaviour; import org.onosproject.net.flowobjective.FilteringObjective; @@ -67,6 +68,13 @@ public interface Pipeliner extends HandlerBehaviour { */ void next(NextObjective nextObjective); + /** + * Purges all objectives for the given application. + * + * @param appId application identifier + */ + void purgeAll(ApplicationId appId); + /** * Retrieves a mapping of the nextObjective to the groups in the dataplane, * and returns it in a form that can be displayed on the CLI. Typically diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntObjective.java b/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntObjective.java index 4d94e626170..41d927fabbd 100644 --- a/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntObjective.java +++ b/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntObjective.java @@ -23,8 +23,6 @@ import java.util.HashSet; import java.util.Set; -import static com.google.common.base.Preconditions.checkArgument; - /** * Represents a device-level objective to collect INT metadata for packets * identified by a traffic selector. @@ -129,8 +127,6 @@ public IntObjective.Builder withMetadataTypes(Set metadataTypes * @return an IntObjective */ public IntObjective build() { - checkArgument(!selector.criteria().isEmpty(), "Empty selector cannot match any flow."); - return new IntObjective(selector, metadataTypes); } } diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntReportConfig.java b/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntReportConfig.java index 95756074a40..158a992de08 100644 --- a/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntReportConfig.java +++ b/core/api/src/main/java/org/onosproject/net/behaviour/inbandtelemetry/IntReportConfig.java @@ -15,14 +15,20 @@ */ package org.onosproject.net.behaviour.inbandtelemetry; +import com.fasterxml.jackson.databind.node.ArrayNode; import com.google.common.annotations.Beta; +import com.google.common.collect.Sets; import org.onlab.packet.IpAddress; +import org.onlab.packet.IpPrefix; import org.onlab.packet.MacAddress; import org.onlab.packet.TpPort; import org.onosproject.core.ApplicationId; import org.onosproject.net.config.Config; import org.onosproject.ui.JsonUtils; +import java.util.Collections; +import java.util.Set; + /** * Application level configuration of the INT process. * Config example: @@ -32,7 +38,11 @@ * "report": { * "collectorIp": "192.168.0.1", * "collectorPort": 5500, - * "minFlowHopLatencyChangeNs": 300 + * "minFlowHopLatencyChangeNs": 300, + * "watchSubnets": [ + * "192.168.0.0/24", + * "10.140.0.0/16" + * ] * } * } * } @@ -46,6 +56,7 @@ public final class IntReportConfig extends Config { private static final String COLLECTOR_NEXT_HOP_MAC = "collectorNextHopMac"; private static final String SINK_IP = "sinkIp"; private static final String SINK_MAC = "sinkMac"; + private static final String WATCH_SUBNETS = "watchSubnets"; /** * IP address of the collector. @@ -145,6 +156,24 @@ public MacAddress sinkMac() { } } + /** + * Gets subnets to be watched. + * + * @return subnets to be watched + */ + public Set watchSubnets() { + if (object.hasNonNull(WATCH_SUBNETS) && object.path(WATCH_SUBNETS).isArray()) { + Set subnets = Sets.newHashSet(); + ArrayNode subnetArray = (ArrayNode) object.path(WATCH_SUBNETS); + subnetArray.forEach(subnetNode -> { + subnets.add(IpPrefix.valueOf(subnetNode.asText())); + }); + return subnets; + } else { + return Collections.EMPTY_SET; + } + } + /** * Sets the collector IP to the config. * @@ -205,4 +234,14 @@ public IntReportConfig setSinkIp(IpAddress sinkIp) { public IntReportConfig setSinkMac(MacAddress sinkMac) { return (IntReportConfig) setOrClear(SINK_MAC, sinkMac.toString()); } + + /** + * Sets subnets to be watched. + * + * @param subnets subnets to be watched. + * @return the config + */ + public IntReportConfig setWatchSubnets(Set subnets) { + return (IntReportConfig) setOrClear(WATCH_SUBNETS, subnets); + } } diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfApplication.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfApplication.java new file mode 100644 index 00000000000..fed1eb97810 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfApplication.java @@ -0,0 +1,270 @@ +/* + * Copyright 2022-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; +import com.google.common.collect.Range; +import org.onlab.packet.Ip4Prefix; + +import java.util.Objects; +import java.util.Optional; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + +/** + * A structure representing the application filtering for the UPF-programmable device. + */ +@Beta +public final class UpfApplication implements UpfEntity { + // Match Keys + private final Ip4Prefix ipPrefix; + private final Range l4PortRange; + private final Byte ipProto; + // TODO: move to SliceId object when slice APIs will be promoted to ONOS core. + private final int sliceId; + // Action parameter + private final byte appId; + + private final int priority; + + private UpfApplication(Ip4Prefix ipPrefix, Range l4PortRange, + Byte ipProto, int sliceId, byte appId, int priority) { + this.ipPrefix = ipPrefix; + this.l4PortRange = l4PortRange; + this.ipProto = ipProto; + this.sliceId = sliceId; + this.appId = appId; + this.priority = priority; + } + + public static Builder builder() { + return new Builder(); + } + + @Override + public boolean equals(Object object) { + if (object == this) { + return true; + } + if (object == null) { + return false; + } + if (getClass() != object.getClass()) { + return false; + } + + UpfApplication that = (UpfApplication) object; + + return Objects.equals(this.ipPrefix, that.ipPrefix) && + Objects.equals(this.l4PortRange, that.l4PortRange) && + Objects.equals(this.ipProto, that.ipProto) && + this.sliceId == that.sliceId && + this.appId == that.appId && + this.priority == that.priority; + } + + @Override + public int hashCode() { + return Objects.hash(ipPrefix, l4PortRange, ipProto, sliceId, appId, priority); + } + + @Override + public String toString() { + return "UpfApplication(priority=" + this.priority + ", " + matchString() + " -> " + actionString() + ")"; + } + + private String matchString() { + StringBuilder matchStrBuilder = new StringBuilder("Match("); + if (this.ipPrefix != null) { + matchStrBuilder.append("ip_prefix=") + .append(this.ipPrefix) + .append(", "); + } + if (this.l4PortRange != null) { + matchStrBuilder.append("l4_port_range=") + .append(l4PortRange) + .append(", "); + } + if (this.ipProto != null) { + matchStrBuilder.append("ip_proto=") + .append(this.ipProto) + .append(", "); + } + matchStrBuilder.append("slice_id=") + .append(this.sliceId) + .append(")"); + return matchStrBuilder.toString(); + } + + private String actionString() { + return "Action(app_id=" + this.appId + ")"; + } + + /** + * Gets the IPv4 prefix of this UPF application rule. + * + * @return The IPv4 prefix, Empty if none. + */ + public Optional ip4Prefix() { + return Optional.ofNullable(ipPrefix); + } + + /** + * Gets the L4 port range of this application filtering rule. + * + * @return A bounded range of L4 port + */ + public Optional> l4PortRange() { + return Optional.ofNullable(l4PortRange); + } + + /** + * Gets the IP protocol field value of this UPF application rule. + * + * @return IP protocol field, Empty if none + */ + public Optional ipProto() { + return Optional.ofNullable(ipProto); + } + + /** + * Gets the slice ID of this UPF application rule. + * + * @return Slice ID + */ + public int sliceId() { + return this.sliceId; + } + + /** + * Get the application ID of this UPF application rule. + * + * @return Application ID + */ + public byte appId() { + return appId; + } + + /** + * Get the priority of this UPF application rule. + * + * @return Priority + */ + public int priority() { + return priority; + } + + @Override + public UpfEntityType type() { + return UpfEntityType.APPLICATION; + } + + /** + * Builder of UpfApplication object. + */ + public static class Builder { + // Match Keys + private Ip4Prefix ipPrefix = null; + private Range l4PortRange = null; + private Byte ipProto = null; + private Integer sliceId = null; + // Action parameters + private Byte appId = null; + + private Integer priority = null; + + public Builder() { + + } + + /** + * Set the IP prefix of the UPF application rule. + * + * @param ipPrefix IPv4 prefix + * @return This builder object + */ + public Builder withIp4Prefix(Ip4Prefix ipPrefix) { + this.ipPrefix = ipPrefix; + return this; + } + + /** + * Set the L4 port range of the UPF application rule. + * + * @param l4PortRange bounded range of L4 port + * @return This builder object + */ + public Builder withL4PortRange(Range l4PortRange) { + checkArgument(l4PortRange.hasLowerBound() && l4PortRange.hasUpperBound(), + "Range must be provided with bounds"); + this.l4PortRange = l4PortRange; + return this; + } + + /** + * Set the IP protocol field value of the UPF application rule. + * + * @param ipProto IP protocol field + * @return This builder object + */ + public Builder withIpProto(byte ipProto) { + this.ipProto = ipProto; + return this; + } + + /** + * Set the slice ID of the UPF application rule. + * + * @param sliceId the slice ID + * @return This builder object + */ + public Builder withSliceId(int sliceId) { + this.sliceId = sliceId; + return this; + } + + /** + * Set the application ID of the UPF application rule. + * + * @param appId Application ID + * @return This builder object + */ + public Builder withAppId(byte appId) { + this.appId = appId; + return this; + } + + /** + * Set the priority of the UPF application rule. + * + * @param priority Priority + * @return This builder object + */ + public Builder withPriority(int priority) { + this.priority = priority; + return this; + } + + public UpfApplication build() { + checkNotNull(sliceId, "Slice ID must be provided"); + checkNotNull(appId, "Application ID must be provided"); + checkNotNull(priority, "Priority must be provided"); + return new UpfApplication(ipPrefix, l4PortRange, ipProto, sliceId, appId, priority); + } + } +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfCounter.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfCounter.java new file mode 100644 index 00000000000..c3950097050 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfCounter.java @@ -0,0 +1,293 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; + +import java.util.Objects; +import java.util.Optional; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; +import static org.onosproject.net.behaviour.upf.UpfEntityType.COUNTER; +import static org.onosproject.net.behaviour.upf.UpfEntityType.EGRESS_COUNTER; +import static org.onosproject.net.behaviour.upf.UpfEntityType.INGRESS_COUNTER; + +/** + * A structure for compactly passing UPF counter (ingress, egress or both) values + * for a given counter ID. Contains four counts: Ingress Packets, Ingress Bytes, + * Egress Packets, Egress Bytes. UpfCounter can be used ONLY on {@code apply} + * and {@code readAll} calls in the {@link UpfDevice} interface. + */ +@Beta +public final class UpfCounter implements UpfEntity { + private final int cellId; + private final Long ingressPkts; + private final Long ingressBytes; + private final Long egressPkts; + private final Long egressBytes; + private final UpfEntityType type; + + private UpfCounter(int cellId, Long ingressPkts, Long ingressBytes, + Long egressPkts, Long egressBytes, UpfEntityType type) { + this.cellId = cellId; + this.ingressPkts = ingressPkts; + this.ingressBytes = ingressBytes; + this.egressPkts = egressPkts; + this.egressBytes = egressBytes; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + switch (this.type) { + case COUNTER: + return String.format("UpfStats(cell_id=%d, ingress=(%dpkts,%dbytes), egress=(%dpkts,%dbytes))", + cellId, ingressPkts, ingressBytes, egressPkts, egressBytes); + case INGRESS_COUNTER: + return String.format("UpfIngressCounter(cell_id=%d, packets=%d, bytes=%d))", + cellId, ingressPkts, ingressBytes); + case EGRESS_COUNTER: + return String.format("UpfEgressCounter(cell_id=%d, packets=%d, bytes=%d))", + cellId, egressPkts, egressBytes); + default: + throw new IllegalStateException("I should never reach this point!"); + } + } + + @Override + public boolean equals(Object object) { + if (object == this) { + return true; + } + if (object == null) { + return false; + } + if (getClass() != object.getClass()) { + return false; + } + UpfCounter that = (UpfCounter) object; + return this.cellId == that.cellId && this.type == that.type; + } + + /** + * Returns whether this UpfCounter is exactly equal to the given UpfCounter, + * including their packets and bytes values. + * + * @param that other {@link UpfCounter} instance to compare + * @return true if exactly equals, false otherwise + */ + public boolean exactlyEquals(UpfCounter that) { + return this.equals(that) && + (this.ingressPkts == that.ingressPkts || this.ingressPkts.equals(that.ingressPkts)) && + (this.ingressBytes == that.ingressBytes || this.ingressBytes.equals(that.ingressBytes)) && + (this.egressPkts == that.egressPkts || this.egressPkts.equals(that.egressPkts)) && + (this.egressBytes == that.egressBytes || this.egressBytes.equals(that.egressBytes)); + } + + @Override + public int hashCode() { + return Objects.hash(cellId, type); + } + + /** + * Get the cell ID (index) of the dataplane counter that produced this set of stats. + * + * @return counter cell ID + */ + public int getCellId() { + return cellId; + } + + /** + * Get the number of packets that hit this counter in the dataplane ingress pipeline. + * Return a value only if the counter is of type {@code UpfEntityType.COUNTER} + * or {@code UpfEntityType.INGRESS_COUNTER}, otherwise an empty Optional. + * + * @return ingress packet count or empty if this is of type {@code UpfEntityType.EGRESS_COUNTER} + */ + public Optional getIngressPkts() { + return Optional.ofNullable(ingressPkts); + } + + /** + * Get the number of packets that hit this counter in the dataplane egress pipeline. + * Return a value only if the counter is of type {@code UpfEntityType.COUNTER} + * or {@code UpfEntityType.EGRESS_COUNTER}, otherwise an empty Optional. + * + * @return egress packet count or empty if this is of type {@code UpfEntityType.INGRESS_COUNTER} + */ + public Optional getEgressPkts() { + return Optional.ofNullable(egressPkts); + } + + /** + * Get the number of packet bytes that hit this counter in the dataplane ingress pipeline. + * Return value only if the counter is of type {{@code UpfEntityType.COUNTER} + * or {@code UpfEntityType.INGRESS_COUNTER}, otherwise an empty Optional. + * + * @return ingress byte count or empty if this is of type {@code UpfEntityType.EGRESS_COUNTER} + */ + public Optional getIngressBytes() { + return Optional.ofNullable(ingressBytes); + } + + /** + * Get the number of packet bytes that hit this counter in the dataplane egress pipeline. + * Return a value only if the counter is of type {@code UpfEntityType.COUNTER} + * or {@code UpfEntityType.EGRESS_COUNTER}, otherwise an empty Optional. + * + * @return egress byte count or empty if this is of type {@code UpfEntityType.INGRESS_COUNTER} + */ + public Optional getEgressBytes() { + return Optional.ofNullable(egressBytes); + } + + @Override + public UpfEntityType type() { + return type; + } + + /** + * Sum the content of the given UpfCounter to the counter values contained + * in this instance. + * + * @param that The UpfCounter to sum to this instance + * @return a new UpfCounter instance with sum counters. + * @throws IllegalArgumentException if the given UpfCounter is not referring + * to the same type and id as this + */ + public UpfCounter sum(UpfCounter that) throws IllegalArgumentException { + if (!this.equals(that)) { + throw new IllegalArgumentException( + "The given UpfCounter is not of the same type or refers to a different index"); + } + UpfCounter.Builder builder = UpfCounter.builder().withCellId(this.getCellId()); + if (this.type.equals(UpfEntityType.COUNTER) || this.type.equals(UpfEntityType.INGRESS_COUNTER)) { + builder.setIngress(this.ingressPkts + that.ingressPkts, + this.ingressBytes + that.ingressBytes); + } + if (this.type.equals(UpfEntityType.COUNTER) || this.type.equals(UpfEntityType.EGRESS_COUNTER)) { + builder.setEgress(this.egressPkts + that.egressPkts, + this.egressBytes + that.egressBytes); + } + return builder.build(); + } + + /** + * Builder for UpfCounter. + */ + public static class Builder { + private Integer cellId; + private Long ingressPkts; + private Long ingressBytes; + private Long egressPkts; + private Long egressBytes; + private UpfEntityType type = COUNTER; + + public Builder() { + } + + /** + * Set the Cell ID (index) of the datalane counter that produced this set of stats. + * + * @param cellId the counter cell ID + * @return This builder + */ + public Builder withCellId(int cellId) { + this.cellId = cellId; + return this; + } + + /** + * Set the number of packets and bytes that hit the counter in the dataplane ingress pipeline. + * + * @param ingressPkts ingress packet count + * @param ingressBytes egress packet count + * @return This builder + */ + public Builder setIngress(long ingressPkts, long ingressBytes) { + this.ingressPkts = ingressPkts; + this.ingressBytes = ingressBytes; + return this; + } + + /** + * Set the number of packets and bytes that hit the counter in the dataplane egress pipeline. + * + * @param egressPkts egress packet count + * @param egressBytes egress byte count + * @return This builder + */ + public Builder setEgress(long egressPkts, long egressBytes) { + this.egressPkts = egressPkts; + this.egressBytes = egressBytes; + return this; + } + + /** + * Set the counter as ingress only counter. + * + * @return This builder + */ + public Builder isIngressCounter() { + this.type = INGRESS_COUNTER; + return this; + } + + /** + * Set the counter as egress only counter. + * + * @return This builder + */ + public Builder isEgressCounter() { + this.type = EGRESS_COUNTER; + return this; + } + + public UpfCounter build() { + checkNotNull(cellId, "CellID must be provided"); + switch (type) { + case INGRESS_COUNTER: + checkArgument(this.ingressBytes != null && this.ingressPkts != null, + "Ingress counter values must be provided"); + this.egressBytes = null; + this.egressPkts = null; + break; + case EGRESS_COUNTER: + checkArgument(this.egressBytes != null && this.egressPkts != null, + "Egress counter values must be provided"); + this.ingressBytes = null; + this.ingressPkts = null; + break; + case COUNTER: + checkArgument(this.ingressBytes != null && this.ingressPkts != null && + this.egressBytes != null && this.egressPkts != null, + "Ingress and egress counter values must be provided"); + break; + default: + // I should never reach this point + throw new IllegalArgumentException("I should never reach this point!"); + } + return new UpfCounter(cellId, ingressPkts, ingressBytes, egressPkts, egressBytes, type); + } + } +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfDevice.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfDevice.java new file mode 100644 index 00000000000..738d6b6f4bd --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfDevice.java @@ -0,0 +1,138 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; + +import java.nio.ByteBuffer; +import java.util.Collection; + +/** + * Provides means to update forwarding state to implement a 3GPP User Plane Function. + */ +@Beta +public interface UpfDevice { + + /** + * Removes any state previously created by this API. + */ + void cleanUp(); + + /** + * Applies the given UPF entity to the UPF-programmable device. + * + * @param entity The UPF entity to be applied. + * @throws UpfProgrammableException if the given UPF entity can not be applied or + * the operation is not supported on the given UPF entity. + */ + void apply(UpfEntity entity) throws UpfProgrammableException; + + /** + * Reads all the UPF entities of the given type from the UPF-programmable device. + * + * @param entityType The type of entities to read. + * @return A collection of installed UPF entities. + * @throws UpfProgrammableException if UPF entity type is not available to be read or + * the operation is not supported on the given UPF entity type. + */ + Collection readAll(UpfEntityType entityType) throws UpfProgrammableException; + + /** + * Reads the given UPF counter type and index from the UPF-programmable device. + * + * @param counterIdx The counter index from which to read. + * @param type {@link UpfEntityType} of UPF counter to read + * ({@code COUNTER, INGRESS_COUNTER, EGRESS_COUNTER}) + * @return The content of the UPF counter. + * @throws UpfProgrammableException if the counter ID is out of bounds. + */ + UpfCounter readCounter(int counterIdx, UpfEntityType type) throws UpfProgrammableException; + + /** + * Reads the given UPF counter type contents for all indices that are valid + * on the UPF-programmable device. {@code maxCounterId} parameter is used to + * limit the number of counters retrieved from the UPF. If the limit given is + * larger than the physical limit, the physical limit will be used. + * A limit of -1 removes limitations, and it is equivalent of calling + * {@link #readAll(UpfEntityType)} passing the given {@link UpfEntityType}. + * + * @param maxCounterIdx Maximum counter index to retrieve from the UPF device. + * @param type {@link UpfEntityType} of UPF counter to read + * ({@code COUNTER, INGRESS_COUNTER, EGRESS_COUNTER}) + * @return A collection of UPF counters for all valid hardware counter cells. + * @throws UpfProgrammableException if the counters are unable to be read. + */ + Collection readCounters(long maxCounterIdx, UpfEntityType type) throws UpfProgrammableException; + + /** + * Deletes the given UPF entity from the UPF-programmable device. + * + * @param entity The UPF entity to be removed. + * @throws UpfProgrammableException if the given UPF entity is not found or + * the operation is not supported on the given UPF entity. + */ + void delete(UpfEntity entity) throws UpfProgrammableException; + + /** + * Deletes the given UPF entity from the UPF-programmable device. + * + * @param entityType The UPF entity type to be removed. + * @throws UpfProgrammableException if the given UPF entity is not found or + * the operation is not supported on the given UPF entity. + */ + void deleteAll(UpfEntityType entityType) throws UpfProgrammableException; + + /** + * Returns the total number of UPF entities of the given type supported by + * the UPF-programmable device. For entities that have a direction,returns + * the total amount of entities including both the downlink and the uplink + * directions. + * + * @param entityType The type of UPF programmable entities to retrieve the size from. + * @return The total number of supported UPF entities. + * @throws UpfProgrammableException if the operation is not supported on the given UPF entity. + */ + long tableSize(UpfEntityType entityType) throws UpfProgrammableException; + + /** + * Instructs the UPF-programmable device to use GTP-U extension PDU Session Container (PSC) when + * doing encap of downlink packets, with the given QoS Flow Identifier (QFI). + * + * @throws UpfProgrammableException if operation is not available + */ + void enablePscEncap() throws UpfProgrammableException; + + /** + * Disable PSC encap previously enabled with {@link #enablePscEncap()}. + * + * @throws UpfProgrammableException if operation is not available + */ + void disablePscEncap() throws UpfProgrammableException; + + /** + * Sends the given data as a data plane packet-out through this device. Data is expected to + * contain an Ethernet frame. + *

+ * The device should process the packet through the pipeline tables to select an output port + * and to apply eventual modifications (e.g., MAC rewrite for routing, pushing a VLAN tag, + * etc.). + * + * @param data Ethernet frame bytes + * @throws UpfProgrammableException if operation is not available + */ + void sendPacketOut(ByteBuffer data) throws UpfProgrammableException; +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfEntity.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfEntity.java new file mode 100644 index 00000000000..e54ab341953 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfEntity.java @@ -0,0 +1,47 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; + +/** + * Abstraction of a UPF entity used to interact with the UPF-programmable device. + */ +@Beta +public interface UpfEntity { + /** + * Default Application ID, to be used if application filtering is performed. + */ + byte DEFAULT_APP_ID = 0; + + /** + * Default session index, to be used if no session metering is performed. + */ + int DEFAULT_SESSION_INDEX = 0; + + /** + * Default app index, to be used if no app metering is performed. + */ + int DEFAULT_APP_INDEX = 0; + + /** + * Returns the type of this entity. + * + * @return entity type + */ + UpfEntityType type(); +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfEntityType.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfEntityType.java new file mode 100644 index 00000000000..e13a3c842b3 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfEntityType.java @@ -0,0 +1,57 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; + +/** + * Type of UPF entity. + */ +@Beta +public enum UpfEntityType { + INTERFACE("interface"), + TERMINATION_DOWNLINK("termination_downlink"), + TERMINATION_UPLINK("termination_uplink"), + SESSION_DOWNLINK("session_downlink"), + SESSION_UPLINK("session_downlink"), + TUNNEL_PEER("tunnel_peer"), + INGRESS_COUNTER("ingress_counter"), + EGRESS_COUNTER("egress_counter"), + COUNTER("counter"), + APPLICATION("application"), + SESSION_METER("session_meter"), + APPLICATION_METER("application_meter"), + // TODO: slice meter shouldn't be exposed via UpfProgrammable driver behaviour + // we should have dedicated driver behaviour for the slicing functionality. + SLICE_METER("slice_meter"); + + private final String humanReadableName; + + UpfEntityType(String humanReadableName) { + this.humanReadableName = humanReadableName; + } + + /** + * Returns a human-readable representation of this UPF entity type (useful + * for logging). + * + * @return string + */ + public String humanReadableName() { + return humanReadableName; + } +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfGtpTunnelPeer.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfGtpTunnelPeer.java new file mode 100644 index 00000000000..04b216bd683 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfGtpTunnelPeer.java @@ -0,0 +1,187 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; +import org.onlab.packet.Ip4Address; + +import java.util.Objects; + +import static com.google.common.base.Preconditions.checkArgument; + +/** + * A structure representing a UPF GTP tunnel peer. + * The GTP Tunnel Peer is used by UPF to identify a second end of a GTP tunnel. + * The source and destination tunnel IPv4 addresses, and source UDP port are set + * based on the information from this structure. + */ +@Beta +public final class UpfGtpTunnelPeer implements UpfEntity { + // Match keys + private final byte tunPeerId; + // Action parameters + private final Ip4Address src; // The source address of the unidirectional tunnel + private final Ip4Address dst; // The destination address of the unidirectional tunnel + private final short srcPort; // Tunnel source port, default 2152 + + private UpfGtpTunnelPeer(byte tunPeerId, Ip4Address src, Ip4Address dst, short srcPort) { + this.tunPeerId = tunPeerId; + this.src = src; + this.dst = dst; + this.srcPort = srcPort; + } + + public static UpfGtpTunnelPeer.Builder builder() { + return new UpfGtpTunnelPeer.Builder(); + } + + @Override + public String toString() { + return String.format("UpfGtpTunnelPeer(tunn_peer_id=%s -> src=%s, dst=%s src_port=%s)", + tunPeerId, src.toString(), dst.toString(), srcPort); + } + + public boolean equals(Object object) { + if (this == object) { + return true; + } + + if (object == null) { + return false; + } + + if (getClass() != object.getClass()) { + return false; + } + + UpfGtpTunnelPeer that = (UpfGtpTunnelPeer) object; + return this.tunPeerId == that.tunPeerId && + this.src.equals(that.src) && + this.dst.equals(that.dst) && + this.srcPort == that.srcPort; + } + + @Override + public int hashCode() { + return Objects.hash(tunPeerId, src, dst, srcPort); + } + + /** + * Get the ID of the UPF GTP tunnel peer. + * + * @return GTP tunnel peer ID + */ + public byte tunPeerId() { + return tunPeerId; + } + + /** + * Get the source IP address of this unidirectional UPF GTP tunnel. + * + * @return tunnel source IP + */ + public Ip4Address src() { + return this.src; + } + + /** + * Get the destination address of this unidirectional UPF GTP tunnel. + * + * @return tunnel destination IP + */ + public Ip4Address dst() { + return this.dst; + } + + /** + * Get the source L4 port of this unidirectional UPF GTP tunnel. + * + * @return tunnel source port + */ + public short srcPort() { + return this.srcPort; + } + + @Override + public UpfEntityType type() { + return UpfEntityType.TUNNEL_PEER; + } + + public static class Builder { + private Byte tunPeerId = null; + private Ip4Address src = null; + private Ip4Address dst = null; + private short srcPort = 2152; // Default value is equal to GTP tunnel dst port + + public Builder() { + + } + + /** + * Set the ID of the UPF GTP Tunnel peer. + * + * @param tunPeerId GTP tunnel peer ID + * @return This builder object + */ + public UpfGtpTunnelPeer.Builder withTunnelPeerId(byte tunPeerId) { + this.tunPeerId = tunPeerId; + return this; + } + + /** + * Set the source IP address of the unidirectional UPF GTP tunnel. + * + * @param src GTP tunnel source IP + * @return This builder object + */ + public UpfGtpTunnelPeer.Builder withSrcAddr(Ip4Address src) { + this.src = src; + return this; + } + + /** + * Set the destination IP address of the unidirectional UPF GTP tunnel. + * + * @param dst GTP tunnel destination IP + * @return This builder object + */ + public UpfGtpTunnelPeer.Builder withDstAddr(Ip4Address dst) { + this.dst = dst; + return this; + } + + /** + * Set the source port of this unidirectional UPF GTP tunnel. + * + * @param srcPort tunnel source port + * @return this builder object + */ + public UpfGtpTunnelPeer.Builder withSrcPort(short srcPort) { + this.srcPort = srcPort; + return this; + } + + public UpfGtpTunnelPeer build() { + checkArgument(tunPeerId != null, "Tunnel Peer ID must be provided"); + checkArgument(src != null, "Tunnel source address cannot be null"); + checkArgument(dst != null, "Tunnel destination address cannot be null"); + return new UpfGtpTunnelPeer(this.tunPeerId, this.src, this.dst, srcPort); + } + + } + +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfInterface.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfInterface.java new file mode 100644 index 00000000000..e903d30ae9f --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfInterface.java @@ -0,0 +1,283 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; +import org.onlab.packet.Ip4Address; +import org.onlab.packet.Ip4Prefix; + +import java.util.Objects; + +import static com.google.common.base.Preconditions.checkNotNull; + +/** + * A UPF device interface, such as a N3, or UE IP address pool (N6). + */ +@Beta +public final class UpfInterface implements UpfEntity { + private final Ip4Prefix prefix; + private final Type type; + // TODO: move to SliceId object when slice APIs will be promoted to ONOS core. + private final int sliceId; + + private UpfInterface(Ip4Prefix prefix, Type type, int sliceId) { + this.prefix = prefix; + this.type = type; + this.sliceId = sliceId; + } + + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + return String.format("UpfInterface(type=%s, prefix=%s, slice_id=%s)", type.toString(), prefix, sliceId); + } + + @Override + public boolean equals(Object obj) { + if (obj == this) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + UpfInterface that = (UpfInterface) obj; + return this.type.equals(that.type) && + this.prefix.equals(that.prefix) && + this.sliceId == that.sliceId; + } + + @Override + public int hashCode() { + return Objects.hash(prefix, type, sliceId); + } + + /** + * Create access-facing UPF Interface (N3) from the given address, which will be treated as a /32 prefix. + * + * @param address the address of the new access-facing interface (N3 interface) + * @param sliceId the slice id of the new interface + * @return a new UPF interface + */ + public static UpfInterface createN3From(Ip4Address address, int sliceId) { + return builder() + .setAccess() + .setPrefix(Ip4Prefix.valueOf(address, 32)) + .setSliceId(sliceId) + .build(); + } + + /** + * Create a core-facing UPF Interface (N6) from the given IP prefix. + * + * @param prefix the prefix of the new core-facing interface (N6 interface) + * @param sliceId the slice id of the new interface + * @return a new UPF interface + */ + public static UpfInterface createUePoolFrom(Ip4Prefix prefix, int sliceId) { + return builder() + .setCore() + .setPrefix(prefix) + .setSliceId(sliceId) + .build(); + } + + /** + * Create a dbuf-receiving UPF interface from the given IP address. + * + * @param address the address of the dbuf-receiving interface + * @param sliceId the slice id of the new interface + * @return a new UPF interface + */ + public static UpfInterface createDbufReceiverFrom(Ip4Address address, int sliceId) { + return builder() + .setDbufReceiver() + .setAddress(address) + .setSliceId(sliceId) + .build(); + } + + /** + * Get the IP prefix of this interface. + * + * @return the interface prefix + */ + public Ip4Prefix prefix() { + return prefix; + } + + /** + * Get the slice ID of this interface. + * + * @return the slice ID + */ + public int sliceId() { + return sliceId; + } + + /** + * Check if this UPF interface is for packets traveling from UEs. + * This will be true for N3 interface table entries. + * + * @return true if interface receives from access + */ + public boolean isAccess() { + return type == Type.ACCESS; + } + + /** + * Check if this UPF interface is for packets traveling towards UEs. + * This will be true for UE IP address pool table entries. + * + * @return true if interface receives from core + */ + public boolean isCore() { + return type == Type.CORE; + } + + /** + * Check if this UPF interface is for receiving buffered packets as they are released from the dbuf + * buffering device. + * + * @return true if interface receives from dbuf + */ + public boolean isDbufReceiver() { + return type == Type.DBUF; + } + + /** + * Get the IPv4 prefix of this UPF interface. + * + * @return the interface prefix + */ + public Ip4Prefix getPrefix() { + return this.prefix; + } + + @Override + public UpfEntityType type() { + return UpfEntityType.INTERFACE; + } + + public enum Type { + /** + * Unknown UPF interface type. + */ + UNKNOWN, + + /** + * Interface that receives GTP encapsulated packets. + * This is the type of the N3 interface. + */ + ACCESS, + + /** + * Interface that receives unencapsulated packets from the core of the network. + * This is the type of UE IP address pool interfaces (N6). + */ + CORE, + + /** + * Interface that receives buffered packets as they are drained from a dbuf device. + */ + DBUF + } + + public static class Builder { + private Ip4Prefix prefix; + private Type type; + private Integer sliceId; + + public Builder() { + type = Type.UNKNOWN; + } + + /** + * Set the IPv4 prefix of this interface. + * + * @param prefix the interface prefix + * @return this builder object + */ + public Builder setPrefix(Ip4Prefix prefix) { + this.prefix = prefix; + return this; + } + + /** + * Set the slice ID of this interface. + * + * @param sliceId the slice ID + * @return this builder object + */ + public Builder setSliceId(int sliceId) { + this.sliceId = sliceId; + return this; + } + + /** + * Set the IPv4 prefix of this interface, by turning the given address into a /32 prefix. + * + * @param address the interface address that will become a /32 prefix + * @return this builder object + */ + public Builder setAddress(Ip4Address address) { + this.prefix = Ip4Prefix.valueOf(address, 32); + return this; + } + + /** + * Make this an access-facing interface (N3). + * + * @return this builder object + */ + public Builder setAccess() { + this.type = Type.ACCESS; + return this; + } + + /** + * Make this a core-facing interface (N6). + * + * @return this builder object + */ + public Builder setCore() { + this.type = Type.CORE; + return this; + } + + /** + * Make this a dbuf-facing interface. + * + * @return this builder object + */ + public Builder setDbufReceiver() { + this.type = Type.DBUF; + return this; + } + + public UpfInterface build() { + checkNotNull(prefix, "The IPv4 prefix must be provided"); + checkNotNull(sliceId, "Slice ID must be provided"); + return new UpfInterface(prefix, type, sliceId); + } + } +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfMeter.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfMeter.java new file mode 100644 index 00000000000..39302ebe379 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfMeter.java @@ -0,0 +1,293 @@ +/* + * Copyright 2022-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; +import org.onosproject.net.meter.Band; +import org.onosproject.net.meter.DefaultBand; + +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; +import static org.onosproject.net.behaviour.upf.UpfEntityType.APPLICATION_METER; +import static org.onosproject.net.behaviour.upf.UpfEntityType.SESSION_METER; +import static org.onosproject.net.behaviour.upf.UpfEntityType.SLICE_METER; +import static org.onosproject.net.meter.Band.Type.MARK_RED; +import static org.onosproject.net.meter.Band.Type.MARK_YELLOW; + +/** + * A structure representing a UPF meter, either for metering session (UE), + * application traffic, or slice traffic. + * UPF meters represent PFCP QER MBR and GBR information and slice maximum rate. + * UPF meters of type session and slice support only the peak band. + * UPF meters of type application support both peak and committed bands. + */ +@Beta +public final class UpfMeter implements UpfEntity { + private final int cellId; + private final ImmutableMap meterBands; + private final UpfEntityType type; + + private UpfMeter(int cellId, Map meterBands, UpfEntityType type) { + this.cellId = cellId; + this.meterBands = ImmutableMap.copyOf(meterBands); + this.type = type; + } + + @Override + public String toString() { + return String.format("UpfMeter(type=%s, index=%d, committed=%s, peak=%s)", + type, cellId, committedBand().orElse(null), + peakBand().orElse(null)); + } + + @Override + public boolean equals(Object object) { + if (this == object) { + return true; + } + + if (object == null) { + return false; + } + + if (getClass() != object.getClass()) { + return false; + } + + UpfMeter that = (UpfMeter) object; + return this.type.equals(that.type) && + this.cellId == that.cellId && + this.meterBands.equals(that.meterBands); + } + + @Override + public int hashCode() { + return Objects.hash(type, cellId, meterBands); + } + + @Override + public UpfEntityType type() { + return this.type; + } + + /** + * Get the meter cell index of this meter. + * + * @return the cell index + */ + public int cellId() { + return this.cellId; + } + + /** + * Get the committed band of this meter. + * + * @return the committed band, Empty if none + */ + public Optional committedBand() { + return Optional.ofNullable(meterBands.getOrDefault(MARK_YELLOW, null)); + } + + /** + * Get the peak band of this meter. + * + * @return the peak band, Empty if none + */ + public Optional peakBand() { + return Optional.ofNullable(meterBands.getOrDefault(MARK_RED, null)); + } + + /** + * Check if this UPF meter is for sessions (UE) traffic. + * + * @return true if the meter is for session traffic + */ + public boolean isSession() { + return type.equals(SESSION_METER); + } + + /** + * Check if this UPF meter is for application traffic. + * + * @return true if the meter is for application traffic + */ + public boolean isApplication() { + return type.equals(APPLICATION_METER); + } + + /** + * Check if this UPF meter is a reset. + * + * @return true if this represents a meter reset. + */ + public boolean isReset() { + return meterBands.isEmpty(); + } + + /** + * Return a session UPF meter with no bands. Used to reset the meter. + * + * @param cellId the meter cell index of this meter + * @return a UpfMeter of type session with no bands + */ + public static UpfMeter resetSession(int cellId) { + return new UpfMeter(cellId, Maps.newHashMap(), SESSION_METER); + } + + /** + * Return an application UPF meter with no bands. Used to reset the meter. + * + * @param cellId the meter cell index of this meter + * @return a UpfMeter of type application with no bands + */ + public static UpfMeter resetApplication(int cellId) { + return new UpfMeter(cellId, Maps.newHashMap(), APPLICATION_METER); + } + + /** + * Return a slice meter with no bands. Used to reset the meter. + * + * @param cellId the meter cell index of this meter + * @return a UpfMeter of type slice with no bands + */ + public static UpfMeter resetSlice(int cellId) { + return new UpfMeter(cellId, Maps.newHashMap(), SLICE_METER); + } + + public static Builder builder() { + return new Builder(); + } + + /** + * Builder of UpfMeter object. Use {@link #resetApplication(int)}, + * {@link #resetSession(int)}, or {@link #resetSlice(int)} to reset the + * meter config. + */ + public static class Builder { + private Integer cellId = null; + private Map bands = Maps.newHashMap(); + private UpfEntityType type; + + public Builder() { + + } + + /** + * Set the meter cell index of this meter. + * + * @param cellId the meter cell index + * @return this builder object + */ + public Builder setCellId(int cellId) { + this.cellId = cellId; + return this; + } + + /** + * Set the committed band of this meter. + * Valid only for meter of type application. + * + * @param cir the Committed Information Rate in bytes/s + * @param cburst the Committed Burst in bytes + * @return this builder object + */ + public Builder setCommittedBand(long cir, long cburst) { + this.bands.put(MARK_YELLOW, + DefaultBand.builder() + .ofType(MARK_YELLOW) + .withRate(cir) + .burstSize(cburst) + .build() + ); + return this; + } + + /** + * Set the peak band of this meter. + * + * @param pir the Peak Information Rate in bytes/s + * @param pburst the Peak Burst in bytes + * @return this builder object + */ + public Builder setPeakBand(long pir, long pburst) { + this.bands.put(MARK_RED, + DefaultBand.builder() + .ofType(MARK_RED) + .withRate(pir) + .burstSize(pburst) + .build() + ); + return this; + } + + /** + * Make this meter a session meter. + * + * @return this builder object + */ + public Builder setSession() { + this.type = SESSION_METER; + return this; + } + + /** + * Make this meter an application meter. + * + * @return this builder object + */ + public Builder setApplication() { + this.type = APPLICATION_METER; + return this; + } + + /** + * Make this meter a slice meter. + * + * @return this builder object + */ + public Builder setSlice() { + this.type = SLICE_METER; + return this; + } + + public UpfMeter build() { + checkNotNull(type, "A meter type must be assigned"); + switch (type) { + case SESSION_METER: + case SLICE_METER: + checkArgument(!bands.containsKey(MARK_YELLOW), + "Committed band can not be provided for " + type + " meter!"); + break; + case APPLICATION_METER: + checkArgument((bands.containsKey(MARK_YELLOW) && bands.containsKey(MARK_RED)) || bands.isEmpty(), + "Bands (committed and peak) must be provided together or not at all!"); + break; + default: + // I should never reach this point + throw new IllegalArgumentException("Invalid meter type, I should never reach this point"); + } + checkNotNull(cellId, "Meter cell ID must be provided!"); + return new UpfMeter(cellId, bands, type); + } + } +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfProgrammable.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfProgrammable.java new file mode 100644 index 00000000000..2fd718ce879 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfProgrammable.java @@ -0,0 +1,55 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; +import org.onosproject.net.driver.HandlerBehaviour; +import org.onosproject.net.flow.FlowRule; +import org.onosproject.net.meter.Meter; + +/** + * Provides means to update the device forwarding state to implement a 3GPP + * User Plane Function. An implementation of this API should not write state + * directly to the device, but instead, always rely on core ONOS subsystems + * (e.g., FlowRuleService, GroupService, etc). + */ +@Beta +public interface UpfProgrammable extends HandlerBehaviour, UpfDevice { + /** + * Apps are expected to call this method as the first one when they are ready + * to install any UPF entity. + * + * @return True if initialized, false otherwise. + */ + boolean init(); + + /** + * Checks if the given flow rule has been generated by this UPF behaviour. + * + * @param flowRule the flow rule to check + * @return True if the given flow rule has been created by this UPF behaviour, False otherwise. + */ + boolean fromThisUpf(FlowRule flowRule); + + /** + * Checks if the given meter has been generated by this UPF behaviour. + * + * @param meter the meter to check + * @return True if the given meter has been created by this UPF behaviour, False otherwise. + */ + boolean fromThisUpf(Meter meter); +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfProgrammableException.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfProgrammableException.java new file mode 100644 index 00000000000..96f8c85ea35 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfProgrammableException.java @@ -0,0 +1,106 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; + +import java.util.Optional; + +/** + * An exception indicating a an error happened in the UPF programmable behaviour. + * Possible errors include the attempted insertion of a malformed flow rule, the + * reading or writing of an out-of-bounds counter cell, the deletion of a non-existent + * flow rule, and the attempted insertion of a flow rule into a full table. + */ +@Beta +public class UpfProgrammableException extends Exception { + private final Type type; + private final UpfEntityType entityType; + + public enum Type { + /** + * The UpfProgrammable did not provide a specific exception type. + */ + UNKNOWN, + /** + * The target entity is at capacity. + */ + ENTITY_EXHAUSTED, + /** + * A provided index was out of range. + */ + ENTITY_OUT_OF_RANGE, + /** + * The UpfProgrammable implementation doesn't support the operation. + */ + UNSUPPORTED_OPERATION + } + + /** + * Creates a new exception for the given message. + * + * @param message message + */ + public UpfProgrammableException(String message) { + super(message); + this.type = Type.UNKNOWN; + this.entityType = null; + } + + /** + * Creates a new exception for the given message and type. + * + * @param message exception message + * @param type exception type + */ + public UpfProgrammableException(String message, Type type) { + super(message); + this.type = type; + this.entityType = null; + } + + /** + * Creates a new exception for the given message, type and entity type. + * + * @param message exception message + * @param type exception type + * @param entityType entity type + */ + public UpfProgrammableException(String message, Type type, UpfEntityType entityType) { + super(message); + this.type = type; + this.entityType = entityType; + } + + /** + * Get the type of the exception. + * + * @return exception type + */ + public Type getType() { + return type; + } + + /** + * Get the type of the entity that generated the exception. + * + * @return entity type + */ + public Optional getEntityType() { + return Optional.ofNullable(entityType); + } +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfSessionDownlink.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfSessionDownlink.java new file mode 100644 index 00000000000..02a8a547fe0 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfSessionDownlink.java @@ -0,0 +1,230 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; +import org.onlab.packet.Ip4Address; + +import java.util.Objects; + +import static com.google.common.base.Preconditions.checkNotNull; + +/** + * A structure representing the UE Session on the UPF-programmable device. + * Provide means to set up the UPF UE Session in the downlink direction. + */ +@Beta +public final class UpfSessionDownlink implements UpfEntity { + // Match Keys + private final Ip4Address ueAddress; + // Action parameters + private final Byte tunPeerId; + private final int sessionMeterIdx; + private final boolean buffering; + private final boolean dropping; + + private UpfSessionDownlink(Ip4Address ipv4Address, + Byte tunPeerId, + int sessionMeterIdx, + boolean buffering, + boolean drop) { + this.ueAddress = ipv4Address; + this.sessionMeterIdx = sessionMeterIdx; + this.tunPeerId = tunPeerId; + this.buffering = buffering; + this.dropping = drop; + } + + public static Builder builder() { + return new Builder(); + } + + @Override + public boolean equals(Object object) { + if (object == this) { + return true; + } + if (object == null) { + return false; + } + if (getClass() != object.getClass()) { + return false; + } + + UpfSessionDownlink that = (UpfSessionDownlink) object; + + return this.buffering == that.buffering && + this.dropping == that.dropping && + this.sessionMeterIdx == that.sessionMeterIdx && + Objects.equals(ueAddress, that.ueAddress) && + Objects.equals(tunPeerId, that.tunPeerId); + } + + @Override + public int hashCode() { + return java.util.Objects.hash(ueAddress, sessionMeterIdx, tunPeerId, buffering, dropping); + } + + @Override + public String toString() { + return "UpfSessionDL(" + matchString() + " -> " + actionString() + ")"; + } + + private String matchString() { + return "Match(ue_addr=" + this.ueAddress() + ")"; + } + + private String actionString() { + StringBuilder actionStrBuilder = new StringBuilder("Action("); + if (this.needsBuffering() && this.needsDropping()) { + actionStrBuilder.append("BUFF+DROP, "); + } else if (this.needsBuffering()) { + actionStrBuilder.append("BUFF, "); + } else if (this.needsDropping()) { + actionStrBuilder.append("DROP, "); + } else { + actionStrBuilder.append("FWD, "); + } + return actionStrBuilder.append(" tun_peer=").append(this.tunPeerId()) + .append(", session_meter_idx=").append(this.sessionMeterIdx()).append(")") + .toString(); + } + + /** + * True if this UPF UE Session needs buffering of the downlink traffic. + * + * @return true if the UPF UE Session needs buffering. + */ + public boolean needsBuffering() { + return buffering; + } + + /** + * True if this UPF UE Session needs dropping of the downlink traffic. + * + * @return true if the UPF UE Session needs dropping. + */ + public boolean needsDropping() { + return dropping; + } + + /** + * Get the UE IP address of this downlink UPF UE session. + * + * @return UE IP address + */ + public Ip4Address ueAddress() { + return ueAddress; + } + + /** + * Get the GTP tunnel peer ID that is set by this UPF UE Session rule. + * + * @return GTP tunnel peer ID + */ + public Byte tunPeerId() { + return tunPeerId; + } + + /** + * Get the session meter index that is set by this UPF UE Session rule. + * + * @return Session meter index + */ + public int sessionMeterIdx() { + return this.sessionMeterIdx; + } + + @Override + public UpfEntityType type() { + return UpfEntityType.SESSION_DOWNLINK; + } + + public static class Builder { + private Ip4Address ueAddress = null; + private Byte tunPeerId = null; + private int sessionMeterIdx = DEFAULT_SESSION_INDEX; + private boolean buffer = false; + private boolean drop = false; + + public Builder() { + + } + + /** + * Sets the UE IP address that this downlink UPF UE session rule matches on. + * + * @param ueAddress UE IP address + * @return This builder object + */ + public Builder withUeAddress(Ip4Address ueAddress) { + this.ueAddress = ueAddress; + return this; + } + + /** + * Sets the GTP tunnel peer ID that is set by this UPF UE Session rule. + * + * @param tunnelPeerId GTP tunnel peer ID + * @return This builder object + */ + public Builder withGtpTunnelPeerId(Byte tunnelPeerId) { + this.tunPeerId = tunnelPeerId; + return this; + } + + /** + * Sets whether to buffer downlink UPF UE session traffic or not. + * + * @param buffer True if request to buffer, false otherwise + * @return This builder object + */ + public Builder needsBuffering(boolean buffer) { + this.buffer = buffer; + return this; + } + + /** + * Sets whether to drop downlink UPF UE session traffic or not. + * + * @param drop True if request to buffer, false otherwise + * @return This builder object + */ + public Builder needsDropping(boolean drop) { + this.drop = drop; + return this; + } + + /** + * Sets the meter index associated with this UE session. + * If not set, default to {@link UpfEntity#DEFAULT_SESSION_INDEX}. + * + * @param sessionMeterIdx Session meter index + * @return This builder object + */ + public Builder withSessionMeterIdx(int sessionMeterIdx) { + this.sessionMeterIdx = sessionMeterIdx; + return this; + } + + public UpfSessionDownlink build() { + // Match fields are required + checkNotNull(ueAddress, "UE address must be provided"); + return new UpfSessionDownlink(ueAddress, tunPeerId, sessionMeterIdx, buffer, drop); + } + } +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfSessionUplink.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfSessionUplink.java new file mode 100644 index 00000000000..7cdff7e93ac --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfSessionUplink.java @@ -0,0 +1,205 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; +import org.onlab.packet.Ip4Address; + +import java.util.Objects; + +import static com.google.common.base.Preconditions.checkNotNull; + +/** + * A structure representing the UE Session on the UPF-programmable device. + * Provide means to set up the UPF UE Session in the uplink direction. + */ +@Beta +public final class UpfSessionUplink implements UpfEntity { + // Match Keys + private final Ip4Address tunDestAddr; // The tunnel destination address (N3/S1U IPv4 address) + private final Integer teid; // The Tunnel Endpoint ID that this UeSession matches on + + // Action parameters + private final boolean dropping; // Used to convey dropping information + private final int sessionMeterIdx; + + private UpfSessionUplink(Ip4Address tunDestAddr, + Integer teid, + int sessionMeterIdx, + boolean drop) { + this.tunDestAddr = tunDestAddr; + this.teid = teid; + this.sessionMeterIdx = sessionMeterIdx; + this.dropping = drop; + } + + public static Builder builder() { + return new Builder(); + } + + @Override + public boolean equals(Object object) { + if (object == this) { + return true; + } + if (object == null) { + return false; + } + if (getClass() != object.getClass()) { + return false; + } + + UpfSessionUplink that = (UpfSessionUplink) object; + + return this.dropping == that.dropping && + this.sessionMeterIdx == that.sessionMeterIdx && + Objects.equals(tunDestAddr, that.tunDestAddr) && + Objects.equals(teid, that.teid); + } + + @Override + public int hashCode() { + return Objects.hash(tunDestAddr, teid, sessionMeterIdx, dropping); + } + + @Override + public String toString() { + return "UpfSessionUL(" + matchString() + " -> " + actionString() + ")"; + } + + private String matchString() { + return "Match(tun_dst_addr=" + this.tunDstAddr() + ", teid=" + this.teid() + ")"; + } + + private String actionString() { + StringBuilder actionStrBuilder = new StringBuilder("Action("); + if (this.needsDropping()) { + actionStrBuilder.append("DROP"); + + } else { + actionStrBuilder.append("FWD"); + } + return actionStrBuilder + .append(", session_meter_idx=").append(this.sessionMeterIdx()) + .append(")").toString(); + } + + /** + * True if this UPF UE Session needs dropping of the uplink traffic. + * + * @return true if the UE Session needs dropping. + */ + public boolean needsDropping() { + return dropping; + } + + /** + * Get the tunnel destination IP address in the uplink UPF UE session (N3/S1U IP address). + * + * @return UE IP address + */ + public Ip4Address tunDstAddr() { + return tunDestAddr; + } + + /** + * Get the identifier of the GTP tunnel that this UPF UE Session rule matches on. + * + * @return GTP tunnel ID + */ + public Integer teid() { + return teid; + } + + /** + * Get the session meter index that is set by this UPF UE Session rule. + * + * @return Session meter index + */ + public int sessionMeterIdx() { + return this.sessionMeterIdx; + } + + @Override + public UpfEntityType type() { + return UpfEntityType.SESSION_UPLINK; + } + + public static class Builder { + private Ip4Address tunDstAddr = null; + private Integer teid = null; + public int sessionMeterIdx = DEFAULT_SESSION_INDEX; + private boolean drop = false; + + public Builder() { + + } + + /** + * Sets the tunnel destination IP address (N3/S1U address) that this UPF UE Session rule matches on. + * + * @param tunDstAddr The tunnel destination IP address + * @return This builder object + */ + public Builder withTunDstAddr(Ip4Address tunDstAddr) { + this.tunDstAddr = tunDstAddr; + return this; + } + + /** + * Sets the identifier of the GTP tunnel that this UPF UE Session rule matches on. + * + * @param teid GTP tunnel ID + * @return This builder object + */ + public Builder withTeid(Integer teid) { + this.teid = teid; + return this; + } + + + /** + * Sets whether to drop uplink UPF UE session traffic or not. + * + * @param drop True if request to buffer, false otherwise + * @return This builder object + */ + public Builder needsDropping(boolean drop) { + this.drop = drop; + return this; + } + + /** + * Sets the meter index associated with this UE session. + * If not set, default to {@link UpfEntity#DEFAULT_SESSION_INDEX}. + * + * @param sessionMeterIdx Session meter index + * @return This builder object + */ + public Builder withSessionMeterIdx(int sessionMeterIdx) { + this.sessionMeterIdx = sessionMeterIdx; + return this; + } + + public UpfSessionUplink build() { + // Match keys are required. + checkNotNull(tunDstAddr, "Tunnel destination must be provided"); + checkNotNull(teid, "TEID must be provided"); + return new UpfSessionUplink(tunDstAddr, teid, sessionMeterIdx, drop); + } + } +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfTerminationDownlink.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfTerminationDownlink.java new file mode 100644 index 00000000000..22c25c0749d --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfTerminationDownlink.java @@ -0,0 +1,312 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; +import org.onlab.packet.Ip4Address; + +import java.util.Objects; + +import static com.google.common.base.Preconditions.checkNotNull; + +/** + * A structure representing the UE Termination in the downlink direction on the + * UPF-programmable device. + * Provide means to configure the traffic behavior (e.g. set Traffic Class, GTP TEID, or QFI). + */ +@Beta +public final class UpfTerminationDownlink implements UpfEntity { + // Match Keys + private final Ip4Address ueSessionId; // UE Session ID, use UE IP address to uniquely identify a session. + private final byte applicationId; // Application ID, defaults to DEFAULT_APP_ID + // Action parameters + private final Integer ctrId; // Counter ID unique to this UPF Termination Rule + private final Byte trafficClass; + private final Integer teid; // Tunnel Endpoint Identifier + private final Byte qfi; // QoS Flow Identifier + private final int appMeterIdx; + private final boolean dropping; + + private UpfTerminationDownlink(Ip4Address ueSessionId, byte applicationId, Integer ctrId, Byte trafficClass, + Integer teid, Byte qfi, int appMeterIdx, boolean dropping) { + this.ueSessionId = ueSessionId; + this.applicationId = applicationId; + this.ctrId = ctrId; + this.trafficClass = trafficClass; + this.teid = teid; + this.qfi = qfi; + this.appMeterIdx = appMeterIdx; + this.dropping = dropping; + } + + public static Builder builder() { + return new Builder(); + } + + @Override + public boolean equals(Object obj) { + if (obj == this) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + UpfTerminationDownlink that = (UpfTerminationDownlink) obj; + + // Safe comparisons between potentially null objects + return this.dropping == that.dropping && + Objects.equals(this.ueSessionId, that.ueSessionId) && + Objects.equals(this.applicationId, that.applicationId) && + Objects.equals(this.ctrId, that.ctrId) && + Objects.equals(this.trafficClass, that.trafficClass) && + Objects.equals(this.teid, that.teid) && + this.appMeterIdx == that.appMeterIdx && + Objects.equals(this.qfi, that.qfi); + } + + @Override + public int hashCode() { + return Objects.hash(ueSessionId, applicationId, ctrId, trafficClass, teid, qfi, appMeterIdx, dropping); + } + + /** + * Get UE Session ID associated with UPF Termination rule. + * + * @return UE Session ID + */ + public Ip4Address ueSessionId() { + return ueSessionId; + } + + /** + * Get the application ID associated with UPF Termination rule. + * + * @return the application ID + */ + public byte applicationId() { + return applicationId; + } + + /** + * Get PDR Counter ID associated with UPF Termination rule. + * + * @return PDR counter cell ID + */ + public Integer counterId() { + return ctrId; + } + + /** + * Get Traffic Class set by this UPF Termination rule. + * + * @return Traffic Class + */ + public Byte trafficClass() { + return trafficClass; + } + + /** + * Get GTP TEID set by this UPF Termination rule. + * + * @return GTP tunnel ID + */ + public Integer teid() { + return teid; + } + + /** + * Get QoS Flow Identifier set by this UPF Termination rule. + * + * @return QoS Flow Identifier + */ + public Byte qfi() { + return qfi; + } + + /** + * True if this UPF Termination needs to drop traffic. + * + * @return true if the UPF Termination needs dropping. + */ + public boolean needsDropping() { + return dropping; + } + + /** + * Get the app meter index set by this UPF Termination rule. + * + * @return App meter index + */ + public int appMeterIdx() { + return appMeterIdx; + } + + @Override + public UpfEntityType type() { + return UpfEntityType.TERMINATION_DOWNLINK; + } + + @Override + public String toString() { + return "UpfTerminationDL(" + matchString() + " -> " + actionString() + ")"; + } + + private String matchString() { + return "Match(ue_addr=" + this.ueSessionId() + ", app_id=" + this.applicationId + ")"; + } + + private String actionString() { + String fwd = "FWD"; + if (this.needsDropping()) { + fwd = "DROP"; + } + return "Action(" + fwd + + ", teid=" + this.teid() + + ", ctr_id=" + this.counterId() + + ", qfi=" + this.qfi() + + ", tc=" + this.trafficClass() + + ", app_meter_idx=" + this.appMeterIdx() + + ")"; + } + + public static class Builder { + private Ip4Address ueSessionId = null; + private Byte applicationId = null; + private Integer ctrId = null; + private Byte trafficClass = null; + private Integer teid = null; + private Byte qfi = null; + private int appMeterIdx = DEFAULT_APP_INDEX; + private boolean drop = false; + + public Builder() { + + } + + /** + * Set the ID of the UE session. + * + * @param ueSessionId UE session ID + * @return This builder object + */ + public Builder withUeSessionId(Ip4Address ueSessionId) { + this.ueSessionId = ueSessionId; + return this; + } + + /** + * Set the ID of the application. + * If not set, default to {@link UpfEntity#DEFAULT_APP_ID}. + * + * @param applicationId Application ID + * @return This builder object + */ + public Builder withApplicationId(byte applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Set the dataplane counter cell ID. + * + * @param ctrId PDR counter cell ID + * @return This builder object + */ + public Builder withCounterId(int ctrId) { + this.ctrId = ctrId; + return this; + } + + /** + * Set the Traffic Class. + * + * @param trafficClass Traffic Class + * @return This builder object + */ + public Builder withTrafficClass(byte trafficClass) { + this.trafficClass = trafficClass; + return this; + } + + /** + * Set the identifier of the unidirectional GTP tunnel that should be used for the UE Session. + * + * @param teid tunnel ID + * @return This builder object + */ + public Builder withTeid(Integer teid) { + this.teid = teid; + return this; + } + + /** + * Set the QoS Flow Identifier. + * + * @param qfi GTP Tunnel QFI + * @return This builder object + */ + public Builder withQfi(byte qfi) { + this.qfi = qfi; + return this; + } + + /** + * Sets whether to drop downlink UPF termination traffic or not. + * + * @param drop True if request to drop, false otherwise + * @return This builder object + */ + public Builder needsDropping(boolean drop) { + this.drop = drop; + return this; + } + + /** + * Sets the app meter index. + * If not set, default to {@link UpfEntity#DEFAULT_APP_INDEX}. + * + * @param appMeterIdx App meter index + * @return This builder object + */ + public Builder withAppMeterIdx(int appMeterIdx) { + this.appMeterIdx = appMeterIdx; + return this; + } + + public UpfTerminationDownlink build() { + // Match fields must be provided + checkNotNull(ueSessionId, "UE session ID must be provided"); + if (applicationId == null) { + applicationId = DEFAULT_APP_ID; + } + checkNotNull(ctrId, "Counter ID must be provided"); + if (!drop) { + checkNotNull(trafficClass, "Traffic class must be provided"); + } + // TODO: should we verify that when dropping no other fields are provided + return new UpfTerminationDownlink( + this.ueSessionId, this.applicationId, this.ctrId, this.trafficClass, + this.teid, this.qfi, this.appMeterIdx, this.drop + ); + } + + } + +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfTerminationUplink.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfTerminationUplink.java new file mode 100644 index 00000000000..45848580f86 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfTerminationUplink.java @@ -0,0 +1,263 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.behaviour.upf; + +import com.google.common.annotations.Beta; +import org.onlab.packet.Ip4Address; + +import java.util.Objects; + +import static com.google.common.base.Preconditions.checkNotNull; + +/** + * A structure representing the UE Termination in the uplink direction on the + * UPF-programmable device. + * Provide means to configure the traffic behavior (e.g. set Traffic Class). + */ +@Beta +public final class UpfTerminationUplink implements UpfEntity { + // Match Keys + private final Ip4Address ueSessionId; // UE Session ID, use UE IP address to uniquely identify a session. + private final byte applicationId; // Application ID defaults to DEFAULT_APP_ID + // Action parameters + private final Integer ctrId; // Counter ID unique to this UPF Termination Rule + private final Byte trafficClass; + private final int appMeterIdx; + private final boolean dropping; + + private UpfTerminationUplink(Ip4Address ueSessionId, byte applicationId, + Integer ctrId, Byte trafficClass, + int appMeterIdx, boolean dropping) { + this.ueSessionId = ueSessionId; + this.applicationId = applicationId; + this.ctrId = ctrId; + this.trafficClass = trafficClass; + this.appMeterIdx = appMeterIdx; + this.dropping = dropping; + } + + public static Builder builder() { + return new Builder(); + } + + @Override + public boolean equals(Object obj) { + if (obj == this) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + UpfTerminationUplink that = (UpfTerminationUplink) obj; + + // Safe comparisons between potentially null objects + return this.dropping == that.dropping && + Objects.equals(this.ueSessionId, that.ueSessionId) && + Objects.equals(this.applicationId, that.applicationId) && + Objects.equals(this.ctrId, that.ctrId) && + this.appMeterIdx == that.appMeterIdx && + Objects.equals(this.trafficClass, that.trafficClass); + } + + @Override + public int hashCode() { + return Objects.hash(ueSessionId, applicationId, ctrId, trafficClass, appMeterIdx, dropping); + } + + /** + * Get UE Session ID associated with UPF Termination rule. + * + * @return UE Session ID + */ + public Ip4Address ueSessionId() { + return ueSessionId; + } + + /** + * Get the application ID associated with UPF Termination rule. + * + * @return Application ID + */ + public byte applicationId() { + return applicationId; + } + + /** + * Get PDR Counter ID associated with UPF Termination rule. + * + * @return PDR counter cell ID + */ + public Integer counterId() { + return ctrId; + } + + /** + * Get Traffic Class set by this UPF Termination rule. + * + * @return Traffic Class + */ + public Byte trafficClass() { + return trafficClass; + } + + /** + * True if this UPF Termination needs to drop traffic. + * + * @return true if the UPF Termination needs dropping. + */ + public boolean needsDropping() { + return dropping; + } + + /** + * Get the app meter index set by this UPF Termination rule. + * + * @return App meter index + */ + public int appMeterIdx() { + return appMeterIdx; + } + + @Override + public UpfEntityType type() { + return UpfEntityType.TERMINATION_UPLINK; + } + + @Override + public String toString() { + return "UpfTerminationUL(" + matchString() + " -> " + actionString() + ")"; + } + + private String matchString() { + return "Match(ue_addr=" + this.ueSessionId() + ", app_id=" + this.applicationId() + ")"; + } + + private String actionString() { + String fwd = "FWD"; + if (this.needsDropping()) { + fwd = "DROP"; + } + return "Action(" + fwd + + ", ctr_id=" + this.counterId() + + ", tc=" + this.trafficClass() + + ", app_meter_idx=" + this.appMeterIdx() + + ")"; + } + + public static class Builder { + private Ip4Address ueSessionId = null; + private Byte applicationId = null; + private Integer ctrId = null; + private Byte trafficClass = null; + private int appMeterIdx = DEFAULT_APP_INDEX; + private boolean dropping = false; + + public Builder() { + + } + + /** + * Set the ID of the UE session. + * + * @param ueSessionId UE session ID + * @return This builder object + */ + public Builder withUeSessionId(Ip4Address ueSessionId) { + this.ueSessionId = ueSessionId; + return this; + } + + /** + * Set the ID of the application. + * If not set, default to {@link UpfEntity#DEFAULT_APP_ID}. + * + * @param applicationId Application ID + * @return This builder object + */ + public Builder withApplicationId(byte applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Set the dataplane counter cell ID. + * + * @param ctrId PDR counter cell ID + * @return This builder object + */ + public Builder withCounterId(int ctrId) { + this.ctrId = ctrId; + return this; + } + + /** + * Set the Traffic Class. + * + * @param trafficClass Traffic Class + * @return This builder object + */ + public Builder withTrafficClass(byte trafficClass) { + this.trafficClass = trafficClass; + return this; + } + + /** + * Sets whether to drop uplink UPF termination traffic or not. + * + * @param dropping True if request to drop, false otherwise + * @return This builder object + */ + public Builder needsDropping(boolean dropping) { + this.dropping = dropping; + return this; + } + + /** + * Sets the app meter index. + * If not set, default to {@link UpfEntity#DEFAULT_APP_INDEX}. + * + * @param appMeterIdx App meter index + * @return This builder object + */ + public Builder withAppMeterIdx(int appMeterIdx) { + this.appMeterIdx = appMeterIdx; + return this; + } + + public UpfTerminationUplink build() { + // Match fields must be provided + checkNotNull(ueSessionId, "UE session ID must be provided"); + if (applicationId == null) { + applicationId = DEFAULT_APP_ID; + } + checkNotNull(ctrId, "Counter ID must be provided"); + if (!dropping) { + checkNotNull(trafficClass, "Traffic class must be provided"); + } + // TODO: should we verify that when dropping no other fields are provided + return new UpfTerminationUplink( + this.ueSessionId, this.applicationId, this.ctrId, + this.trafficClass, this.appMeterIdx, this.dropping + ); + } + + } + +} diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/package-info.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/package-info.java new file mode 100644 index 00000000000..805e149f654 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * 3GPP User Plane Function behaviors and related classes. + */ +package org.onosproject.net.behaviour.upf; diff --git a/core/api/src/main/java/org/onosproject/net/device/DefaultDeviceDescription.java b/core/api/src/main/java/org/onosproject/net/device/DefaultDeviceDescription.java index d0b7b2b335c..271e678667d 100644 --- a/core/api/src/main/java/org/onosproject/net/device/DefaultDeviceDescription.java +++ b/core/api/src/main/java/org/onosproject/net/device/DefaultDeviceDescription.java @@ -217,6 +217,7 @@ public String toString() { .add("hw", hwVersion).add("sw", swVersion) .add("serial", serialNumber) .add("chassisId", chassisId) + .add("defaultAvailable", defaultAvailable) .add("annotations", annotations()) .toString(); } diff --git a/core/api/src/main/java/org/onosproject/net/device/DeviceProvider.java b/core/api/src/main/java/org/onosproject/net/device/DeviceProvider.java index 771a8e43227..d625da75372 100644 --- a/core/api/src/main/java/org/onosproject/net/device/DeviceProvider.java +++ b/core/api/src/main/java/org/onosproject/net/device/DeviceProvider.java @@ -20,6 +20,8 @@ import org.onosproject.net.PortNumber; import org.onosproject.net.provider.Provider; +import java.util.concurrent.CompletableFuture; + /** * Abstraction of a device information provider. */ @@ -107,4 +109,31 @@ default void triggerDisconnect(DeviceId deviceId) { throw new UnsupportedOperationException(id() + " does not implement this feature"); } + /** + * Probe the reachability of the device from the provider perspective. + *

+ * Implementations are encouraged to provide an async implementation. + * With the respect of triggerProbe, this method returns whether or + * not was possible to send a message to the device from this instance. + * Instead, isReachable asses only the capability to send a message from + * this node but does not imply sending a message to the device. + * + * @param deviceId device identifier + * @return completable future eventually true if reachable, false otherwise + */ + default CompletableFuture probeReachability(DeviceId deviceId) { + return CompletableFuture.completedFuture(isReachable(deviceId)); + } + + /** + * Return the grace period of this provider in milliseconds. With some devices, it might be + * required more time to establish a working channel. This method returns a grace period + * that should be respected before checking the reachability with the device. + * + * @return the grace period of the device. 0 if the device is expected to be immediately functional + */ + default int gracePeriod() { + return 0; + } + } diff --git a/core/api/src/main/java/org/onosproject/net/device/DeviceProviderService.java b/core/api/src/main/java/org/onosproject/net/device/DeviceProviderService.java index b00fa632159..f11f0cc894b 100644 --- a/core/api/src/main/java/org/onosproject/net/device/DeviceProviderService.java +++ b/core/api/src/main/java/org/onosproject/net/device/DeviceProviderService.java @@ -105,4 +105,14 @@ default void receivedRoleReply(DeviceId deviceId, MastershipRole response) { */ void updatePortStatistics(DeviceId deviceId, Collection portStatistics); + /** + * Returns the specified device description. + * + * @param deviceId device identifier + * @return device description or null if not present + */ + default DeviceDescription getDeviceDescription(DeviceId deviceId) { + return null; + } + } diff --git a/core/api/src/main/java/org/onosproject/net/device/DeviceStore.java b/core/api/src/main/java/org/onosproject/net/device/DeviceStore.java index bd59838433b..ed5d33d19bc 100644 --- a/core/api/src/main/java/org/onosproject/net/device/DeviceStore.java +++ b/core/api/src/main/java/org/onosproject/net/device/DeviceStore.java @@ -207,6 +207,17 @@ default PortStatistics getDeltaStatisticsForPort(DeviceId deviceId, PortNumber p */ PortDescription getPortDescription(ProviderId providerId, DeviceId deviceId, PortNumber portNumber); + /** + * Returns the specified device description. + * + * @param providerId provider identifier + * @param deviceId device identifier + * @return device description or null if not present + */ + default DeviceDescription getDeviceDescription(ProviderId providerId, DeviceId deviceId) { + return null; + } + /** * Indicates whether the specified device is available/online. * diff --git a/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficTreatment.java b/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficTreatment.java index ffad4f7aa18..467cc6d61b3 100644 --- a/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficTreatment.java +++ b/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficTreatment.java @@ -273,6 +273,7 @@ public Builder add(Instruction instruction) { case L4MODIFICATION: case PROTOCOL_INDEPENDENT: case EXTENSION: + case TRUNCATE: current.add(instruction); break; case TABLE: @@ -558,6 +559,11 @@ public TrafficTreatment.Builder addTreatment(TrafficTreatment treatment) { return this; } + @Override + public TrafficTreatment.Builder truncate(int maxLen) { + return add(Instructions.truncate(maxLen)); + } + @Override public TrafficTreatment build() { if (deferred.isEmpty() && immediate.isEmpty() diff --git a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleOperations.java b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleOperations.java index 9c0f522ea8a..ef41ca7358b 100644 --- a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleOperations.java +++ b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleOperations.java @@ -21,10 +21,13 @@ import com.google.common.collect.Lists; import java.util.List; +import java.util.Optional; import java.util.Set; import static com.google.common.base.Preconditions.checkNotNull; -import static org.onosproject.net.flow.FlowRuleOperation.Type.*; +import static org.onosproject.net.flow.FlowRuleOperation.Type.ADD; +import static org.onosproject.net.flow.FlowRuleOperation.Type.REMOVE; +import static org.onosproject.net.flow.FlowRuleOperation.Type.MODIFY; /** * A batch of flow rule operations that are broken into stages. @@ -34,17 +37,21 @@ public class FlowRuleOperations { private final List> stages; private final FlowRuleOperationsContext callback; + private final Integer stripeKey; private FlowRuleOperations(List> stages, - FlowRuleOperationsContext cb) { + FlowRuleOperationsContext cb, + Integer stripeKey) { this.stages = stages; this.callback = cb; + this.stripeKey = stripeKey; } // kryo-constructor protected FlowRuleOperations() { this.stages = Lists.newArrayList(); this.callback = null; + this.stripeKey = null; } /** @@ -66,6 +73,18 @@ public FlowRuleOperationsContext callback() { return callback; } + /** + * Returns the stripe key. Expectation is that FlowRuleOperations with the + * same key will be executed sequentially in the same order as they are + * submitted to the FlowRuleService. Operations without a key or with + * different keys might be executed in parallel. + * + * @return the stripe key associated to this or null if not present + */ + public Optional stripeKey() { + return Optional.ofNullable(stripeKey); + } + /** * Returns a new builder. * @@ -89,6 +108,7 @@ public static final class Builder { private final ImmutableList.Builder> listBuilder = ImmutableList.builder(); private ImmutableSet.Builder currentStage = ImmutableSet.builder(); + private Integer stripeKey = null; // prevent use of the default constructor outside of this file; use the above method private Builder() {} @@ -159,6 +179,25 @@ public Builder newStage() { return this; } + /** + * Provides semantics similar to lock striping. FlowRuleOperations + * with the same key will be executed sequentially. Operations without + * a key or with different keys might be executed in parallel. + *

+ * This parameter is useful to correlate different operations with + * potentially conflicting writes, to guarantee that operations are + * executed in-order. For example, to handle the case where one operation + * that removes a flow rule is followed by one that adds the same flow rule. + *

+ * + * @param stripeKey an integer key + * @return this + */ + public Builder striped(int stripeKey) { + this.stripeKey = stripeKey; + return this; + } + /** * Builds the immutable flow rule operations. * @@ -178,7 +217,7 @@ public FlowRuleOperations build(FlowRuleOperationsContext cb) { checkNotNull(cb); closeStage(); - return new FlowRuleOperations(listBuilder.build(), cb); + return new FlowRuleOperations(listBuilder.build(), cb, stripeKey); } } } diff --git a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java index 78aef84a7df..807d09eef1d 100644 --- a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java +++ b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleService.java @@ -63,6 +63,14 @@ default int getFlowRuleCount(DeviceId deviceId, FlowEntry.FlowEntryState state) return 0; } + /** + * Returns the stored flow. + * + * @param rule the rule to look for + * @return a flow rule + */ + FlowEntry getFlowEntry(FlowRule rule); + /** * Returns the collection of flow entries applied on the specified device. * This will include flow rules which may not yet have been applied to @@ -114,6 +122,15 @@ default Iterable getFlowEntriesByState(DeviceId deviceId, */ void purgeFlowRules(DeviceId deviceId); + /** + * Purges all the flow rules on the specified device from the given application id. + * @param deviceId device identifier + * @param appId application identifier + */ + default void purgeFlowRules(DeviceId deviceId, ApplicationId appId) { + throw new UnsupportedOperationException("purgeFlowRules not implemented!"); + } + /** * Removes the specified flow rules from their respective devices. If the * device is not presently connected to the controller, these flow will @@ -179,4 +196,33 @@ default Iterable getFlowEntriesByState(DeviceId deviceId, default long getActiveFlowRuleCount(DeviceId deviceId) { return 0; } + + /** + * Applies the specified flow rules onto their respective devices. Similar + * to {@link FlowRuleService#applyFlowRules(FlowRule...)} but expectation is + * that flow rules applied by subsequent calls using the same key will be + * executed sequentially. Flow rules applied through {@link FlowRuleService#applyFlowRules(FlowRule...)} + * might be executed in parallel. + * + * @param stripeKey an integer key + * @param flowRules one or more flow rules + */ + default void applyFlowRules(int stripeKey, FlowRule... flowRules) { + + } + + /** + * Removes the specified flow rules from their respective devices. Similar + * to {@link FlowRuleService#removeFlowRules(FlowRule...)} but expectation is + * that flow rules removed by subsequent calls using the same key will be + * executed sequentially. Flow rules applied through {@link FlowRuleService#removeFlowRules(FlowRule...)} + * might be executed in parallel. + * + * @param stripeKey an integer key + * @param flowRules one or more flow rules + */ + default void removeFlowRules(int stripeKey, FlowRule... flowRules) { + + } + } diff --git a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleStore.java b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleStore.java index 07493a887a1..1d9e60e434d 100644 --- a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleStore.java +++ b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleStore.java @@ -15,6 +15,7 @@ */ package org.onosproject.net.flow; +import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; import org.onosproject.net.flow.oldbatch.FlowRuleBatchEvent; import org.onosproject.net.flow.oldbatch.FlowRuleBatchOperation; @@ -136,6 +137,15 @@ default int getFlowRuleCount(DeviceId deviceId, FlowEntry.FlowEntryState state) */ default void purgeFlowRule(DeviceId deviceId) {} + /** + * Removes all flow entries of given device and application ID from store. + * + * @param deviceId device id + * @param appId application id + * @return true if operation was successful, false otherwise. + */ + boolean purgeFlowRules(DeviceId deviceId, ApplicationId appId); + /** * Removes all flow entries from store. */ diff --git a/core/api/src/main/java/org/onosproject/net/flow/TrafficTreatment.java b/core/api/src/main/java/org/onosproject/net/flow/TrafficTreatment.java index 9fde7741dec..538a78f24f6 100644 --- a/core/api/src/main/java/org/onosproject/net/flow/TrafficTreatment.java +++ b/core/api/src/main/java/org/onosproject/net/flow/TrafficTreatment.java @@ -479,6 +479,14 @@ interface Builder { Builder statTrigger(Map statTriggerFieldMap, StatTriggerFlag statTriggerFlag); + /** + * Adds a truncate instruction. + * + * @param maxLen the maximum frame length in bytes, must be a positive integer + * @return a treatment builder + */ + Builder truncate(int maxLen); + /** * Add all instructions from another treatment. * diff --git a/core/api/src/main/java/org/onosproject/net/flow/criteria/PiCriterion.java b/core/api/src/main/java/org/onosproject/net/flow/criteria/PiCriterion.java index a346927fd72..43a5bdfb87a 100644 --- a/core/api/src/main/java/org/onosproject/net/flow/criteria/PiCriterion.java +++ b/core/api/src/main/java/org/onosproject/net/flow/criteria/PiCriterion.java @@ -23,6 +23,7 @@ import org.onosproject.net.pi.runtime.PiExactFieldMatch; import org.onosproject.net.pi.runtime.PiFieldMatch; import org.onosproject.net.pi.runtime.PiLpmFieldMatch; +import org.onosproject.net.pi.runtime.PiOptionalFieldMatch; import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; @@ -107,6 +108,16 @@ public static Builder builder() { return new Builder(); } + /** + * Returns the PiCriterion builder initialized by the given PiCriterion. + * + * @param piCriterion the input PiCriterion + * @return PiCriterion builder + */ + public static Builder builder(PiCriterion piCriterion) { + return new Builder(piCriterion); + } + /** * PiCriterion Builder. */ @@ -120,6 +131,21 @@ private Builder() { // ban constructor. } + private Builder(PiCriterion piCriterion) { + piCriterion.fieldMatchMap.forEach(((piMatchFieldId, piFieldMatch) -> add(piFieldMatch))); + } + + /** + * Adds a match field to the builder. + * + * @param field the field value + * @return this + */ + public Builder add(PiFieldMatch field) { + fieldMatchMapBuilder.put(field.fieldId(), field); + return this; + } + /** * Adds an exact field match for the given fieldId and value. * @@ -168,6 +194,18 @@ public Builder matchExact(PiMatchFieldId fieldId, byte[] value) { return this; } + /** + * Adds an exact field match for the given fieldId and value. + * + * @param fieldId protocol-independent header field Id + * @param value exact match value + * @return this + */ + public Builder matchExact(PiMatchFieldId fieldId, String value) { + fieldMatchMapBuilder.put(fieldId, new PiExactFieldMatch(fieldId, copyFrom(value))); + return this; + } + /** * Adds a ternary field match for the given fieldId, value and mask. * @@ -324,6 +362,66 @@ public Builder matchRange(PiMatchFieldId fieldId, byte[] low, byte[] high) { return this; } + /** + * Adds an optional field match for the given fieldId and value. + * + * @param fieldId protocol-independent header field Id + * @param value optional match value + * @return this + */ + public Builder matchOptional(PiMatchFieldId fieldId, short value) { + fieldMatchMapBuilder.put(fieldId, new PiOptionalFieldMatch(fieldId, copyFrom(value))); + return this; + } + + /** + * Adds an optional field match for the given fieldId and value. + * + * @param fieldId protocol-independent header field Id + * @param value optional match value + * @return this + */ + public Builder matchOptional(PiMatchFieldId fieldId, int value) { + fieldMatchMapBuilder.put(fieldId, new PiOptionalFieldMatch(fieldId, copyFrom(value))); + return this; + } + + /** + * Adds an optional field match for the given fieldId and value. + * + * @param fieldId protocol-independent header field Id + * @param value optional match value + * @return this + */ + public Builder matchOptional(PiMatchFieldId fieldId, long value) { + fieldMatchMapBuilder.put(fieldId, new PiOptionalFieldMatch(fieldId, copyFrom(value))); + return this; + } + + /** + * Adds an optional field match for the given fieldId and value. + * + * @param fieldId protocol-independent header field Id + * @param value optional match value + * @return this + */ + public Builder matchOptional(PiMatchFieldId fieldId, byte[] value) { + fieldMatchMapBuilder.put(fieldId, new PiOptionalFieldMatch(fieldId, copyFrom(value))); + return this; + } + + /** + * Adds an optional field match for the given fieldId and value. + * + * @param fieldId protocol-independent header field Id + * @param value optional match value + * @return this + */ + public Builder matchOptional(PiMatchFieldId fieldId, String value) { + fieldMatchMapBuilder.put(fieldId, new PiOptionalFieldMatch(fieldId, copyFrom(value))); + return this; + } + /** * Builds a PiCriterion. * diff --git a/core/api/src/main/java/org/onosproject/net/flow/criteria/PortCriterion.java b/core/api/src/main/java/org/onosproject/net/flow/criteria/PortCriterion.java index af0673b7ffe..a2c49a1d496 100644 --- a/core/api/src/main/java/org/onosproject/net/flow/criteria/PortCriterion.java +++ b/core/api/src/main/java/org/onosproject/net/flow/criteria/PortCriterion.java @@ -54,7 +54,7 @@ public PortNumber port() { @Override public String toString() { - return type().toString() + SEPARATOR + port; + return type().toString() + SEPARATOR + port.toStringWithoutName(); } @Override diff --git a/core/api/src/main/java/org/onosproject/net/flow/instructions/Instruction.java b/core/api/src/main/java/org/onosproject/net/flow/instructions/Instruction.java index 66fbb1841f6..a87f3a31b54 100644 --- a/core/api/src/main/java/org/onosproject/net/flow/instructions/Instruction.java +++ b/core/api/src/main/java/org/onosproject/net/flow/instructions/Instruction.java @@ -101,7 +101,12 @@ enum Type { /** * Signifies that statistics will be triggered. */ - STAT_TRIGGER + STAT_TRIGGER, + + /** + * Signifies that the packet should be truncated. + */ + TRUNCATE } /** diff --git a/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java b/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java index 621c0071e34..d330dcd2030 100644 --- a/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java +++ b/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java @@ -49,6 +49,7 @@ import java.util.Objects; import static com.google.common.base.MoreObjects.toStringHelper; +import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; /** @@ -544,6 +545,17 @@ public static StatTriggerInstruction statTrigger(Map sta return new StatTriggerInstruction(statTriggerMap, flag); } + /** + * Creates a truncate instruction. + * + * @param maxLen the maximum frame length in bytes, must be a positive integer + * @return truncate instruction + */ + public static TruncateInstruction truncate(int maxLen) { + checkArgument(maxLen > 0, "Truncate max length must be a positive integer."); + return new TruncateInstruction(maxLen); + } + /** * No Action instruction. */ @@ -974,6 +986,44 @@ public int hashCode() { } } + public static final class TruncateInstruction implements Instruction { + private int maxLen; + + public TruncateInstruction(int maxLen) { + this.maxLen = maxLen; + } + + public int maxLen() { + return maxLen; + } + + @Override + public Type type() { + return Type.TRUNCATE; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TruncateInstruction that = (TruncateInstruction) o; + return maxLen == that.maxLen; + } + + @Override + public int hashCode() { + return com.google.common.base.Objects.hashCode(maxLen); + } + + @Override + public String toString() { + return type() + SEPARATOR + maxLen; + } + } } diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultFilteringObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultFilteringObjective.java index f3d426606d1..37000afeda3 100644 --- a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultFilteringObjective.java +++ b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultFilteringObjective.java @@ -18,6 +18,8 @@ import com.google.common.annotations.Beta; import com.google.common.collect.ImmutableList; import org.onosproject.core.ApplicationId; +import org.onosproject.net.AbstractAnnotated; +import org.onosproject.net.Annotations; import org.onosproject.net.flow.TrafficTreatment; import org.onosproject.net.flow.criteria.Criteria; import org.onosproject.net.flow.criteria.Criterion; @@ -35,7 +37,8 @@ * Default implementation of a filtering objective. */ @Beta -public final class DefaultFilteringObjective implements FilteringObjective { +public final class DefaultFilteringObjective extends AbstractAnnotated + implements FilteringObjective { private final Type type; private final boolean permanent; @@ -50,6 +53,7 @@ public final class DefaultFilteringObjective implements FilteringObjective { private final TrafficTreatment meta; private DefaultFilteringObjective(Builder builder) { + super(builder.annotations); this.key = builder.key; this.type = builder.type; this.permanent = builder.permanent; @@ -160,6 +164,7 @@ public String toString() { .add("appId", appId()) .add("permanent", permanent()) .add("timeout", timeout()) + .add("annotations", annotations()) .toString(); } @@ -191,6 +196,7 @@ public static final class Builder implements FilteringObjective.Builder { private Operation op; private ObjectiveContext context; private TrafficTreatment meta; + private Annotations annotations; // Creates an empty builder private Builder() { @@ -207,6 +213,7 @@ private Builder(FilteringObjective objective) { this.appId = objective.appId(); this.meta = objective.meta(); this.op = objective.op(); + this.annotations = objective.annotations(); } @Override @@ -264,6 +271,12 @@ public Builder withMeta(TrafficTreatment treatment) { return this; } + @Override + public Builder withAnnotations(Annotations annotations) { + this.annotations = annotations; + return this; + } + @Override public FilteringObjective add() { conditions = listBuilder.build(); diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultForwardingObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultForwardingObjective.java index a44b05b808a..bea1e968922 100644 --- a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultForwardingObjective.java +++ b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultForwardingObjective.java @@ -18,6 +18,8 @@ import com.google.common.annotations.Beta; import org.onosproject.core.ApplicationId; +import org.onosproject.net.AbstractAnnotated; +import org.onosproject.net.Annotations; import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.flow.TrafficTreatment; @@ -32,7 +34,8 @@ * Default implementation of a forwarding objective. */ @Beta -public final class DefaultForwardingObjective implements ForwardingObjective { +public final class DefaultForwardingObjective extends AbstractAnnotated + implements ForwardingObjective { private final TrafficSelector selector; private final Flag flag; @@ -49,6 +52,7 @@ public final class DefaultForwardingObjective implements ForwardingObjective { private final int id; private DefaultForwardingObjective(Builder builder) { + super(builder.annotations); this.selector = builder.selector; this.flag = builder.flag; this.permanent = builder.permanent; @@ -169,6 +173,7 @@ public String toString() { .add("appId", appId()) .add("permanent", permanent()) .add("timeout", timeout()) + .add("annotations", annotations()) .toString(); } @@ -212,6 +217,8 @@ public static final class Builder implements ForwardingObjective.Builder { private Operation op; private ObjectiveContext context; private TrafficSelector meta; + private Annotations annotations; + // Creates an empty builder private Builder() { @@ -229,6 +236,7 @@ private Builder(ForwardingObjective objective) { this.treatment = objective.treatment(); this.op = objective.op(); this.meta = objective.meta(); + this.annotations = objective.annotations(); } @Override @@ -286,6 +294,12 @@ public Builder withMeta(TrafficSelector meta) { return this; } + @Override + public Builder withAnnotations(Annotations annotations) { + this.annotations = annotations; + return this; + } + @Override public ForwardingObjective add() { checkNotNull(selector, "Must have a selector"); diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java index 36656c481e7..32635cba665 100644 --- a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java +++ b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java @@ -18,6 +18,8 @@ import com.google.common.annotations.Beta; import com.google.common.collect.ImmutableList; import org.onosproject.core.ApplicationId; +import org.onosproject.net.AbstractAnnotated; +import org.onosproject.net.Annotations; import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.flow.TrafficTreatment; @@ -35,7 +37,8 @@ * Default implementation of a next objective. */ @Beta -public final class DefaultNextObjective implements NextObjective { +public final class DefaultNextObjective extends AbstractAnnotated + implements NextObjective { private final List treatments; private final ApplicationId appId; @@ -46,6 +49,7 @@ public final class DefaultNextObjective implements NextObjective { private final TrafficSelector meta; private DefaultNextObjective(Builder builder) { + super(builder.annotations); this.treatments = builder.treatments; this.appId = builder.appId; this.type = builder.type; @@ -147,6 +151,7 @@ public String toString() { .add("appId", appId()) .add("permanent", permanent()) .add("timeout", timeout()) + .add("annotations", annotations()) .toString(); } @@ -173,6 +178,7 @@ public static final class Builder implements NextObjective.Builder { private Operation op; private ObjectiveContext context; private TrafficSelector meta; + private Annotations annotations; private final ImmutableList.Builder listBuilder = ImmutableList.builder(); @@ -190,6 +196,7 @@ private Builder(NextObjective objective) { this.meta = objective.meta(); this.appId = objective.appId(); this.op = objective.op(); + this.annotations = objective.annotations(); } @Override @@ -260,6 +267,12 @@ public Builder withMeta(TrafficSelector meta) { return this; } + @Override + public Builder withAnnotations(Annotations annotations) { + this.annotations = annotations; + return this; + } + @Override public NextObjective add() { return add(null); diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjective.java index 623de3b46a5..641ba882102 100644 --- a/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjective.java +++ b/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjective.java @@ -17,6 +17,7 @@ import com.google.common.annotations.Beta; import org.onosproject.core.ApplicationId; +import org.onosproject.net.Annotations; import org.onosproject.net.flow.TrafficTreatment; import org.onosproject.net.flow.criteria.Criterion; @@ -169,6 +170,16 @@ interface Builder extends Objective.Builder { @Override public Builder makePermanent(); + + /** + * Adds annotations to the filtering objective. + * + * @param annotations the annotations for the filtering objective + * @return a filtering objective builder + */ + @Override + Builder withAnnotations(Annotations annotations); + /** * Builds the filtering objective that will be added. * diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/FlowObjectiveService.java b/core/api/src/main/java/org/onosproject/net/flowobjective/FlowObjectiveService.java index 11a7f5f41b6..4def9534686 100644 --- a/core/api/src/main/java/org/onosproject/net/flowobjective/FlowObjectiveService.java +++ b/core/api/src/main/java/org/onosproject/net/flowobjective/FlowObjectiveService.java @@ -25,6 +25,7 @@ import com.google.common.collect.Maps; import org.apache.commons.lang.NotImplementedException; import org.apache.commons.lang3.tuple.Pair; +import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; /** @@ -128,6 +129,14 @@ default void apply(DeviceId deviceId, Objective objective) { */ List getPendingFlowObjectives(); + /** + * Purges all flow objectives on a given device and for a given application. + * + * @param deviceId device identifier + * @param appId application identifier + */ + void purgeAll(DeviceId deviceId, ApplicationId appId); + /** * Returns all filtering objective that are waiting for the completion of previous objective * with the same FilteringObjQueueKey. diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/ForwardingObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/ForwardingObjective.java index a0c81af54eb..0ae592035ce 100644 --- a/core/api/src/main/java/org/onosproject/net/flowobjective/ForwardingObjective.java +++ b/core/api/src/main/java/org/onosproject/net/flowobjective/ForwardingObjective.java @@ -17,6 +17,7 @@ import com.google.common.annotations.Beta; import org.onosproject.core.ApplicationId; +import org.onosproject.net.Annotations; import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.flow.TrafficTreatment; @@ -182,13 +183,22 @@ interface Builder extends Objective.Builder { Builder withPriority(int priority); /** - * Makes the filtering objective permanent. + * Makes the forwarding objective permanent. * * @return an objective builder */ @Override Builder makePermanent(); + /** + * Adds annotations to the forwarding objective. + * + * @param annotations the annotations for the forwarding objective + * @return a forwarding objective builder + */ + @Override + Builder withAnnotations(Annotations annotations); + /** * Builds the forwarding objective that will be added. * diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjective.java index 19585f7e29d..6d4acaac3fb 100644 --- a/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjective.java +++ b/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjective.java @@ -17,6 +17,7 @@ import com.google.common.annotations.Beta; import org.onosproject.core.ApplicationId; +import org.onosproject.net.Annotations; import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.flow.TrafficTreatment; @@ -176,6 +177,15 @@ interface Builder extends Objective.Builder { */ Builder withMeta(TrafficSelector selector); + /** + * Adds annotations to the next objective. + * + * @param annotations the annotations for the next objective + * @return a next objective builder + */ + @Override + Builder withAnnotations(Annotations annotations); + /** * Builds the next objective that will be added. * diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java index 3b0346c8fa2..8dfc1760cb3 100644 --- a/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java +++ b/core/api/src/main/java/org/onosproject/net/flowobjective/Objective.java @@ -17,6 +17,8 @@ import com.google.common.annotations.Beta; import org.onosproject.core.ApplicationId; +import org.onosproject.net.Annotated; +import org.onosproject.net.Annotations; import java.util.Optional; @@ -24,7 +26,7 @@ * Base representation of a flow-objective description. */ @Beta -public interface Objective { +public interface Objective extends Annotated { boolean DEFAULT_PERMANENT = true; int DEFAULT_TIMEOUT = 0; @@ -173,6 +175,14 @@ interface Builder { */ Builder withPriority(int priority); + /** + * Adds annotations to the objective. + * + * @param annotations the annotations for the objective + * @return an objective builder + */ + Builder withAnnotations(Annotations annotations); + /** * Builds the objective that will be added. * diff --git a/core/api/src/main/java/org/onosproject/net/group/GroupService.java b/core/api/src/main/java/org/onosproject/net/group/GroupService.java index 460ccb658ee..bf18a2e360d 100644 --- a/core/api/src/main/java/org/onosproject/net/group/GroupService.java +++ b/core/api/src/main/java/org/onosproject/net/group/GroupService.java @@ -132,6 +132,16 @@ default void setBucketsForGroup(DeviceId deviceId, */ void purgeGroupEntries(DeviceId deviceId); + /** + * Purges all the group entries on the specified device and application. + * + * @param deviceId device identifier + * @param appId application identifier + */ + default void purgeGroupEntries(DeviceId deviceId, ApplicationId appId) { + throw new UnsupportedOperationException("purgeGroupEntries not implemented"); + } + /** * Purges all group entries. */ diff --git a/core/api/src/main/java/org/onosproject/net/group/GroupStore.java b/core/api/src/main/java/org/onosproject/net/group/GroupStore.java index 850b2ce51d7..672bb4e81a0 100644 --- a/core/api/src/main/java/org/onosproject/net/group/GroupStore.java +++ b/core/api/src/main/java/org/onosproject/net/group/GroupStore.java @@ -17,6 +17,7 @@ import java.util.Collection; +import org.onosproject.core.ApplicationId; import org.onosproject.core.GroupId; import org.onosproject.net.DeviceId; import org.onosproject.store.Store; @@ -129,6 +130,14 @@ void deleteGroupDescription(DeviceId deviceId, */ void purgeGroupEntry(DeviceId deviceId); + /** + * Removes all group entries of given device and given application from store. + * + * @param deviceId device id + * @param appId application id + */ + void purgeGroupEntries(DeviceId deviceId, ApplicationId appId); + /** * Removes all group entries from store. */ diff --git a/core/api/src/main/java/org/onosproject/net/intent/IntentService.java b/core/api/src/main/java/org/onosproject/net/intent/IntentService.java index 595e7e333ae..745d7f4609c 100644 --- a/core/api/src/main/java/org/onosproject/net/intent/IntentService.java +++ b/core/api/src/main/java/org/onosproject/net/intent/IntentService.java @@ -17,6 +17,7 @@ import com.google.common.annotations.Beta; +import org.onosproject.core.ApplicationId; import org.onosproject.event.ListenerService; import java.util.List; @@ -71,6 +72,14 @@ public interface IntentService */ Iterable getIntents(); + /** + * Returns an iterable of all intents with this application ID. + * + * @param id the application ID to look up + * @return collection of intents + */ + Iterable getIntentsByAppId(ApplicationId id); + /** * Adds an intent data object to the pending map for processing. *

diff --git a/core/api/src/main/java/org/onosproject/net/intent/Key.java b/core/api/src/main/java/org/onosproject/net/intent/Key.java index fadf8b92cc4..ef109f2cb8b 100644 --- a/core/api/src/main/java/org/onosproject/net/intent/Key.java +++ b/core/api/src/main/java/org/onosproject/net/intent/Key.java @@ -130,8 +130,12 @@ public boolean equals(Object obj) { @Override public int compareTo(Key o) { - StringKey sk = (StringKey) o; - return this.key.compareTo(sk.key); + if (o instanceof StringKey) { + StringKey sk = (StringKey) o; + return this.key.compareTo(sk.key); + } else { + return this.key.compareTo(o.toString()); + } } } @@ -176,9 +180,13 @@ public boolean equals(Object obj) { @Override public int compareTo(Key o) { - Long myKey = key; - Long otherKey = ((LongKey) o).key; - return myKey.compareTo(otherKey); + if (o instanceof LongKey) { + Long myKey = key; + Long otherKey = ((LongKey) o).key; + return myKey.compareTo(otherKey); + } else { + return this.toString().compareTo(o.toString()); + } } } } diff --git a/core/api/src/main/java/org/onosproject/net/intent/constraint/AnnotationConstraint.java b/core/api/src/main/java/org/onosproject/net/intent/constraint/AnnotationConstraint.java index 192eff5b5bd..fe91de332d9 100644 --- a/core/api/src/main/java/org/onosproject/net/intent/constraint/AnnotationConstraint.java +++ b/core/api/src/main/java/org/onosproject/net/intent/constraint/AnnotationConstraint.java @@ -76,9 +76,11 @@ public boolean isValid(Link link, ResourceContext context) { } private boolean isValid(Link link) { - double value = getAnnotatedValue(link, key); - - return value <= threshold; + if (link.annotations().value(key) != null) { + return getAnnotatedValue(link, key) <= threshold; + } else { + return false; + } } // doesn't use LinkResourceService diff --git a/core/api/src/main/java/org/onosproject/net/meter/Band.java b/core/api/src/main/java/org/onosproject/net/meter/Band.java index 9f9479c987f..befbeadf0f4 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/Band.java +++ b/core/api/src/main/java/org/onosproject/net/meter/Band.java @@ -51,8 +51,27 @@ enum Type { * Defines a meter band with no action, used to mark * packets internally in the pipeline, i.e. without * modifying the packet headers. + * + * @deprecated in onos-2.5, replace by MARK_YELLOW and MARK_RED */ + @Deprecated NONE, + + /** + * Defines a meter band for the configuration of the committed + * rate AND the committed burst size. Used in conjunction with MARK_RED + * to implement a srTCM or trTCM, see RFCs 2697 and 2698 respectively. + */ + MARK_YELLOW, + + /** + * Defines a meter band for the configuration of the peak rate + * AND the peak burst size OR the excess burst size. When used to + * configure a srTCM excess rate must be 0. Used in conjunction with + * MARK_YELLOW to implement a srTCM or trTCM, see RFCs 2697 and 2698 + * respectively. + */ + MARK_RED, } /** diff --git a/core/api/src/main/java/org/onosproject/net/meter/DefaultBand.java b/core/api/src/main/java/org/onosproject/net/meter/DefaultBand.java index e0069a5eb58..85e6c70f268 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/DefaultBand.java +++ b/core/api/src/main/java/org/onosproject/net/meter/DefaultBand.java @@ -15,6 +15,8 @@ */ package org.onosproject.net.meter; +import com.google.common.base.Objects; + import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; @@ -96,6 +98,26 @@ public static Builder builder() { return new Builder(); } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefaultBand that = (DefaultBand) o; + return rate == that.rate && + type == that.type && + Objects.equal(burstSize, that.burstSize) && + Objects.equal(prec, that.prec); + } + + @Override + public int hashCode() { + return Objects.hashCode(type, rate, burstSize, prec); + } + public static final class Builder implements Band.Builder { private long rate; diff --git a/core/api/src/main/java/org/onosproject/net/meter/DefaultMeter.java b/core/api/src/main/java/org/onosproject/net/meter/DefaultMeter.java index ad0256e7573..ef8b3df73d6 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/DefaultMeter.java +++ b/core/api/src/main/java/org/onosproject/net/meter/DefaultMeter.java @@ -18,9 +18,12 @@ import com.google.common.base.Objects; import com.google.common.collect.ImmutableSet; import org.onosproject.core.ApplicationId; +import org.onosproject.net.AbstractAnnotated; +import org.onosproject.net.Annotations; import org.onosproject.net.DeviceId; import java.util.Collection; +import java.util.Optional; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; @@ -30,11 +33,10 @@ /** * A default implementation of a meter. */ -public final class DefaultMeter implements Meter, MeterEntry { - +public final class DefaultMeter extends AbstractAnnotated implements Meter, MeterEntry { private final MeterCellId cellId; - private final ApplicationId appId; + private final Optional appId; private final Unit unit; private final boolean burst; private final Collection bands; @@ -46,8 +48,11 @@ public final class DefaultMeter implements Meter, MeterEntry { private long packets; private long bytes; - private DefaultMeter(DeviceId deviceId, MeterCellId cellId, ApplicationId appId, - Unit unit, boolean burst, Collection bands) { + private DefaultMeter(DeviceId deviceId, MeterCellId cellId, + Optional appId, Unit unit, + boolean burst, Collection bands, + Annotations... annotations) { + super(annotations); this.deviceId = deviceId; this.cellId = cellId; this.appId = appId; @@ -77,7 +82,8 @@ public MeterCellId meterCellId() { @Override public ApplicationId appId() { - return appId; + return appId.orElse(null); + // TODO: Deprecate this API because AppId becomes optional in Meter } @Override @@ -154,11 +160,13 @@ public String toString() { return toStringHelper(this) .add("device", deviceId) .add("cellId", cellId) - .add("appId", appId.name()) + .add("appId", appId.orElse(null)) .add("unit", unit) .add("isBurst", burst) .add("state", state) - .add("bands", bands).toString(); + .add("bands", bands) + .add("annotations", annotations()) + .toString(); } @Override @@ -184,11 +192,12 @@ public int hashCode() { public static final class Builder implements Meter.Builder { private MeterCellId cellId; - private ApplicationId appId; + private Optional appId = Optional.empty(); private Unit unit = Unit.KB_PER_SEC; private boolean burst = false; private Collection bands; private DeviceId deviceId; + private Annotations annotations; @Override public Meter.Builder forDevice(DeviceId deviceId) { @@ -210,7 +219,7 @@ public Meter.Builder withCellId(MeterCellId cellId) { @Override public Meter.Builder fromApp(ApplicationId appId) { - this.appId = appId; + this.appId = Optional.ofNullable(appId); return this; } @@ -232,14 +241,20 @@ public Meter.Builder withBands(Collection bands) { return this; } + @Override + public Builder withAnnotations(Annotations anns) { + this.annotations = anns; + return this; + } + @Override public DefaultMeter build() { checkNotNull(deviceId, "Must specify a device"); checkNotNull(bands, "Must have bands."); checkArgument(!bands.isEmpty(), "Must have at least one band."); - checkNotNull(appId, "Must have an application id"); checkArgument(cellId != null, "Must specify a cell id."); - return new DefaultMeter(deviceId, cellId, appId, unit, burst, bands); + return new DefaultMeter(deviceId, cellId, appId, unit, burst, bands, + annotations); } diff --git a/core/api/src/main/java/org/onosproject/net/meter/DefaultMeterFeatures.java b/core/api/src/main/java/org/onosproject/net/meter/DefaultMeterFeatures.java index bd5d9981247..b9a4368a0bd 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/DefaultMeterFeatures.java +++ b/core/api/src/main/java/org/onosproject/net/meter/DefaultMeterFeatures.java @@ -22,6 +22,7 @@ import java.util.HashSet; import java.util.Set; +import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; /** @@ -29,7 +30,8 @@ */ public final class DefaultMeterFeatures implements MeterFeatures { private DeviceId deviceId; - private long maxMeter; + private long startIndex; + private long endIndex; private Set bandTypes; private Set units; private boolean burst; @@ -37,13 +39,16 @@ public final class DefaultMeterFeatures implements MeterFeatures { private short maxBands; private short maxColor; private Set features; + private MeterScope scope; - private DefaultMeterFeatures(DeviceId did, long maxMeter, + private DefaultMeterFeatures(DeviceId did, long startIndex, long endIndex, Set bandTypes, Set units, boolean burst, boolean stats, - short maxBands, short maxColor, Set flag) { + short maxBands, short maxColor, Set flag, + MeterScope scope) { this.deviceId = did; - this.maxMeter = maxMeter; + this.startIndex = startIndex; + this.endIndex = endIndex; this.bandTypes = bandTypes; this.burst = burst; this.stats = stats; @@ -51,6 +56,7 @@ private DefaultMeterFeatures(DeviceId did, long maxMeter, this.maxBands = maxBands; this.maxColor = maxColor; this.features = flag; + this.scope = scope; } @Override @@ -60,9 +66,23 @@ public DeviceId deviceId() { @Override public long maxMeter() { + long maxMeter = 0; + if (startIndex != -1 && endIndex != -1) { + maxMeter = endIndex - startIndex + 1; + } return maxMeter; } + @Override + public long startIndex() { + return startIndex; + } + + @Override + public long endIndex() { + return endIndex; + } + @Override public Set bandTypes() { return bandTypes; @@ -98,6 +118,11 @@ public Set features() { return features; } + @Override + public MeterScope scope() { + return scope; + } + public static Builder builder() { return new Builder(); } @@ -111,13 +136,15 @@ public static MeterFeatures noMeterFeatures(DeviceId deviceId) { public String toString() { return MoreObjects.toStringHelper(getClass()) .add("deviceId", deviceId()) - .add("maxMeter", maxMeter()) + .add("startIndex", startIndex()) + .add("endIndex", endIndex()) .add("maxBands", maxBands()) .add("maxColor", maxColor()) .add("bands", bandTypes()) .add("burst", isBurstSupported()) .add("stats", isStatsSupported()) .add("units", unitTypes()) + .add("scope", scope()) .toString(); } @@ -127,6 +154,8 @@ public String toString() { public static final class Builder implements MeterFeatures.Builder { private DeviceId did; private long mmeter = 0L; + private long starti = -1L; + private long endi = -1L; private short mbands = 0; private short mcolors = 0; private Set bandTypes = new HashSet<>(); @@ -134,6 +163,7 @@ public static final class Builder implements MeterFeatures.Builder { private boolean burst = false; private boolean stats = false; private Set features = Sets.newHashSet(); + private MeterScope mscope = MeterScope.globalScope(); @Override public MeterFeatures.Builder forDevice(DeviceId deviceId) { @@ -147,6 +177,18 @@ public MeterFeatures.Builder withMaxMeters(long maxMeter) { return this; } + @Override + public MeterFeatures.Builder withStartIndex(long startIndex) { + starti = startIndex; + return this; + } + + @Override + public MeterFeatures.Builder withEndIndex(long endIndex) { + endi = endIndex; + return this; + } + @Override public MeterFeatures.Builder withMaxBands(short maxBands) { mbands = maxBands; @@ -189,10 +231,34 @@ public MeterFeatures.Builder withFeatures(Set featureFlags) { return this; } + @Override + public MeterFeatures.Builder withScope(MeterScope scope) { + mscope = scope; + return this; + } + @Override public MeterFeatures build() { + // In case some functions are using maxMeter + // and both indexes are not set + // Start index will be + // 1, if it is global scope (An OpenFlow meter) + // 0, for the rest (A P4RT meter) + if (mmeter != 0L && starti == -1L && endi == -1L) { + starti = mscope.isGlobal() ? 1 : 0; + endi = mscope.isGlobal() ? mmeter : mmeter - 1; + } + // If one of the index is unset/unvalid value, treated as no meter features + if (starti <= -1 || endi <= -1) { + starti = -1; + endi = -1; + } + checkNotNull(did, "Must specify a device"); - return new DefaultMeterFeatures(did, mmeter, bandTypes, units1, burst, stats, mbands, mcolors, features); + checkArgument(starti <= endi, "Start index must be less than or equal to end index"); + + return new DefaultMeterFeatures(did, starti, endi, bandTypes, units1, burst, + stats, mbands, mcolors, features, mscope); } } } diff --git a/core/api/src/main/java/org/onosproject/net/meter/DefaultMeterRequest.java b/core/api/src/main/java/org/onosproject/net/meter/DefaultMeterRequest.java index d2465345f3a..617151d6a74 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/DefaultMeterRequest.java +++ b/core/api/src/main/java/org/onosproject/net/meter/DefaultMeterRequest.java @@ -17,6 +17,8 @@ import com.google.common.collect.ImmutableSet; import org.onosproject.core.ApplicationId; +import org.onosproject.net.AbstractAnnotated; +import org.onosproject.net.Annotations; import org.onosproject.net.DeviceId; import java.util.Collection; @@ -29,9 +31,7 @@ /** * A default implementation of a meter. */ -public final class DefaultMeterRequest implements MeterRequest { - - +public final class DefaultMeterRequest extends AbstractAnnotated implements MeterRequest { private final ApplicationId appId; private final Meter.Unit unit; @@ -40,11 +40,15 @@ public final class DefaultMeterRequest implements MeterRequest { private final DeviceId deviceId; private final Optional context; private final Type op; + private final MeterScope scope; + private final Optional index; private DefaultMeterRequest(DeviceId deviceId, ApplicationId appId, Meter.Unit unit, boolean burst, Collection bands, MeterContext context, - Type op) { + Type op, MeterScope scope, Optional index, + Annotations... annotations) { + super(annotations); this.deviceId = deviceId; this.appId = appId; this.unit = unit; @@ -52,6 +56,8 @@ private DefaultMeterRequest(DeviceId deviceId, ApplicationId appId, this.bands = bands; this.context = Optional.ofNullable(context); this.op = op; + this.scope = scope; + this.index = index; } @Override @@ -85,7 +91,15 @@ public Optional context() { return context; } + @Override + public MeterScope scope() { + return scope; + } + @Override + public Optional index() { + return index; + } public static Builder builder() { return new Builder(); @@ -98,10 +112,16 @@ public String toString() { .add("appId", appId.name()) .add("unit", unit) .add("isBurst", burst) - .add("bands", bands).toString(); + .add("bands", bands) + .add("scope", scope) + .add("desired index", index.orElse(null)) + .add("annotations", annotations()) + .toString(); } public static final class Builder implements MeterRequest.Builder { + // Relevant only for delete + private static final Band DUMMY_BAND = new DefaultBand(Band.Type.DROP, 0L, 0L, (short) 0); private ApplicationId appId; private Meter.Unit unit = Meter.Unit.KB_PER_SEC; @@ -109,8 +129,9 @@ public static final class Builder implements MeterRequest.Builder { private Collection bands; private DeviceId deviceId; private MeterContext context; - private Optional desiredId = Optional.empty(); - + private Annotations annotations; + private MeterScope scope = MeterScope.globalScope(); + private Optional desiredIndex = Optional.empty(); @Override public MeterRequest.Builder forDevice(DeviceId deviceId) { @@ -125,19 +146,19 @@ public MeterRequest.Builder fromApp(ApplicationId appId) { } @Override - public MeterRequest.Builder withUnit(Meter.Unit unit) { + public MeterRequest.Builder withUnit(Meter.Unit unit) { this.unit = unit; return this; } @Override - public MeterRequest.Builder burst() { + public MeterRequest.Builder burst() { this.burst = true; return this; } @Override - public MeterRequest.Builder withBands(Collection bands) { + public MeterRequest.Builder withBands(Collection bands) { this.bands = ImmutableSet.copyOf(bands); return this; } @@ -148,18 +169,41 @@ public MeterRequest.Builder withContext(MeterContext context) { return this; } + @Override + public MeterRequest.Builder withAnnotations(Annotations annotations) { + this.annotations = annotations; + return this; + } + + @Override + public MeterRequest.Builder withScope(MeterScope scope) { + this.scope = scope; + return this; + } + + @Override + public MeterRequest.Builder withIndex(Long index) { + this.desiredIndex = Optional.ofNullable(index); + return this; + } + @Override public MeterRequest add() { validate(); - return new DefaultMeterRequest(deviceId, appId, unit, burst, bands, - context, Type.ADD); + return new DefaultMeterRequest(deviceId, appId, unit, burst, bands, context, + Type.ADD, scope, desiredIndex, annotations); } @Override public MeterRequest remove() { + // Allow to create the removal request without specifying bands + if (bands == null || bands.isEmpty()) { + bands = ImmutableSet.of(DUMMY_BAND); + } + validate(); - return new DefaultMeterRequest(deviceId, appId, unit, burst, bands, - context, Type.REMOVE); + return new DefaultMeterRequest(deviceId, appId, unit, burst, bands, context, + Type.REMOVE, scope, desiredIndex, annotations); } private void validate() { @@ -167,6 +211,9 @@ private void validate() { checkNotNull(bands, "Must have bands."); checkArgument(!bands.isEmpty(), "Must have at least one band."); checkNotNull(appId, "Must have an application id"); + if (desiredIndex.isPresent()) { + checkArgument(desiredIndex.get() >= 0, "Desired index cannot be negative"); + } } diff --git a/core/api/src/main/java/org/onosproject/net/meter/Meter.java b/core/api/src/main/java/org/onosproject/net/meter/Meter.java index 3d7544e404a..64379d33909 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/Meter.java +++ b/core/api/src/main/java/org/onosproject/net/meter/Meter.java @@ -16,6 +16,8 @@ package org.onosproject.net.meter; import org.onosproject.core.ApplicationId; +import org.onosproject.net.Annotated; +import org.onosproject.net.Annotations; import org.onosproject.net.DeviceId; import org.onosproject.net.pi.service.PiTranslatable; @@ -24,7 +26,7 @@ /** * Represents a generalized meter cell configuration to be deployed on a device. */ -public interface Meter extends PiTranslatable { +public interface Meter extends PiTranslatable, Annotated { enum Unit { /** @@ -35,7 +37,12 @@ enum Unit { /** * Kilo bits per second. */ - KB_PER_SEC + KB_PER_SEC, + + /** + * Bytes per second. + */ + BYTES_PER_SEC } /** @@ -63,10 +70,13 @@ enum Unit { /** * The id of the application which created this meter. + * Could be null if the meter is read from the controller southbound. * * @return an application id */ ApplicationId appId(); + // TODO: Deprecate this and create a new method returns an Optional ApplicationId + // TODO: Or introduce MeterEntry on south and keep this method /** * The unit used within this meter. @@ -189,6 +199,14 @@ interface Builder { */ Builder withBands(Collection bands); + /** + * Sets the annotations. + * + * @param annotations annotations + * @return builder object + */ + Builder withAnnotations(Annotations annotations); + /** * Builds the meter based on the specified parameters. * diff --git a/core/api/src/main/java/org/onosproject/net/meter/MeterFeatures.java b/core/api/src/main/java/org/onosproject/net/meter/MeterFeatures.java index 27496874a16..ff846eb3d91 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/MeterFeatures.java +++ b/core/api/src/main/java/org/onosproject/net/meter/MeterFeatures.java @@ -35,9 +35,25 @@ public interface MeterFeatures { * Returns the maximum number of meters accepted by the device. * * @return the maximum meter value. + * @deprecated in onos-2.5 replaced by {@link #startIndex()} and {@link #endIndex()} */ + @Deprecated long maxMeter(); + /** + * Returns the start index (inclusive) of the meters. + * + * @return the start index + */ + long startIndex(); + + /** + * Returns the end index (inclusive) of the meters. + * + * @return the end index + */ + long endIndex(); + /** * Returns band types supported. * @@ -88,6 +104,13 @@ public interface MeterFeatures { */ Set features(); + /** + * Returns Meter Scope. + * + * @return meter scope + */ + MeterScope scope(); + /** * A meter features builder. */ @@ -105,9 +128,27 @@ interface Builder { * * @param maxMeter the maximum meters available * @return this builder + * @deprecated in onos-2.5 replaced by {@link #withStartIndex(long)} and {@link #withEndIndex(long)} */ + @Deprecated Builder withMaxMeters(long maxMeter); + /** + * Assigns the start index (inclusive) for this meter features. + * + * @param startIndex the start index + * @return this builder + */ + Builder withStartIndex(long startIndex); + + /** + * Assigns the end index (inclusive) for this meter features. + * + * @param endIndex the end index + * @return this builder + */ + Builder withEndIndex(long endIndex); + /** * Assigns the max bands value for this meter features. * @@ -164,6 +205,14 @@ interface Builder { */ Builder withFeatures(Set featureFlags); + /** + * Assigns the meter scope. + * + * @param scope the scope + * @return this builder + */ + Builder withScope(MeterScope scope); + /** * Builds the Meter Features based on the specified parameters. * diff --git a/core/api/src/main/java/org/onosproject/net/meter/MeterFeaturesKey.java b/core/api/src/main/java/org/onosproject/net/meter/MeterFeaturesKey.java index fa19a5fc5c2..2b5eb076b87 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/MeterFeaturesKey.java +++ b/core/api/src/main/java/org/onosproject/net/meter/MeterFeaturesKey.java @@ -23,7 +23,9 @@ * A meter features key represents a meter features uniquely. * Right now only deviceId is used but this class might be useful in * virtualization in which a unique deviceId could have multiple features (guess). + * @deprecated in onos-2.5 replaced by {@link MeterTableKey} */ +@Deprecated public final class MeterFeaturesKey { private final DeviceId deviceId; diff --git a/core/api/src/main/java/org/onosproject/net/meter/MeterKey.java b/core/api/src/main/java/org/onosproject/net/meter/MeterKey.java index 8c528b24d58..21717b66e82 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/MeterKey.java +++ b/core/api/src/main/java/org/onosproject/net/meter/MeterKey.java @@ -26,9 +26,9 @@ public final class MeterKey { private final DeviceId deviceId; - private final MeterId id; + private final MeterCellId id; - private MeterKey(DeviceId deviceId, MeterId id) { + private MeterKey(DeviceId deviceId, MeterCellId id) { this.deviceId = deviceId; this.id = id; } @@ -37,7 +37,22 @@ public DeviceId deviceId() { return deviceId; } + /** + * @return a MeterId iff the id is a MeterId + * otherwise, return null + * @deprecated in onos-2.5 replaced by {@link #key(DeviceId,MeterCellId)} + * extends MeterKey to support both MeterId and PiMeterCellId + */ + @Deprecated public MeterId meterId() { + if (id instanceof MeterId) { + return (MeterId) id; + } else { + return null; + } + } + + public MeterCellId meterCellId() { return id; } @@ -63,10 +78,22 @@ public int hashCode() { public String toString() { return toStringHelper(this) .add("deviceId", deviceId) - .add("meterId", id).toString(); + .add("meterCellId", id).toString(); } + /** + * @param deviceId a DeviceId + * @param id a MeterId + * @return a MeterKey contains DeviceId and MeterId + * @deprecated in onos-2.5 replaced by {@link #key(DeviceId,MeterCellId)} + * extends MeterKey to support both MeterId and PiMeterCellId + */ + @Deprecated public static MeterKey key(DeviceId deviceId, MeterId id) { return new MeterKey(deviceId, id); } + + public static MeterKey key(DeviceId deviceId, MeterCellId id) { + return new MeterKey(deviceId, id); + } } diff --git a/core/api/src/main/java/org/onosproject/net/meter/MeterProgrammable.java b/core/api/src/main/java/org/onosproject/net/meter/MeterProgrammable.java index 4b8ea07e29c..74eab4d60a4 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/MeterProgrammable.java +++ b/core/api/src/main/java/org/onosproject/net/meter/MeterProgrammable.java @@ -42,4 +42,11 @@ public interface MeterProgrammable extends HandlerBehaviour { * @return completable future with the collection of meters */ CompletableFuture> getMeters(); + + /** + * Queries the meter features from the device. + * + * @return completable future with the collection of meter features + */ + CompletableFuture> getMeterFeatures(); } \ No newline at end of file diff --git a/core/api/src/main/java/org/onosproject/net/meter/MeterProviderService.java b/core/api/src/main/java/org/onosproject/net/meter/MeterProviderService.java index 29c251c2307..e96e2249199 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/MeterProviderService.java +++ b/core/api/src/main/java/org/onosproject/net/meter/MeterProviderService.java @@ -54,6 +54,14 @@ void pushMeterMetrics(DeviceId deviceId, void pushMeterFeatures(DeviceId deviceId, MeterFeatures meterfeatures); + /** + * Pushes the collection of meter features collected from the device. + * + * @param deviceId the device Id + * @param meterfeatures the meter features + */ + void pushMeterFeatures(DeviceId deviceId, + Collection meterfeatures); /** * Delete meter features collected from the device. diff --git a/core/api/src/main/java/org/onosproject/net/meter/MeterRequest.java b/core/api/src/main/java/org/onosproject/net/meter/MeterRequest.java index 9060b955198..e156fd4a61d 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/MeterRequest.java +++ b/core/api/src/main/java/org/onosproject/net/meter/MeterRequest.java @@ -16,6 +16,8 @@ package org.onosproject.net.meter; import org.onosproject.core.ApplicationId; +import org.onosproject.net.Annotated; +import org.onosproject.net.Annotations; import org.onosproject.net.DeviceId; import java.util.Collection; @@ -24,7 +26,7 @@ /** * Represents a generalized meter request to be deployed on a device. */ -public interface MeterRequest { +public interface MeterRequest extends Annotated { enum Type { ADD, @@ -74,6 +76,20 @@ enum Type { */ Optional context(); + /** + * Returns the scope of this meter request. + * + * @return a meter scope + */ + MeterScope scope(); + + /** + * Returns the desired meter index of this meter request. + * + * @return an optional long index + */ + Optional index(); + /** * A meter builder. */ @@ -128,6 +144,30 @@ interface Builder { */ Builder withContext(MeterContext context); + /** + * Sets the annotations. + * + * @param annotations annotations + * @return builder object + */ + Builder withAnnotations(Annotations annotations); + + /** + * Sets the scope. + * + * @param scope a meter scope + * @return this + */ + Builder withScope(MeterScope scope); + + /** + * Sets the index. + * + * @param index an optional index + * @return this + */ + Builder withIndex(Long index); + /** * Requests the addition of a meter. * diff --git a/core/api/src/main/java/org/onosproject/net/meter/MeterScope.java b/core/api/src/main/java/org/onosproject/net/meter/MeterScope.java new file mode 100644 index 00000000000..06eb4484258 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/meter/MeterScope.java @@ -0,0 +1,69 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onosproject.net.meter; + +import org.onlab.util.Identifier; + +/** + * Scope of Meter Features. + * + * There are multiple meter tables in a P4RT device, + * to distinguish and represent them uniquely, + * we added a Scope field. + * + * For P4RT device, value will be the PiMeterId. + * For OF device, we use "global" by default, since there is only 1 table in OF. + * In general, a Meter Scope is referring to a Meter Table. + * It can be a PiMeterId or "global" for the single OF meter table. + * + * During runtime, users need to provide a PiMeterId to indicate which Meter Cell they + * are intended to modify. The value will then be used to create a Meter Scope + * for the rest of the process. + * If no PiMeterId is provided, a "global" Meter Scope is created. + */ +public class MeterScope extends Identifier { + + public static final String METER_GLOBAL_SCOPE = "global"; + + /** + * Create a Meter Scope from id string. + * @param scope the scope + * @return a Meter Scope + */ + public static MeterScope of(String scope) { + return new MeterScope(scope); + } + + /** + * Create a global Meter Scope. + * @return a Meter Scope + */ + public static MeterScope globalScope() { + return new MeterScope(METER_GLOBAL_SCOPE); + } + + MeterScope(String scope) { + super(scope); + } + + /** + * Global scope or not. + * @return true if global scope, false if not. + */ + public boolean isGlobal() { + return identifier.equals(METER_GLOBAL_SCOPE); + } +} \ No newline at end of file diff --git a/core/api/src/main/java/org/onosproject/net/meter/MeterService.java b/core/api/src/main/java/org/onosproject/net/meter/MeterService.java index 991715c1abe..82bab2cc40f 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/MeterService.java +++ b/core/api/src/main/java/org/onosproject/net/meter/MeterService.java @@ -15,6 +15,7 @@ */ package org.onosproject.net.meter; +import org.onosproject.core.ApplicationId; import org.onosproject.event.ListenerService; import org.onosproject.net.DeviceId; @@ -41,18 +42,39 @@ public interface MeterService * * @param meter a meter to remove * @param meterId the meter id of the meter to remove. + * @deprecated in onos-2.5, replace MeterId with MeterCellId */ + @Deprecated void withdraw(MeterRequest meter, MeterId meterId); + /** + * Remove a meter from the system and the dataplane. + * + * @param meter a meter to remove + * @param meterCellId the meter cell id of the meter to remove. + */ + void withdraw(MeterRequest meter, MeterCellId meterCellId); + /** * Fetch the meter by the meter id. * * @param deviceId a device id * @param id a meter id * @return a meter + * @deprecated in onos-2.5, Replace MeterId with MeterCellId */ + @Deprecated Meter getMeter(DeviceId deviceId, MeterId id); + /** + * Fetch the meter by the meter id. + * + * @param deviceId a device id + * @param id a meter cell id + * @return a meter + */ + Meter getMeter(DeviceId deviceId, MeterCellId id); + /** * Fetches all the meters. * @@ -68,13 +90,24 @@ public interface MeterService */ Collection getMeters(DeviceId deviceId); + /** + * Fetches the meters by the device id and scope. + * + * @param deviceId a device id + * @param scope meters scope + * @return a collection of meters + */ + Collection getMeters(DeviceId deviceId, MeterScope scope); + /** * Allocates a new meter id in the system. * * @param deviceId the device id * @return the allocated meter id, null if there is an internal error * or there are no meter ids available + * @deprecated in onos-2.5 */ + @Deprecated MeterId allocateMeterId(DeviceId deviceId); /** @@ -82,15 +115,27 @@ public interface MeterService * * @param deviceId the device id * @param meterId the id to be freed + * @deprecated in onos-2.5 */ + @Deprecated void freeMeterId(DeviceId deviceId, MeterId meterId); /** * Purges all the meters on the specified device. * @param deviceId device identifier */ - default void purgeMeters(DeviceId deviceId){ - //Default implementation does nothing + default void purgeMeters(DeviceId deviceId) { + throw new UnsupportedOperationException("purgeMeters not implemented"); + } + + /** + * Purges all the meters on the given device and for the given application. + * + * @param deviceId device identifier + * @param appId application identifier + */ + default void purgeMeters(DeviceId deviceId, ApplicationId appId) { + throw new UnsupportedOperationException("purgeMeter not implemented"); } } diff --git a/core/api/src/main/java/org/onosproject/net/meter/MeterState.java b/core/api/src/main/java/org/onosproject/net/meter/MeterState.java index 78fdd90f890..c098d91dd56 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/MeterState.java +++ b/core/api/src/main/java/org/onosproject/net/meter/MeterState.java @@ -35,9 +35,4 @@ public enum MeterState { */ PENDING_REMOVE, - /** - * The meter has been removed. - */ - REMOVED, - } diff --git a/core/api/src/main/java/org/onosproject/net/meter/MeterStore.java b/core/api/src/main/java/org/onosproject/net/meter/MeterStore.java index 675592a317c..f15438b8d7a 100644 --- a/core/api/src/main/java/org/onosproject/net/meter/MeterStore.java +++ b/core/api/src/main/java/org/onosproject/net/meter/MeterStore.java @@ -15,6 +15,7 @@ */ package org.onosproject.net.meter; +import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; import org.onosproject.store.Store; @@ -27,12 +28,12 @@ public interface MeterStore extends Store { /** - * Adds a meter to the store. + * Adds a meter to the store or updates a meter in the store. * * @param meter a meter * @return a future indicating the result of the store operation */ - CompletableFuture storeMeter(Meter meter); + CompletableFuture addOrUpdateMeter(Meter meter); /** * Deletes a meter from the store. @@ -50,6 +51,14 @@ public interface MeterStore extends Store { */ MeterStoreResult storeMeterFeatures(MeterFeatures meterfeatures); + /** + * Adds a collection of meter features to the store. + * + * @param meterfeatures the collection of meter features + * @return the result of the store operation + */ + MeterStoreResult storeMeterFeatures(Collection meterfeatures); + /** * Deletes the meter features from the store. * @@ -59,12 +68,12 @@ public interface MeterStore extends Store { MeterStoreResult deleteMeterFeatures(DeviceId deviceId); /** - * Updates a meter whose meter id is the same as the passed meter. + * Deletes a collection of meter features from the store. * - * @param meter a new meter + * @param meterfeatures a collection of meter features * @return a future indicating the result of the store operation */ - CompletableFuture updateMeter(Meter meter); + MeterStoreResult deleteMeterFeatures(Collection meterfeatures); /** * Updates a given meter's state with the provided state. @@ -98,6 +107,17 @@ public interface MeterStore extends Store { */ Collection getAllMeters(DeviceId deviceId); + /** + * Returns all meters stored in the store for a + * precise device and scope. + * + * @param deviceId a device id + * @param scope meters scope + * @return an immutable copy of the meters stored for a given device + * withing a given scope + */ + Collection getAllMeters(DeviceId deviceId, MeterScope scope); + /** * Update the store by deleting the failed meter. * Notifies the delegate that the meter failed to allow it @@ -113,38 +133,54 @@ public interface MeterStore extends Store { * * @param m a meter */ - void deleteMeterNow(Meter m); - - /** - * Retrieve maximum meters available for the device. - * - * @param key the meter features key - * @return the maximum number of meters supported by the device - */ - long getMaxMeters(MeterFeaturesKey key); + void purgeMeter(Meter m); /** * Allocates the first available MeterId. * * @param deviceId the device id + * @param meterScope the meter scope * @return the meter Id or null if it was not possible * to allocate a meter id */ - MeterId allocateMeterId(DeviceId deviceId); + MeterCellId allocateMeterId(DeviceId deviceId, MeterScope meterScope); /** * Frees the given meter id. * * @param deviceId the device id * @param meterId the id to be freed + * @deprecated in onos-2.5, freeing an ID is closely related to removal of a meter + * so, this function is no longer exposed on interface */ + @Deprecated void freeMeterId(DeviceId deviceId, MeterId meterId); /** * Removes all meters of given device from store. + * This API is typically used when the device is offline. + * + * @param deviceId the device id + */ + void purgeMeters(DeviceId deviceId); + + /** + * Removes all meters of given device and for the given application from store. + * This API is typically used when the device is offline. * * @param deviceId the device id + * @param appId the application id + */ + void purgeMeters(DeviceId deviceId, ApplicationId appId); + + /** + * Enables/disables user defined index mode for the store. In this mode users + * can provide an index for the meter. Store may reject switching mode requests + * at run time if meters were already allocated. + * + * @param enable to enable/disable the user defined index mode. + * @return true if user defined index mode is enabled. False otherwise. */ - void purgeMeter(DeviceId deviceId); + boolean userDefinedIndexMode(boolean enable); } diff --git a/core/api/src/main/java/org/onosproject/net/meter/MeterTableKey.java b/core/api/src/main/java/org/onosproject/net/meter/MeterTableKey.java new file mode 100644 index 00000000000..dc76fee9bf6 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/meter/MeterTableKey.java @@ -0,0 +1,67 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onosproject.net.meter; + +import org.onosproject.net.DeviceId; + +import java.util.Objects; + +/** + * MeterTableKey is used to represent a single meter table in each device uniquely. + */ +public final class MeterTableKey { + private final DeviceId deviceId; + private final MeterScope scope; + + private MeterTableKey(DeviceId deviceId, MeterScope scope) { + this.deviceId = deviceId; + this.scope = scope; + } + + public static MeterTableKey key(DeviceId did, MeterScope scope) { + return new MeterTableKey(did, scope); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null || getClass() != obj.getClass()) { + return false; + } + MeterTableKey mtk = (MeterTableKey) obj; + return Objects.equals(deviceId, mtk.deviceId()) && Objects.equals(scope, mtk.scope()); + } + + @Override + public int hashCode() { + return Objects.hash(deviceId, scope); + } + + @Override + public String toString() { + return "mtk@" + deviceId.toString() + " scope:" + scope.toString(); + } + + public DeviceId deviceId() { + return deviceId; + } + + public MeterScope scope() { + return scope; + } +} diff --git a/core/api/src/main/java/org/onosproject/net/pi/model/DefaultPiPipeconf.java b/core/api/src/main/java/org/onosproject/net/pi/model/DefaultPiPipeconf.java index 464bdd74682..2041cdbea72 100644 --- a/core/api/src/main/java/org/onosproject/net/pi/model/DefaultPiPipeconf.java +++ b/core/api/src/main/java/org/onosproject/net/pi/model/DefaultPiPipeconf.java @@ -192,21 +192,25 @@ public PiPipeconf build() { Map, Class> behaviours = behaviourMapBuilder.build(); return new DefaultPiPipeconf( - id, pipelineModel, generateFingerprint(extensions.values()), + id, pipelineModel, generateFingerprint(extensions), behaviours, extensions); } - private long generateFingerprint(Collection extensions) { + private long generateFingerprint(Map extensions) { Collection hashes = new ArrayList<>(); - for (URL extUrl : extensions) { + for (ExtensionType extensionType : ExtensionType.values()) { try { - HashingInputStream hin = new HashingInputStream( - Hashing.crc32(), extUrl.openStream()); - //noinspection StatementWithEmptyBody - while (hin.read() != -1) { - // Do nothing. Reading all input stream to update hash. + // Get the extension if present and then hash the content + URL extUrl = extensions.get(extensionType); + if (extUrl != null) { + HashingInputStream hin = new HashingInputStream( + Hashing.crc32(), extUrl.openStream()); + //noinspection StatementWithEmptyBody + while (hin.read() != -1) { + // Do nothing. Reading all input stream to update hash. + } + hashes.add(hin.hash().asInt()); } - hashes.add(hin.hash().asInt()); } catch (IOException e) { throw new IllegalArgumentException(e); } diff --git a/core/api/src/main/java/org/onosproject/net/pi/model/PiActionParamModel.java b/core/api/src/main/java/org/onosproject/net/pi/model/PiActionParamModel.java index 284d2b26126..ff504bef8af 100644 --- a/core/api/src/main/java/org/onosproject/net/pi/model/PiActionParamModel.java +++ b/core/api/src/main/java/org/onosproject/net/pi/model/PiActionParamModel.java @@ -33,8 +33,17 @@ public interface PiActionParamModel { /** * Return the size in bits of this action parameter. + * It returns -1 if the bit width of the action parameters is not predefined. * - * @return size in bits + * @return size in bits, -1 if not predefined */ int bitWidth(); + + /** + * Return true is the action parameters has a predefined bit width. + * It returns false if it can have arbitrary bit width. + * + * @return True if the action parameter has predefined bit width, false otherwise + */ + boolean hasBitWidth(); } diff --git a/core/api/src/main/java/org/onosproject/net/pi/model/PiMatchFieldModel.java b/core/api/src/main/java/org/onosproject/net/pi/model/PiMatchFieldModel.java index 57d817ab5e3..16020ce0b2a 100644 --- a/core/api/src/main/java/org/onosproject/net/pi/model/PiMatchFieldModel.java +++ b/core/api/src/main/java/org/onosproject/net/pi/model/PiMatchFieldModel.java @@ -33,11 +33,20 @@ public interface PiMatchFieldModel { /** * Returns the number of bits matched by this field. + * It returns -1 if the bit width of the match field is not predefined. * - * @return number of bits + * @return number of bits, -1 in case it is not predefined */ int bitWidth(); + /** + * Return true is the match field has a predefined bit width. + * It returns false if it can have arbitrary bit width. + * + * @return True if the match field has predefined bit width, false otherwise + */ + boolean hasBitWidth(); + /** * Returns the type of match applied to this field. * diff --git a/core/api/src/main/java/org/onosproject/net/pi/model/PiMatchType.java b/core/api/src/main/java/org/onosproject/net/pi/model/PiMatchType.java index f4fce3edc8a..a0cb1611379 100644 --- a/core/api/src/main/java/org/onosproject/net/pi/model/PiMatchType.java +++ b/core/api/src/main/java/org/onosproject/net/pi/model/PiMatchType.java @@ -42,5 +42,10 @@ public enum PiMatchType { /** * Range match type. */ - RANGE + RANGE, + + /** + * Optional match type. + */ + OPTIONAL } diff --git a/core/api/src/main/java/org/onosproject/net/pi/model/PiPacketMetadataModel.java b/core/api/src/main/java/org/onosproject/net/pi/model/PiPacketMetadataModel.java index 76fdbe462c9..6cf2f49999e 100644 --- a/core/api/src/main/java/org/onosproject/net/pi/model/PiPacketMetadataModel.java +++ b/core/api/src/main/java/org/onosproject/net/pi/model/PiPacketMetadataModel.java @@ -37,4 +37,12 @@ public interface PiPacketMetadataModel { * @return size in bit */ int bitWidth(); + + /** + * Return true is the packet metadata has a fixed bit width. + * It returns false if it can have flexible bit width. + * + * @return True if the packet metadata has fixed bit width, false otherwise + */ + boolean hasBitWidth(); } diff --git a/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineInterpreter.java b/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineInterpreter.java index 1ba85e0335f..11ca7c94bf3 100644 --- a/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineInterpreter.java +++ b/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineInterpreter.java @@ -106,11 +106,25 @@ InboundPacket mapInboundPacket(PiPacketOperation packetOperation, DeviceId devic * * @param port port number * @return optional integer + * @deprecated in ONOS 3.0 using {@link #mapLogicalPort} instead */ + @Deprecated default Optional mapLogicalPortNumber(PortNumber port) { return Optional.empty(); } + /** + * Maps the given logical port number to the data plane port ID (long) + * identifying the same port for this pipeconf, if such mapping is + * possible. + * + * @param port port number + * @return optional long + */ + default Optional mapLogicalPort(PortNumber port) { + return mapLogicalPortNumber(port).map(integer -> (long) integer); + } + /** * If the given table allows for mutable default actions, this method * returns an action instance to be used when ONOS tries to remove a diff --git a/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineModel.java b/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineModel.java index bddbae8fad4..2efa40fd6b9 100644 --- a/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineModel.java +++ b/core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineModel.java @@ -27,6 +27,13 @@ @Beta public interface PiPipelineModel { + /** + * Returns the data plane target architecture supported by this pipeline model. + * + * @return optional architecture string. + */ + Optional architecture(); + /** * Returns the table model associated with the given ID, if present. * diff --git a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiActionParam.java b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiActionParam.java index a8d565cb1c9..91f6e04394c 100644 --- a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiActionParam.java +++ b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiActionParam.java @@ -103,6 +103,17 @@ public PiActionParam(PiActionParamId id, byte[] value) { this(id, copyFrom(value)); } + /** + * Creates an action's runtime parameter for the given param ID and string + * value. + * + * @param id parameter identifier + * @param value value + */ + public PiActionParam(PiActionParamId id, String value) { + this(id, copyFrom(value)); + } + /** * Returns the identifier of this parameter. * diff --git a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiMeterBand.java b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiMeterBand.java index b1dbcf5cc18..ea8c34d8ed1 100644 --- a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiMeterBand.java +++ b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiMeterBand.java @@ -27,20 +27,32 @@ */ @Beta public final class PiMeterBand { + private final PiMeterBandType type; private final long rate; private final long burst; /** * Creates a band with rate and burst. * + * @param type type of this band * @param rate rate of this band * @param burst burst of this band */ - public PiMeterBand(long rate, long burst) { + public PiMeterBand(PiMeterBandType type, long rate, long burst) { + this.type = type; this.rate = rate; this.burst = burst; } + /** + * Returns the type of this band. + * + * @return type of this band + */ + public PiMeterBandType type() { + return type; + } + /** * Returns the rate of this band. * @@ -61,7 +73,7 @@ public long burst() { @Override public int hashCode() { - return Objects.hash(rate, burst); + return Objects.hash(type, rate, burst); } @Override @@ -71,7 +83,8 @@ public boolean equals(Object obj) { } if (obj instanceof PiMeterBand) { PiMeterBand that = (PiMeterBand) obj; - return Objects.equals(rate, that.rate) && + return Objects.equals(type, that.type) && + Objects.equals(rate, that.rate) && Objects.equals(burst, that.burst); } @@ -80,6 +93,7 @@ public boolean equals(Object obj) { public String toString() { return toStringHelper(this) + .add("type", type) .add("rate", rate) .add("burst", burst).toString(); } diff --git a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiMeterBandType.java b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiMeterBandType.java new file mode 100644 index 00000000000..ee15a576dc2 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiMeterBandType.java @@ -0,0 +1,51 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.pi.runtime; + +import com.google.common.annotations.Beta; + +/** + * Type of meter band of a protocol-independent pipeline. + */ +@Beta +public enum PiMeterBandType { + /** + * Committed band config. + */ + COMMITTED("committed"), + + /** + * Peak band config. + */ + PEAK("peak"); + + private final String humanReadableName; + + PiMeterBandType(String humanReadableName) { + this.humanReadableName = humanReadableName; + } + + /** + * Returns a human readable representation of this PI meter band type (useful + * for logging). + * + * @return string + */ + public String humanReadableName() { + return humanReadableName; + } +} diff --git a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiMeterCellConfig.java b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiMeterCellConfig.java index f13e276af3b..ecbfe079e9b 100644 --- a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiMeterCellConfig.java +++ b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiMeterCellConfig.java @@ -19,12 +19,12 @@ import com.google.common.annotations.Beta; import com.google.common.base.MoreObjects; import com.google.common.base.Objects; -import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; import org.onosproject.net.DeviceId; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; +import java.util.Collections; +import java.util.Map; import static com.google.common.base.Preconditions.checkNotNull; @@ -35,7 +35,7 @@ public final class PiMeterCellConfig implements PiEntity { private final PiMeterCellId cellId; - private final ImmutableList piMeterBands; + private final ImmutableMap piMeterBands; /** * Creates a new meter cell configuration for the given cell identifier and meter bands. @@ -43,9 +43,9 @@ public final class PiMeterCellConfig implements PiEntity { * @param cellId meter cell identifier * @param piMeterBands meter bands */ - private PiMeterCellConfig(PiMeterCellId cellId, Collection piMeterBands) { + private PiMeterCellConfig(PiMeterCellId cellId, Map piMeterBands) { this.cellId = cellId; - this.piMeterBands = ImmutableList.copyOf(piMeterBands); + this.piMeterBands = ImmutableMap.copyOf(piMeterBands); } /** @@ -58,14 +58,63 @@ public PiMeterCellId cellId() { } /** - * Returns the collection of bands of this cell. + * Returns the map of bands of this cell. * * @return meter bands */ - public Collection meterBands() { + public Map meterBands() { return piMeterBands; } + /** + * Check if the config represents a modify operation. + * Or it is a non-default config read from south bound. + * + * @return true if there are exactly 2 bands + */ + public boolean isModifyConfig() { + return piMeterBands.size() == 2; + } + + /** + * Check if the config represents a reset operation. + * Or it is a default config read from south bound. + * + * @return true if there is no band + */ + public boolean isDefaultConfig() { + return piMeterBands.isEmpty(); + } + + /** + * Returns the committed configuration if present. + * + * @return the committed band. Null otherwise + */ + public PiMeterBand committedBand() { + return piMeterBands.get(PiMeterBandType.COMMITTED); + } + + /** + * Returns the peak configuration if present. + * + * @return the peak band. Null otherwise + */ + public PiMeterBand peakBand() { + return piMeterBands.get(PiMeterBandType.PEAK); + } + + /** + * Returns a PiMeterCellConfig with no bands. + * Used to reset a PI meter cell. + * + * @param piMeterCellId the PiMeterCellId need to be reset + * @return a PiMeterCellConfig with no bands + */ + public static PiMeterCellConfig reset(PiMeterCellId piMeterCellId) { + return new PiMeterCellConfig(piMeterCellId, Collections.emptyMap()); + } + @Override public PiEntityType piEntityType() { return PiEntityType.METER_CELL_CONFIG; @@ -86,8 +135,7 @@ public boolean equals(Object o) { } PiMeterCellConfig that = (PiMeterCellConfig) o; - return piMeterBands.containsAll((that.piMeterBands)) && - piMeterBands.size() == that.piMeterBands.size() && + return Objects.equal(piMeterBands, that.piMeterBands) && Objects.equal(cellId, that.cellId); } @@ -114,8 +162,8 @@ public static PiMeterCellConfig.Builder builder() { } public static final class Builder { - private PiMeterCellId cellId; - private List bands = new ArrayList<>(); + private PiMeterCellId cellId; + private Map bands = Maps.newHashMap(); private Builder() { @@ -141,7 +189,31 @@ public PiMeterCellConfig.Builder withMeterCellId(PiMeterCellId meterCellId) { * @return this */ public PiMeterCellConfig.Builder withMeterBand(PiMeterBand band) { - this.bands.add(band); + this.bands.put(band.type(), band); + return this; + } + + /** + * Sets the committed band of this meter. + * + * @param rate committed rate + * @param burst committed burst + * @return this + */ + public PiMeterCellConfig.Builder withCommittedBand(long rate, long burst) { + this.bands.put(PiMeterBandType.COMMITTED, new PiMeterBand(PiMeterBandType.COMMITTED, rate, burst)); + return this; + } + + /** + * Sets the peak band of this meter. + * + * @param rate peak rate + * @param burst peak burst + * @return this + */ + public PiMeterCellConfig.Builder withPeakBand(long rate, long burst) { + this.bands.put(PiMeterBandType.PEAK, new PiMeterBand(PiMeterBandType.PEAK, rate, burst)); return this; } diff --git a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiOptionalFieldMatch.java b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiOptionalFieldMatch.java new file mode 100644 index 00000000000..cb34981e93a --- /dev/null +++ b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiOptionalFieldMatch.java @@ -0,0 +1,86 @@ +/* + * Copyright 2020-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.pi.runtime; + +import com.google.common.annotations.Beta; +import com.google.common.base.Objects; +import org.onlab.util.ImmutableByteSequence; +import org.onosproject.net.pi.model.PiMatchFieldId; +import org.onosproject.net.pi.model.PiMatchType; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + +/** + * Instance of an optional field match in a protocol-independent pipeline. + * The optional match field behaves like an exact match if specified, otherwise + * it is logically equivalent to a wildcard match. + */ +@Beta +public final class PiOptionalFieldMatch extends PiFieldMatch { + + private final ImmutableByteSequence value; + + /** + * Creates an optional field match. + * + * @param fieldId field identifier + * @param value value + */ + public PiOptionalFieldMatch(PiMatchFieldId fieldId, ImmutableByteSequence value) { + super(fieldId); + this.value = checkNotNull(value); + checkArgument(value.size() > 0, "Value can't have size 0"); + } + + @Override + public PiMatchType type() { + return PiMatchType.OPTIONAL; + } + + /** + * Returns the byte sequence value to be matched. + * + * @return an immutable byte sequence + */ + public ImmutableByteSequence value() { + return value; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PiOptionalFieldMatch that = (PiOptionalFieldMatch) o; + return Objects.equal(this.fieldId(), that.fieldId()) && + Objects.equal(value, that.value); + } + + @Override + public int hashCode() { + return Objects.hashCode(this.fieldId(), value); + } + + @Override + public String toString() { + return this.fieldId().toString() + "=" + value.toString(); + } +} diff --git a/core/api/src/main/java/org/onosproject/store/primitives/DefaultConsistentMultimap.java b/core/api/src/main/java/org/onosproject/store/primitives/DefaultConsistentMultimap.java index c14b187178a..51f09346a85 100644 --- a/core/api/src/main/java/org/onosproject/store/primitives/DefaultConsistentMultimap.java +++ b/core/api/src/main/java/org/onosproject/store/primitives/DefaultConsistentMultimap.java @@ -110,11 +110,21 @@ public Versioned> removeAll(K key) { return complete(asyncMultimap.removeAll(key)); } + @Override + public boolean removeAll(Map> mapping) { + return complete(asyncMultimap.removeAll(mapping)); + } + @Override public boolean putAll(K key, Collection values) { return complete(asyncMultimap.putAll(key, values)); } + @Override + public boolean putAll(Map> mapping) { + return complete(asyncMultimap.putAll(mapping)); + } + @Override public Versioned> replaceValues( K key, Collection values) { diff --git a/core/api/src/main/java/org/onosproject/store/primitives/DefaultLeaderElector.java b/core/api/src/main/java/org/onosproject/store/primitives/DefaultLeaderElector.java index 6275a4f2b7b..be67325b494 100644 --- a/core/api/src/main/java/org/onosproject/store/primitives/DefaultLeaderElector.java +++ b/core/api/src/main/java/org/onosproject/store/primitives/DefaultLeaderElector.java @@ -90,6 +90,11 @@ public void removeChangeListener(Consumer> consumer) { complete(asyncElector.removeChangeListener(consumer)); } + @Override + public boolean demote(String topic, NodeId nodeId) { + return complete(asyncElector.demote(topic, nodeId)); + } + @Override public void addStatusChangeListener(Consumer listener) { asyncElector.addStatusChangeListener(listener); diff --git a/core/api/src/main/java/org/onosproject/store/primitives/PartitionAdminService.java b/core/api/src/main/java/org/onosproject/store/primitives/PartitionAdminService.java index 36029307911..d54dcf00142 100644 --- a/core/api/src/main/java/org/onosproject/store/primitives/PartitionAdminService.java +++ b/core/api/src/main/java/org/onosproject/store/primitives/PartitionAdminService.java @@ -17,6 +17,7 @@ import java.util.List; +import org.onosproject.cluster.PartitionId; import org.onosproject.store.service.PartitionClientInfo; import org.onosproject.store.service.PartitionInfo; @@ -36,4 +37,16 @@ public interface PartitionAdminService { * @return list of {@code PartitionClientInfo} */ List partitionClientInfo(); + + /** + * Takes a snapshot of all partitions. + */ + void snapshot(); + + /** + * Takes a snapshot of the given partition. + * + * @param partitionId the partition to snapshot + */ + void snapshot(PartitionId partitionId); } \ No newline at end of file diff --git a/core/api/src/main/java/org/onosproject/store/service/AsyncConsistentMultimap.java b/core/api/src/main/java/org/onosproject/store/service/AsyncConsistentMultimap.java index 94943b8d333..b86845e4468 100644 --- a/core/api/src/main/java/org/onosproject/store/service/AsyncConsistentMultimap.java +++ b/core/api/src/main/java/org/onosproject/store/service/AsyncConsistentMultimap.java @@ -165,6 +165,19 @@ CompletableFuture removeAll(K key, */ CompletableFuture>> removeAll(K key); + /** + * Removes the set of key-value pairs with the specified key and values if they + * exist. In implementations that allow duplicates each instance of a key + * will remove one matching entry, which one is not defined. Equivalent to + * repeated calls to {@code remove()} for each key value pair but more + * efficient. + * + * @param mapping the keys-values to be removed + * @return a future whose value will be true if the map changes because of + * this call, false otherwise. + */ + CompletableFuture removeAll(Map> mapping); + /** * Adds the set of key-value pairs of the specified key with each of the * values in the iterable if each key-value pair does not already exist, @@ -179,6 +192,18 @@ CompletableFuture removeAll(K key, CompletableFuture putAll(K key, Collection values); + /** + * Adds the set of key-value pairs of the specified mapping with each of + * the values in the iterable if each key-value pair does not already exist, + * if the pair does exist the behavior is implementation specific. + * (Same as repeated puts but with efficiency gains.) + * + * @param mapping the keys-values to be added + * @return a future whose value will be true if any change in the map + * results from this call, false otherwise + */ + CompletableFuture putAll(Map> mapping); + /** * Stores all the values in values associated with the key specified, * removes all preexisting values and returns a collection of the removed diff --git a/core/api/src/main/java/org/onosproject/store/service/AsyncLeaderElector.java b/core/api/src/main/java/org/onosproject/store/service/AsyncLeaderElector.java index b253e2a5a25..7aee61fdd38 100644 --- a/core/api/src/main/java/org/onosproject/store/service/AsyncLeaderElector.java +++ b/core/api/src/main/java/org/onosproject/store/service/AsyncLeaderElector.java @@ -144,4 +144,16 @@ default LeaderElector asLeaderElector(long timeoutMillis) { default LeaderElector asLeaderElector() { return asLeaderElector(DistributedPrimitive.DEFAULT_OPERATION_TIMEOUT_MILLIS); } + + /** + * Attempts to demote a node to the bottom of the candidate list. It is not allowed + * to demote the current leader + * + * @param topic leadership topic + * @param nodeId identifier of node to be demoted + * @return CompletableFuture that is completed with a boolean when the operation is done. Boolean is true if + * node is now the bottom candidate. This operation can fail (i.e. return false) if the node + * is not registered to run for election for the topic or it is leader + */ + CompletableFuture demote(String topic, NodeId nodeId); } diff --git a/core/api/src/main/java/org/onosproject/store/service/ConsistentMultimap.java b/core/api/src/main/java/org/onosproject/store/service/ConsistentMultimap.java index 99045a867c5..8aabca74129 100644 --- a/core/api/src/main/java/org/onosproject/store/service/ConsistentMultimap.java +++ b/core/api/src/main/java/org/onosproject/store/service/ConsistentMultimap.java @@ -148,6 +148,18 @@ public interface ConsistentMultimap extends DistributedPrimitive, Iterable */ Versioned> removeAll(K key); + /** + * Removes the set of key-value pairs with the specified key and values if they + * exist. In implementations that allow duplicates each instance of a key + * will remove one matching entry, which one is not defined. Equivalent to + * repeated calls to {@code remove()} for each key value pair but more + * efficient. + * + * @param mapping the keys-values to be removed + * @return true if the map changes because of this call, false otherwise. + */ + boolean removeAll(Map> mapping); + /** * Adds the set of key-value pairs of the specified key with each of the * values in the iterable if each key-value pair does not already exist, @@ -161,6 +173,18 @@ public interface ConsistentMultimap extends DistributedPrimitive, Iterable */ boolean putAll(K key, Collection values); + /** + * Adds the set of key-value pairs of the specified mapping with each of + * the values in the iterable if each key-value pair does not already exist, + * if the pair does exist the behavior is implementation specific. + * (Same as repeated puts but with efficiency gains.) + * + * @param mapping the keys-values to be added + * @return true if any change in the map results from this call, + * false otherwise + */ + boolean putAll(Map> mapping); + /** * Stores all the values in values associated with the key specified, * removes all preexisting values and returns a collection of the removed diff --git a/core/api/src/main/java/org/onosproject/store/service/LeaderElector.java b/core/api/src/main/java/org/onosproject/store/service/LeaderElector.java index 9ac1a6eae85..e7604ebde17 100644 --- a/core/api/src/main/java/org/onosproject/store/service/LeaderElector.java +++ b/core/api/src/main/java/org/onosproject/store/service/LeaderElector.java @@ -102,4 +102,15 @@ default DistributedPrimitive.Type primitiveType() { * @param consumer listener to remove */ void removeChangeListener(Consumer> consumer); + + /** + * Attempts to demote a node to the bottom of the candidate list. It is not allowed + * to demote the current leader + * + * @param topic leadership topic + * @param nodeId identifier of node to be demoted + * @return {@code true} if nodeId is now the bottom candidate. This method returns {@code false} + * if {@code nodeId} is not one of the candidates for the topic or if it is the leader. + */ + boolean demote(String topic, NodeId nodeId); } diff --git a/core/api/src/main/java/org/onosproject/ui/UiExtensionService.java b/core/api/src/main/java/org/onosproject/ui/UiExtensionService.java index 9e03a516304..f1ea508c9f1 100644 --- a/core/api/src/main/java/org/onosproject/ui/UiExtensionService.java +++ b/core/api/src/main/java/org/onosproject/ui/UiExtensionService.java @@ -55,6 +55,22 @@ default void register(UiGlyphFactory factory) { default void unregister(UiGlyphFactory factory) { } + /** + * Registers the specified topo hilighter factory. + * + * @param factory UI topo higlighter factory to register + */ + default void register(UiTopoHighlighterFactory factory) { + } + + /** + * Unregisters the specified user interface extension. + * + * @param factory UI topo higlighter factory to unregister + */ + default void unregister(UiTopoHighlighterFactory factory) { + } + /** * Returns the list of registered user interface extensions. * @@ -79,6 +95,15 @@ default List getGlyphs() { return new ArrayList(); } + /** + * Returns the list of registered topo highlighter factories. + * + * @return list of highlighter factories + */ + default List getTopoHighlighterFactories() { + return new ArrayList(); + } + /** * Returns the navigation pane localization bundle. * diff --git a/core/api/src/main/java/org/onosproject/ui/UiTopoHighlighter.java b/core/api/src/main/java/org/onosproject/ui/UiTopoHighlighter.java new file mode 100644 index 00000000000..9c12603e556 --- /dev/null +++ b/core/api/src/main/java/org/onosproject/ui/UiTopoHighlighter.java @@ -0,0 +1,41 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.ui; + +import org.onosproject.ui.topo.Highlights; + +/** + * Abstraction of an entity capable of generating a set of topology highlights + * for devices, hosts and links. + */ +public interface UiTopoHighlighter { + + /** + * Returns the self-assigned name of the hilighter. + * + * @return highlighter name + */ + String name(); + + /** + * Generate a set of highlights. + * + * @return topology highlights + */ + Highlights createHighlights(); + +} diff --git a/core/api/src/main/java/org/onosproject/ui/UiTopoHighlighterFactory.java b/core/api/src/main/java/org/onosproject/ui/UiTopoHighlighterFactory.java new file mode 100644 index 00000000000..8a2d9767b3b --- /dev/null +++ b/core/api/src/main/java/org/onosproject/ui/UiTopoHighlighterFactory.java @@ -0,0 +1,30 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onosproject.ui; + +/** + * Abstraction of an entity capable of producing a a new topology highlighter. + */ +public interface UiTopoHighlighterFactory { + + /** + * Produces a new topology highlighter. + * + * @return newly created topology highlighter + */ + UiTopoHighlighter newTopoHighlighter(); + +} diff --git a/core/api/src/main/java/org/onosproject/ui/topo/AbstractTopoMonitor.java b/core/api/src/main/java/org/onosproject/ui/topo/AbstractTopoMonitor.java index ac00e606028..2b1dd08f4f7 100644 --- a/core/api/src/main/java/org/onosproject/ui/topo/AbstractTopoMonitor.java +++ b/core/api/src/main/java/org/onosproject/ui/topo/AbstractTopoMonitor.java @@ -21,6 +21,35 @@ */ public class AbstractTopoMonitor { + /** + * Creates a new topo monitor base. + */ + protected AbstractTopoMonitor() { + } + + /** + * Number of milliseconds between invocations of sending traffic data. + */ + protected static long trafficPeriod = 5000; + + /** + * Sets the traffic refresh period in milliseconds. + * + * @param ms refresh rate in millis + */ + public static void setTrafficPeriod(long ms) { + trafficPeriod = ms; + } + + /** + * Returns the traffic refresh period in milliseconds. + * + * @return refresh rate in millis + */ + public static long getTrafficPeriod() { + return trafficPeriod; + } + // TODO: pull common code up into this class // Note to Andrea: diff --git a/core/api/src/main/java/org/onosproject/ui/topo/NodeSelection.java b/core/api/src/main/java/org/onosproject/ui/topo/NodeSelection.java index 85c51f6cb3a..ae9d4459286 100644 --- a/core/api/src/main/java/org/onosproject/ui/topo/NodeSelection.java +++ b/core/api/src/main/java/org/onosproject/ui/topo/NodeSelection.java @@ -36,7 +36,7 @@ import java.util.Set; import static com.google.common.base.Strings.isNullOrEmpty; -import static org.onosproject.net.ConnectPoint.deviceConnectPoint; +import static org.onosproject.net.ConnectPoint.fromString; import static org.onosproject.net.DeviceId.deviceId; import static org.onosproject.net.HostId.hostId; @@ -301,8 +301,8 @@ private Set findLinks(Set ids) { continue; } - cpSrc = deviceConnectPoint(connectPoints[0]); - cpDst = deviceConnectPoint(connectPoints[1]); + cpSrc = fromString(connectPoints[0]); + cpDst = fromString(connectPoints[1]); link = linkService.getLink(cpSrc, cpDst); if (link != null) { diff --git a/core/api/src/test/java/org/onosproject/cluster/ClusterEventTest.java b/core/api/src/test/java/org/onosproject/cluster/ClusterEventTest.java index 8995062a840..f5e1f1ee3eb 100644 --- a/core/api/src/test/java/org/onosproject/cluster/ClusterEventTest.java +++ b/core/api/src/test/java/org/onosproject/cluster/ClusterEventTest.java @@ -49,6 +49,26 @@ public class ClusterEventTest { new ClusterEvent(ClusterEvent.Type.INSTANCE_READY, cNode2, time); private final ClusterEvent sameAsEvent7 = new ClusterEvent(ClusterEvent.Type.INSTANCE_READY, cNode2, time); + private final ClusterEvent event8 = + new ClusterEvent(ClusterEvent.Type.INSTANCE_ADDED, cNode2, ClusterEvent.InstanceType.ONOS); + private final ClusterEvent event9 = + new ClusterEvent(ClusterEvent.Type.INSTANCE_ADDED, cNode2, ClusterEvent.InstanceType.STORAGE); + private final ClusterEvent event10 = + new ClusterEvent(ClusterEvent.Type.INSTANCE_REMOVED, cNode2, ClusterEvent.InstanceType.ONOS); + private final ClusterEvent event11 = + new ClusterEvent(ClusterEvent.Type.INSTANCE_REMOVED, cNode2, ClusterEvent.InstanceType.STORAGE); + private final ClusterEvent event12 = + new ClusterEvent(ClusterEvent.Type.INSTANCE_ACTIVATED, cNode1, ClusterEvent.InstanceType.ONOS); + private final ClusterEvent event13 = + new ClusterEvent(ClusterEvent.Type.INSTANCE_ACTIVATED, cNode1, ClusterEvent.InstanceType.STORAGE); + private final ClusterEvent event14 = + new ClusterEvent(ClusterEvent.Type.INSTANCE_READY, cNode1, ClusterEvent.InstanceType.ONOS); + private final ClusterEvent event15 = + new ClusterEvent(ClusterEvent.Type.INSTANCE_READY, cNode1, ClusterEvent.InstanceType.STORAGE); + private final ClusterEvent event16 = + new ClusterEvent(ClusterEvent.Type.INSTANCE_DEACTIVATED, cNode1, ClusterEvent.InstanceType.ONOS); + private final ClusterEvent event17 = + new ClusterEvent(ClusterEvent.Type.INSTANCE_DEACTIVATED, cNode1, ClusterEvent.InstanceType.STORAGE); /** * Tests for proper operation of equals(), hashCode() and toString() methods. @@ -63,6 +83,16 @@ public void checkEquals() { .addEqualityGroup(event5) .addEqualityGroup(event6) .addEqualityGroup(event7, sameAsEvent7) + .addEqualityGroup(event8) + .addEqualityGroup(event9) + .addEqualityGroup(event10) + .addEqualityGroup(event11) + .addEqualityGroup(event12) + .addEqualityGroup(event13) + .addEqualityGroup(event14) + .addEqualityGroup(event15) + .addEqualityGroup(event16) + .addEqualityGroup(event17) .testEquals(); } @@ -73,10 +103,52 @@ public void checkEquals() { public void checkConstruction() { assertThat(event1.type(), is(ClusterEvent.Type.INSTANCE_ADDED)); assertThat(event1.subject(), is(cNode1)); + assertThat(event1.instanceType(), is(ClusterEvent.InstanceType.UNKNOWN)); assertThat(event7.time(), is(time)); assertThat(event7.type(), is(ClusterEvent.Type.INSTANCE_READY)); assertThat(event7.subject(), is(cNode2)); + assertThat(event7.instanceType(), is(ClusterEvent.InstanceType.UNKNOWN)); + + assertThat(event8.type(), is(ClusterEvent.Type.INSTANCE_ADDED)); + assertThat(event8.subject(), is(cNode2)); + assertThat(event8.instanceType(), is(ClusterEvent.InstanceType.ONOS)); + + assertThat(event9.type(), is(ClusterEvent.Type.INSTANCE_ADDED)); + assertThat(event9.subject(), is(cNode2)); + assertThat(event9.instanceType(), is(ClusterEvent.InstanceType.STORAGE)); + + assertThat(event10.type(), is(ClusterEvent.Type.INSTANCE_REMOVED)); + assertThat(event10.subject(), is(cNode2)); + assertThat(event10.instanceType(), is(ClusterEvent.InstanceType.ONOS)); + + assertThat(event11.type(), is(ClusterEvent.Type.INSTANCE_REMOVED)); + assertThat(event11.subject(), is(cNode2)); + assertThat(event11.instanceType(), is(ClusterEvent.InstanceType.STORAGE)); + + assertThat(event12.type(), is(ClusterEvent.Type.INSTANCE_ACTIVATED)); + assertThat(event12.subject(), is(cNode1)); + assertThat(event12.instanceType(), is(ClusterEvent.InstanceType.ONOS)); + + assertThat(event13.type(), is(ClusterEvent.Type.INSTANCE_ACTIVATED)); + assertThat(event13.subject(), is(cNode1)); + assertThat(event13.instanceType(), is(ClusterEvent.InstanceType.STORAGE)); + + assertThat(event14.type(), is(ClusterEvent.Type.INSTANCE_READY)); + assertThat(event14.subject(), is(cNode1)); + assertThat(event14.instanceType(), is(ClusterEvent.InstanceType.ONOS)); + + assertThat(event15.type(), is(ClusterEvent.Type.INSTANCE_READY)); + assertThat(event15.subject(), is(cNode1)); + assertThat(event15.instanceType(), is(ClusterEvent.InstanceType.STORAGE)); + + assertThat(event16.type(), is(ClusterEvent.Type.INSTANCE_DEACTIVATED)); + assertThat(event16.subject(), is(cNode1)); + assertThat(event16.instanceType(), is(ClusterEvent.InstanceType.ONOS)); + + assertThat(event17.type(), is(ClusterEvent.Type.INSTANCE_DEACTIVATED)); + assertThat(event17.subject(), is(cNode1)); + assertThat(event17.instanceType(), is(ClusterEvent.InstanceType.STORAGE)); } } diff --git a/core/api/src/test/java/org/onosproject/net/ConnectPointTest.java b/core/api/src/test/java/org/onosproject/net/ConnectPointTest.java index 73dfe79d368..0a7516de9f9 100644 --- a/core/api/src/test/java/org/onosproject/net/ConnectPointTest.java +++ b/core/api/src/test/java/org/onosproject/net/ConnectPointTest.java @@ -71,14 +71,47 @@ public void testParseDeviceConnectPoint() { } @Test - public void testParseFromString() { + public void testParseFromStringOF() { + String cp = "of:0011223344556677/1"; + + ConnectPoint connectPoint = ConnectPoint.fromString(cp); + assertEquals("of:0011223344556677", connectPoint.deviceId().toString()); + assertEquals("1", connectPoint.port().toString()); + + expectStringParseException("["); + expectStringParseException("1/["); + expectStringParseException("1/[aasksk"); + expectStringParseException("1/[alksas]"); + } + + @Test + public void testParseFromStringNetconf() { String cp = "netconf:127.0.0.1/[TYPE](1)"; ConnectPoint connectPoint = ConnectPoint.fromString(cp); assertEquals("netconf:127.0.0.1", connectPoint.deviceId().toString()); assertEquals("[TYPE](1)", connectPoint.port().toString()); assertEquals(connectPoint, ConnectPoint.fromString(connectPoint.toString())); + } + + @Test + public void testParseFromStringBmv2() { + String cp = "device:leaf1/[leaf1-eth4](1)"; + ConnectPoint connectPoint = ConnectPoint.fromString(cp); + assertEquals("device:leaf1", connectPoint.deviceId().toString()); + assertEquals("[leaf1-eth4](1)", connectPoint.port().toString()); + assertEquals(connectPoint, ConnectPoint.fromString(connectPoint.toString())); + } + + @Test + public void testParseFromStringStratum() { + String cp = "device:leaf1/[3/0](1)"; + + ConnectPoint connectPoint = ConnectPoint.fromString(cp); + assertEquals("device:leaf1", connectPoint.deviceId().toString()); + assertEquals("[3/0](1)", connectPoint.port().toString()); + assertEquals(connectPoint, ConnectPoint.fromString(connectPoint.toString())); } /** @@ -95,6 +128,20 @@ private static void expectDeviceParseException(String string) { } } + /** + * Parse a string connect point and expect an exception to be thrown. + * + * @param string string to parse + */ + private static void expectStringParseException(String string) { + try { + ConnectPoint.fromString(string); + fail(String.format("Expected exception was not thrown for '%s'", string)); + } catch (Exception e) { + assertTrue(true); + } + } + @Test public void testParseHostConnectPoint() { String cp = "16:3A:BD:6E:31:E4/-1/1"; diff --git a/core/api/src/test/java/org/onosproject/net/NetTestTools.java b/core/api/src/test/java/org/onosproject/net/NetTestTools.java index dcc3e1502bc..42f828f1821 100644 --- a/core/api/src/test/java/org/onosproject/net/NetTestTools.java +++ b/core/api/src/test/java/org/onosproject/net/NetTestTools.java @@ -57,6 +57,7 @@ private NetTestTools() { public static final ProviderId PID = new ProviderId("of", "foo"); public static final ApplicationId APP_ID = new TestApplicationId("foo"); + public static final ApplicationId APP_ID_2 = new TestApplicationId("foo2"); public static final NodeId NODE_ID = new NodeId("node1"); // Short-hand for producing a device id from a string diff --git a/core/api/src/test/java/org/onosproject/net/behaviour/PipelinerAdapter.java b/core/api/src/test/java/org/onosproject/net/behaviour/PipelinerAdapter.java index c87dee2dc14..0ff36447edc 100644 --- a/core/api/src/test/java/org/onosproject/net/behaviour/PipelinerAdapter.java +++ b/core/api/src/test/java/org/onosproject/net/behaviour/PipelinerAdapter.java @@ -17,6 +17,7 @@ import java.util.List; +import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; import org.onosproject.net.driver.DriverData; import org.onosproject.net.driver.DriverHandler; @@ -48,6 +49,11 @@ public void next(NextObjective nextObjective) { } + @Override + public void purgeAll(ApplicationId appId) { + + } + @Override public DriverHandler handler() { return null; diff --git a/core/api/src/test/java/org/onosproject/net/flow/FlowRuleServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/flow/FlowRuleServiceAdapter.java index 21fd0454fd4..1ccbbc8220b 100644 --- a/core/api/src/test/java/org/onosproject/net/flow/FlowRuleServiceAdapter.java +++ b/core/api/src/test/java/org/onosproject/net/flow/FlowRuleServiceAdapter.java @@ -28,6 +28,11 @@ public int getFlowRuleCount() { return 0; } + @Override + public FlowEntry getFlowEntry(FlowRule rule) { + return null; + } + @Override public Iterable getFlowEntries(DeviceId deviceId) { return null; @@ -38,7 +43,11 @@ public void applyFlowRules(FlowRule... flowRules) { } @Override - public void purgeFlowRules(DeviceId deviceId){ + public void purgeFlowRules(DeviceId deviceId) { + } + + @Override + public void purgeFlowRules(DeviceId deviceId, ApplicationId appId) { } @Override diff --git a/core/api/src/test/java/org/onosproject/net/flow/criteria/PiCriteriaTest.java b/core/api/src/test/java/org/onosproject/net/flow/criteria/PiCriteriaTest.java index bd11252be67..fc95e0025fb 100644 --- a/core/api/src/test/java/org/onosproject/net/flow/criteria/PiCriteriaTest.java +++ b/core/api/src/test/java/org/onosproject/net/flow/criteria/PiCriteriaTest.java @@ -22,6 +22,7 @@ import org.onosproject.net.pi.runtime.PiExactFieldMatch; import org.onosproject.net.pi.runtime.PiFieldMatch; import org.onosproject.net.pi.runtime.PiLpmFieldMatch; +import org.onosproject.net.pi.runtime.PiOptionalFieldMatch; import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; @@ -74,6 +75,40 @@ public class PiCriteriaTest { private Criterion matchPiExactLong2 = PiCriterion.builder() .matchExact(ethMatchFieldId, matchExactLong2).build(); + private Criterion matchPiOptionalByte1 = PiCriterion.builder() + .matchOptional(ethMatchFieldId, matchExactBytes1).build(); + private Criterion sameAsMatchPiOptionalByte1 = PiCriterion.builder() + .matchOptional(ethMatchFieldId, matchExactBytes1).build(); + private Criterion matchPiOptionalByte2 = PiCriterion.builder() + .matchOptional(ethMatchFieldId, matchExactBytes2).build(); + + private short matchOptionalShort1 = 0x800; + private short matchOptionalShort2 = 0x806; + private Criterion matchPiOptionalShort1 = PiCriterion.builder() + .matchOptional(ethMatchFieldId, matchOptionalShort1).build(); + private Criterion sameAsMatchPiOptionalShort1 = PiCriterion.builder() + .matchOptional(ethMatchFieldId, matchOptionalShort1).build(); + private Criterion matchPiOptionalShort2 = PiCriterion.builder() + .matchOptional(ethMatchFieldId, matchOptionalShort2).build(); + + private int matchOptionalInt1 = 0x800; + private int matchOptionalInt2 = 0x806; + private Criterion matchPiOptionalInt1 = PiCriterion.builder() + .matchOptional(ethMatchFieldId, matchOptionalInt1).build(); + private Criterion sameAsMatchPiOptionalInt1 = PiCriterion.builder() + .matchOptional(ethMatchFieldId, matchOptionalInt1).build(); + private Criterion matchPiOptionalInt2 = PiCriterion.builder() + .matchOptional(ethMatchFieldId, matchOptionalInt2).build(); + + private long matchOptionalLong1 = 0x800; + private long matchOptionalLong2 = 0x806; + private Criterion matchPiOptionalLong1 = PiCriterion.builder() + .matchOptional(ethMatchFieldId, matchOptionalLong1).build(); + private Criterion sameAsMatchPiOptionalLong1 = PiCriterion.builder() + .matchOptional(ethMatchFieldId, matchOptionalLong1).build(); + private Criterion matchPiOptionalLong2 = PiCriterion.builder() + .matchOptional(ethMatchFieldId, matchOptionalLong2).build(); + private PiMatchFieldId ipv4MatchFieldId = PiMatchFieldId.of("ipv4_t.dstAddr"); private int mask = 0x00ffffff; private byte[] matchLpmBytes1 = {0x0a, 0x01, 0x01, 0x01}; @@ -241,6 +276,37 @@ public void testExactMatchPiMethod() { assertThat(piCriterionLong.fieldMatches().iterator().next(), is(expectedMatchLong)); } + /** + * Test the OptionalMatchPi method. + */ + @Test + public void testOptionalMatchPiMethod() { + + Criterion matchPiBytes = PiCriterion.builder().matchOptional(ethMatchFieldId, matchExactBytes1).build(); + PiCriterion piCriterionBytes = checkAndConvert(matchPiBytes, Criterion.Type.PROTOCOL_INDEPENDENT, + PiCriterion.class); + PiFieldMatch expectedMatchBytes = new PiOptionalFieldMatch(ethMatchFieldId, copyFrom(matchExactBytes1)); + assertThat(piCriterionBytes.fieldMatches().iterator().next(), is(expectedMatchBytes)); + + Criterion matchPiShort = PiCriterion.builder().matchOptional(ethMatchFieldId, matchExactShort1).build(); + PiCriterion piCriterionShort = checkAndConvert(matchPiShort, Criterion.Type.PROTOCOL_INDEPENDENT, + PiCriterion.class); + PiFieldMatch expectedMatchShort = new PiOptionalFieldMatch(ethMatchFieldId, copyFrom(matchExactShort1)); + assertThat(piCriterionShort.fieldMatches().iterator().next(), is(expectedMatchShort)); + + Criterion matchPiInt = PiCriterion.builder().matchOptional(ethMatchFieldId, matchExactInt1).build(); + PiCriterion piCriterionInt = checkAndConvert(matchPiInt, Criterion.Type.PROTOCOL_INDEPENDENT, + PiCriterion.class); + PiFieldMatch expectedMatchInt = new PiOptionalFieldMatch(ethMatchFieldId, copyFrom(matchExactInt1)); + assertThat(piCriterionInt.fieldMatches().iterator().next(), is(expectedMatchInt)); + + Criterion matchPiLong = PiCriterion.builder().matchOptional(ethMatchFieldId, matchExactLong1).build(); + PiCriterion piCriterionLong = checkAndConvert(matchPiLong, Criterion.Type.PROTOCOL_INDEPENDENT, + PiCriterion.class); + PiFieldMatch expectedMatchLong = new PiOptionalFieldMatch(ethMatchFieldId, copyFrom(matchExactLong1)); + assertThat(piCriterionLong.fieldMatches().iterator().next(), is(expectedMatchLong)); + } + /** * Test the LpmMatchPi method. */ @@ -384,6 +450,32 @@ public void testPiExactCriterionEquals() { .testEquals(); } + /** + * Test the equals() method of the PiCriterion class. + */ + @Test + public void testPiOptionalCriterionEquals() { + new EqualsTester() + .addEqualityGroup(matchPiOptionalByte1, sameAsMatchPiOptionalByte1) + .addEqualityGroup(matchPiOptionalByte2) + .testEquals(); + + new EqualsTester() + .addEqualityGroup(matchPiOptionalShort1, sameAsMatchPiOptionalShort1) + .addEqualityGroup(matchPiOptionalShort2) + .testEquals(); + + new EqualsTester() + .addEqualityGroup(matchPiOptionalInt1, sameAsMatchPiOptionalInt1) + .addEqualityGroup(matchPiOptionalInt2) + .testEquals(); + + new EqualsTester() + .addEqualityGroup(matchPiOptionalLong1, sameAsMatchPiOptionalLong1) + .addEqualityGroup(matchPiOptionalLong2) + .testEquals(); + } + /** * Test the equals() method of the PiCriterion class. */ diff --git a/core/api/src/test/java/org/onosproject/net/flowobjective/FlowObjectiveServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/flowobjective/FlowObjectiveServiceAdapter.java index 0b17ce8217d..66ff1259d9d 100644 --- a/core/api/src/test/java/org/onosproject/net/flowobjective/FlowObjectiveServiceAdapter.java +++ b/core/api/src/test/java/org/onosproject/net/flowobjective/FlowObjectiveServiceAdapter.java @@ -18,6 +18,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; import org.apache.commons.lang3.tuple.Pair; import java.util.Map; @@ -69,6 +70,11 @@ public List getPendingFlowObjectives() { return ImmutableList.of(); } + @Override + public void purgeAll(DeviceId deviceId, ApplicationId appId) { + + } + @Override public Map, List> getNextMappingsChain() { return ImmutableMap.of(); diff --git a/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java b/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java index e3e6277f4db..870ad0b8ca3 100644 --- a/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java +++ b/core/api/src/test/java/org/onosproject/net/intent/FakeIntentManager.java @@ -16,6 +16,7 @@ package org.onosproject.net.intent; import com.google.common.collect.ImmutableMap; +import org.onosproject.core.ApplicationId; import java.util.ArrayList; import java.util.Collections; @@ -26,6 +27,7 @@ import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.stream.Collectors; /** * Fake implementation of the intent service to assist in developing tests of @@ -178,6 +180,15 @@ public Set getIntents() { return Collections.unmodifiableSet(new HashSet<>(intents.values())); } + @Override + public Set getIntentsByAppId(ApplicationId id) { + return Collections.unmodifiableSet( + intents.values().stream() + .filter(intent -> intent.appId().equals(id)) + .collect(Collectors.toSet()) + ); + } + @Override public void addPending(IntentData intentData) { throw new UnsupportedOperationException(); diff --git a/core/api/src/test/java/org/onosproject/net/intent/IntentServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/intent/IntentServiceAdapter.java index 850344790e3..17f489e38f4 100644 --- a/core/api/src/test/java/org/onosproject/net/intent/IntentServiceAdapter.java +++ b/core/api/src/test/java/org/onosproject/net/intent/IntentServiceAdapter.java @@ -16,6 +16,8 @@ package org.onosproject.net.intent; +import org.onosproject.core.ApplicationId; + import java.util.List; /** @@ -42,6 +44,11 @@ public Iterable getIntents() { return null; } + @Override + public Iterable getIntentsByAppId(ApplicationId id) { + return null; + } + @Override public void addPending(IntentData intentData) { diff --git a/core/api/src/test/java/org/onosproject/net/intent/IntentTestsMocks.java b/core/api/src/test/java/org/onosproject/net/intent/IntentTestsMocks.java index 642830e71d5..bdfa10641f4 100644 --- a/core/api/src/test/java/org/onosproject/net/intent/IntentTestsMocks.java +++ b/core/api/src/test/java/org/onosproject/net/intent/IntentTestsMocks.java @@ -19,6 +19,7 @@ import com.google.common.collect.Sets; import org.onlab.graph.ScalarWeight; import org.onlab.graph.Weight; +import org.onosproject.core.ApplicationId; import org.onosproject.core.GroupId; import org.onosproject.net.ConnectPoint; import org.onosproject.net.DefaultLink; @@ -557,6 +558,12 @@ public MockIntent(Long number) { this.number = number; } + public MockIntent(Long number, ApplicationId appId) { + super(appId, null, Collections.emptyList(), + Intent.DEFAULT_INTENT_PRIORITY, null); + this.number = number; + } + public MockIntent(Long number, Collection resources) { super(NetTestTools.APP_ID, null, resources, Intent.DEFAULT_INTENT_PRIORITY, null); this.number = number; diff --git a/core/api/src/test/java/org/onosproject/net/intent/KeyTest.java b/core/api/src/test/java/org/onosproject/net/intent/KeyTest.java index b383afeddb8..1de9fbb59a2 100644 --- a/core/api/src/test/java/org/onosproject/net/intent/KeyTest.java +++ b/core/api/src/test/java/org/onosproject/net/intent/KeyTest.java @@ -21,7 +21,10 @@ import com.google.common.testing.EqualsTester; import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.comparesEqualTo; +import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.notNullValue; import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutableBaseClass; import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable; @@ -118,4 +121,74 @@ public void longKey() { .addEqualityGroup(longKey3) .testEquals(); } + + /** + * Tests compareTo for string based keys. + */ + @Test + public void stringKeyCompare() { + Key stringKey1 = Key.of(KEY_1, NetTestTools.APP_ID); + Key copyOfStringKey1 = Key.of(KEY_1, NetTestTools.APP_ID); + Key stringKey2 = Key.of(KEY_2, NetTestTools.APP_ID); + Key copyOfStringKey2 = Key.of(KEY_2, NetTestTools.APP_ID); + Key stringKey3 = Key.of(KEY_3, NetTestTools.APP_ID); + Key copyOfStringKey3 = Key.of(KEY_3, NetTestTools.APP_ID); + + assertThat(stringKey1, comparesEqualTo(copyOfStringKey1)); + assertThat(stringKey1, lessThan(stringKey2)); + assertThat(stringKey1, lessThan(stringKey3)); + + assertThat(stringKey2, greaterThan(stringKey1)); + assertThat(stringKey2, comparesEqualTo(copyOfStringKey2)); + assertThat(stringKey2, lessThan(stringKey3)); + + assertThat(stringKey3, greaterThan(stringKey1)); + assertThat(stringKey3, greaterThan(stringKey2)); + assertThat(stringKey3, comparesEqualTo(copyOfStringKey3)); + } + + /** + * Tests compareTo for long based keys. + */ + @Test + public void longKeyCompare() { + Key longKey1 = Key.of(LONG_KEY_1, NetTestTools.APP_ID); + Key copyOfLongKey1 = Key.of(LONG_KEY_1, NetTestTools.APP_ID); + Key longKey2 = Key.of(LONG_KEY_2, NetTestTools.APP_ID); + Key copyOfLongKey2 = Key.of(LONG_KEY_2, NetTestTools.APP_ID); + Key longKey3 = Key.of(LONG_KEY_3, NetTestTools.APP_ID); + Key copyOfLongKey3 = Key.of(LONG_KEY_3, NetTestTools.APP_ID); + + assertThat(longKey1, comparesEqualTo(copyOfLongKey1)); + assertThat(longKey1, lessThan(longKey2)); + assertThat(longKey1, lessThan(longKey3)); + + assertThat(longKey2, greaterThan(longKey1)); + assertThat(longKey2, comparesEqualTo(copyOfLongKey2)); + assertThat(longKey2, lessThan(longKey3)); + + assertThat(longKey3, greaterThan(longKey1)); + assertThat(longKey3, greaterThan(longKey2)); + assertThat(longKey3, comparesEqualTo(copyOfLongKey3)); + } + + /** + * Tests compareTo for string and long based keys. + */ + @Test + public void stringAndLongKeyCompare() { + Key stringKey0 = Key.of("0" + KEY_1, NetTestTools.APP_ID); + Key longKey1 = Key.of(LONG_KEY_1, NetTestTools.APP_ID); + Key stringKey2 = Key.of(KEY_2, NetTestTools.APP_ID); + + + assertThat(stringKey0, lessThan(longKey1)); + assertThat(stringKey0, lessThan(stringKey2)); + + assertThat(longKey1, greaterThan(stringKey0)); + assertThat(longKey1, lessThan(stringKey2)); + + assertThat(stringKey2, greaterThan(stringKey0)); + assertThat(stringKey2, greaterThan(longKey1)); + } } diff --git a/core/api/src/test/java/org/onosproject/net/intent/constraint/AnnotationConstraintTest.java b/core/api/src/test/java/org/onosproject/net/intent/constraint/AnnotationConstraintTest.java index afcbaceee1b..e21d4809c98 100644 --- a/core/api/src/test/java/org/onosproject/net/intent/constraint/AnnotationConstraintTest.java +++ b/core/api/src/test/java/org/onosproject/net/intent/constraint/AnnotationConstraintTest.java @@ -30,6 +30,7 @@ import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.lessThan; +import static org.hamcrest.Matchers.nullValue; import static org.junit.Assert.assertThat; import static org.onosproject.net.DefaultLinkTest.cp; import static org.onosproject.net.DeviceId.deviceId; @@ -47,6 +48,7 @@ public class AnnotationConstraintTest { private static final PortNumber PID1 = portNumber(1); private static final PortNumber PID2 = portNumber(2); private static final String KEY = "distance"; + private static final String MISSING_KEY = "loss"; private static final double VALUE = 100; private AnnotationConstraint sut; @@ -99,4 +101,16 @@ public void testEquality() { .addEqualityGroup(new AnnotationConstraint("latency", 100)) .testEquals(); } + + /** + * Tests the annotated constraint is invalid and has negative cost if the key is not annotated on the link. + */ + @Test + public void testNotAnnotated() { + sut = new AnnotationConstraint(MISSING_KEY, 80); + + assertThat(link.annotations().value(MISSING_KEY), nullValue()); + assertThat(sut.isValid(link, resourceContext), is(false)); + assertThat(sut.cost(link, resourceContext), is(lessThan(0.0))); + } } diff --git a/core/api/src/test/java/org/onosproject/net/meter/DefaultMeterFeaturesTest.java b/core/api/src/test/java/org/onosproject/net/meter/DefaultMeterFeaturesTest.java new file mode 100644 index 00000000000..5cd0d1ac5d3 --- /dev/null +++ b/core/api/src/test/java/org/onosproject/net/meter/DefaultMeterFeaturesTest.java @@ -0,0 +1,99 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onosproject.net.meter; + +import org.junit.Before; +import org.junit.Test; +import org.onosproject.net.DeviceId; + +import java.util.Set; + +import static org.junit.Assert.assertEquals; + +/** + * DefaultMeterFeatures Tests. + */ +public class DefaultMeterFeaturesTest { + + private MeterFeatures mf; + private DeviceId did = DeviceId.deviceId("foo:foo"); + private short band = 2; + private short color = 3; + private Set types; + private Set units; + private MeterScope globalScope = MeterScope.globalScope(); + private MeterScope fooScope = MeterScope.of("foo"); + + @Before + public void setup() { + types = Set.of(Band.Type.DROP); + units = Set.of(Meter.Unit.KB_PER_SEC); + } + + @Test + public void testZeroMaxMeter() { + mf = DefaultMeterFeatures.builder() + .forDevice(did) + .withMaxMeters(0L) + .withScope(globalScope) + .withMaxBands(band) + .withMaxColors(color) + .withBandTypes(types) + .withUnits(units) + .hasBurst(true) + .hasStats(true).build(); + + assertEquals(-1, mf.startIndex()); + assertEquals(-1, mf.endIndex()); + assertEquals(0L, mf.maxMeter()); + } + + @Test + public void testOfMaxMeter() { + mf = DefaultMeterFeatures.builder() + .forDevice(did) + .withMaxMeters(1024L) + .withScope(globalScope) + .withMaxBands(band) + .withMaxColors(color) + .withBandTypes(types) + .withUnits(units) + .hasBurst(true) + .hasStats(true).build(); + + assertEquals(1L, mf.startIndex()); + assertEquals(1024L, mf.endIndex()); + assertEquals(1024L, mf.maxMeter()); + } + + @Test + public void testNonOfMaxMeter() { + mf = DefaultMeterFeatures.builder() + .forDevice(did) + .withMaxMeters(1024L) + .withScope(fooScope) + .withMaxBands(band) + .withMaxColors(color) + .withBandTypes(types) + .withUnits(units) + .hasBurst(true) + .hasStats(true).build(); + + assertEquals(0L, mf.startIndex()); + assertEquals(1023L, mf.endIndex()); + assertEquals(1024L, mf.maxMeter()); + } +} diff --git a/core/api/src/test/java/org/onosproject/net/meter/MeterOperationTest.java b/core/api/src/test/java/org/onosproject/net/meter/MeterOperationTest.java index 0716d7d0090..c43c5c7100a 100644 --- a/core/api/src/test/java/org/onosproject/net/meter/MeterOperationTest.java +++ b/core/api/src/test/java/org/onosproject/net/meter/MeterOperationTest.java @@ -18,6 +18,7 @@ import com.google.common.testing.EqualsTester; import org.junit.Test; import org.onosproject.core.ApplicationId; +import org.onosproject.net.AbstractAnnotated; import org.onosproject.net.DeviceId; import java.util.Collection; @@ -67,7 +68,7 @@ public void testConstruction() { assertThat(op.meter(), is(m1)); } - private static final class TestMeter implements Meter { + private static final class TestMeter extends AbstractAnnotated implements Meter { @Override public DeviceId deviceId() { diff --git a/core/api/src/test/java/org/onosproject/net/meter/MeterServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/meter/MeterServiceAdapter.java index cc556725692..86795e91b81 100644 --- a/core/api/src/test/java/org/onosproject/net/meter/MeterServiceAdapter.java +++ b/core/api/src/test/java/org/onosproject/net/meter/MeterServiceAdapter.java @@ -16,6 +16,7 @@ package org.onosproject.net.meter; +import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; import java.util.Collection; @@ -34,11 +35,21 @@ public void withdraw(MeterRequest meter, MeterId meterId) { } + @Override + public void withdraw(MeterRequest meter, MeterCellId meterCellId) { + + } + @Override public Meter getMeter(DeviceId deviceId, MeterId id) { return null; } + @Override + public Meter getMeter(DeviceId deviceId, MeterCellId meterCellId) { + return null; + } + @Override public Collection getAllMeters() { return null; @@ -49,6 +60,11 @@ public Collection getMeters(DeviceId deviceId) { return null; } + @Override + public Collection getMeters(DeviceId deviceId, MeterScope scope) { + return null; + } + @Override public MeterId allocateMeterId(DeviceId deviceId) { return null; @@ -64,6 +80,11 @@ public void purgeMeters(DeviceId deviceId) { } + @Override + public void purgeMeters(DeviceId deviceId, ApplicationId appId) { + + } + @Override public void addListener(MeterListener listener) { diff --git a/core/api/src/test/java/org/onosproject/net/pi/runtime/PiOptionalFieldMatchTest.java b/core/api/src/test/java/org/onosproject/net/pi/runtime/PiOptionalFieldMatchTest.java new file mode 100644 index 00000000000..6e0c3d9c139 --- /dev/null +++ b/core/api/src/test/java/org/onosproject/net/pi/runtime/PiOptionalFieldMatchTest.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.pi.runtime; + +import com.google.common.testing.EqualsTester; +import org.junit.Test; +import org.onlab.util.ImmutableByteSequence; +import org.onosproject.net.pi.model.PiMatchFieldId; +import org.onosproject.net.pi.model.PiMatchType; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.notNullValue; +import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable; +import static org.onlab.util.ImmutableByteSequence.copyFrom; +import static org.onosproject.net.pi.runtime.PiConstantsTest.*; + +/** + * Unit tests for PiOptionalFieldMatch class. + */ +public class PiOptionalFieldMatchTest { + + private final ImmutableByteSequence value1 = copyFrom(0x0800); + private final ImmutableByteSequence value2 = copyFrom(0x0806); + private final PiMatchFieldId piMatchField = PiMatchFieldId.of(ETH_HEADER_NAME + DOT + ETH_TYPE); + private PiOptionalFieldMatch piOptionalFieldMatch1 = new PiOptionalFieldMatch(piMatchField, value1); + private PiOptionalFieldMatch sameAsPiOptionalFieldMatch1 = new PiOptionalFieldMatch(piMatchField, value1); + private PiOptionalFieldMatch piOptionalFieldMatch2 = new PiOptionalFieldMatch(piMatchField, value2); + + /** + * Checks that the PiOptionalFieldMatch class is immutable. + */ + @Test + public void testImmutability() { + assertThatClassIsImmutable(PiOptionalFieldMatch.class); + } + + /** + * Checks the operation of equals(), hashCode() and toString() methods. + */ + @Test + public void testEquals() { + new EqualsTester() + .addEqualityGroup(piOptionalFieldMatch1, sameAsPiOptionalFieldMatch1) + .addEqualityGroup(piOptionalFieldMatch2) + .testEquals(); + } + + /** + * Checks the construction of a PiOptionalFieldMatch object. + */ + @Test + public void testConstruction() { + final ImmutableByteSequence value = copyFrom(0x0806); + final PiMatchFieldId piMatchField = PiMatchFieldId.of(ETH_HEADER_NAME + DOT + ETH_TYPE); + PiOptionalFieldMatch piOptionalFieldMatch = new PiOptionalFieldMatch(piMatchField, value); + assertThat(piOptionalFieldMatch, is(notNullValue())); + assertThat(piOptionalFieldMatch.value(), is(value)); + assertThat(piOptionalFieldMatch.type(), is(PiMatchType.OPTIONAL)); + } +} diff --git a/core/api/src/test/java/org/onosproject/store/primitives/DefaultConsistentMultimapTest.java b/core/api/src/test/java/org/onosproject/store/primitives/DefaultConsistentMultimapTest.java new file mode 100644 index 00000000000..61a175aa380 --- /dev/null +++ b/core/api/src/test/java/org/onosproject/store/primitives/DefaultConsistentMultimapTest.java @@ -0,0 +1,176 @@ +/* + * Copyright 2019-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.store.primitives; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Multimap; +import org.junit.Test; +import org.onosproject.store.service.AsyncConsistentMultimapAdapter; +import org.onosproject.store.service.ConsistentMultimap; +import org.onosproject.store.service.Versioned; + +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.is; + +/** + * Tests for DefaultConsistentMultiMap. + */ +public class DefaultConsistentMultimapTest { + + private static final String KEY1 = "AAA"; + private static final String VALUE1 = "111"; + private static final String KEY2 = "BBB"; + private static final String VALUE2 = "222"; + private static final String KEY3 = "CCC"; + private static final String VALUE3 = "333"; + private static final String KEY4 = "DDD"; + private static final String VALUE4 = "444"; + private final List allKeys = Lists.newArrayList(KEY1, KEY2, + KEY3, KEY4); + private final List allValues = Lists.newArrayList(VALUE1, VALUE2, + VALUE3, VALUE4); + + /** + * Tests the behavior of public APIs of the default consistent multi-map + * implementation. + */ + @Test + public void testBehavior() { + // Initialize the map + Multimap baseMap = HashMultimap.create(); + AsyncConsistentMultimapMock asyncMultiMap = new AsyncConsistentMultimapMock<>(baseMap); + ConsistentMultimap newMap = new DefaultConsistentMultimap<>(asyncMultiMap, 69); + + // Verify is empty + assertThat(newMap.size(), is(0)); + assertThat(newMap.isEmpty(), is(true)); + + // Test multi put + Map> mapping = Maps.newHashMap(); + // First build the mappings having each key a different mapping + allKeys.forEach(key -> { + switch (key) { + case KEY1: + mapping.put(key, Lists.newArrayList(allValues.subList(0, 1))); + break; + case KEY2: + mapping.put(key, Lists.newArrayList(allValues.subList(0, 2))); + break; + case KEY3: + mapping.put(key, Lists.newArrayList(allValues.subList(0, 3))); + break; + default: + mapping.put(key, Lists.newArrayList(allValues.subList(0, 4))); + break; + } + }); + // Success + assertThat(newMap.putAll(mapping), is(true)); + // Failure + assertThat(newMap.putAll(mapping), is(false)); + // Verify operation + assertThat(newMap.size(), is(10)); + assertThat(newMap.isEmpty(), is(false)); + // verify mapping is ok + + allKeys.forEach(key -> { + List actual = Lists.newArrayList(Versioned.valueOrNull(newMap.get(key))); + switch (key) { + case KEY1: + assertThat(actual, containsInAnyOrder(allValues.subList(0, 1).toArray())); + break; + case KEY2: + assertThat(actual, containsInAnyOrder(allValues.subList(0, 2).toArray())); + break; + case KEY3: + assertThat(actual, containsInAnyOrder(allValues.subList(0, 3).toArray())); + break; + default: + assertThat(actual, containsInAnyOrder(allValues.subList(0, 4).toArray())); + break; + } + }); + // Success + assertThat(newMap.removeAll(mapping), is(true)); + // Failure + assertThat(newMap.removeAll(mapping), is(false)); + // Verify operation + assertThat(newMap.size(), is(0)); + assertThat(newMap.isEmpty(), is(true)); + } + + public static class AsyncConsistentMultimapMock extends AsyncConsistentMultimapAdapter { + private final Multimap baseMap; + private static final int DEFAULT_CREATION_TIME = 0; + private static final int DEFAULT_VERSION = 0; + + AsyncConsistentMultimapMock(Multimap newBaseMap) { + baseMap = newBaseMap; + } + + Versioned> makeVersioned(Collection v) { + return new Versioned<>(v, DEFAULT_VERSION, DEFAULT_CREATION_TIME); + } + + @Override + public CompletableFuture size() { + return CompletableFuture.completedFuture(baseMap.size()); + } + + @Override + public CompletableFuture isEmpty() { + return CompletableFuture.completedFuture(baseMap.isEmpty()); + } + + @Override + public CompletableFuture putAll(Map> mapping) { + CompletableFuture result = CompletableFuture.completedFuture(false); + for (Map.Entry> entry : mapping.entrySet()) { + if (baseMap.putAll(entry.getKey(), entry.getValue())) { + result = CompletableFuture.completedFuture(true); + } + } + return result; + } + + @Override + public CompletableFuture>> get(K key) { + return CompletableFuture.completedFuture(makeVersioned(baseMap.get(key))); + } + + @Override + public CompletableFuture removeAll(Map> mapping) { + CompletableFuture result = CompletableFuture.completedFuture(false); + for (Map.Entry> entry : mapping.entrySet()) { + for (V value : entry.getValue()) { + if (baseMap.remove(entry.getKey(), value)) { + result = CompletableFuture.completedFuture(true); + } + } + } + return result; + } + } +} diff --git a/core/api/src/test/java/org/onosproject/store/service/AsyncConsistentMultimapAdapter.java b/core/api/src/test/java/org/onosproject/store/service/AsyncConsistentMultimapAdapter.java new file mode 100644 index 00000000000..4bb26188513 --- /dev/null +++ b/core/api/src/test/java/org/onosproject/store/service/AsyncConsistentMultimapAdapter.java @@ -0,0 +1,205 @@ +/* + * Copyright 2019-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.store.service; + +import com.google.common.collect.Multiset; +import org.onosproject.core.ApplicationId; + +import java.util.Collection; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Executor; +import java.util.function.Consumer; + +public class AsyncConsistentMultimapAdapter implements AsyncConsistentMultimap { + + @Override + public String name() { + return null; + } + + @Override + public Type primitiveType() { + return null; + } + + @Override + public ApplicationId applicationId() { + return null; + } + + @Override + public CompletableFuture destroy() { + return null; + } + + @Override + public void addStatusChangeListener(Consumer listener) { + + } + + @Override + public void removeStatusChangeListener(Consumer listener) { + + } + + @Override + public Collection> statusChangeListeners() { + return null; + } + + @Override + public CompletableFuture size() { + return null; + } + + @Override + public CompletableFuture isEmpty() { + return null; + } + + @Override + public CompletableFuture containsKey(K key) { + return null; + } + + @Override + public CompletableFuture containsValue(V value) { + return null; + } + + @Override + public CompletableFuture containsEntry(K key, V value) { + return null; + } + + @Override + public CompletableFuture put(K key, V value) { + return null; + } + + @Override + public CompletableFuture>> putAndGet(K key, V value) { + return null; + } + + @Override + public CompletableFuture remove(K key, V value) { + return null; + } + + @Override + public CompletableFuture>> removeAndGet(K key, V value) { + return null; + } + + @Override + public CompletableFuture removeAll(K key, Collection values) { + return null; + } + + @Override + public CompletableFuture>> removeAll(K key) { + return null; + } + + @Override + public CompletableFuture removeAll(Map> mapping) { + return null; + } + + @Override + public CompletableFuture putAll(K key, Collection values) { + return null; + } + + @Override + public CompletableFuture putAll(Map> mapping) { + return null; + } + + @Override + public CompletableFuture>> replaceValues(K key, Collection values) { + return null; + } + + @Override + public CompletableFuture clear() { + return null; + } + + @Override + public CompletableFuture>> get(K key) { + return null; + } + + @Override + public CompletableFuture> keySet() { + return null; + } + + @Override + public CompletableFuture> keys() { + return null; + } + + @Override + public CompletableFuture> values() { + return null; + } + + @Override + public CompletableFuture>> entries() { + return null; + } + + @Override + public CompletableFuture addListener(MultimapEventListener listener) { + return null; + } + + @Override + public CompletableFuture addListener(MultimapEventListener listener, Executor executor) { + return null; + } + + @Override + public CompletableFuture removeListener(MultimapEventListener listener) { + return null; + } + + @Override + public CompletableFuture>> asMap() { + return null; + } + + @Override + public ConsistentMultimap asMultimap() { + return null; + } + + @Override + public ConsistentMultimap asMultimap(long timeoutMillis) { + return null; + } + + @Override + public CompletableFuture>> iterator() { + return null; + } +} diff --git a/core/api/src/test/java/org/onosproject/store/service/TestConsistentMultimap.java b/core/api/src/test/java/org/onosproject/store/service/TestConsistentMultimap.java index 08be2e4b48c..f70d1863cd3 100644 --- a/core/api/src/test/java/org/onosproject/store/service/TestConsistentMultimap.java +++ b/core/api/src/test/java/org/onosproject/store/service/TestConsistentMultimap.java @@ -24,6 +24,7 @@ import java.util.Set; import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicLong; +import java.util.stream.Collectors; /** * Implementation to test ConsistentMultimap. Very limited. @@ -102,11 +103,42 @@ public Versioned> removeAll(K key) { return null; } + @Override + public boolean removeAll(Map> mapping) { + // Semantic is that any change in the map should return true + boolean result = false; + for (Map.Entry> entry : mapping.entrySet()) { + Collection> versionedValues = entry.getValue().stream() + .map(this::version) + .collect(Collectors.toList()); + for (Versioned value : versionedValues) { + if (innermap.remove(entry.getKey(), value)) { + result = true; + } + } + } + return result; + } + @Override public boolean putAll(K key, Collection values) { return false; } + @Override + public boolean putAll(Map> mapping) { + // Semantic is that any change in the map should return true + boolean result = false; + for (Map.Entry> entry : mapping.entrySet()) { + Collection> versionedValues = entry.getValue().stream() + .map(this::version).collect(Collectors.toList()); + if (innermap.putAll(entry.getKey(), versionedValues)) { + result = true; + } + } + return result; + } + @Override public Versioned> replaceValues(K key, Collection values) { return null; diff --git a/core/common/src/main/java/org/onosproject/codec/impl/ControllerNodeCodec.java b/core/common/src/main/java/org/onosproject/codec/impl/ControllerNodeCodec.java index 07d8e454528..e59de95eefb 100644 --- a/core/common/src/main/java/org/onosproject/codec/impl/ControllerNodeCodec.java +++ b/core/common/src/main/java/org/onosproject/codec/impl/ControllerNodeCodec.java @@ -36,9 +36,10 @@ public final class ControllerNodeCodec extends JsonCodec { public ObjectNode encode(ControllerNode node, CodecContext context) { checkNotNull(node, "Controller node cannot be null"); ClusterService service = context.getService(ClusterService.class); + IpAddress nodeIp = node.ip(); return context.mapper().createObjectNode() .put("id", node.id().toString()) - .put("ip", node.ip().toString()) + .put("ip", nodeIp != null ? nodeIp.toString() : node.host()) .put("tcpPort", node.tcpPort()) .put("status", service.getState(node.id()).toString()) .put("lastUpdate", Long.toString(service.getLastUpdatedInstant(node.id()).toEpochMilli())) diff --git a/core/common/src/main/java/org/onosproject/codec/impl/DecodeCriterionCodecHelper.java b/core/common/src/main/java/org/onosproject/codec/impl/DecodeCriterionCodecHelper.java index 9516ed3a5af..cbd1df3a98d 100644 --- a/core/common/src/main/java/org/onosproject/codec/impl/DecodeCriterionCodecHelper.java +++ b/core/common/src/main/java/org/onosproject/codec/impl/DecodeCriterionCodecHelper.java @@ -82,6 +82,7 @@ public DecodeCriterionCodecHelper(ObjectNode json) { decoderMap.put(Criterion.Type.ETH_DST.name(), new EthDstDecoder()); decoderMap.put(Criterion.Type.ETH_DST_MASKED.name(), new EthDstMaskedDecoder()); decoderMap.put(Criterion.Type.ETH_SRC.name(), new EthSrcDecoder()); + decoderMap.put(Criterion.Type.ETH_SRC_MASKED.name(), new EthSrcMaskedDecoder()); decoderMap.put(Criterion.Type.ETH_TYPE.name(), new EthTypeDecoder()); decoderMap.put(Criterion.Type.VLAN_VID.name(), new VlanVidDecoder()); decoderMap.put(Criterion.Type.VLAN_PCP.name(), new VlanPcpDecoder()); @@ -155,9 +156,9 @@ private class EthDstMaskedDecoder implements CriterionDecoder { @Override public Criterion decodeCriterion(ObjectNode json) { MacAddress mac = MacAddress.valueOf(nullIsIllegal(json.get(CriterionCodec.MAC), - CriterionCodec.MAC + MISSING_MEMBER_MESSAGE).asText()); + CriterionCodec.MAC + MISSING_MEMBER_MESSAGE).asText()); MacAddress macMask = MacAddress.valueOf(nullIsIllegal(json.get(CriterionCodec.MAC_MASK), - CriterionCodec.MAC + MISSING_MEMBER_MESSAGE).asText()); + CriterionCodec.MAC_MASK + MISSING_MEMBER_MESSAGE).asText()); return Criteria.matchEthDstMasked(mac, macMask); } } @@ -172,6 +173,17 @@ public Criterion decodeCriterion(ObjectNode json) { } } + private class EthSrcMaskedDecoder implements CriterionDecoder { + @Override + public Criterion decodeCriterion(ObjectNode json) { + MacAddress mac = MacAddress.valueOf(nullIsIllegal(json.get(CriterionCodec.MAC), + CriterionCodec.MAC + MISSING_MEMBER_MESSAGE).asText()); + MacAddress macMask = MacAddress.valueOf(nullIsIllegal(json.get(CriterionCodec.MAC_MASK), + CriterionCodec.MAC_MASK + MISSING_MEMBER_MESSAGE).asText()); + return Criteria.matchEthSrcMasked(mac, macMask); + } + } + private class InPortDecoder implements CriterionDecoder { @Override public Criterion decodeCriterion(ObjectNode json) { @@ -666,9 +678,18 @@ public Criterion decodeCriterion(ObjectNode json) { CriterionCodec.PI_MATCH_LOW_VALUE + MISSING_MEMBER_MESSAGE).asText(), null), HexString.fromHexString(nullIsIllegal(node.get(CriterionCodec.PI_MATCH_HIGH_VALUE), - CriterionCodec.PI_MATCH_HIGH_VALUE + - MISSING_MEMBER_MESSAGE).asText(), null) - ); + CriterionCodec.PI_MATCH_HIGH_VALUE + + MISSING_MEMBER_MESSAGE).asText(), null)); + break; + case OPTIONAL: + builder.matchOptional( + PiMatchFieldId.of( + nullIsIllegal(node.get(CriterionCodec.PI_MATCH_FIELD_ID), + CriterionCodec.PI_MATCH_FIELD_ID + + MISSING_MEMBER_MESSAGE).asText()), + HexString.fromHexString(nullIsIllegal(node.get(CriterionCodec.PI_MATCH_VALUE), + CriterionCodec.PI_MATCH_VALUE + + MISSING_MEMBER_MESSAGE).asText(), null)); break; default: throw new IllegalArgumentException("Type " + type + " is unsupported"); diff --git a/core/common/src/main/java/org/onosproject/codec/impl/EncodeCriterionCodecHelper.java b/core/common/src/main/java/org/onosproject/codec/impl/EncodeCriterionCodecHelper.java index c99e3535b3f..8a3feaac363 100644 --- a/core/common/src/main/java/org/onosproject/codec/impl/EncodeCriterionCodecHelper.java +++ b/core/common/src/main/java/org/onosproject/codec/impl/EncodeCriterionCodecHelper.java @@ -56,6 +56,7 @@ import org.onosproject.net.pi.runtime.PiExactFieldMatch; import org.onosproject.net.pi.runtime.PiFieldMatch; import org.onosproject.net.pi.runtime.PiLpmFieldMatch; +import org.onosproject.net.pi.runtime.PiOptionalFieldMatch; import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; import org.onosproject.store.serializers.KryoNamespaces; @@ -94,6 +95,7 @@ public EncodeCriterionCodecHelper(Criterion criterion, CodecContext context) { formatMap.put(Criterion.Type.ETH_DST, new FormatEth()); formatMap.put(Criterion.Type.ETH_DST_MASKED, new FormatEthMasked()); formatMap.put(Criterion.Type.ETH_SRC, new FormatEth()); + formatMap.put(Criterion.Type.ETH_SRC_MASKED, new FormatEthMasked()); formatMap.put(Criterion.Type.ETH_TYPE, new FormatEthType()); formatMap.put(Criterion.Type.VLAN_VID, new FormatVlanVid()); formatMap.put(Criterion.Type.VLAN_PCP, new FormatVlanPcp()); @@ -150,14 +152,6 @@ public EncodeCriterionCodecHelper(Criterion criterion, CodecContext context) { formatMap.put(Criterion.Type.TCP_FLAGS, new FormatUnknown()); formatMap.put(Criterion.Type.ACTSET_OUTPUT, new FormatUnknown()); formatMap.put(Criterion.Type.PACKET_TYPE, new FormatUnknown()); - formatMap.put(Criterion.Type.ETH_SRC_MASKED, new FormatUnknown()); - formatMap.put(Criterion.Type.TCP_SRC_MASKED, new FormatUnknown()); - formatMap.put(Criterion.Type.TCP_DST_MASKED, new FormatUnknown()); - formatMap.put(Criterion.Type.UDP_SRC_MASKED, new FormatUnknown()); - formatMap.put(Criterion.Type.UDP_DST_MASKED, new FormatUnknown()); - formatMap.put(Criterion.Type.SCTP_SRC_MASKED, new FormatUnknown()); - formatMap.put(Criterion.Type.SCTP_DST_MASKED, new FormatUnknown()); - } private interface CriterionTypeFormatter { @@ -555,6 +549,17 @@ private ObjectNode parsePiMatchRange(PiRangeFieldMatch rangeFieldMatch) { return matchRangeNode; } + private ObjectNode parsePiMatchOptional(PiOptionalFieldMatch optionalFieldMatch) { + + ObjectNode optionalExactNode = context.mapper().createObjectNode(); + optionalExactNode.put(CriterionCodec.PI_MATCH_FIELD_ID, optionalFieldMatch.fieldId().id()); + optionalExactNode.put(CriterionCodec.PI_MATCH_TYPE, PiMatchType.OPTIONAL.name().toLowerCase()); + optionalExactNode.put(CriterionCodec.PI_MATCH_VALUE, + HexString.toHexString(optionalFieldMatch.value().asArray(), + null)); + return optionalExactNode; + } + private class FormatProtocolIndependent implements CriterionTypeFormatter { @Override public ObjectNode encodeCriterion(ObjectNode root, Criterion criterion) { @@ -574,6 +579,9 @@ public ObjectNode encodeCriterion(ObjectNode root, Criterion criterion) { case RANGE: matchNodes.add(parsePiMatchRange((PiRangeFieldMatch) fieldMatch)); break; + case OPTIONAL: + matchNodes.add(parsePiMatchOptional((PiOptionalFieldMatch) fieldMatch)); + break; default: throw new IllegalArgumentException("Type " + fieldMatch.type().name() + " is unsupported"); } diff --git a/core/common/src/main/java/org/onosproject/codec/impl/MeterBandCodec.java b/core/common/src/main/java/org/onosproject/codec/impl/MeterBandCodec.java index 4621e9467b2..3cb68a08b1b 100644 --- a/core/common/src/main/java/org/onosproject/codec/impl/MeterBandCodec.java +++ b/core/common/src/main/java/org/onosproject/codec/impl/MeterBandCodec.java @@ -21,17 +21,14 @@ import org.onosproject.net.meter.Band; import org.onosproject.net.meter.Band.Builder; import org.onosproject.net.meter.DefaultBand; -import org.slf4j.Logger; import static com.google.common.base.Preconditions.checkNotNull; import static org.onlab.util.Tools.nullIsIllegal; -import static org.slf4j.LoggerFactory.getLogger; /** * Meter band JSON codec. */ public final class MeterBandCodec extends JsonCodec { - private final Logger log = getLogger(getClass()); // JSON field names private static final String TYPE = "type"; @@ -93,6 +90,18 @@ public Band decode(ObjectNode json, CodecContext context) { builder.ofType(type); builder.dropPrecedence(precedence); break; + case "NONE": + type = Band.Type.NONE; + builder.ofType(type); + break; + case "MARK_YELLOW": + type = Band.Type.MARK_YELLOW; + builder.ofType(type); + break; + case "MARK_RED": + type = Band.Type.MARK_RED; + builder.ofType(type); + break; default: nullIsIllegal(type, "The requested type " + typeStr + " is not defined for band."); } diff --git a/core/common/src/main/java/org/onosproject/codec/impl/MeterCodec.java b/core/common/src/main/java/org/onosproject/codec/impl/MeterCodec.java index 5cf1d135a9f..26b66778179 100644 --- a/core/common/src/main/java/org/onosproject/codec/impl/MeterCodec.java +++ b/core/common/src/main/java/org/onosproject/codec/impl/MeterCodec.java @@ -21,17 +21,14 @@ import org.onosproject.codec.JsonCodec; import org.onosproject.net.meter.Band; import org.onosproject.net.meter.Meter; -import org.slf4j.Logger; import static com.google.common.base.Preconditions.checkNotNull; -import static org.slf4j.LoggerFactory.getLogger; /** * Meter JSON codec. */ public final class MeterCodec extends JsonCodec { - private final Logger log = getLogger(getClass()); // JSON field names private static final String ID = "id"; @@ -51,7 +48,7 @@ public final class MeterCodec extends JsonCodec { public ObjectNode encode(Meter meter, CodecContext context) { checkNotNull(meter, "Meter cannot be null"); ObjectNode result = context.mapper().createObjectNode() - .put(ID, meter.id().toString()) + .put(ID, meter.meterCellId().toString()) .put(LIFE, meter.life()) .put(PACKETS, meter.packetsSeen()) .put(BYTES, meter.bytesSeen()) diff --git a/core/common/src/main/java/org/onosproject/codec/impl/MeterRequestCodec.java b/core/common/src/main/java/org/onosproject/codec/impl/MeterRequestCodec.java index d2544289a6d..d46e2579c0e 100644 --- a/core/common/src/main/java/org/onosproject/codec/impl/MeterRequestCodec.java +++ b/core/common/src/main/java/org/onosproject/codec/impl/MeterRequestCodec.java @@ -26,29 +26,32 @@ import org.onosproject.net.meter.DefaultMeterRequest; import org.onosproject.net.meter.Meter; import org.onosproject.net.meter.MeterRequest; -import org.slf4j.Logger; +import org.onosproject.net.meter.MeterScope; import java.util.ArrayList; import java.util.List; import java.util.stream.IntStream; import static com.google.common.base.Preconditions.checkNotNull; +import static com.google.common.base.Strings.isNullOrEmpty; import static org.onlab.util.Tools.nullIsIllegal; -import static org.slf4j.LoggerFactory.getLogger; /** * MeterRequest JSON codec. */ public final class MeterRequestCodec extends JsonCodec { - private final Logger log = getLogger(getClass()); // JSON field names private static final String DEVICE_ID = "deviceId"; private static final String UNIT = "unit"; private static final String BANDS = "bands"; - public static final String REST_APP_ID = "org.onosproject.rest"; + private static final String SCOPE = "scope"; + private static final String INDEX = "index"; + private static final String REST_APP_ID = "org.onosproject.rest"; private static final String MISSING_MEMBER_MESSAGE = " member is required in MeterRequest"; + private ApplicationId applicationId; + @Override public MeterRequest decode(ObjectNode json, CodecContext context) { if (json == null || !json.isObject()) { @@ -56,14 +59,17 @@ public MeterRequest decode(ObjectNode json, CodecContext context) { } final JsonCodec meterBandCodec = context.codec(Band.class); - CoreService coreService = context.getService(CoreService.class); + // parse device id DeviceId deviceId = DeviceId.deviceId(nullIsIllegal(json.get(DEVICE_ID), DEVICE_ID + MISSING_MEMBER_MESSAGE).asText()); // application id - ApplicationId appId = coreService.registerApplication(REST_APP_ID); + if (applicationId == null) { + CoreService coreService = context.getService(CoreService.class); + applicationId = coreService.registerApplication(REST_APP_ID); + } // parse burst boolean burst = false; @@ -83,6 +89,9 @@ public MeterRequest decode(ObjectNode json, CodecContext context) { case "PKTS_PER_SEC": meterUnit = Meter.Unit.PKTS_PER_SEC; break; + case "BYTES_PER_SEC": + meterUnit = Meter.Unit.BYTES_PER_SEC; + break; default: nullIsIllegal(meterUnit, "The requested unit " + unit + " is not defined for meter."); } @@ -98,22 +107,39 @@ public MeterRequest decode(ObjectNode json, CodecContext context) { }); } - MeterRequest meterRequest; + // parse scope and index + JsonNode scopeJson = json.get(SCOPE); + MeterScope scope = null; + if (scopeJson != null && !isNullOrEmpty(scopeJson.asText())) { + scope = MeterScope.of(scopeJson.asText()); + } + + JsonNode indexJson = json.get(INDEX); + Long index = null; + if (indexJson != null && !isNullOrEmpty(indexJson.asText()) && scope != null) { + index = indexJson.asLong(); + } + + // build the final request + MeterRequest.Builder meterRequest = DefaultMeterRequest.builder(); + if (scope != null) { + meterRequest.withScope(scope); + } + + if (index != null) { + meterRequest.withIndex(index); + } + + meterRequest.fromApp(applicationId) + .forDevice(deviceId) + .withUnit(meterUnit) + .withBands(bandList); + if (burst) { - meterRequest = DefaultMeterRequest.builder() - .fromApp(appId) - .forDevice(deviceId) - .withUnit(meterUnit) - .withBands(bandList) - .burst().add(); - } else { - meterRequest = DefaultMeterRequest.builder() - .fromApp(appId) - .forDevice(deviceId) - .withUnit(meterUnit) - .withBands(bandList).add(); + meterRequest.burst(); } - return meterRequest; + return meterRequest.add(); } + } diff --git a/core/common/src/test/java/org/onosproject/codec/impl/CriterionCodecTest.java b/core/common/src/test/java/org/onosproject/codec/impl/CriterionCodecTest.java index 2628827d187..1542f0dbb00 100644 --- a/core/common/src/test/java/org/onosproject/codec/impl/CriterionCodecTest.java +++ b/core/common/src/test/java/org/onosproject/codec/impl/CriterionCodecTest.java @@ -49,6 +49,7 @@ import org.onosproject.net.pi.runtime.PiExactFieldMatch; import org.onosproject.net.pi.runtime.PiFieldMatch; import org.onosproject.net.pi.runtime.PiLpmFieldMatch; +import org.onosproject.net.pi.runtime.PiOptionalFieldMatch; import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; @@ -73,6 +74,7 @@ public class CriterionCodecTest { final MacAddress mcastMac = MacAddress.valueOf("01:00:5E:00:00:01"); final MacAddress mcastMacMask = MacAddress.valueOf("FF:FF:FF:80:00:00"); final TpPort tpPort = TpPort.tpPort(40000); + final TpPort tpPortMask = TpPort.tpPort(65472); final int tributaryPortNumber = 11; final int tributarySlotLen = 80; final byte[] tributarySlotBitmap = new byte[] {1, 2, 3, 4, 2, 3, 4, 2, 3, 4}; @@ -167,6 +169,16 @@ public void matchEthSrcTest() { assertThat(result, matchesCriterion(criterion)); } + /** + * Tests masked ethernet source criterion (Criterion.Type.ETH_SRC_MASKED). + */ + @Test + public void matchEthSrcMaskTest() { + Criterion criterion = Criteria.matchEthSrcMasked(mcastMac, mcastMacMask); + ObjectNode result = criterionCodec.encode(criterion, context); + assertThat(result, matchesCriterion(criterion)); + } + /** * Tests ethernet type criterion. */ @@ -257,6 +269,16 @@ public void matchTcpSrcTest() { assertThat(result, matchesCriterion(criterion)); } + /** + * Tests source TCP port masked criterion. + */ + @Test + public void matchTcpSrcMaskedTest() { + Criterion criterion = Criteria.matchTcpSrcMasked(tpPort, tpPortMask); + ObjectNode result = criterionCodec.encode(criterion, context); + assertThat(result, matchesCriterion(criterion)); + } + /** * Tests destination TCP port criterion. */ @@ -267,6 +289,16 @@ public void matchTcpDstTest() { assertThat(result, matchesCriterion(criterion)); } + /** + * Tests destination TCP port masked criterion. + */ + @Test + public void matchTcpDstMaskedTest() { + Criterion criterion = Criteria.matchTcpDstMasked(tpPort, tpPortMask); + ObjectNode result = criterionCodec.encode(criterion, context); + assertThat(result, matchesCriterion(criterion)); + } + /** * Tests source UDP port criterion. */ @@ -277,6 +309,16 @@ public void matchUdpSrcTest() { assertThat(result, matchesCriterion(criterion)); } + /** + * Tests source UDP port masked criterion. + */ + @Test + public void matchUdpSrcMaskedTest() { + Criterion criterion = Criteria.matchUdpSrcMasked(tpPort, tpPortMask); + ObjectNode result = criterionCodec.encode(criterion, context); + assertThat(result, matchesCriterion(criterion)); + } + /** * Tests destination UDP criterion. */ @@ -287,6 +329,16 @@ public void matchUdpDstTest() { assertThat(result, matchesCriterion(criterion)); } + /** + * Tests destination UDP port masked criterion. + */ + @Test + public void matchUdpDstMaskedTest() { + Criterion criterion = Criteria.matchUdpDstMasked(tpPort, tpPortMask); + ObjectNode result = criterionCodec.encode(criterion, context); + assertThat(result, matchesCriterion(criterion)); + } + /** * Tests source SCTP criterion. */ @@ -297,6 +349,16 @@ public void matchSctpSrcTest() { assertThat(result, matchesCriterion(criterion)); } + /** + * Tests source SCTP port masked criterion. + */ + @Test + public void matchSctpSrcMaskedTest() { + Criterion criterion = Criteria.matchSctpSrcMasked(tpPort, tpPortMask); + ObjectNode result = criterionCodec.encode(criterion, context); + assertThat(result, matchesCriterion(criterion)); + } + /** * Tests destination SCTP criterion. */ @@ -307,6 +369,16 @@ public void matchSctpDstTest() { assertThat(result, matchesCriterion(criterion)); } + /** + * Tests destination SCTP port masked criterion. + */ + @Test + public void matchSctpDstMaskedTest() { + Criterion criterion = Criteria.matchSctpDstMasked(tpPort, tpPortMask); + ObjectNode result = criterionCodec.encode(criterion, context); + assertThat(result, matchesCriterion(criterion)); + } + /** * Tests ICMP type criterion. */ @@ -519,6 +591,12 @@ public void matchPiTypeEncodingTest() { .matchRange(ipv4MatchFieldId, matchRangeBytes1, matchRangeHighBytes).build(); ObjectNode rangeResult = criterionCodec.encode(rangeBytesCriterion, context); assertThat(rangeResult, matchesCriterion(rangeBytesCriterion)); + + byte[] matchOptionalBytes = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55}; + Criterion optionalBytesCriterion = PiCriterion.builder().matchOptional(ethMatchFieldId, + matchOptionalBytes).build(); + ObjectNode optionalResult = criterionCodec.encode(optionalBytesCriterion, context); + assertThat(optionalResult, matchesCriterion(optionalBytesCriterion)); } /** @@ -556,6 +634,11 @@ public void matchPiTypeDecodingTest() throws IOException { Assert.assertThat(((PiRangeFieldMatch) piFieldMatch).lowValue(), is(copyFrom((byte) 0x10))); break; + case OPTIONAL: + Assert.assertThat(piFieldMatch.fieldId().id(), is("eth_dst")); + Assert.assertThat(((PiOptionalFieldMatch) piFieldMatch).value(), + is(copyFrom(new byte[]{0x00, 0x11, 0x22, 0x33, 0x44, 0x55}))); + break; default: Assert.fail(); } diff --git a/core/common/src/test/java/org/onosproject/codec/impl/CriterionJsonMatcher.java b/core/common/src/test/java/org/onosproject/codec/impl/CriterionJsonMatcher.java index b19ee53e70c..9113124c1c0 100644 --- a/core/common/src/test/java/org/onosproject/codec/impl/CriterionJsonMatcher.java +++ b/core/common/src/test/java/org/onosproject/codec/impl/CriterionJsonMatcher.java @@ -57,6 +57,7 @@ import org.onosproject.net.pi.runtime.PiExactFieldMatch; import org.onosproject.net.pi.runtime.PiFieldMatch; import org.onosproject.net.pi.runtime.PiLpmFieldMatch; +import org.onosproject.net.pi.runtime.PiOptionalFieldMatch; import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; @@ -137,7 +138,7 @@ private boolean matchCriterion(EthCriterion criterion) { description.appendText("mac was " + jsonMac); return false; } - if (criterion.type() == Criterion.Type.ETH_DST_MASKED) { + if (criterion.type() == Criterion.Type.ETH_SRC_MASKED || criterion.type() == Criterion.Type.ETH_DST_MASKED) { final String macMask = criterion.mask().toString(); final String jsonMacMask = jsonCriterion.get("macMask").textValue(); if (!macMask.equals(jsonMacMask)) { @@ -277,6 +278,15 @@ private boolean matchCriterion(TcpPortCriterion criterion) { + Integer.toString(jsonTcpPort)); return false; } + if (criterion.type() == Criterion.Type.TCP_SRC_MASKED || criterion.type() == Criterion.Type.TCP_DST_MASKED) { + final int tcpMask = criterion.mask().toInt(); + final int jsonTcpMask = jsonCriterion.get("tcpMask").intValue(); + if (tcpMask != jsonTcpMask) { + description.appendText("tcp mask was " + + Integer.toString(jsonTcpMask)); + return false; + } + } return true; } @@ -294,6 +304,16 @@ private boolean matchCriterion(UdpPortCriterion criterion) { + Integer.toString(jsonUdpPort)); return false; } + + if (criterion.type() == Criterion.Type.UDP_SRC_MASKED || criterion.type() == Criterion.Type.UDP_DST_MASKED) { + final int udpMask = criterion.mask().toInt(); + final int jsonUdpMask = jsonCriterion.get("udpMask").intValue(); + if (udpMask != jsonUdpMask) { + description.appendText("udp mask was " + + Integer.toString(jsonUdpMask)); + return false; + } + } return true; } @@ -311,6 +331,15 @@ private boolean matchCriterion(SctpPortCriterion criterion) { + Integer.toString(jsonSctpPort)); return false; } + if (criterion.type() == Criterion.Type.SCTP_SRC_MASKED || criterion.type() == Criterion.Type.SCTP_DST_MASKED) { + final int sctpMask = criterion.mask().toInt(); + final int jsonSctpMask = jsonCriterion.get("sctpMask").intValue(); + if (sctpMask != jsonSctpMask) { + description.appendText("sctp mask was " + + Integer.toString(jsonSctpMask)); + return false; + } + } return true; } @@ -633,6 +662,14 @@ private boolean matchCriterion(PiCriterion criterion) { return false; } break; + case OPTIONAL: + if (!Objects.equals(copyFrom(HexString.fromHexString(matchNode.get("value") + .textValue(), null)), + ((PiOptionalFieldMatch) fieldMatch).value())) { + description.appendText("match value was " + ((PiOptionalFieldMatch) fieldMatch).value()); + return false; + } + break; default: description.appendText("match type was " + fieldMatch.type().name().toLowerCase()); return false; @@ -667,6 +704,7 @@ public boolean matchesSafely(JsonNode jsonCriterion, case ETH_DST: case ETH_DST_MASKED: case ETH_SRC: + case ETH_SRC_MASKED: return matchCriterion((EthCriterion) criterion); case ETH_TYPE: @@ -694,15 +732,21 @@ public boolean matchesSafely(JsonNode jsonCriterion, return matchCriterion((IPCriterion) criterion); case TCP_SRC: + case TCP_SRC_MASKED: case TCP_DST: + case TCP_DST_MASKED: return matchCriterion((TcpPortCriterion) criterion); case UDP_SRC: + case UDP_SRC_MASKED: case UDP_DST: + case UDP_DST_MASKED: return matchCriterion((UdpPortCriterion) criterion); case SCTP_SRC: + case SCTP_SRC_MASKED: case SCTP_DST: + case SCTP_DST_MASKED: return matchCriterion((SctpPortCriterion) criterion); case ICMPV4_TYPE: diff --git a/core/common/src/test/java/org/onosproject/store/trivial/SimpleFlowRuleStore.java b/core/common/src/test/java/org/onosproject/store/trivial/SimpleFlowRuleStore.java index 31b58fbe698..3b667a89e6a 100644 --- a/core/common/src/test/java/org/onosproject/store/trivial/SimpleFlowRuleStore.java +++ b/core/common/src/test/java/org/onosproject/store/trivial/SimpleFlowRuleStore.java @@ -25,6 +25,7 @@ import com.google.common.collect.Streams; import com.google.common.util.concurrent.SettableFuture; import org.onlab.util.Tools; +import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; import org.onosproject.net.flow.CompletedBatchOperation; import org.onosproject.net.flow.DefaultFlowEntry; @@ -300,6 +301,16 @@ public void purgeFlowRule(DeviceId deviceId) { flowEntries.remove(deviceId); } + @Override + public boolean purgeFlowRules(DeviceId deviceId, ApplicationId appId) { + flowEntries.get(deviceId).values() + .removeIf(storedFlowEntries -> { + storedFlowEntries.removeIf(storedFlowEntry -> storedFlowEntry.appId() == appId.id()); + return storedFlowEntries.isEmpty(); + }); + return true; + } + @Override public void purgeFlowRules() { flowEntries.clear(); diff --git a/core/common/src/test/java/org/onosproject/store/trivial/SimpleGroupStore.java b/core/common/src/test/java/org/onosproject/store/trivial/SimpleGroupStore.java index bf8ba599c00..8ece6483b41 100644 --- a/core/common/src/test/java/org/onosproject/store/trivial/SimpleGroupStore.java +++ b/core/common/src/test/java/org/onosproject/store/trivial/SimpleGroupStore.java @@ -17,6 +17,7 @@ import com.google.common.collect.FluentIterable; import com.google.common.collect.Sets; +import org.onosproject.core.ApplicationId; import org.onosproject.core.GroupId; import org.onosproject.net.DeviceId; import org.onosproject.net.group.DefaultGroup; @@ -51,6 +52,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; import static org.slf4j.LoggerFactory.getLogger; @@ -481,6 +483,31 @@ public void purgeGroupEntry(DeviceId deviceId) { }); } + @Override + public void purgeGroupEntries(DeviceId deviceId, ApplicationId appId) { + List entryPendingRemove = + groupEntriesById.get(deviceId).values().stream() + .filter(storedGroupEntry -> storedGroupEntry.appId().equals(appId)) + .collect(Collectors.toList()); + + entryPendingRemove.forEach(storedGroupEntry -> { + groupEntriesById.computeIfPresent(deviceId, (k, value) -> { + value.remove(storedGroupEntry.id()); + if (value.isEmpty()) { + return null; + } + return value; + }); + groupEntriesByKey.computeIfPresent(deviceId, (k, value) -> { + value.remove(storedGroupEntry.appCookie()); + if (value.isEmpty()) { + return null; + } + return value; + }); + }); + } + @Override public void purgeGroupEntries() { groupEntriesById.values().forEach(groupEntries -> { diff --git a/core/common/src/test/java/org/onosproject/store/trivial/SimpleMastershipStore.java b/core/common/src/test/java/org/onosproject/store/trivial/SimpleMastershipStore.java index 4536ddae1d4..0f00a5fc05b 100644 --- a/core/common/src/test/java/org/onosproject/store/trivial/SimpleMastershipStore.java +++ b/core/common/src/test/java/org/onosproject/store/trivial/SimpleMastershipStore.java @@ -412,4 +412,22 @@ public synchronized void relinquishAllRole(NodeId nodeId) { future.whenComplete((event, error) -> notifyDelegate(event)); }); } + + @Override + public void demote(NodeId instance, DeviceId deviceId) { + if (instance == null) { + return; + } + NodeId master = masterMap.get(deviceId); + if (master.equals(instance)) { + return; + } + List stbys = backups.getOrDefault(deviceId, new ArrayList<>()); + if (!stbys.contains(instance)) { + return; + } + stbys.remove(instance); + stbys.add(instance); + backups.put(deviceId, stbys); + } } diff --git a/core/common/src/test/java/org/onosproject/store/trivial/SimpleMastershipStoreTest.java b/core/common/src/test/java/org/onosproject/store/trivial/SimpleMastershipStoreTest.java index 24c7a47a0f6..cee24312058 100644 --- a/core/common/src/test/java/org/onosproject/store/trivial/SimpleMastershipStoreTest.java +++ b/core/common/src/test/java/org/onosproject/store/trivial/SimpleMastershipStoreTest.java @@ -20,6 +20,7 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; +import com.google.common.collect.Lists; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -49,6 +50,8 @@ public class SimpleMastershipStoreTest { private static final NodeId N1 = new NodeId("local"); private static final NodeId N2 = new NodeId("other"); + private static final NodeId N3 = new NodeId("other2"); + private static final NodeId N4 = new NodeId("other3"); private SimpleMastershipStore sms; @@ -170,6 +173,30 @@ public void unsetMaster() { assertEquals("wrong master", N2, event.roleInfo().master()); } + @Test + public void demote() { + put(DID1, N1, true, false); + put(DID1, N2, false, true); + put(DID1, N3, false, true); + List stdbys = Lists.newArrayList(N2, N3); + // N1 master, N2 and N3 backups + assertEquals("wrong role", MASTER, sms.getRole(N1, DID1)); + assertEquals("wrong backups", stdbys, sms.backups.getOrDefault(DID1, new ArrayList<>())); + // No effect, it is the master + sms.demote(N1, DID1); + assertEquals("wrong role", MASTER, sms.getRole(N1, DID1)); + assertEquals("wrong backups", stdbys, sms.backups.getOrDefault(DID1, new ArrayList<>())); + // No effect, it is not part of the mastership + sms.demote(N4, DID1); + assertEquals("wrong role", MASTER, sms.getRole(N1, DID1)); + assertEquals("wrong backups", stdbys, sms.backups.getOrDefault(DID1, new ArrayList<>())); + // Demote N2 + stdbys = Lists.newArrayList(N3, N2); + sms.demote(N2, DID1); + assertEquals("wrong role", MASTER, sms.getRole(N1, DID1)); + assertEquals("wrong backups", stdbys, sms.backups.getOrDefault(DID1, new ArrayList<>())); + } + //helper to populate master/backup structures private void put(DeviceId dev, NodeId node, boolean master, boolean backup) { if (master) { diff --git a/core/common/src/test/resources/org/onosproject/codec/impl/PiCriterion.json b/core/common/src/test/resources/org/onosproject/codec/impl/PiCriterion.json index d1df49ea700..6635641d277 100644 --- a/core/common/src/test/resources/org/onosproject/codec/impl/PiCriterion.json +++ b/core/common/src/test/resources/org/onosproject/codec/impl/PiCriterion.json @@ -23,6 +23,11 @@ "match": "range", "highValue": "20", "lowValue": "10" + }, + { + "field": "eth_dst", + "match": "optional", + "value": "001122334455" } ] } diff --git a/core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java b/core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java index c7e28bdf87b..8ebfa4cbd7c 100644 --- a/core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java +++ b/core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java @@ -15,14 +15,9 @@ */ package org.onosproject.app.impl; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.google.common.collect.HashMultimap; -import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Multimap; import com.google.common.util.concurrent.Uninterruptibles; @@ -37,9 +32,6 @@ import org.onosproject.app.ApplicationStoreDelegate; import org.onosproject.core.Application; import org.onosproject.core.ApplicationId; -import org.onosproject.core.DefaultApplication; -import org.onosproject.core.DefaultApplicationId; -import org.onosproject.core.Version; import org.onosproject.core.VersionService; import org.onosproject.event.AbstractListenerManager; import org.onosproject.security.Permission; @@ -51,19 +43,17 @@ import org.osgi.service.component.annotations.ReferenceCardinality; import org.slf4j.Logger; -import java.io.IOException; import java.io.InputStream; -import java.net.HttpURLConnection; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Iterator; import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; import static com.google.common.base.Preconditions.checkNotNull; -import static org.onosproject.app.ApplicationEvent.Type.*; +import static org.onosproject.app.ApplicationEvent.Type.APP_ACTIVATED; +import static org.onosproject.app.ApplicationEvent.Type.APP_DEACTIVATED; +import static org.onosproject.app.ApplicationEvent.Type.APP_INSTALLED; +import static org.onosproject.app.ApplicationEvent.Type.APP_UNINSTALLED; import static org.onosproject.security.AppGuard.checkPermission; import static org.onosproject.security.AppPermission.Type.APP_READ; import static org.slf4j.LoggerFactory.getLogger; @@ -78,8 +68,6 @@ public class ApplicationManager private final Logger log = getLogger(getClass()); - private static final String APP_REGISTRY_URL = "http://api.onosproject.org:8080/api/applications"; - private static final String APP_ID_NULL = "Application ID cannot be null"; private static final long DEFAULT_OPERATION_TIMEOUT_MILLIS = 2000; private final ApplicationStoreDelegate delegate = new InternalStoreDelegate(); @@ -297,6 +285,8 @@ private synchronized boolean installAppFeatures(Application app) throws Exceptio changed = true; } else if (feature == null) { log.warn("Feature {} not found", name); + } else if (log.isDebugEnabled()) { + log.debug("Feature already installed for {}", app.id()); } } return changed; @@ -334,67 +324,7 @@ private void invokeHook(Runnable hook, ApplicationId appId) { @Override public Set getRegisteredApplications() { - ImmutableSet.Builder builder = ImmutableSet.builder(); - ObjectMapper mapper = new ObjectMapper(); - String vers = versionService.version().toString(); - vers = vers.substring(0, vers.lastIndexOf(".") + 2); - // Get input stream from the URL - try { - URL serverUrl = new URL(APP_REGISTRY_URL + "?onosVersion=" + vers); - HttpURLConnection serverHttp = (HttpURLConnection) serverUrl.openConnection(); - InputStream githubStream = serverHttp.getInputStream(); - - // Read input stream into an ArrayNode - ArrayNode rootTree = (ArrayNode) mapper.readTree(githubStream); - - // Iterate over the array node for each object add each version as application object to the set - rootTree.forEach(n -> { - mapObject(builder, (ObjectNode) n); - }); - - //Iterate through Builder to remove unnecessary apps - Set apps = builder.build(); - - return apps; - } catch (MalformedURLException e) { - throw new IllegalStateException("Bad URL: " + APP_REGISTRY_URL + "?onosVersion=" + vers, e); - } catch (IOException e) { - throw new IllegalStateException("Unable to fetch URL: " + APP_REGISTRY_URL + "?onosVersion=" + vers, e); - } + return ImmutableSet.of(); } - private void mapObject(ImmutableSet.Builder apps, ObjectNode node) { - String appIDs = node.get("id").asText(); - ApplicationId appID = new DefaultApplicationId(1, appIDs); - String title = node.get("title").asText(); - String readme = node.get("readme").asText(); - String category = node.get("category").asText(); - String url = node.get("url").asText(); - String origin = node.get("maintainer").asText(); - JsonNode it = node.get("versions"); - Iterator iterate = it.iterator(); - while (iterate.hasNext()) { - DefaultApplication.Builder app = new DefaultApplication.Builder(); - JsonNode jsonNode = (JsonNode) iterate.next(); - URL imageUrl = null; - try { - imageUrl = new URL(jsonNode.get("oarURL").asText()); - } catch (MalformedURLException e) { - e.printStackTrace(); - } - Version version1 = Version.version(jsonNode.get("onosVersion").asText()); - app.withImageUrl(imageUrl) - .withAppId(new DefaultApplicationId(1, node.get("id").asText())) - .withVersion(version1) - .withAppId(appID) - .withReadme(readme) - .withDescription(readme) - .withTitle(title) - .withFeatures(ImmutableList.of("none")) - .withCategory(category) - .withUrl(url) - .withOrigin(origin); - apps.add(app.build()); - } - } } \ No newline at end of file diff --git a/core/net/src/main/java/org/onosproject/cfg/impl/ComponentConfigManager.java b/core/net/src/main/java/org/onosproject/cfg/impl/ComponentConfigManager.java index 076ae4b063f..49ae74874f7 100644 --- a/core/net/src/main/java/org/onosproject/cfg/impl/ComponentConfigManager.java +++ b/core/net/src/main/java/org/onosproject/cfg/impl/ComponentConfigManager.java @@ -74,7 +74,7 @@ public class ComponentConfigManager implements ComponentConfigService { private final Logger log = getLogger(getClass()); private final ComponentConfigStoreDelegate delegate = new InternalStoreDelegate(); - private final InternalAccumulator accumulator = new InternalAccumulator(); + private InternalAccumulator accumulator; @Reference(cardinality = ReferenceCardinality.MANDATORY) protected ComponentConfigStore store; @@ -89,12 +89,17 @@ public class ComponentConfigManager implements ComponentConfigService { @Activate public void activate() { + // Accumulator depends on SharedExecutors, we create a new one at each + // activation to avoid using executors that have been terminated, which + // can happen during core bundle refresh. + accumulator = new InternalAccumulator(); store.setDelegate(delegate); log.info("Started"); } @Deactivate public void deactivate() { + accumulator = null; store.unsetDelegate(delegate); log.info("Stopped"); } diff --git a/core/net/src/main/java/org/onosproject/cfg/impl/ConfigPropertyDefinitions.java b/core/net/src/main/java/org/onosproject/cfg/impl/ConfigPropertyDefinitions.java index e07773b307f..25ba6e0cd4c 100644 --- a/core/net/src/main/java/org/onosproject/cfg/impl/ConfigPropertyDefinitions.java +++ b/core/net/src/main/java/org/onosproject/cfg/impl/ConfigPropertyDefinitions.java @@ -75,6 +75,11 @@ public static Set read(InputStream stream) throws IOException { while ((line = br.readLine()) != null) { if (!line.isEmpty() && !line.startsWith(COMMENT)) { String[] f = line.split(SEP, 4); + if (f.length < 4) { + log.warn("Cannot parse property from line: '{}'. " + + "This property will be ignored", line); + continue; + } builder.add(defineProperty(f[0], Type.valueOf(f[1]), f[2], f[3])); } } diff --git a/core/net/src/main/java/org/onosproject/cluster/impl/LeadershipManager.java b/core/net/src/main/java/org/onosproject/cluster/impl/LeadershipManager.java index 5d02b5d03dd..f582f30f6ba 100644 --- a/core/net/src/main/java/org/onosproject/cluster/impl/LeadershipManager.java +++ b/core/net/src/main/java/org/onosproject/cluster/impl/LeadershipManager.java @@ -102,6 +102,11 @@ public Map getLeaderBoard() { return store.getLeaderships(); } + @Override + public boolean demote(String topic, NodeId nodeId) { + return store.demote(topic, nodeId); + } + @Override public boolean transferLeadership(String topic, NodeId to) { return store.moveLeadership(topic, to); diff --git a/core/net/src/main/java/org/onosproject/cluster/impl/MastershipManager.java b/core/net/src/main/java/org/onosproject/cluster/impl/MastershipManager.java index 442aaefb924..d6a7eaeafcf 100644 --- a/core/net/src/main/java/org/onosproject/cluster/impl/MastershipManager.java +++ b/core/net/src/main/java/org/onosproject/cluster/impl/MastershipManager.java @@ -305,6 +305,15 @@ public void balanceRoles() { Futures.getUnchecked(balanceRolesFuture); } + @Override + public void demote(NodeId instance, DeviceId deviceId) { + checkNotNull(instance, NODE_ID_NULL); + checkNotNull(deviceId, DEVICE_ID_NULL); + checkPermission(CLUSTER_WRITE); + + store.demote(instance, deviceId); + } + /** * Balances the nodes specified in controllerDevices. * diff --git a/core/net/src/main/java/org/onosproject/core/impl/VersionManager.java b/core/net/src/main/java/org/onosproject/core/impl/VersionManager.java index 72eb841612a..ad5e9f04463 100644 --- a/core/net/src/main/java/org/onosproject/core/impl/VersionManager.java +++ b/core/net/src/main/java/org/onosproject/core/impl/VersionManager.java @@ -38,7 +38,7 @@ public class VersionManager implements VersionService { private final Logger log = LoggerFactory.getLogger(getClass()); private static final File VERSION_FILE = new File("../VERSION"); - private static Version version = Version.version("2.5.0-SNAPSHOT"); + private static Version version = Version.version("2.5.10-SNAPSHOT"); @Activate protected void activate() { diff --git a/core/net/src/main/java/org/onosproject/net/OsgiPropertyConstants.java b/core/net/src/main/java/org/onosproject/net/OsgiPropertyConstants.java index 64b3cc2a837..ab3096f0399 100644 --- a/core/net/src/main/java/org/onosproject/net/OsgiPropertyConstants.java +++ b/core/net/src/main/java/org/onosproject/net/OsgiPropertyConstants.java @@ -125,6 +125,9 @@ private OsgiPropertyConstants() { public static final String MM_PURGE_ON_DISCONNECTION = "purgeOnDisconnection"; public static final boolean MM_PURGE_ON_DISCONNECTION_DEFAULT = false; + public static final String MM_USER_DEFINED_INDEX = "userDefinedIndex"; + public static final boolean MM_USER_DEFINED_INDEX_DEFAULT = false; + public static final String NRM_ARP_ENABLED = "arpEnabled"; public static final boolean NRM_ARP_ENABLED_DEFAULT = true; diff --git a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java index e40b14d1608..32d2584b4a2 100644 --- a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java +++ b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java @@ -22,8 +22,11 @@ import com.google.common.util.concurrent.Futures; import org.onlab.util.KryoNamespace; import org.onlab.util.Tools; +import org.onosproject.cfg.ComponentConfigService; import org.onosproject.cluster.ClusterService; +import org.onosproject.cluster.ControllerNode; import org.onosproject.cluster.NodeId; +import org.onosproject.mastership.MastershipAdminService; import org.onosproject.mastership.MastershipEvent; import org.onosproject.mastership.MastershipListener; import org.onosproject.mastership.MastershipService; @@ -68,21 +71,25 @@ import org.onosproject.store.serializers.KryoNamespaces; import org.onosproject.store.service.Serializer; import org.onosproject.upgrade.UpgradeService; +import org.osgi.service.component.ComponentContext; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Deactivate; import org.osgi.service.component.annotations.Reference; +import org.osgi.service.component.annotations.Modified; import org.osgi.service.component.annotations.ReferenceCardinality; import org.slf4j.Logger; import java.time.Instant; import java.util.Collection; +import java.util.Dictionary; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Set; +import java.util.Properties; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; @@ -90,18 +97,24 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; +import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.collect.Multimaps.newListMultimap; import static com.google.common.collect.Multimaps.synchronizedListMultimap; import static java.util.concurrent.Executors.newSingleThreadExecutor; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; +import static java.lang.System.currentTimeMillis; +import static org.onlab.util.Tools.get; import static org.onlab.util.Tools.groupedThreads; import static org.onosproject.net.MastershipRole.MASTER; import static org.onosproject.net.MastershipRole.NONE; import static org.onosproject.net.MastershipRole.STANDBY; +import static org.onosproject.net.device.impl.OsgiPropertyConstants.ROLE_TIMEOUT_SECONDS; +import static org.onosproject.net.device.impl.OsgiPropertyConstants.ROLE_TIMEOUT_SECONDS_DEFAULT; import static org.onosproject.security.AppGuard.checkPermission; import static org.onosproject.security.AppPermission.Type.DEVICE_READ; import static org.slf4j.LoggerFactory.getLogger; @@ -111,7 +124,10 @@ */ @Component(immediate = true, service = {DeviceService.class, DeviceAdminService.class, - DeviceProviderRegistry.class, PortConfigOperatorRegistry.class }) + DeviceProviderRegistry.class, PortConfigOperatorRegistry.class }, + property = { + ROLE_TIMEOUT_SECONDS + ":Integer=" + ROLE_TIMEOUT_SECONDS_DEFAULT + }) public class DeviceManager extends AbstractListenerProviderRegistry implements DeviceService, DeviceAdminService, DeviceProviderRegistry, PortConfigOperatorRegistry { @@ -143,6 +159,9 @@ public class DeviceManager @Reference(cardinality = ReferenceCardinality.MANDATORY) protected MastershipService mastershipService; + @Reference(cardinality = ReferenceCardinality.MANDATORY) + protected MastershipAdminService mastershipAdminService; + @Reference(cardinality = ReferenceCardinality.MANDATORY) protected MastershipTermService termService; @@ -155,7 +174,10 @@ public class DeviceManager @Reference(cardinality = ReferenceCardinality.MANDATORY) protected ClusterCommunicationService communicationService; - private ExecutorService portReqeustExecutor; + @Reference(cardinality = ReferenceCardinality.MANDATORY) + protected ComponentConfigService cfgService; + + private ExecutorService clusterRequestExecutor; /** * List of all registered PortConfigOperator. */ @@ -175,6 +197,11 @@ public class DeviceManager private static final MessageSubject PORT_UPDOWN_SUBJECT = new MessageSubject("port-updown-req"); + private static final MessageSubject PROBE_SUBJECT = + new MessageSubject("probe-req"); + private static final long PROBE_TIMEOUT_MILLIS = 5000; + private static final int PROBE_ATTEMPTS = 3; + private static final Serializer SERIALIZER = Serializer.using( KryoNamespace.newBuilder() .register(KryoNamespaces.API) @@ -198,8 +225,26 @@ public LocalStatus(boolean b, Instant now) { private final Map deviceLocalStatus = Maps.newConcurrentMap(); + // To remember whether or not the role was acknowledged by the device + private final Map roleToAcknowledge = + Maps.newConcurrentMap(); + private ScheduledExecutorService backgroundRoleChecker; + + + /** + * Timeout for role acknowledgement check. + **/ + protected int roleTimeoutSeconds = ROLE_TIMEOUT_SECONDS_DEFAULT; + + // FIXME join this map with roleToAcknowledge and fix the back to back event issue here + private final Map lastAcknowledgedRole = + Maps.newConcurrentMap(); + @Activate - public void activate() { + public void activate(ComponentContext context) { + cfgService.registerProperties(getClass()); + + modified(context); portAnnotationOp = new PortAnnotationOperator(networkConfigService); deviceAnnotationOp = new DeviceAnnotationOperator(networkConfigService); portOpsIndex.put(PortAnnotationConfig.class, portAnnotationOp); @@ -217,30 +262,65 @@ public void activate() { try { mastershipCheck(); } catch (Exception e) { - log.error("Exception thrown during integrity check", e); + log.error("Exception thrown during mastership integrity check", e); } }, 1, 1, TimeUnit.MINUTES); - portReqeustExecutor = newSingleThreadExecutor(); + clusterRequestExecutor = newSingleThreadExecutor(); - communicationService.addSubscriber( + communicationService.addSubscriber( PORT_UPDOWN_SUBJECT, SERIALIZER::decode, this::handlePortRequest, - portReqeustExecutor); + clusterRequestExecutor); + + communicationService.addSubscriber( + PROBE_SUBJECT, + SERIALIZER::decode, + this::handleProbeRequest, + SERIALIZER::encode, + clusterRequestExecutor); + + backgroundRoleChecker = newSingleThreadScheduledExecutor( + groupedThreads("onos/device", "manager-role", log)); + backgroundRoleChecker.scheduleAtFixedRate(() -> { + try { + roleCheck(); + } catch (Exception e) { + log.error("Exception thrown while verifying role acknowledgement from all devices", e); + } + }, 0, 10, TimeUnit.SECONDS); log.info("Started"); } + @Modified + public void modified(ComponentContext context) { + Dictionary properties = context != null ? context.getProperties() : new Properties(); + String roleTimeoutSec = get(properties, ROLE_TIMEOUT_SECONDS); + int oldRoleTimeoutSeconds = roleTimeoutSeconds; + try { + roleTimeoutSeconds = isNullOrEmpty(roleTimeoutSec) ? + oldRoleTimeoutSeconds : Integer.parseInt(roleTimeoutSec.trim()); + } catch (NumberFormatException e) { + log.warn("Can't parse {}, setting the old value {}", roleTimeoutSec, oldRoleTimeoutSeconds, e); + roleTimeoutSeconds = oldRoleTimeoutSeconds; + } + log.info("Modified. Values = {}: {}", + ROLE_TIMEOUT_SECONDS, roleTimeoutSeconds); + } + @Deactivate - public void deactivate() { + public void deactivate(ComponentContext context) { + cfgService.unregisterProperties(getClass(), true); backgroundService.shutdown(); networkConfigService.removeListener(networkConfigListener); store.unsetDelegate(delegate); mastershipService.removeListener(mastershipListener); eventDispatcher.removeSink(DeviceEvent.class); communicationService.removeSubscriber(PORT_UPDOWN_SUBJECT); - portReqeustExecutor.shutdown(); + clusterRequestExecutor.shutdown(); + backgroundRoleChecker.shutdown(); log.info("Stopped"); } @@ -362,18 +442,32 @@ public long getLastUpdatedInstant(DeviceId deviceId) { return ls.dateTime.toEpochMilli(); } + // Returns true if the grace period is still on + private boolean inGracePeriod(DeviceId deviceId) { + LocalStatus ls = deviceLocalStatus.get(deviceId); + if (ls == null) { + // This should not be possible, unless the device is removed + log.warn("Not found a recent local status for {}", deviceId); + return true; + } + DeviceProvider provider = getProvider(deviceId); + return ls.connected && + (Instant.now().toEpochMilli() - ls.dateTime.toEpochMilli()) < provider.gracePeriod(); + } + // Check a device for control channel connectivity // and changes local-status appropriately. - private boolean isReachable(DeviceId deviceId) { + private boolean isReachable(DeviceId deviceId, boolean inGracePeriod) { if (deviceId == null) { return false; } DeviceProvider provider = getProvider(deviceId); if (provider != null) { - boolean reachable = provider.isReachable(deviceId); + boolean reachable = probeReachability(deviceId); if (reachable && !isLocallyConnected(deviceId)) { deviceLocalStatus.put(deviceId, new LocalStatus(true, Instant.now())); - } else if (!reachable && isLocallyConnected(deviceId)) { + } else if (!reachable && isLocallyConnected(deviceId) && !inGracePeriod) { + // Do not update if the grace period is still on deviceLocalStatus.put(deviceId, new LocalStatus(false, Instant.now())); } return reachable; @@ -413,7 +507,7 @@ public void removeDevicePorts(DeviceId deviceId) { private void handlePortRequest(InternalPortUpDownEvent event) { DeviceId deviceId = event.deviceId(); checkNotNull(deviceId, DEVICE_ID_NULL); - checkNotNull(deviceId, PORT_NUMBER_NULL); + checkNotNull(event.portNumber(), PORT_NUMBER_NULL); checkState(mastershipService.isLocalMaster(deviceId), EVENT_NON_MASTER); changePortStateAtMaster(event.deviceId(), event.portNumber(), event.isEnable()); } @@ -435,7 +529,7 @@ private void changePortStateAtMaster(DeviceId deviceId, PortNumber portNumber, public void changePortState(DeviceId deviceId, PortNumber portNumber, boolean enable) { checkNotNull(deviceId, DEVICE_ID_NULL); - checkNotNull(deviceId, PORT_NUMBER_NULL); + checkNotNull(portNumber, PORT_NUMBER_NULL); NodeId masterId = mastershipService.getMasterFor(deviceId); if (masterId == null) { @@ -477,59 +571,122 @@ private void mastershipCheck() { final DeviceId deviceId = device.id(); MastershipRole myRole = mastershipService.getLocalRole(deviceId); log.trace("Checking device {}. Current role is {}", deviceId, myRole); - if (!isReachable(deviceId)) { + + log.debug("Device {} local status is {}", deviceId, localStatus(deviceId)); + final boolean isGracePeriodOn = inGracePeriod(deviceId); + final boolean isReachable = isReachable(deviceId, isGracePeriodOn); + // Passed the grace period and it is still not reachable + if (!isGracePeriodOn && !isReachable) { if (myRole != NONE) { - // can't be master if device is not reachable + // Verify if the device is fully disconnected from the cluster + if (updateMastershipFor(deviceId) == null + && myRole == MASTER && isAvailable(deviceId)) { + log.info("Local Role {}, Marking unreachable device {} offline", MASTER, deviceId); + // Following the deviceDisconnected method logic (line 734) we are marking also all the + // ports as disabled. + List descs = store.getPortDescriptions(getProvider(deviceId).id(), deviceId) + .map(desc -> ensurePortEnabledState(desc, false)) + .collect(Collectors.toList()); + store.updatePorts(getProvider(deviceId).id(), deviceId, descs); + post(store.markOffline(deviceId)); + } + } else { + // Firstly get a role and then check if the device is available in the store. + // if it is, if this node is the master and the device is fully disconnected + // from the cluster mark the device offline. In principle, this condition should + // never be hit unless in a device removed phase for NONE mastership roles. try { - if (myRole == MASTER) { - log.info("Local Role {}, Marking unreachable device {} offline", MASTER, deviceId); - post(store.markOffline(deviceId)); - } - //relinquish master role and ability to be backup. - mastershipService.relinquishMastership(deviceId).get(); + mastershipService.requestRoleFor(deviceId).get(); } catch (InterruptedException e) { - log.warn("Interrupted while relinquishing role for {}", deviceId); Thread.currentThread().interrupt(); + log.error("Interrupted waiting for Mastership", e); } catch (ExecutionException e) { - log.error("Exception thrown while relinquishing role for {}", deviceId, e); + log.error("Encountered an error waiting for Mastership", e); } - } else { - // check if the device has master and is available to the store, if not, mark it offline - // only the nodes which has mastership role can mark any device offline. - // This condition should never be hit unless in a device removed phase for NONE mastership roles. - NodeId master = mastershipService.getMasterFor(deviceId); - if (master == null && isAvailable(deviceId)) { - CompletableFuture roleFuture = mastershipService.requestRoleFor(deviceId); - roleFuture.thenAccept(role -> { - MastershipTerm term = termService.getMastershipTerm(deviceId); - if (term != null && localNodeId.equals(term.master())) { - log.info("Marking unreachable device {} offline", deviceId); - post(store.markOffline(deviceId)); - } else { - log.info("Failed marking {} offline. {}", deviceId, role); - } - mastershipService.relinquishMastership(deviceId); - }); + + MastershipTerm term = termService.getMastershipTerm(deviceId); + if (updateMastershipFor(deviceId) == null && + term != null && localNodeId.equals(term.master()) && + isAvailable(deviceId)) { + log.info("Marking unreachable device {} offline", deviceId); + // Following the deviceDisconnected method logic (line 734) we are marking also all the + // ports as disabled. + List descs = store.getPortDescriptions(getProvider(deviceId).id(), deviceId) + .map(desc -> ensurePortEnabledState(desc, false)) + .collect(Collectors.toList()); + store.updatePorts(getProvider(deviceId).id(), deviceId, descs); + post(store.markOffline(deviceId)); } } - continue; - } + roleToAcknowledge.remove(deviceId); + } else if (isReachable) { + // If this node is the master, ensure the device is marked online. + if (myRole == MASTER && canMarkOnline(device)) { + log.debug("Can mark online {}", deviceId); + post(store.markOnline(deviceId)); + } - // If this node is the master, ensure the device is marked online. - if (myRole == MASTER && canMarkOnline(device)) { - post(store.markOnline(deviceId)); + log.debug("{} is reachable - reasserting the role", deviceId); + + // Device is still reachable. It is useful for some protocols + // to reassert the role. Note: NONE triggers request to MastershipService + reassertRole(deviceId, myRole); + } else { + // Do not proceed furthermore if the grace period is still on + log.debug("Skipping mastership check for {}", deviceId); } + } + } - if (myRole != NONE) { + /** + * Checks if all the devices have acknowledged the mastership role. + */ + private void roleCheck() { + log.debug("Checking role"); + for (Device device : getDevices()) { + final DeviceId deviceId = device.id(); + MastershipRole myRole = mastershipService.getLocalRole(deviceId); + log.trace("Checking device {}. Current role is {}", deviceId, myRole); + final AtomicBoolean exists = new AtomicBoolean(false); + final Long ts = roleToAcknowledge.compute(deviceId, (key, value) -> { + if (value == null) { + return null; + } + exists.set(true); + if (currentTimeMillis() - value < (roleTimeoutSeconds * 1000)) { + return value; + } + return null; + }); + // Nobody applied the role recently + if (!exists.get()) { + log.trace("Role was not applied or it has been acknowledged for device {}", deviceId); continue; } + // Timeout still on + if (ts != null) { + log.debug("Timeout expires in {} ms", ((roleTimeoutSeconds * 1000) - currentTimeMillis() + ts)); + continue; + } + if (myRole != MASTER) { + log.debug("Timeout is expired but current role is not MASTER ({}), nothing to do", myRole); + continue; + } + // Switch failed to acknowledge master role we asked for. + // Yield mastership to other instance + log.warn("Failed to assert role onto device {}. requested={}, no response", + deviceId, myRole); + updateMastershipFor(deviceId); + } + } - log.info("{} is reachable but did not have a valid role, reasserting", deviceId); - - // isReachable but was not MASTER or STANDBY, get a role and apply - // Note: NONE triggers request to MastershipService - reassertRole(deviceId, NONE); + PortDescription ensurePortEnabledState(PortDescription desc, boolean enabled) { + if (desc.isEnabled() != enabled) { + return DefaultPortDescription.builder(desc) + .isEnabled(enabled) + .build(); } + return desc; } // Personalized device provider service issued to the supplied provider. @@ -561,6 +718,8 @@ private boolean applyRole(DeviceId deviceId, MastershipRole newRole) { deviceId, newRole); return false; } + // Start the timer + roleToAcknowledge.put(deviceId, currentTimeMillis()); provider.roleChanged(deviceId, newRole); // not triggering probe when triggered by provider service event return true; @@ -614,66 +773,59 @@ public void deviceConnected(DeviceId deviceId, } } - private PortDescription ensurePortEnabledState(PortDescription desc, boolean enabled) { - if (desc.isEnabled() != enabled) { - return DefaultPortDescription.builder(desc) - .isEnabled(enabled) - .build(); - } - return desc; - } - @Override public void deviceDisconnected(DeviceId deviceId) { checkNotNull(deviceId, DEVICE_ID_NULL); checkValidity(); + // Update the local status deviceLocalStatus.put(deviceId, new LocalStatus(false, Instant.now())); - log.info("Device {} disconnected from this node", deviceId); - - List descs = store.getPortDescriptions(provider().id(), deviceId) - .map(desc -> ensurePortEnabledState(desc, false)) - .collect(Collectors.toList()); + log.info("Device {} disconnected from this node: {}", deviceId, + clusterService.getLocalNode().id()); + + // If none can reach the device, we will continue with the disconnection logic. + // If there is one instance that reported device is still reachable, we hand over + // the mastership to it if we are the current master, otherwise if we are a backup + // we demote ourselves to the bottom of the backups list + if (updateMastershipFor(deviceId) == null) { + log.info("Device {} is fully disconnected from the cluster", deviceId); + List descs = store.getPortDescriptions(provider().id(), deviceId) + .map(desc -> ensurePortEnabledState(desc, false)) + .collect(Collectors.toList()); + store.updatePorts(this.provider().id(), deviceId, descs); - store.updatePorts(this.provider().id(), deviceId, descs); - try { - if (mastershipService.isLocalMaster(deviceId)) { - post(store.markOffline(deviceId)); - } - } catch (IllegalStateException e) { - log.warn("Failed to mark {} offline", deviceId); - // only the MASTER should be marking off-line in normal cases, - // but if I was the last STANDBY connection, etc. and no one else - // was there to mark the device offline, this instance may need to - // temporarily request for Master Role and mark offline. - - //there are times when this node will correctly have mastership, BUT - //that isn't reflected in the ClockManager before the device disconnects. - //we want to let go of the device anyways, so make sure this happens. - - // FIXME: Store semantics leaking out as IllegalStateException. - // Consider revising store API to handle this scenario. - CompletableFuture roleFuture = mastershipService.requestRoleFor(deviceId); - roleFuture.whenComplete((role, error) -> { - MastershipTerm term = termService.getMastershipTerm(deviceId); - // TODO: Move this type of check inside device clock manager, etc. - if (term != null && localNodeId.equals(term.master())) { - log.info("Retry marking {} offline", deviceId); + try { + if (mastershipService.isLocalMaster(deviceId)) { post(store.markOffline(deviceId)); - } else { - log.info("Failed again marking {} offline. {}", deviceId, role); } - }); - } finally { - try { - //relinquish master role and ability to be backup. - mastershipService.relinquishMastership(deviceId).get(); - } catch (InterruptedException e) { - log.warn("Interrupted while reliquishing role for {}", deviceId); - Thread.currentThread().interrupt(); - } catch (ExecutionException e) { - log.error("Exception thrown while relinquishing role for {}", deviceId, e); + } catch (IllegalStateException e) { + log.warn("Failed to mark {} offline", deviceId); + // only the MASTER should be marking off-line in normal cases, + // but if I was the last STANDBY connection, etc. and no one else + // was there to mark the device offline, this instance may need to + // temporarily request for Master Role and mark offline. + + //there are times when this node will correctly have mastership, BUT + //that isn't reflected in the ClockManager before the device disconnects. + //we want to let go of the device anyways, so make sure this happens. + + // FIXME: Store semantics leaking out as IllegalStateException. + // Consider revising store API to handle this scenario. + CompletableFuture roleFuture = mastershipService.requestRoleFor(deviceId); + roleFuture.whenComplete((role, error) -> { + MastershipTerm term = termService.getMastershipTerm(deviceId); + // TODO: Move this type of check inside device clock manager, etc. + if (term != null && localNodeId.equals(term.master())) { + log.info("Retry marking {} offline", deviceId); + post(store.markOffline(deviceId)); + } else { + log.info("Failed again marking {} offline. {}", deviceId, role); + } + }); + } finally { + roleToAcknowledge.remove(deviceId); } } + } @Override @@ -799,7 +951,8 @@ public void receivedRoleReply(DeviceId deviceId, MastershipRole requested, if (requested == null && response == null) { // something was off with DeviceProvider, maybe check channel too? log.warn("Failed to assert role onto Device {}", deviceId); - mastershipService.relinquishMastership(deviceId); + roleToAcknowledge.remove(deviceId); + updateMastershipFor(deviceId); return; } @@ -816,24 +969,35 @@ public void receivedRoleReply(DeviceId deviceId, MastershipRole requested, if (Objects.equals(requested, response)) { if (Objects.equals(requested, expected)) { - return; + if (log.isDebugEnabled()) { + log.debug("Role has been acknowledged for device {}", deviceId); + } else if (!requested.equals(lastAcknowledgedRole.get(deviceId))) { + log.info("Role has been acknowledged for device {}", deviceId); + } + // Update the last known role and stop the timer + lastAcknowledgedRole.put(deviceId, requested); + roleToAcknowledge.remove(deviceId); } else { log.warn("Role mismatch on {}. Set to {}, but store demands {}", deviceId, response, expected); // roleManager got the device to comply, but doesn't agree with // the store; use the store's view, then try to reassert. backgroundService.execute(() -> reassertRole(deviceId, expected)); - return; } } else { // we didn't get back what we asked for. Reelect someone else. log.warn("Failed to assert role onto device {}. requested={}, response={}", deviceId, requested, response); if (requested == MastershipRole.MASTER) { - mastershipService.relinquishMastership(deviceId); - // TODO: Shouldn't we be triggering event? - //final Device device = getDevice(deviceId); - //post(new DeviceEvent(DEVICE_MASTERSHIP_CHANGED, device)); + // Stop the timer + roleToAcknowledge.remove(deviceId); + updateMastershipFor(deviceId); + } else if (requested == MastershipRole.STANDBY) { + // For P4RT devices, the response role will be NONE when this node is expected to be STANDBY + // but the stream channel is not opened correctly. + // Calling reassertRole will trigger the mechanism in GeneralDeviceProvider that + // attempts to re-establish the stream channel + backgroundService.execute(() -> reassertRole(deviceId, expected)); } } } @@ -848,6 +1012,14 @@ public void updatePortStatistics(DeviceId deviceId, Collection p deviceId, portStatistics); post(event); } + + @Override + public DeviceDescription getDeviceDescription(DeviceId deviceId) { + checkNotNull(deviceId, DEVICE_ID_NULL); + checkValidity(); + + return store.getDeviceDescription(provider().id(), deviceId); + } } // by default allowed, otherwise check flag @@ -884,6 +1056,8 @@ private boolean applyRoleAndProbe(DeviceId deviceId, MastershipRole newRole) { log.warn("Provider for {} was not found. Cannot apply role {}", deviceId, newRole); return false; } + // Start the timer + roleToAcknowledge.put(deviceId, currentTimeMillis()); provider.roleChanged(deviceId, newRole); if (newRole.equals(MastershipRole.MASTER)) { @@ -894,6 +1068,16 @@ private boolean applyRoleAndProbe(DeviceId deviceId, MastershipRole newRole) { return true; } + private boolean probeReachability(DeviceId deviceId) { + DeviceProvider provider = getProvider(deviceId); + if (provider == null) { + log.warn("Provider for {} was not found. Cannot probe reachability", deviceId); + return false; + } + return provider.isReachable(deviceId) && Tools.futureGetOrElse(provider.probeReachability(deviceId), + PROBE_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS, Boolean.FALSE); + } + /** * Reassert role for specified device connected to this node. * @@ -933,7 +1117,7 @@ private void reassertRole(final DeviceId did, if (!applyRoleAndProbe(did, MASTER)) { log.warn("Unsuccessful applying role {} to {}", myNextRole, did); // immediately failed to apply role - mastershipService.relinquishMastership(did); + updateMastershipFor(did); // FIXME disconnect? } break; @@ -942,7 +1126,7 @@ private void reassertRole(final DeviceId did, if (!applyRoleAndProbe(did, STANDBY)) { log.warn("Unsuccessful applying role {} to {}", myNextRole, did); // immediately failed to apply role - mastershipService.relinquishMastership(did); + updateMastershipFor(did); // FIXME disconnect? } break; @@ -956,13 +1140,10 @@ private void reassertRole(final DeviceId did, } private void handleMastershipEvent(MastershipEvent event) { - if (event.type() == MastershipEvent.Type.BACKUPS_CHANGED) { - // Don't care if backup list changed. - return; - } + log.debug("Handling mastership event"); final DeviceId did = event.subject(); - // myRole suggested by MastershipService + // myNextRole suggested by MastershipService event MastershipRole myNextRole; if (event.type() == MastershipEvent.Type.SUSPENDED) { myNextRole = NONE; // FIXME STANDBY OR NONE? @@ -981,29 +1162,52 @@ private void handleMastershipEvent(MastershipEvent event) { myNextRole = NONE; } - final boolean isReachable = isReachable(did); - if (!isReachable) { - // device is not connected to this node + log.debug("Device {} local status is {}", did, localStatus(did)); + final boolean isGracePeriodOn = inGracePeriod(did); + final boolean isReachable = isReachable(did, isGracePeriodOn); + // Passed the grace period and it is still not reachable + if (!isGracePeriodOn && !isReachable) { + // device is not connected to this node, nevertheless we should get a role if (mastershipService.getLocalRole(did) == NONE) { log.debug("Node was instructed to be {} role for {}, " + "but this node cannot reach the device " - + "and role is already None. Ignoring request.", + + "and role is already None. Asking a new role " + + "and then apply the disconnection protocol.", myNextRole, did); + try { + mastershipService.requestRoleFor(did).get(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + log.error("Interrupted waiting for Mastership", e); + } catch (ExecutionException e) { + log.error("Encountered an error waiting for Mastership", e); + } } else if (myNextRole != NONE) { log.warn("Node was instructed to be {} role for {}, " - + "but this node cannot reach the device. " - + "Relinquishing role. ", + + "but this node cannot reach the device. " + + "Apply the disconnection protocol.", myNextRole, did); - mastershipService.relinquishMastership(did); } - return; - } - - // device is connected to this node: - if (store.getDevice(did) != null) { - reassertRole(did, myNextRole); + // Let's put some order in the candidates list + roleToAcknowledge.remove(did); + updateMastershipFor(did); + } else if (isReachable) { + // Device is connected to this node - always reassert the role. + // Ideally, protocols like OpenFlow would not need to reassert the + // role because the instances are only identified by the role. However, + // other protocols like P4RT require to provide also an election id + // which maybe different over time, by reasserting the role will guarantee + // that updated election ids are communicated to the devices. It should not + // cost us a lot as it is equivalent to a probe. + if (store.getDevice(did) != null) { + log.info("{} is reachable - reasserting the role", did); + reassertRole(did, myNextRole); + } else { + log.debug("Device is not yet/no longer in the store: {}", did); + } } else { - log.debug("Device is not yet/no longer in the store: {}", did); + // Do not proceed furthermore if the grace period is still on + log.debug("Skipping mastership event {}", event); } } @@ -1031,6 +1235,7 @@ public void notify(DeviceEvent event) { // When device is administratively removed, force disconnect. DeviceId deviceId = event.subject().id(); deviceLocalStatus.remove(deviceId); + lastAcknowledgedRole.remove(deviceId); DeviceProvider provider = getProvider(deviceId); if (provider != null) { @@ -1276,6 +1481,81 @@ private PortDescription applyAllPortOps(ConnectPoint cpt, PortDescription desc, return portAnnotationOp.combine(cpt, work, prevConfig); } + /** + * Handler for remote probe requests. + * + * @param deviceId the device to check + * @return whether or not the device is reachable + */ + private boolean handleProbeRequest(DeviceId deviceId) { + int attempt = 0; + // Let's do a number of attempts + while (attempt < PROBE_ATTEMPTS) { + if (!probeReachability(deviceId)) { + return false; + } + attempt++; + } + return true; + } + + /** + * Update the mastership for this device. If there is a node able + * to reach the device and this node is the master move the + * mastership to the next node still connected to this device. + * If the current node is a backup, it demotes itself to the bottom + * of the candidates list + * + * @param deviceId the device for which we have to update the mastership + * @return the NodeId of any node that can reach the device, or null if + * none of the ONOS instances can reach the device + */ + private NodeId updateMastershipFor(DeviceId deviceId) { + Map> probes = Maps.newHashMap(); + // Request a probe only if the node is ready + for (ControllerNode onosNode : clusterService.getNodes()) { + if (!clusterService.getState(onosNode.id()).isReady() || localNodeId.equals(onosNode.id())) { + continue; + } + probes.put(onosNode.id(), communicationService.sendAndReceive(deviceId, PROBE_SUBJECT, SERIALIZER::encode, + SERIALIZER::decode, onosNode.id())); + } + + // Returns the first node able to reach the device + // FIXME [SDFAB-935] optimize by looking at the MastershipInfo + boolean isReachable; + NodeId nextMaster = null; + // FIXME Should we expose timeout? Understand if there is need to signal to the caller + for (Map.Entry> probe : probes.entrySet()) { + isReachable = Tools.futureGetOrElse(probe.getValue(), PROBE_TIMEOUT_MILLIS, + TimeUnit.MILLISECONDS, Boolean.FALSE); + if (isReachable) { + nextMaster = probe.getKey(); + } + } + + // FIXME [SDFAB-935] optimize demote by looking at the MastershipInfo; + if (nextMaster != null) { + log.info("Device {} is still connected to {}", deviceId, nextMaster); + MastershipRole myRole = mastershipService.getLocalRole(deviceId); + if (myRole == MASTER) { + log.info("Handing over the mastership of {} to next master {}", deviceId, nextMaster); + mastershipAdminService.setRole(nextMaster, deviceId, MASTER); + // Do not demote here because setRole can return before the mastership has been passed. + // Current implementation promotes first the nextMaster as top of candidate list and then + // transfer the leadership. We can use the BACKUP events to do demote or leverage periodic + // checks. + } else if (myRole == STANDBY) { + log.info("Demote current instance to the bottom of the candidates list for {}", deviceId); + mastershipAdminService.demote(localNodeId, deviceId); + } else { + log.debug("No valid role for {}", deviceId); + } + } + + return nextMaster; + } + /** * Port Enable/Disable message sent to the device's MASTER node. */ diff --git a/core/net/src/main/java/org/onosproject/net/device/impl/OsgiPropertyConstants.java b/core/net/src/main/java/org/onosproject/net/device/impl/OsgiPropertyConstants.java new file mode 100644 index 00000000000..1c700564ca7 --- /dev/null +++ b/core/net/src/main/java/org/onosproject/net/device/impl/OsgiPropertyConstants.java @@ -0,0 +1,28 @@ +/* + * Copyright 2022-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onosproject.net.device.impl; + +/** + * Constants for default values of configurable properties. + */ +public final class OsgiPropertyConstants { + + private OsgiPropertyConstants() { + } + + public static final String ROLE_TIMEOUT_SECONDS = "roleTimeoutSeconds"; + public static final int ROLE_TIMEOUT_SECONDS_DEFAULT = 10; +} \ No newline at end of file diff --git a/core/net/src/main/java/org/onosproject/net/driver/impl/DriverRegistryManager.java b/core/net/src/main/java/org/onosproject/net/driver/impl/DriverRegistryManager.java index 546f40a2fe3..834b88cd37b 100644 --- a/core/net/src/main/java/org/onosproject/net/driver/impl/DriverRegistryManager.java +++ b/core/net/src/main/java/org/onosproject/net/driver/impl/DriverRegistryManager.java @@ -77,7 +77,7 @@ public class DriverRegistryManager extends DefaultDriverProvider implements Driv private final Logger log = LoggerFactory.getLogger(getClass()); - private static final String FORMAT = "Required drivers: {}"; + private static final String FORMAT = "Modified, Required drivers: {}"; private static final String COMMA = ","; private static final String NO_DRIVER = "Driver not found"; private static final String DEFAULT = "default"; @@ -179,6 +179,8 @@ public void unregisterProvider(DriverProvider provider) { private synchronized void checkRequiredDrivers() { Set driverSet = registeredDrivers(); boolean isReady = driverSet.containsAll(requiredDriverSet); + log.debug("RequiredDriverSet {}, isReady {}, isStarted {}", + requiredDriverSet, isReady, isStarted); if (isReady && !isStarted) { log.info("Starting driver subsystem"); componentService.activate(null, DRIVER_COMPONENT); diff --git a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java index dd7f8029e9c..d25ceaba337 100644 --- a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java +++ b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java @@ -21,6 +21,8 @@ import com.google.common.collect.Maps; import com.google.common.collect.Multimap; import com.google.common.collect.Sets; +import org.onlab.util.PredictableExecutor; +import org.onlab.util.PredictableExecutor.PickyRunnable; import org.onlab.util.Tools; import org.onosproject.cfg.ComponentConfigService; import org.onosproject.cluster.ClusterService; @@ -76,6 +78,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import java.util.Random; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; @@ -143,11 +146,11 @@ public class FlowRuleManager private final FlowRuleDriverProvider driverProvider = new FlowRuleDriverProvider(); - protected ExecutorService deviceInstallers = - Executors.newFixedThreadPool(32, groupedThreads("onos/flowservice", "device-installer-%d", log)); + protected ExecutorService deviceInstallers = Executors.newFixedThreadPool(32, + groupedThreads("onos/flowservice", "device-installer-%d", log)); - protected ExecutorService operationsService = - Executors.newFixedThreadPool(32, groupedThreads("onos/flowservice", "operations-%d", log)); + protected ExecutorService operationsService = new PredictableExecutor(32, + groupedThreads("onos/flowservice", "operations-%d", log)); private IdGenerator idGenerator; @@ -155,6 +158,8 @@ public class FlowRuleManager private NodeId local; + private Random randomGenerator = new Random(); + @Reference(cardinality = ReferenceCardinality.MANDATORY) protected FlowRuleStore store; @@ -267,7 +272,7 @@ private void readComponentConfiguration(ComponentContext context) { log.info("Configured. FallbackFlowPollFrequency is {} seconds", fallbackFlowPollFrequency); } catch (NumberFormatException e) { - log.warn("Configured fallbackFlowPollFrequency value '{}' " + + log.warn("Configured fallbackFlowPollFrequency value " + "is not a number, using current value of {} seconds", fallbackFlowPollFrequency); } @@ -294,6 +299,13 @@ public int getFlowRuleCount(DeviceId deviceId, FlowEntry.FlowEntryState state) { return store.getFlowRuleCount(deviceId, state); } + @Override + public FlowEntry getFlowEntry(FlowRule rule) { + checkPermission(FLOWRULE_READ); + checkNotNull(rule, FLOW_RULE_NULL); + return store.getFlowEntry(rule); + } + @Override public Iterable getFlowEntries(DeviceId deviceId) { checkPermission(FLOWRULE_READ); @@ -305,11 +317,7 @@ public Iterable getFlowEntries(DeviceId deviceId) { public void applyFlowRules(FlowRule... flowRules) { checkPermission(FLOWRULE_WRITE); - FlowRuleOperations.Builder builder = FlowRuleOperations.builder(); - for (FlowRule flowRule : flowRules) { - builder.add(flowRule); - } - apply(builder.build()); + apply(buildFlowRuleOperations(true, null, flowRules)); } @Override @@ -319,15 +327,20 @@ public void purgeFlowRules(DeviceId deviceId) { store.purgeFlowRule(deviceId); } + @Override + public void purgeFlowRules(DeviceId deviceId, ApplicationId appId) { + checkPermission(FLOWRULE_WRITE); + checkNotNull(deviceId, DEVICE_ID_NULL); + checkNotNull(appId, "Application ID cannot be null!"); + + store.purgeFlowRules(deviceId, appId); + } + @Override public void removeFlowRules(FlowRule... flowRules) { checkPermission(FLOWRULE_WRITE); - FlowRuleOperations.Builder builder = FlowRuleOperations.builder(); - for (FlowRule flowRule : flowRules) { - builder.remove(flowRule); - } - apply(builder.build()); + apply(buildFlowRuleOperations(false, null, flowRules)); } @Override @@ -379,7 +392,26 @@ public Iterable getFlowRulesByGroupId(ApplicationId appId, short group @Override public void apply(FlowRuleOperations ops) { checkPermission(FLOWRULE_WRITE); - operationsService.execute(new FlowOperationsProcessor(ops)); + if (ops.stripeKey().isEmpty()) { + // Null means that we don't care about the in-order processing + // this approach maximizes the throughput but it can introduce + // consistency issues as the original order between conflictual + // writes is not maintained. If conflictual writes can be easily + // handled using different stages, this is the approach to use. + operationsService.execute(new FlowOperationsProcessor(ops)); + } else { + // Following approach is suggested when it is hard to handle + // conflictual writes in the same FlowRuleOperations object. Apps + // may know there are conflictual writes but it could be hard to + // encapsulate them in the same object using different stages (above + // all if they are stimulated by different events). In this case, + // the probabilistic accumulation may help but it is brittle and based + // on the probability that a given event happens in a specific time. + // For this reason we have introduced PredictableFlowOperationsProcessor + // which uses the striped key (provided by the apps) to serialize the ops + // on the same executor. + operationsService.execute(new PredictableFlowOperationsProcessor(ops)); + } } @Override @@ -506,22 +538,42 @@ private void extraneousFlow(FlowRule flowRule) { log.debug("Flow {} is on switch but not in store.", flowRule); } - private boolean flowAdded(FlowEntry flowEntry) { + private boolean handleExistingFlow(FlowEntry flowEntry) { checkNotNull(flowEntry, FLOW_RULE_NULL); checkValidity(); - - if (checkRuleLiveness(flowEntry, store.getFlowEntry(flowEntry))) { - FlowRuleEvent event = store.addOrUpdateFlowRule(flowEntry); - if (event == null) { - log.debug("No flow store event generated."); - return false; - } else { - log.trace("Flow {} {}", flowEntry, event.type()); - post(event); + FlowEntry storedEntry = store.getFlowEntry(flowEntry); + if (storedEntry != null) { + // Flow rule is still valid, let's try to update the stats + if (storedEntry.state() != FlowEntry.FlowEntryState.PENDING_REMOVE && + checkRuleLiveness(flowEntry, storedEntry)) { + if (!shouldHandle(flowEntry.deviceId())) { + return false; + } + FlowRuleEvent event = store.addOrUpdateFlowRule(flowEntry); + // Something went wrong or there is no master or the device + // is not available better check if it is the latter cases + if (event == null) { + log.debug("No flow store event generated for addOrUpdate of {}", flowEntry); + return false; + } else { + log.trace("Flow {} {}", flowEntry, event.type()); + post(event); + } + } else if (storedEntry.state() == FlowEntry.FlowEntryState.PENDING_REMOVE) { + // Store is already in sync, let's re-issue flow removal only + log.debug("Removing {} from the device", flowEntry); + FlowRuleProvider frp = getProvider(flowEntry.deviceId()); + frp.removeFlowRule(flowEntry); + } else if (!checkRuleLiveness(flowEntry, storedEntry)) { + // Update store first as the flow entry is expired. Then, + // as consequence of this a flow removal will be sent. + log.debug("Removing {}", flowEntry); + removeFlowRules(flowEntry); } } else { - log.debug("Removing flow rules...."); - removeFlowRules(flowEntry); + // It was already removed or there is no master + // better check if it is the latter + return false; } return true; } @@ -577,6 +629,11 @@ public void pushFlowMetricsWithoutFlowMissing(DeviceId deviceId, Iterable flowEntries, boolean useMissingFlow) { Map storedRules = Maps.newHashMap(); @@ -591,20 +648,20 @@ private void pushFlowMetricsInternal(DeviceId deviceId, Iterable flow if (storedRule != null) { if (storedRule.exactMatch(rule)) { // we both have the rule, let's update some info then. - done = flowAdded(rule); + done = handleExistingFlow(rule); if (!done) { // Mastership change can occur during this iteration - master = mastershipService.getMasterFor(deviceId); - if (!Objects.equals(local, master)) { - log.warn("Tried to update the flow stats while the node was not the master"); + if (!shouldHandle(deviceId)) { + log.warn("Tried to update the flow stats while the node was not the master" + + " or the device {} was not available", deviceId); return; } } } else { // Mastership change can occur during this iteration - master = mastershipService.getMasterFor(deviceId); - if (!Objects.equals(local, master)) { - log.warn("Tried to update the flows while the node was not the master"); + if (!shouldHandle(deviceId)) { + log.warn("Tried to update the flows while the node was not the master" + + " or the device {} was not available", deviceId); return; } // the two rules are not an exact match - remove the @@ -616,9 +673,9 @@ private void pushFlowMetricsInternal(DeviceId deviceId, Iterable flow // the device has a rule the store does not have if (!allowExtraneousRules) { // Mastership change can occur during this iteration - master = mastershipService.getMasterFor(deviceId); - if (!Objects.equals(local, master)) { - log.warn("Tried to remove flows while the node was not the master"); + if (!shouldHandle(deviceId)) { + log.warn("Tried to remove flows while the node was not the master" + + " or the device {} was not available", deviceId); return; } extraneousFlow(rule); @@ -626,9 +683,9 @@ private void pushFlowMetricsInternal(DeviceId deviceId, Iterable flow FlowRuleEvent flowRuleEvent = store.addOrUpdateFlowRule(rule); if (flowRuleEvent == null) { // Mastership change can occur during this iteration - master = mastershipService.getMasterFor(deviceId); - if (!Objects.equals(local, master)) { - log.warn("Tried to import flows while the node was not the master"); + if (!shouldHandle(deviceId)) { + log.warn("Tried to import flows while the node was not the master" + + " or the device {} was not available", deviceId); return; } } @@ -644,9 +701,9 @@ private void pushFlowMetricsInternal(DeviceId deviceId, Iterable flow if (useMissingFlow) { for (FlowEntry rule : storedRules.keySet()) { // Mastership change can occur during this iteration - master = mastershipService.getMasterFor(deviceId); - if (!Objects.equals(local, master)) { - log.warn("Tried to install missing rules while the node was not the master"); + if (!shouldHandle(deviceId)) { + log.warn("Tried to install missing rules while the node was not the master" + + " or the device {} was not available", deviceId); return; } try { @@ -752,12 +809,12 @@ private static FlowRuleBatchEntry.FlowRuleOperation mapOperationType(FlowRuleOpe private class FlowOperationsProcessor implements Runnable { // Immutable - private final FlowRuleOperations fops; + protected final FlowRuleOperations fops; // Mutable - private final List> stages; - private final Set pendingDevices = new HashSet<>(); - private boolean hasFailed = false; + protected final List> stages; + protected final Set pendingDevices = new HashSet<>(); + protected boolean hasFailed = false; FlowOperationsProcessor(FlowRuleOperations ops) { this.stages = Lists.newArrayList(ops.stages()); @@ -773,7 +830,7 @@ public synchronized void run() { } } - private void process(Set ops) { + protected void process(Set ops) { Multimap perDeviceBatches = ArrayListMultimap.create(); for (FlowRuleOperation op : ops) { @@ -812,6 +869,91 @@ synchronized void fail(DeviceId devId, Set failures) { } } + // Provides in-order processing in the local instance. The main difference with its + // ancestor is that the runnable ends when all the stages have been processed. Instead, + // its ancestor ends as soon as one stage has been processed and cannot guarantee in-order + // processing between subsequent stages and a new FlowRuleOperation (having the same key). + private class PredictableFlowOperationsProcessor extends FlowOperationsProcessor implements PickyRunnable { + + private static final int WAIT_TIMEOUT = 5000; + private static final int WAIT_ATTEMPTS = 3; + + PredictableFlowOperationsProcessor(FlowRuleOperations ops) { + super(ops); + } + + @Override + public void run() { + try { + while (!stages.isEmpty()) { + process(stages.remove(0)); + synchronized (this) { + // Batch in flights - let's wait + int attempts = 0; + while (!pendingDevices.isEmpty() && attempts < WAIT_ATTEMPTS) { + this.wait(WAIT_TIMEOUT); + attempts++; + } + // Something wrong, we cannot block all the pipeline + if (attempts == WAIT_ATTEMPTS) { + break; + } + } + } + } catch (InterruptedException e) { + // Interrupted case + if (log.isTraceEnabled()) { + log.trace("Interrupted while waiting for {} stages to be completed", + stages.size()); + } + } + + synchronized (this) { + if (stages.isEmpty() && !hasFailed && pendingDevices.isEmpty()) { + // No error and it is done, signal success to the apps + fops.callback().onSuccess(fops); + } else { + // It was interrupted or there is a failure - signal error. + // This may introduce a duplicate error in some cases but + // better than nothing and keeping the apps blocked forever. + FlowRuleOperations.Builder failedOpsBuilder = FlowRuleOperations.builder(); + if (!stages.isEmpty()) { + stages.remove(0).forEach(flowRuleOperation -> failedOpsBuilder.add( + flowRuleOperation.rule())); + } + fops.callback().onError(failedOpsBuilder.build()); + } + } + } + + @Override + synchronized void satisfy(DeviceId devId) { + pendingDevices.remove(devId); + if (pendingDevices.isEmpty()) { + this.notifyAll(); + } + } + + @Override + synchronized void fail(DeviceId devId, Set failures) { + hasFailed = true; + pendingDevices.remove(devId); + if (pendingDevices.isEmpty()) { + this.notifyAll(); + } + + FlowRuleOperations.Builder failedOpsBuilder = FlowRuleOperations.builder(); + failures.forEach(failedOpsBuilder::add); + + fops.callback().onError(failedOpsBuilder.build()); + } + + @Override + public int hint() { + return fops.stripeKey().orElse(randomGenerator.nextInt()); + } + } + @Override public Iterable getFlowTableStatistics(DeviceId deviceId) { checkPermission(FLOWRULE_READ); @@ -825,6 +967,35 @@ public long getActiveFlowRuleCount(DeviceId deviceId) { return store.getActiveFlowRuleCount(deviceId); } + @Override + public void applyFlowRules(int key, FlowRule... flowRules) { + checkPermission(FLOWRULE_WRITE); + + apply(buildFlowRuleOperations(true, key, flowRules)); + } + + @Override + public void removeFlowRules(int key, FlowRule... flowRules) { + checkPermission(FLOWRULE_WRITE); + + apply(buildFlowRuleOperations(false, key, flowRules)); + } + + private FlowRuleOperations buildFlowRuleOperations(boolean add, Integer key, FlowRule... flowRules) { + FlowRuleOperations.Builder builder = FlowRuleOperations.builder(); + for (FlowRule flowRule : flowRules) { + if (add) { + builder.add(flowRule); + } else { + builder.remove(flowRule); + } + } + if (key != null) { + builder.striped(key); + } + return builder.build(); + } + private class InternalDeviceListener implements DeviceListener { @Override public void event(DeviceEvent event) { @@ -834,7 +1005,7 @@ public void event(DeviceEvent event) { DeviceId deviceId = event.subject().id(); if (!deviceService.isAvailable(deviceId)) { BasicDeviceConfig cfg = netCfgService.getConfig(deviceId, BasicDeviceConfig.class); - //if purgeOnDisconnection is set for the device or it's a global configuration + // if purgeOnDisconnection is set for the device or it's a global configuration // lets remove the flows. Priority is given to the per device flag boolean purge = cfg != null && cfg.isPurgeOnDisconnectionConfigured() ? cfg.purgeOnDisconnection() : purgeOnDisconnection; diff --git a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java index 6cc355d062c..a31f0b9a01a 100644 --- a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java +++ b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java @@ -27,6 +27,7 @@ import org.onlab.util.Tools; import org.onosproject.cfg.ComponentConfigService; import org.onosproject.cluster.ClusterService; +import org.onosproject.core.ApplicationId; import org.onosproject.net.Device; import org.onosproject.net.DeviceId; import org.onosproject.net.behaviour.NextGroup; @@ -579,8 +580,12 @@ private class InnerDriverListener implements DriverListener { @Override public void event(DriverEvent event) { String driverName = event.subject().name(); + //we invalidate the pipeliner if the event is for the same driver or + // if we have the device in the cache but the driver for it changed. driverHandlers.entrySet().stream() - .filter(e -> driverName.equals(e.getValue().driver().name())) + .filter(e -> driverName.equals(e.getValue().driver().name()) + || !e.getValue().driver().name() + .equals(driverService.getDriver(e.getKey()).name())) .map(Map.Entry::getKey) .distinct() .forEach(FlowObjectiveManager.this::invalidatePipeliner); @@ -830,4 +835,34 @@ public List getPendingFlowObjectives() { return pendingFlowObjectives; } + + @Override + public void purgeAll(DeviceId deviceId, ApplicationId appId) { + synchronized (pendingForwards) { + List emptyPendingForwards = Lists.newArrayList(); + pendingForwards.forEach((nextId, pendingObjectives) -> { + pendingObjectives.removeIf(pendingFlowObjective -> pendingFlowObjective.deviceId().equals(deviceId)); + if (pendingObjectives.isEmpty()) { + emptyPendingForwards.add(nextId); + } + }); + emptyPendingForwards.forEach(pendingForwards::remove); + } + synchronized (pendingNexts) { + List emptyPendingNexts = Lists.newArrayList(); + pendingNexts.forEach((nextId, pendingObjectives) -> { + pendingObjectives.removeIf(pendingFlowObjective -> pendingFlowObjective.deviceId().equals(deviceId)); + if (pendingObjectives.isEmpty()) { + emptyPendingNexts.add(nextId); + } + }); + emptyPendingNexts.forEach(pendingNexts::remove); + } + Pipeliner pipeliner = getDevicePipeliner(deviceId); + if (pipeliner != null) { + pipeliner.purgeAll(appId); + } else { + log.warn("Skip purgeAll, pipeliner not ready!"); + } + } } diff --git a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/InOrderFlowObjectiveManager.java b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/InOrderFlowObjectiveManager.java index 81e224bec65..50c42dd335f 100644 --- a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/InOrderFlowObjectiveManager.java +++ b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/InOrderFlowObjectiveManager.java @@ -159,6 +159,10 @@ protected void deactivate() { nextCacheEventExecutor.shutdown(); super.deactivate(); + // Due to the check in the AbstractStore we have to pass the right instance + // to perform a correct clean up. The unset delegate in the super class + // will not have any effect + flowObjectiveStore.unsetDelegate(delegate); } /** diff --git a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/composition/FlowObjectiveCompositionManager.java b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/composition/FlowObjectiveCompositionManager.java index dc5ef05ceb9..b930d6b9614 100644 --- a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/composition/FlowObjectiveCompositionManager.java +++ b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/composition/FlowObjectiveCompositionManager.java @@ -23,6 +23,7 @@ import org.onlab.osgi.ServiceDirectory; import org.onlab.util.ItemNotFoundException; import org.onosproject.cluster.ClusterService; +import org.onosproject.core.ApplicationId; import org.onosproject.mastership.MastershipEvent; import org.onosproject.mastership.MastershipListener; import org.onosproject.mastership.MastershipService; @@ -441,4 +442,9 @@ public List getPendingFlowObjectives() { // TODO Implementation deferred as this is an experimental component. return ImmutableList.of(); } + + @Override + public void purgeAll(DeviceId deviceId, ApplicationId appId) { + // TODO Implementation deferred as this is an experimental component. + } } diff --git a/core/net/src/main/java/org/onosproject/net/group/impl/GroupDriverProvider.java b/core/net/src/main/java/org/onosproject/net/group/impl/GroupDriverProvider.java index f86e4a1eda0..51f0420757e 100644 --- a/core/net/src/main/java/org/onosproject/net/group/impl/GroupDriverProvider.java +++ b/core/net/src/main/java/org/onosproject/net/group/impl/GroupDriverProvider.java @@ -117,17 +117,25 @@ public void performGroupOperation(DeviceId deviceId, GroupOperations groupOps) { } private void pollGroups() { - deviceService.getAvailableDevices().forEach(device -> { - if (mastershipService.isLocalMaster(device.id()) && - device.is(GroupProgrammable.class)) { - pollDeviceGroups(device.id()); - } - }); + try { + deviceService.getAvailableDevices().forEach(device -> { + if (mastershipService.isLocalMaster(device.id()) && + device.is(GroupProgrammable.class)) { + pollDeviceGroups(device.id()); + } + }); + } catch (Exception e) { + log.warn("Exception thrown while polling groups", e); + } } private void pollDeviceGroups(DeviceId deviceId) { - Collection groups = getGroupProgrammable(deviceId).getGroups(); - groupProviderService.pushGroupMetrics(deviceId, groups); + try { + Collection groups = getGroupProgrammable(deviceId).getGroups(); + groupProviderService.pushGroupMetrics(deviceId, groups); + } catch (Exception e) { + log.warn("Exception thrown while polling groups from {}", deviceId, e); + } } private GroupProgrammable getGroupProgrammable(DeviceId deviceId) { diff --git a/core/net/src/main/java/org/onosproject/net/group/impl/GroupManager.java b/core/net/src/main/java/org/onosproject/net/group/impl/GroupManager.java index e633a960c68..65ec5d31b62 100644 --- a/core/net/src/main/java/org/onosproject/net/group/impl/GroupManager.java +++ b/core/net/src/main/java/org/onosproject/net/group/impl/GroupManager.java @@ -304,6 +304,12 @@ public void purgeGroupEntries(DeviceId deviceId) { store.purgeGroupEntry(deviceId); } + @Override + public void purgeGroupEntries(DeviceId deviceId, ApplicationId appId) { + checkPermission(GROUP_WRITE); + store.purgeGroupEntries(deviceId, appId); + } + @Override public void purgeGroupEntries() { checkPermission(GROUP_WRITE); diff --git a/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java b/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java index 46cbc0a7dab..adeda77f93c 100644 --- a/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java +++ b/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java @@ -193,7 +193,7 @@ public void activate(ComponentContext context) { eventDispatcher.addSink(HostEvent.class, listenerRegistry); cfgService.registerProperties(getClass()); networkConfigService.addListener(networkConfigListener); - monitor = new HostMonitor(packetService, this, interfaceService, edgePortService); + monitor = new HostMonitor(packetService, this, interfaceService, edgePortService, deviceService); monitor.setProbeRate(probeRate); monitor.start(); cfgService.registerProperties(getClass()); @@ -562,6 +562,7 @@ public void removeDuplicates(HostId hostId, HostDescription desc) { public void hostVanished(HostId hostId) { checkNotNull(hostId, HOST_ID_NULL); checkValidity(); + // TODO SDFAB-718 rethink HostStore APIs to allow atomic operations Host host = store.getHost(hostId); if (!allowedToChange(hostId)) { @@ -569,6 +570,11 @@ public void hostVanished(HostId hostId) { return; } + if (host == null) { + log.info("Request to remove {} is ignored due to host not present in the store", hostId); + return; + } + if (monitorHosts) { host.ipAddresses().forEach(ip -> { monitor.stopMonitoring(ip); diff --git a/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java b/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java index ef1c796dc1d..82522139597 100644 --- a/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java +++ b/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java @@ -25,6 +25,8 @@ import org.onlab.packet.VlanId; import org.onlab.packet.ndp.NeighborSolicitation; import org.onlab.util.SharedScheduledExecutors; +import org.onosproject.net.Port; +import org.onosproject.net.device.DeviceService; import org.onosproject.net.intf.InterfaceService; import org.onosproject.net.ConnectPoint; import org.onosproject.net.Host; @@ -63,6 +65,7 @@ public class HostMonitor implements Runnable { private HostManager hostManager; private InterfaceService interfaceService; private EdgePortService edgePortService; + private DeviceService deviceService; private final Set monitoredAddresses; @@ -78,19 +81,21 @@ public class HostMonitor implements Runnable { * Creates a new host monitor. * * @param packetService packet service used to send packets on the data plane - * @param hostManager host manager used to look up host information and - * probe existing hosts + * @param hostManager host manager used to look up host information and probe existing hosts * @param interfaceService interface service for interface information * @param edgePortService edge port service + * @param deviceService device service */ public HostMonitor(PacketService packetService, HostManager hostManager, InterfaceService interfaceService, - EdgePortService edgePortService) { + EdgePortService edgePortService, + DeviceService deviceService) { this.packetService = packetService; this.hostManager = hostManager; this.interfaceService = interfaceService; this.edgePortService = edgePortService; + this.deviceService = deviceService; monitoredAddresses = Collections.newSetFromMap(new ConcurrentHashMap<>()); hostProviders = new ConcurrentHashMap<>(); @@ -188,8 +193,17 @@ private void probe(IpAddress ip) { */ private void sendRequest(IpAddress targetIp) { interfaceService.getMatchingInterfaces(targetIp).forEach(intf -> { + Port port = deviceService.getPort(intf.connectPoint()); + if (port == null) { + log.debug("Aborting probing non-existent port: {}", intf); + return; + } + if (!port.isEnabled()) { + log.debug("Aborting probing disabled port: {}", intf); + return; + } if (!edgePortService.isEdgePoint(intf.connectPoint())) { - log.warn("Aborting attempt to send probe out non-edge port: {}", intf); + log.warn("Aborting probing non-edge port: {}", intf); return; } diff --git a/core/net/src/main/java/org/onosproject/net/host/impl/HostProbingManager.java b/core/net/src/main/java/org/onosproject/net/host/impl/HostProbingManager.java index ea3a8a1172e..64f2791b928 100644 --- a/core/net/src/main/java/org/onosproject/net/host/impl/HostProbingManager.java +++ b/core/net/src/main/java/org/onosproject/net/host/impl/HostProbingManager.java @@ -52,7 +52,12 @@ public class HostProbingManager extends private static final String SCHEME = "hostprobing"; private HostProbingStoreDelegate delegate = event -> { - getProvider(SCHEME).processEvent(event); + HostProbingProvider hostProbingProvider = getProvider(SCHEME); + if (hostProbingProvider != null) { + hostProbingProvider.processEvent(event); + } else { + log.warn("Unable to find host probing provider. Cannot handle event {}", event); + } }; @Activate diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java index 2b83fa8a029..da13b76a663 100644 --- a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java +++ b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java @@ -15,8 +15,10 @@ */ package org.onosproject.net.intent.impl; +import com.google.common.collect.ImmutableSet; import org.onlab.util.Tools; import org.onosproject.cfg.ComponentConfigService; +import org.onosproject.core.ApplicationId; import org.onosproject.core.CoreService; import org.onosproject.core.IdGenerator; import org.onosproject.event.AbstractListenerManager; @@ -87,8 +89,7 @@ import static org.onosproject.net.intent.constraint.PartialFailureConstraint.intentAllowsPartialFailure; import static org.onosproject.net.intent.impl.phase.IntentProcessPhase.newInitialPhase; import static org.onosproject.security.AppGuard.checkPermission; -import static org.onosproject.security.AppPermission.Type.INTENT_READ; -import static org.onosproject.security.AppPermission.Type.INTENT_WRITE; +import static org.onosproject.security.AppPermission.Type.*; import static org.slf4j.LoggerFactory.getLogger; /** @@ -290,6 +291,20 @@ public Iterable getIntents() { return store.getIntents(); } + @Override + public Iterable getIntentsByAppId(ApplicationId id) { + checkPermission(INTENT_READ); + + ImmutableSet.Builder builder = ImmutableSet.builder(); + for (Intent intent : store.getIntents()) { + if (intent.appId().equals(id)) { + builder.add(intent); + } + } + + return builder.build(); + } + @Override public void addPending(IntentData intentData) { checkPermission(INTENT_WRITE); diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/installer/FlowRuleIntentInstaller.java b/core/net/src/main/java/org/onosproject/net/intent/impl/installer/FlowRuleIntentInstaller.java index b2cdf5a4f94..71cf28c8f77 100644 --- a/core/net/src/main/java/org/onosproject/net/intent/impl/installer/FlowRuleIntentInstaller.java +++ b/core/net/src/main/java/org/onosproject/net/intent/impl/installer/FlowRuleIntentInstaller.java @@ -174,6 +174,7 @@ public void apply(IntentOperationContext context) { flowRulesToUninstall = uninstallIntents.stream() .map(FlowRuleIntent::flowRules) .flatMap(Collection::stream) + .filter(flowRule -> flowRuleService.getFlowEntry(flowRule) != null) .collect(Collectors.toList()); } else { // No flow rules to be uninstalled. diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Compiling.java b/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Compiling.java index 9eb3106ad6c..d42df803ae5 100644 --- a/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Compiling.java +++ b/core/net/src/main/java/org/onosproject/net/intent/impl/phase/Compiling.java @@ -59,7 +59,7 @@ public Optional execute() { stored.map(IntentData::installables).orElse(null)); return Optional.of(new Installing(processor, IntentData.compiled(data, compiled), stored)); } catch (IntentException e) { - log.warn("Unable to compile intent {} due to:", data.intent(), e.getMessage()); + log.warn("Unable to compile intent {} due to:", data.intent(), e); if (stored.filter(x -> !x.installables().isEmpty()).isPresent()) { // removing orphaned flows and deallocating resources return Optional.of(new Withdrawing(processor, IntentData.compiled(data, stored.get().installables()))); diff --git a/core/net/src/main/java/org/onosproject/net/link/impl/LinkManager.java b/core/net/src/main/java/org/onosproject/net/link/impl/LinkManager.java index 326020bc6a9..ef09ee7000a 100644 --- a/core/net/src/main/java/org/onosproject/net/link/impl/LinkManager.java +++ b/core/net/src/main/java/org/onosproject/net/link/impl/LinkManager.java @@ -370,20 +370,14 @@ private void doUpdate(ConnectPoint src, ConnectPoint dst, BasicLinkConfig cfg) { Link link = getLink(src, dst); LinkDescription desc; - if (link == null) { - // TODO Revisit this behaviour. - // config alone probably should not be adding a link, - // netcfg provider should be the one. - desc = BasicLinkOperator.descriptionOf(src, dst, cfg); - } else { + if (link != null) { desc = BasicLinkOperator.combine(cfg, BasicLinkOperator.descriptionOf(src, dst, link)); + ProviderId pid = Optional.ofNullable(link) + .map(Link::providerId) + .orElse(ProviderId.NONE); + store.createOrUpdateLink(pid, desc); } - - ProviderId pid = Optional.ofNullable(link) - .map(Link::providerId) - .orElse(ProviderId.NONE); - store.createOrUpdateLink(pid, desc); } } } diff --git a/core/net/src/main/java/org/onosproject/net/meter/impl/MeterDriverProvider.java b/core/net/src/main/java/org/onosproject/net/meter/impl/MeterDriverProvider.java index e6151b04fd3..aad015f54c4 100644 --- a/core/net/src/main/java/org/onosproject/net/meter/impl/MeterDriverProvider.java +++ b/core/net/src/main/java/org/onosproject/net/meter/impl/MeterDriverProvider.java @@ -23,7 +23,6 @@ import org.onosproject.net.device.DeviceEvent; import org.onosproject.net.device.DeviceListener; import org.onosproject.net.device.DeviceService; -import org.onosproject.net.meter.Meter; import org.onosproject.net.meter.MeterOperation; import org.onosproject.net.meter.MeterOperations; import org.onosproject.net.meter.MeterProgrammable; @@ -35,13 +34,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Collection; +import java.util.Collections; import java.util.Set; -import java.util.concurrent.ExecutionException; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; import static org.onlab.util.Tools.groupedThreads; @@ -52,18 +49,14 @@ * Driver-based Meter provider. */ public class MeterDriverProvider extends AbstractProvider implements MeterProvider { - - private final Logger log = LoggerFactory.getLogger(getClass()); - // To be extracted for reuse as we deal with other. private static final String SCHEME = "default"; private static final String PROVIDER_NAME = "org.onosproject.provider.meter"; - // potentially positive device event - private static final Set POSITIVE_DEVICE_EVENT = - Sets.immutableEnumSet(DEVICE_ADDED, - DEVICE_AVAILABILITY_CHANGED); + private static final Set POSITIVE_DEVICE_EVENT = Sets.immutableEnumSet( + DEVICE_ADDED, DEVICE_AVAILABILITY_CHANGED); + private final Logger log = LoggerFactory.getLogger(getClass()); protected DeviceService deviceService; protected MastershipService mastershipService; MeterProviderService meterProviderService; @@ -115,12 +108,15 @@ void terminate() { } private void pollMeters() { - deviceService.getAvailableDevices().forEach(device -> { - if (mastershipService.isLocalMaster(device.id()) && - device.is(MeterProgrammable.class)) { - pollDeviceMeters(device.id()); - } - }); + try { + deviceService.getAvailableDevices().forEach(device -> { + if (mastershipService.isLocalMaster(device.id()) && device.is(MeterProgrammable.class)) { + pollDeviceMeters(device); + } + }); + } catch (Exception e) { + log.warn("Exception thrown while polling meters", e); + } } @Override @@ -136,23 +132,32 @@ public void performMeterOperation(DeviceId deviceId, MeterOperation meterOp) { } } - private void pollDeviceMeters(DeviceId deviceId) { - Collection meters = null; + private void pollDeviceMeters(Device device) { + try { + meterProviderService.pushMeterMetrics(device.id(), device.as(MeterProgrammable.class).getMeters() + .completeOnTimeout(Collections.emptySet(), pollFrequency, TimeUnit.SECONDS).get()); + } catch (Exception e) { + log.warn("Unable to get the Meters from {}, error: {}", device, e.getMessage()); + log.debug("Exception: ", e); + } + } + + private void getMeterFeatures(Device device) { try { - meters = getMeterProgrammable(deviceId).getMeters().get(pollFrequency, TimeUnit.SECONDS); - } catch (InterruptedException | ExecutionException | TimeoutException e) { - log.warn("Unable to get the Meters from {}, error: {}", deviceId, e.getMessage()); + meterProviderService.pushMeterFeatures(device.id(), device.as(MeterProgrammable.class).getMeterFeatures() + .completeOnTimeout(Collections.emptySet(), pollFrequency, TimeUnit.SECONDS).get()); + } catch (Exception e) { + log.warn("Unable to get the Meter Features from {}, error: {}", device.id(), e.getMessage()); log.debug("Exception: ", e); } - meterProviderService.pushMeterMetrics(deviceId, meters); } private MeterProgrammable getMeterProgrammable(DeviceId deviceId) { Device device = deviceService.getDevice(deviceId); - if (device.is(MeterProgrammable.class)) { + if (device != null && device.is(MeterProgrammable.class)) { return device.as(MeterProgrammable.class); } else { - log.debug("Device {} is not meter programmable", deviceId); + log.debug("Device {} is not meter programmable or does not exist", deviceId); return null; } } @@ -166,18 +171,29 @@ public void event(DeviceEvent event) { @Override public boolean isRelevant(DeviceEvent event) { - Device device = event.subject(); - return POSITIVE_DEVICE_EVENT.contains(event.type()) && - device.is(MeterProgrammable.class); + return event.subject().is(MeterProgrammable.class); } private void handleEvent(DeviceEvent event) { Device device = event.subject(); - boolean isRelevant = mastershipService.isLocalMaster(device.id()) && - deviceService.isAvailable(device.id()); + + switch (event.type()) { + case DEVICE_ADDED: + getMeterFeatures(device); + break; + case DEVICE_REMOVED: + case DEVICE_SUSPENDED: + meterProviderService.deleteMeterFeatures(device.id()); + break; + default: + break; + } + + boolean isRelevant = POSITIVE_DEVICE_EVENT.contains(event.type()) && + mastershipService.isLocalMaster(device.id()) && deviceService.isAvailable(device.id()); if (isRelevant) { - pollDeviceMeters(device.id()); + pollDeviceMeters(device); } } } diff --git a/core/net/src/main/java/org/onosproject/net/meter/impl/MeterManager.java b/core/net/src/main/java/org/onosproject/net/meter/impl/MeterManager.java index a06a037ea10..94e33ebbe67 100644 --- a/core/net/src/main/java/org/onosproject/net/meter/impl/MeterManager.java +++ b/core/net/src/main/java/org/onosproject/net/meter/impl/MeterManager.java @@ -23,6 +23,7 @@ import org.onosproject.cfg.ComponentConfigService; import org.onosproject.cluster.ClusterService; import org.onosproject.cluster.NodeId; +import org.onosproject.core.ApplicationId; import org.onosproject.mastership.MastershipService; import org.onosproject.net.DeviceId; import org.onosproject.net.config.NetworkConfigRegistry; @@ -33,7 +34,7 @@ import org.onosproject.net.driver.DriverService; import org.onosproject.net.meter.DefaultMeter; import org.onosproject.net.meter.Meter; -import org.onosproject.net.meter.MeterCellId.MeterCellType; +import org.onosproject.net.meter.MeterCellId; import org.onosproject.net.meter.MeterEvent; import org.onosproject.net.meter.MeterFailReason; import org.onosproject.net.meter.MeterFeatures; @@ -45,6 +46,7 @@ import org.onosproject.net.meter.MeterProviderRegistry; import org.onosproject.net.meter.MeterProviderService; import org.onosproject.net.meter.MeterRequest; +import org.onosproject.net.meter.MeterScope; import org.onosproject.net.meter.MeterService; import org.onosproject.net.meter.MeterState; import org.onosproject.net.meter.MeterStore; @@ -52,6 +54,8 @@ import org.onosproject.net.meter.MeterStoreResult; import org.onosproject.net.provider.AbstractListenerProviderRegistry; import org.onosproject.net.provider.AbstractProviderService; +import org.onosproject.net.pi.model.PiMeterId; +import org.onosproject.net.pi.runtime.PiMeterCellId; import org.osgi.service.component.ComponentContext; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; @@ -67,6 +71,7 @@ import java.util.Objects; import java.util.stream.Collectors; +import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Strings.isNullOrEmpty; import static org.onlab.util.PredictableExecutor.newPredictableExecutor; @@ -78,6 +83,8 @@ import static org.onosproject.net.OsgiPropertyConstants.MM_NUM_THREADS_DEFAULT; import static org.onosproject.net.OsgiPropertyConstants.MM_PURGE_ON_DISCONNECTION; import static org.onosproject.net.OsgiPropertyConstants.MM_PURGE_ON_DISCONNECTION_DEFAULT; +import static org.onosproject.net.OsgiPropertyConstants.MM_USER_DEFINED_INDEX; +import static org.onosproject.net.OsgiPropertyConstants.MM_USER_DEFINED_INDEX_DEFAULT; import static org.slf4j.LoggerFactory.getLogger; /** @@ -93,16 +100,16 @@ MM_NUM_THREADS + ":Integer=" + MM_NUM_THREADS_DEFAULT, MM_FALLBACK_METER_POLL_FREQUENCY + ":Integer=" + MM_FALLBACK_METER_POLL_FREQUENCY_DEFAULT, MM_PURGE_ON_DISCONNECTION + ":Boolean=" + MM_PURGE_ON_DISCONNECTION_DEFAULT, + MM_USER_DEFINED_INDEX + ":Boolean=" + MM_USER_DEFINED_INDEX_DEFAULT, } ) public class MeterManager extends AbstractListenerProviderRegistry implements MeterService, MeterProviderRegistry { - // Installer related objects + private PredictableExecutor meterInstallers; private static final String WORKER_PATTERN = "installer-%d"; private static final String GROUP_THREAD_NAME = "onos/meter"; - // Logging facility, meter store delegate and listener for device events. private final Logger log = getLogger(getClass()); private final MeterStoreDelegate delegate = new InternalMeterStoreDelegate(); private final DeviceListener deviceListener = new InternalDeviceListener(); @@ -138,10 +145,12 @@ public class MeterManager /** Purge entries associated with a device when the device goes offline. */ private boolean purgeOnDisconnection = MM_PURGE_ON_DISCONNECTION_DEFAULT; + /** Enable user defined index mode. Users can provide their own meter index. */ + protected boolean userDefinedIndex = MM_USER_DEFINED_INDEX_DEFAULT; + // Action triggered when the futures related to submit and withdrawal complete private TriConsumer onComplete; - // Meter provider reference private final MeterDriverProvider defaultProvider = new MeterDriverProvider(); // Node id used to verify who is charge of the meter ops @@ -217,6 +226,11 @@ private void readComponentConfiguration(ComponentContext context) { purgeOnDisconnection ? "enabled" : "disabled"); } + flag = Tools.isPropertyEnabled(properties, MM_USER_DEFINED_INDEX); + boolean enable = flag == null ? userDefinedIndex : flag; + userDefinedIndex = store.userDefinedIndexMode(enable); + log.info("UserDefinedIndex is {}", userDefinedIndex ? "enabled" : "disabled"); + String s = get(properties, MM_FALLBACK_METER_POLL_FREQUENCY); try { fallbackMeterPollFrequency = isNullOrEmpty(s) ? @@ -251,34 +265,55 @@ protected MeterProviderService createProviderService(MeterProvider provider) { @Override public Meter submit(MeterRequest request) { checkNotNull(request, "request cannot be null."); - // Allocate an id and then submit the request - MeterId id = allocateMeterId(request.deviceId()); + MeterCellId cellId; + if (request.index().isPresent()) { + checkArgument(userDefinedIndex, "Index cannot be provided when userDefinedIndex mode is disabled"); + // User provides index + if (request.scope().isGlobal()) { + cellId = MeterId.meterId(request.index().get()); + } else { + cellId = PiMeterCellId.ofIndirect( + PiMeterId.of(request.scope().id()), request.index().get()); + } + } else { + checkArgument(!userDefinedIndex, "Index cannot be allocated when userDefinedIndex mode is enabled"); + // Allocate an id + cellId = allocateMeterId(request.deviceId(), request.scope()); + } Meter.Builder mBuilder = DefaultMeter.builder() .forDevice(request.deviceId()) .fromApp(request.appId()) .withBands(request.bands()) - .withCellId(id) + .withCellId(cellId) .withUnit(request.unit()); if (request.isBurst()) { mBuilder.burst(); } + if (request.annotations() != null && !request.annotations().keys().isEmpty()) { + mBuilder.withAnnotations(request.annotations()); + } DefaultMeter m = (DefaultMeter) mBuilder.build(); // Meter installation logic (happy ending case) // PENDING -> stats -> ADDED -> future completes m.setState(MeterState.PENDING_ADD); - store.storeMeter(m).whenComplete((result, error) -> + store.addOrUpdateMeter(m).whenComplete((result, error) -> onComplete.accept(request, result, error)); return m; } @Override public void withdraw(MeterRequest request, MeterId meterId) { + withdraw(request, (MeterCellId) meterId); + } + + @Override + public void withdraw(MeterRequest request, MeterCellId meterCellId) { checkNotNull(request, "request cannot be null."); Meter.Builder mBuilder = DefaultMeter.builder() .forDevice(request.deviceId()) .fromApp(request.appId()) .withBands(request.bands()) - .withCellId(meterId) + .withCellId(meterCellId) .withUnit(request.unit()); if (request.isBurst()) { @@ -287,7 +322,6 @@ public void withdraw(MeterRequest request, MeterId meterId) { DefaultMeter m = (DefaultMeter) mBuilder.build(); // Meter removal logic (happy ending case) // PENDING -> stats -> removed from the map -> future completes - // There is no transition to the REMOVED state m.setState(MeterState.PENDING_REMOVE); store.deleteMeter(m).whenComplete((result, error) -> onComplete.accept(request, result, error)); @@ -295,14 +329,23 @@ public void withdraw(MeterRequest request, MeterId meterId) { @Override public Meter getMeter(DeviceId deviceId, MeterId id) { + return getMeter(deviceId, (MeterCellId) id); + } + + @Override + public Meter getMeter(DeviceId deviceId, MeterCellId id) { MeterKey key = MeterKey.key(deviceId, id); return store.getMeter(key); } @Override public Collection getMeters(DeviceId deviceId) { - return store.getAllMeters().stream().filter(m -> - m.deviceId().equals(deviceId)).collect(Collectors.toList()); + return store.getAllMeters(deviceId); + } + + @Override + public Collection getMeters(DeviceId deviceId, MeterScope scope) { + return store.getAllMeters(deviceId, scope); } @Override @@ -313,7 +356,11 @@ public Collection getAllMeters() { @Override public MeterId allocateMeterId(DeviceId deviceId) { // We delegate directly to the store - return store.allocateMeterId(deviceId); + return (MeterId) store.allocateMeterId(deviceId, MeterScope.globalScope()); + } + + private MeterCellId allocateMeterId(DeviceId deviceId, MeterScope scope) { + return store.allocateMeterId(deviceId, scope); } @Override @@ -325,7 +372,12 @@ public void freeMeterId(DeviceId deviceId, MeterId meterId) { @Override public void purgeMeters(DeviceId deviceId) { // We delegate directly to the store - store.purgeMeter(deviceId); + store.purgeMeters(deviceId); + } + + @Override + public void purgeMeters(DeviceId deviceId, ApplicationId appId) { + store.purgeMeters(deviceId, appId); } private class InternalMeterProviderService @@ -349,17 +401,16 @@ public void meterOperationFailed(MeterOperation operation, @Override public void pushMeterMetrics(DeviceId deviceId, Collection meterEntries) { - // Each update on the store is reflected on this collection Collection allMeters = store.getAllMeters(deviceId); - Map meterEntriesMap = meterEntries.stream() - .collect(Collectors.toMap(Meter::id, Meter -> Meter)); + Map meterEntriesMap = meterEntries.stream() + .collect(Collectors.toMap(Meter::meterCellId, Meter -> Meter)); // Look for meters defined in onos and missing in the device (restore) allMeters.stream().forEach(m -> { if ((m.state().equals(MeterState.PENDING_ADD) || m.state().equals(MeterState.ADDED)) && - !meterEntriesMap.containsKey(m.id())) { + !meterEntriesMap.containsKey(m.meterCellId())) { // The meter is missing in the device. Reinstall! log.debug("Adding meter missing in device {} {}", deviceId, m); // offload the task to avoid the overloading of the sb threads @@ -369,27 +420,21 @@ public void pushMeterMetrics(DeviceId deviceId, Collection meterEntries) // Look for meters defined in the device and not in onos (remove) meterEntriesMap.entrySet().stream() - .filter(md -> !allMeters.stream().anyMatch(m -> m.id().equals(md.getKey()))) + .filter(md -> !allMeters.stream().anyMatch(m -> m.meterCellId().equals(md.getKey()))) .forEach(mio -> { Meter meter = mio.getValue(); - // FIXME: Removing a meter is meaningful for OpenFlow, but not for P4Runtime. - // In P4Runtime meter cells cannot be removed. For the - // moment, we make the distinction between OpenFlow and - // P4Runtime by looking at the MeterCellType (always - // INDEX for OpenFlow). - if (meter.meterCellId().type() == MeterCellType.INDEX) { - // The meter is missing in onos. Uninstall! - log.debug("Remove meter in device not in onos {} {}", deviceId, mio.getKey()); - // offload the task to avoid the overloading of the sb threads - meterInstallers.execute(new MeterInstaller(deviceId, meter, MeterOperation.Type.REMOVE)); - } + // The meter is missing in onos. Uninstall! + log.debug("Remove meter in device not in onos {} {}", deviceId, mio.getKey()); + // offload the task to avoid the overloading of the sb threads + meterInstallers.execute(new MeterInstaller(deviceId, meter, MeterOperation.Type.REMOVE)); }); // Update the meter stats in the store (first time move the state from pending to added) Collection addedMeters = Sets.newHashSet(); meterEntries.stream() .filter(m -> allMeters.stream() - .anyMatch(sm -> sm.deviceId().equals(deviceId) && sm.id().equals(m.id()))) + .anyMatch(sm -> sm.deviceId().equals(deviceId) && + sm.meterCellId().equals(m.meterCellId()))) .forEach(m -> { Meter updatedMeter = store.updateMeterState(m); if (updatedMeter != null && updatedMeter.state() == MeterState.ADDED) { @@ -399,22 +444,11 @@ public void pushMeterMetrics(DeviceId deviceId, Collection meterEntries) Collection newAllMeters = Sets.newHashSet(allMeters); newAllMeters.removeAll(addedMeters); + // Remove definetely the remaining meters newAllMeters.forEach(m -> { - // FIXME: Installing a meter is meaningful for OpenFlow, but not for P4Runtime. - // It looks like this flow is used only for p4runtime to emulate the installation - // since meters are already instantiated - we need just modify the params. - if (m.state() == MeterState.PENDING_ADD && m.meterCellId().type() != MeterCellType.INDEX) { - // offload the task to avoid the overloading of the sb threads - log.debug("Modify meter {} in device {}", m.id(), deviceId); - meterInstallers.execute(new MeterInstaller(m.deviceId(), m, MeterOperation.Type.MODIFY)); - // Remove workflow. Regarding OpenFlow, meters have been removed from - // the device but they are still in the store, we will purge them definitely. - // Instead, P4Runtime devices will not remove the meter. The first workaround - // for P4Runtime will avoid to send a remove op. Then, we reach this point - // and we purge the meter from the store - } else if (m.state() == MeterState.PENDING_REMOVE) { - log.debug("Delete meter {} now in store", m.id()); - store.deleteMeterNow(m); + if (m.state() == MeterState.PENDING_REMOVE) { + log.debug("Delete meter {} now in store", m.meterCellId()); + store.purgeMeter(m); } }); } @@ -424,6 +458,11 @@ public void pushMeterFeatures(DeviceId deviceId, MeterFeatures meterfeatures) { store.storeMeterFeatures(meterfeatures); } + @Override + public void pushMeterFeatures(DeviceId deviceId, Collection meterfeatures) { + meterfeatures.forEach(mf -> store.storeMeterFeatures(mf)); + } + @Override public void deleteMeterFeatures(DeviceId deviceId) { store.deleteMeterFeatures(deviceId); @@ -484,7 +523,7 @@ public void run() { NodeId master = mastershipService.getMasterFor(meter.deviceId()); if (!Objects.equals(local, master)) { log.trace("Not the master of device {}, skipping installation of the meter {}", - meter.deviceId(), meter.id()); + meter.deviceId(), meter.meterCellId()); return; } MeterProvider p = getProvider(this.deviceId); @@ -497,7 +536,7 @@ public void run() { @Override public int hint() { - return meter.id().hashCode(); + return meter.meterCellId().hashCode(); } } @@ -505,26 +544,29 @@ private class InternalDeviceListener implements DeviceListener { @Override public void event(DeviceEvent event) { - switch (event.type()) { - case DEVICE_REMOVED: - case DEVICE_AVAILABILITY_CHANGED: - DeviceId deviceId = event.subject().id(); - if (!deviceService.isAvailable(deviceId)) { - BasicDeviceConfig cfg = netCfgService.getConfig(deviceId, BasicDeviceConfig.class); - //if purgeOnDisconnection is set for the device or it's a global configuration - // lets remove the meters. - boolean purge = cfg != null && cfg.isPurgeOnDisconnectionConfigured() ? - cfg.purgeOnDisconnection() : purgeOnDisconnection; - if (purge) { - log.info("PurgeOnDisconnection is requested for device {}, " + - "removing meters", deviceId); - store.purgeMeter(deviceId); + DeviceId deviceId = event.subject().id(); + meterInstallers.execute(() -> { + switch (event.type()) { + case DEVICE_REMOVED: + case DEVICE_AVAILABILITY_CHANGED: + if (!deviceService.isAvailable(deviceId)) { + BasicDeviceConfig cfg = netCfgService.getConfig(deviceId, BasicDeviceConfig.class); + //if purgeOnDisconnection is set for the device or it's a global configuration + // lets remove the meters. + boolean purge = cfg != null && cfg.isPurgeOnDisconnectionConfigured() ? + cfg.purgeOnDisconnection() : purgeOnDisconnection; + if (purge) { + log.info("PurgeOnDisconnection is requested for device {}, " + + "removing meters", deviceId); + store.purgeMeters(deviceId); + } } - } - break; - default: - break; - } + break; + default: + break; + } + }, deviceId.hashCode()); + } } diff --git a/core/net/src/main/java/org/onosproject/net/packet/impl/PacketManager.java b/core/net/src/main/java/org/onosproject/net/packet/impl/PacketManager.java index a020da7a1f2..38cfd7656a5 100644 --- a/core/net/src/main/java/org/onosproject/net/packet/impl/PacketManager.java +++ b/core/net/src/main/java/org/onosproject/net/packet/impl/PacketManager.java @@ -285,7 +285,6 @@ private void pushRulesToDevice(Device device) { } else if (request.deviceId().get().equals(device.id())) { pushRule(device, request); } - } } diff --git a/core/net/src/main/java/org/onosproject/net/pi/impl/CriterionTranslatorHelper.java b/core/net/src/main/java/org/onosproject/net/pi/impl/CriterionTranslatorHelper.java index 4b64b0c8c34..a6b213b60f9 100644 --- a/core/net/src/main/java/org/onosproject/net/pi/impl/CriterionTranslatorHelper.java +++ b/core/net/src/main/java/org/onosproject/net/pi/impl/CriterionTranslatorHelper.java @@ -85,6 +85,7 @@ import org.onosproject.net.pi.runtime.PiExactFieldMatch; import org.onosproject.net.pi.runtime.PiFieldMatch; import org.onosproject.net.pi.runtime.PiLpmFieldMatch; +import org.onosproject.net.pi.runtime.PiOptionalFieldMatch; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; import org.onosproject.net.pi.service.PiTranslationException; @@ -163,6 +164,8 @@ static PiFieldMatch translateCriterion(Criterion criterion, PiMatchFieldId field switch (matchType) { case EXACT: return new PiExactFieldMatch(fieldId, translator.exactMatch()); + case OPTIONAL: + return new PiOptionalFieldMatch(fieldId, translator.exactMatch()); case TERNARY: final Pair tp = translator.ternaryMatch(); return new PiTernaryFieldMatch(fieldId, tp.getLeft(), tp.getRight()); diff --git a/core/net/src/main/java/org/onosproject/net/pi/impl/PiFlowRuleTranslatorImpl.java b/core/net/src/main/java/org/onosproject/net/pi/impl/PiFlowRuleTranslatorImpl.java index 364742750fd..f399508dd20 100644 --- a/core/net/src/main/java/org/onosproject/net/pi/impl/PiFlowRuleTranslatorImpl.java +++ b/core/net/src/main/java/org/onosproject/net/pi/impl/PiFlowRuleTranslatorImpl.java @@ -44,6 +44,7 @@ import org.onosproject.net.pi.runtime.PiFieldMatch; import org.onosproject.net.pi.runtime.PiLpmFieldMatch; import org.onosproject.net.pi.runtime.PiMatchKey; +import org.onosproject.net.pi.runtime.PiOptionalFieldMatch; import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTableAction; import org.onosproject.net.pi.runtime.PiTableEntry; @@ -114,7 +115,8 @@ static PiTableEntry translate(FlowRule rule, PiPipeconf pipeconf, Device device) // Need to ignore priority if no TCAM lookup match field needPriority = tableModel.matchFields().stream() .anyMatch(match -> match.matchType() == PiMatchType.TERNARY || - match.matchType() == PiMatchType.RANGE); + match.matchType() == PiMatchType.RANGE || + match.matchType() == PiMatchType.OPTIONAL); } // Translate treatment. final PiTableAction piTableAction = translateTreatment(rule.treatment(), interpreter, piTableId, pipelineModel); @@ -277,7 +279,9 @@ private static PiTableAction checkPiAction(PiAction piAction, PiTableModel table "Not such parameter '%s' for action '%s'", param.id(), actionModel))); try { newActionBuilder.withParameter(new PiActionParam(param.id(), - param.value().fit(paramModel.bitWidth()))); + paramModel.hasBitWidth() ? + param.value().fit(paramModel.bitWidth()) : + param.value())); } catch (ByteSequenceTrimException e) { throw new PiTranslationException(format( "Size mismatch for parameter '%s' of action '%s': %s", @@ -360,6 +364,7 @@ private static Collection translateFieldMatches(PiPipelineInterpre case TERNARY: case LPM: case RANGE: + case OPTIONAL: // Skip field. break; default: @@ -372,7 +377,8 @@ private static Collection translateFieldMatches(PiPipelineInterpre PiFieldMatch fieldMatch = null; - if (criterion != null) { + // TODO: we currently do not support fields with arbitrary bit width + if (criterion != null && fieldModel.hasBitWidth()) { // Criterion mapping is possible for this field id. try { fieldMatch = translateCriterion(criterion, fieldId, fieldModel.matchType(), bitWidth); @@ -444,6 +450,15 @@ private static PiFieldMatch typeCheckFieldMatch(PiFieldMatch fieldMatch, PiMatch fieldMatch.fieldId(), fieldModel.matchType().name(), fieldMatch.type().name())); } + // Check if the arbitrary bit width is supported + if (!fieldModel.hasBitWidth() && + !fieldModel.matchType().equals(PiMatchType.EXACT) && + !fieldModel.matchType().equals(PiMatchType.OPTIONAL)) { + throw new PiTranslationException(format( + "Arbitrary bit width for field '%s' and match type %s is not supported", + fieldMatch.fieldId(), fieldModel.matchType().name())); + } + int modelBitWidth = fieldModel.bitWidth(); /* @@ -458,8 +473,11 @@ model. We also normalize ternary (and LPM) field matches by setting to 0 unused try { switch (fieldModel.matchType()) { case EXACT: + PiExactFieldMatch exactField = (PiExactFieldMatch) fieldMatch; return new PiExactFieldMatch(fieldMatch.fieldId(), - ((PiExactFieldMatch) fieldMatch).value().fit(modelBitWidth)); + fieldModel.hasBitWidth() ? + exactField.value().fit(modelBitWidth) : + exactField.value()); case TERNARY: PiTernaryFieldMatch ternField = (PiTernaryFieldMatch) fieldMatch; ImmutableByteSequence ternMask = ternField.mask().fit(modelBitWidth); @@ -485,6 +503,12 @@ model. We also normalize ternary (and LPM) field matches by setting to 0 unused return new PiRangeFieldMatch(fieldMatch.fieldId(), ((PiRangeFieldMatch) fieldMatch).lowValue().fit(modelBitWidth), ((PiRangeFieldMatch) fieldMatch).highValue().fit(modelBitWidth)); + case OPTIONAL: + PiOptionalFieldMatch optionalField = (PiOptionalFieldMatch) fieldMatch; + return new PiOptionalFieldMatch(fieldMatch.fieldId(), + fieldModel.hasBitWidth() ? + optionalField.value().fit(modelBitWidth) : + optionalField.value()); default: // Should never be here. throw new IllegalArgumentException( diff --git a/core/net/src/main/java/org/onosproject/net/pi/impl/PiGroupTranslatorImpl.java b/core/net/src/main/java/org/onosproject/net/pi/impl/PiGroupTranslatorImpl.java index 42a29a89b77..fae7bd1c65e 100644 --- a/core/net/src/main/java/org/onosproject/net/pi/impl/PiGroupTranslatorImpl.java +++ b/core/net/src/main/java/org/onosproject/net/pi/impl/PiGroupTranslatorImpl.java @@ -161,7 +161,10 @@ ID must be unique for the whole action profile (i.e. the group table .withAction((PiAction) tableAction) .build(); - piActionGroupBuilder.addMember(member, bucket.weight()); + // NOTE Indirect groups have weight set to -1 which is not supported + // by P4RT - setting to 1 to avoid problems with the p4rt server. + final int weight = group.type() == GroupDescription.Type.INDIRECT ? 1 : bucket.weight(); + piActionGroupBuilder.addMember(member, weight); } return piActionGroupBuilder.build(); diff --git a/core/net/src/main/java/org/onosproject/net/pi/impl/PiMeterTranslatorImpl.java b/core/net/src/main/java/org/onosproject/net/pi/impl/PiMeterTranslatorImpl.java index 3831699efb9..3a243959279 100644 --- a/core/net/src/main/java/org/onosproject/net/pi/impl/PiMeterTranslatorImpl.java +++ b/core/net/src/main/java/org/onosproject/net/pi/impl/PiMeterTranslatorImpl.java @@ -20,7 +20,6 @@ import org.onosproject.net.meter.Band; import org.onosproject.net.meter.Meter; import org.onosproject.net.pi.model.PiPipeconf; -import org.onosproject.net.pi.runtime.PiMeterBand; import org.onosproject.net.pi.runtime.PiMeterCellConfig; import org.onosproject.net.pi.runtime.PiMeterCellId; import org.onosproject.net.pi.service.PiTranslationException; @@ -36,7 +35,7 @@ private PiMeterTranslatorImpl() { // Hides constructor. } - private static final int TRTCM_RATES = 2; + private static final int TCM_BANDS = 2; /** * Returns a PI meter config equivalent to the given meter, for the given pipeconf and device. @@ -53,23 +52,53 @@ static PiMeterCellConfig translate(Meter meter, PiPipeconf pipeconf, Device devi throw new PiTranslationException("PI meter cell type must be PIPELINE_INDEPENDENT!"); } - // FIXME: we might want to move this check to P4Runtime driver or protocol layer. - // In general, This check is more of P4Runtime limitation, we should do this check in the low level layer. - if (meter.bands().size() > TRTCM_RATES) { - throw new PiTranslationException("PI meter can not have more than 2 bands!"); + // In general, this check is more of P4Runtime limitation, we should do this check in the low level layer. + // At the same time we could extend to support other configurations (for example srTCM). + // TODO implement SRTCM and TRTCM helper classes to improve readability of the code. + // Or in future when we support other markers we can simply create two different methods. + if (meter.bands().size() != TCM_BANDS) { + throw new PiTranslationException("PI meter must have 2 bands in order to implement TCM metering!"); } + final Band[] bands = meter.bands().toArray(new Band[0]); + // Validate proper config of the TCM settings. + if ((bands[0].type() != Band.Type.MARK_YELLOW && bands[0].type() != Band.Type.MARK_RED) || + (bands[1].type() != Band.Type.MARK_YELLOW && bands[1].type() != Band.Type.MARK_RED) || + (bands[0].type() == bands[1].type())) { + throw new PiTranslationException("PI TCM meter must have a MARK_YELLOW band and a MARK_RED band!"); + } + + // Validate proper config. NOTE that we have relaxed some checks + // and the ONOS meters are not spec compliants with trTCM RFC + if (bands[0].burst() < 0 || bands[1].burst() < 0) { + throw new PiTranslationException("PI trTCM meter can not have band with burst < 0!"); + } + if (bands[0].rate() < 0 || bands[1].rate() < 0) { + throw new PiTranslationException("PI trTCM meter can not have band with rate < 0!"); + } - PiMeterCellConfig.Builder builder = PiMeterCellConfig.builder(); - for (Band band : meter.bands()) { - if (band.type() != Band.Type.NONE) { - throw new PiTranslationException("PI meter can not have band with other types except NONE!"); - } + long cir, cburst, pir, pburst; + if (bands[0].type() == Band.Type.MARK_YELLOW) { + cir = bands[0].rate(); + cburst = bands[0].burst(); + pir = bands[1].rate(); + pburst = bands[1].burst(); + } else { + pir = bands[0].rate(); + pburst = bands[0].burst(); + cir = bands[1].rate(); + cburst = bands[1].burst(); + } - PiMeterBand piMeterBand = new PiMeterBand(band.rate(), band.burst()); - builder.withMeterBand(piMeterBand); + if (cir > pir) { + throw new PiTranslationException("PI trTCM meter must have a pir >= cir!"); } - return builder.withMeterCellId((PiMeterCellId) meter.meterCellId()).build(); + return PiMeterCellConfig.builder() + .withCommittedBand(cir, cburst) + .withPeakBand(pir, pburst) + .withMeterCellId((PiMeterCellId) meter.meterCellId()) + .build(); } + } diff --git a/core/net/src/main/java/org/onosproject/net/pi/impl/PiPipeconfWatchdogManager.java b/core/net/src/main/java/org/onosproject/net/pi/impl/PiPipeconfWatchdogManager.java index 21df7781d84..3c85802be92 100644 --- a/core/net/src/main/java/org/onosproject/net/pi/impl/PiPipeconfWatchdogManager.java +++ b/core/net/src/main/java/org/onosproject/net/pi/impl/PiPipeconfWatchdogManager.java @@ -18,8 +18,8 @@ import com.google.common.collect.Maps; import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.Striped; import org.onlab.util.KryoNamespace; +import org.onlab.util.PredictableExecutor; import org.onlab.util.Tools; import org.onosproject.cfg.ComponentConfigService; import org.onosproject.event.AbstractListenerManager; @@ -42,10 +42,14 @@ import org.onosproject.net.pi.service.PiPipeconfWatchdogEvent; import org.onosproject.net.pi.service.PiPipeconfWatchdogListener; import org.onosproject.net.pi.service.PiPipeconfWatchdogService; +import org.onosproject.store.primitives.DefaultDistributedSet; import org.onosproject.store.serializers.KryoNamespaces; +import org.onosproject.store.service.DistributedPrimitive; +import org.onosproject.store.service.DistributedSet; import org.onosproject.store.service.EventuallyConsistentMap; import org.onosproject.store.service.EventuallyConsistentMapEvent; import org.onosproject.store.service.EventuallyConsistentMapListener; +import org.onosproject.store.service.Serializer; import org.onosproject.store.service.StorageService; import org.onosproject.store.service.WallClockTimestamp; import org.osgi.service.component.ComponentContext; @@ -60,13 +64,12 @@ import java.util.Dictionary; import java.util.Map; import java.util.Objects; -import java.util.Timer; -import java.util.TimerTask; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.locks.Lock; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; import static java.util.Collections.singleton; +import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; import static org.onlab.util.Tools.groupedThreads; import static org.onosproject.net.OsgiPropertyConstants.PWM_PROBE_INTERVAL; import static org.onosproject.net.OsgiPropertyConstants.PWM_PROBE_INTERVAL_DEFAULT; @@ -90,8 +93,6 @@ public class PiPipeconfWatchdogManager private final Logger log = getLogger(getClass()); - private static final long SECONDS = 1000L; - @Reference(cardinality = ReferenceCardinality.MANDATORY) private PiPipeconfMappingStore pipeconfMappingStore; @@ -115,25 +116,35 @@ public class PiPipeconfWatchdogManager */ private int probeInterval = PWM_PROBE_INTERVAL_DEFAULT; - protected ExecutorService executor = Executors.newFixedThreadPool( - 30, groupedThreads("onos/pipeconf-watchdog", "%d", log)); + // Setting to 0 will leverage available processors + private static final int DEFAULT_THREADS = 0; + protected PredictableExecutor watchdogWorkers = new PredictableExecutor(DEFAULT_THREADS, + groupedThreads("onos/pipeconf-watchdog", "%d", log)); private final DeviceListener deviceListener = new InternalDeviceListener(); private final PiPipeconfListener pipeconfListener = new InternalPipeconfListener(); - private Timer timer; - private TimerTask task; - - private final Striped locks = Striped.lock(30); + private ScheduledExecutorService eventExecutor = newSingleThreadScheduledExecutor( + groupedThreads("onos/pipeconf-event", "%d", log)); + private ScheduledFuture poller = null; private EventuallyConsistentMap statusMap; private Map localStatusMap; + // Configured devices by this cluster. We use a set to keep track of all devices for which + // we have pushed the forwarding pipeline config at least once. This guarantees that device + // pipelines are wiped out/reset at least once when starting the cluster, minimizing the risk + // of any stale state from previous runs affecting control operations. Another effect of this + // approach is that the default entries mirror will get populated even though the pipeline results + // to be the same across different ONOS installations. + private static final String CONFIGURED_DEVICES = "onos-pipeconf-configured-set"; + private DistributedSet configuredDevices; + @Activate public void activate() { eventDispatcher.addSink(PiPipeconfWatchdogEvent.class, listenerRegistry); localStatusMap = Maps.newConcurrentMap(); - // Init distributed status map. + // Init distributed status map and configured devices set KryoNamespace.Builder serializer = KryoNamespace.newBuilder() .register(KryoNamespaces.API) .register(PipelineStatus.class); @@ -142,10 +153,15 @@ public void activate() { .withSerializer(serializer) .withTimestampProvider((k, v) -> new WallClockTimestamp()).build(); statusMap.addListener(new StatusMapListener()); + // Init the set of the configured devices + configuredDevices = new DefaultDistributedSet<>(storageService.setBuilder() + .withName(CONFIGURED_DEVICES) + .withSerializer(Serializer.using(KryoNamespaces.API)) + .build(), + DistributedPrimitive.DEFAULT_OPERATION_TIMEOUT_MILLIS); // Register component configurable properties. componentConfigService.registerProperties(getClass()); // Start periodic watchdog task. - timer = new Timer(); startProbeTask(); // Add listeners. deviceService.addListener(deviceListener); @@ -177,7 +193,8 @@ public void deactivate() { pipeconfService.removeListener(pipeconfListener); deviceService.removeListener(deviceListener); stopProbeTask(); - timer = null; + eventExecutor.shutdown(); + watchdogWorkers.shutdown(); statusMap = null; localStatusMap = null; log.info("Stopped"); @@ -202,39 +219,55 @@ private void triggerCheckAllDevices() { } private void filterAndTriggerTasks(Iterable devices) { - devices.forEach(device -> { - if (!isLocalMaster(device)) { - return; - } + devices.forEach(device -> watchdogWorkers.execute(() -> probeTask(device), device.id().hashCode())); + } - final PiPipeconfId pipeconfId = pipeconfMappingStore.getPipeconfId(device.id()); - if (pipeconfId == null || !device.is(PiPipelineProgrammable.class)) { - return; - } + private void probeTask(Device device) { + if (!isLocalMaster(device)) { + return; + } - if (!pipeconfService.getPipeconf(pipeconfId).isPresent()) { - log.warn("Pipeconf {} is not registered, skipping probe for {}", - pipeconfId, device.id()); - return; - } + final PiPipeconfId pipeconfId = pipeconfMappingStore.getPipeconfId(device.id()); + if (pipeconfId == null || !device.is(PiPipelineProgrammable.class)) { + return; + } - final PiPipeconf pipeconf = pipeconfService.getPipeconf(pipeconfId).get(); + if (pipeconfService.getPipeconf(pipeconfId).isEmpty()) { + log.warn("Pipeconf {} is not registered, skipping probe for {}", + pipeconfId, device.id()); + return; + } - if (!device.is(DeviceHandshaker.class)) { - log.error("Missing DeviceHandshaker behavior for {}", device.id()); - return; - } + final PiPipeconf pipeconf = pipeconfService.getPipeconf(pipeconfId).get(); - // Trigger task with per-device lock. - executor.execute(withLock(() -> { - final boolean success = doSetPipeconfIfRequired(device, pipeconf); - if (success) { - signalStatusReady(device.id()); - } else { - signalStatusUnknown(device.id()); - } - }, device.id())); - }); + if (!device.is(DeviceHandshaker.class)) { + log.error("Missing DeviceHandshaker behavior for {}", device.id()); + return; + } + + final boolean success = doSetPipeconfIfRequired(device, pipeconf); + // The probe task is not performed in atomic way and between the + // initial mastership check and the actual probe the execution + // can be blocked many times and the mastership can change. Recheck + // the mastership after pipeline probe returns. + if (isLocalMaster(device)) { + // An harmless side effect of the check above is that when we return + // from the set pipeline config we might be no longer the master and this + // will delay in the worst case the mark online of the device for 15s + // (next reconcile interval) + if (success) { + signalStatusReady(device.id()); + signalStatusConfigured(device.id()); + } else { + // When a network partition occurs watchdog is stuck for LONG_TIMEOUT + // before returning and will mark the device offline. However, in the + // meanwhile the mastership has been passed to another instance which is + // already connected and has already marked the device online. + signalStatusUnknown(device.id()); + } + } else { + log.warn("No longer the master for {} aborting probe task", device.id()); + } } /** @@ -251,9 +284,11 @@ private boolean doSetPipeconfIfRequired(Device device, PiPipeconf pipeconf) { final PiPipelineProgrammable pipelineProg = device.as(PiPipelineProgrammable.class); final DeviceHandshaker handshaker = device.as(DeviceHandshaker.class); if (!handshaker.hasConnection()) { + log.warn("There is no connectivity with {}", device.id()); return false; } - if (Futures.getUnchecked(pipelineProg.isPipeconfSet(pipeconf))) { + if (Futures.getUnchecked(pipelineProg.isPipeconfSet(pipeconf)) && + configuredDevices.contains(device.id())) { log.debug("Pipeconf {} already configured on {}", pipeconf.id(), device.id()); return true; @@ -261,18 +296,6 @@ private boolean doSetPipeconfIfRequired(Device device, PiPipeconf pipeconf) { return Futures.getUnchecked(pipelineProg.setPipeconf(pipeconf)); } - private Runnable withLock(Runnable task, Object object) { - return () -> { - final Lock lock = locks.get(object); - lock.lock(); - try { - task.run(); - } finally { - lock.unlock(); - } - }; - } - private void signalStatusUnknown(DeviceId deviceId) { statusMap.remove(deviceId); } @@ -281,6 +304,14 @@ private void signalStatusReady(DeviceId deviceId) { statusMap.put(deviceId, PipelineStatus.READY); } + private void signalStatusUnconfigured(DeviceId deviceId) { + configuredDevices.remove(deviceId); + } + + private void signalStatusConfigured(DeviceId deviceId) { + configuredDevices.add(deviceId); + } + private boolean isLocalMaster(Device device) { if (mastershipService.isLocalMaster(device.id())) { return true; @@ -297,9 +328,8 @@ private boolean isLocalMaster(Device device) { private void startProbeTask() { synchronized (this) { log.info("Starting pipeline probe thread with {} seconds interval...", probeInterval); - task = new InternalTimerTask(); - timer.scheduleAtFixedRate(task, probeInterval * SECONDS, - probeInterval * SECONDS); + poller = eventExecutor.scheduleAtFixedRate(this::triggerCheckAllDevices, probeInterval, + probeInterval, TimeUnit.SECONDS); } } @@ -307,8 +337,8 @@ private void startProbeTask() { private void stopProbeTask() { synchronized (this) { log.info("Stopping pipeline probe thread..."); - task.cancel(); - task = null; + poller.cancel(false); + poller = null; } } @@ -320,13 +350,6 @@ private synchronized void rescheduleProbeTask() { } } - private class InternalTimerTask extends TimerTask { - @Override - public void run() { - triggerCheckAllDevices(); - } - } - /** * Listener of device events used to update the pipeline status. */ @@ -334,47 +357,48 @@ private class InternalDeviceListener implements DeviceListener { @Override public void event(DeviceEvent event) { - final Device device = event.subject(); - switch (event.type()) { - case DEVICE_ADDED: - case DEVICE_UPDATED: - case DEVICE_AVAILABILITY_CHANGED: - if (!deviceService.isAvailable(device.id())) { + eventExecutor.execute(() -> { + final Device device = event.subject(); + switch (event.type()) { + case DEVICE_ADDED: + case DEVICE_UPDATED: + case DEVICE_AVAILABILITY_CHANGED: + // The GeneralDeviceProvider marks online/offline devices that + // have/have not ANY pipeline config set. Here we make sure the + // one configured in the pipeconf service is the expected one. + // Clearly, it would be better to let the GDP do this check and + // avoid sending twice the same message to the switch. + if (!deviceService.isAvailable(device.id())) { + signalStatusUnknown(device.id()); + } else { + filterAndTriggerTasks(singleton(device)); + } + break; + case DEVICE_REMOVED: + case DEVICE_SUSPENDED: signalStatusUnknown(device.id()); - } else { - // The GeneralDeviceProvider marks online devices that - // have ANY pipeline config set. Here we make sure the - // one configured in the pipeconf service is the - // expected one. Clearly, it would be better to let the - // GDP do this check and avoid sending twice the same - // message to the switch. - filterAndTriggerTasks(singleton(device)); - } - break; - case DEVICE_REMOVED: - case DEVICE_SUSPENDED: - signalStatusUnknown(device.id()); - break; - case PORT_ADDED: - case PORT_UPDATED: - case PORT_REMOVED: - case PORT_STATS_UPDATED: - default: - break; - } + signalStatusUnconfigured(device.id()); + break; + case PORT_ADDED: + case PORT_UPDATED: + case PORT_REMOVED: + case PORT_STATS_UPDATED: + default: + break; + } + }); } } private class InternalPipeconfListener implements PiPipeconfListener { @Override public void event(PiPipeconfEvent event) { - pipeconfMappingStore.getDevices(event.subject()) - .forEach(PiPipeconfWatchdogManager.this::triggerProbe); - } - - @Override - public boolean isRelevant(PiPipeconfEvent event) { - return Objects.equals(event.type(), PiPipeconfEvent.Type.REGISTERED); + eventExecutor.execute(() -> { + if (Objects.equals(event.type(), PiPipeconfEvent.Type.REGISTERED)) { + pipeconfMappingStore.getDevices(event.subject()) + .forEach(PiPipeconfWatchdogManager.this::triggerProbe); + } + }); } } diff --git a/core/net/src/main/java/org/onosproject/net/pi/impl/PiReplicationGroupTranslatorImpl.java b/core/net/src/main/java/org/onosproject/net/pi/impl/PiReplicationGroupTranslatorImpl.java index 53fb9d26792..112aab2c2a3 100644 --- a/core/net/src/main/java/org/onosproject/net/pi/impl/PiReplicationGroupTranslatorImpl.java +++ b/core/net/src/main/java/org/onosproject/net/pi/impl/PiReplicationGroupTranslatorImpl.java @@ -16,13 +16,16 @@ package org.onosproject.net.pi.impl; +import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import org.onosproject.net.Device; import org.onosproject.net.PortNumber; import org.onosproject.net.flow.instructions.Instruction; import org.onosproject.net.flow.instructions.Instructions.OutputInstruction; +import org.onosproject.net.flow.instructions.Instructions.TruncateInstruction; import org.onosproject.net.group.Group; +import org.onosproject.net.group.GroupBucket; import org.onosproject.net.group.GroupDescription; import org.onosproject.net.pi.model.PiPipeconf; import org.onosproject.net.pi.model.PiPipelineInterpreter; @@ -69,23 +72,42 @@ static PiPreEntry translate(Group group, PiPipeconf pipeconf, Device device) checkNotNull(group); - final List instructions = group.buckets().buckets().stream() - .flatMap(b -> b.treatment().allInstructions().stream()) - .collect(Collectors.toList()); - - final boolean hasNonOutputInstr = instructions.stream() - .anyMatch(i -> !i.type().equals(Instruction.Type.OUTPUT)); - - if (instructions.size() != group.buckets().buckets().size() - || hasNonOutputInstr) { - throw new PiTranslationException( - "support only groups with just one OUTPUT instruction per bucket"); + final List outInstructions = Lists.newArrayList(); + int truncateMaxLen = PiCloneSessionEntry.DO_NOT_TRUNCATE; + for (GroupBucket bucket : group.buckets().buckets()) { + int numInstructionsInBucket = bucket.treatment().allInstructions().size(); + List outputs = + getInstructions(bucket, Instruction.Type.OUTPUT, OutputInstruction.class); + List truncates = + getInstructions(bucket, Instruction.Type.TRUNCATE, TruncateInstruction.class); + if (outputs.size() != 1) { + throw new PiTranslationException( + "support only groups with just one OUTPUT instruction per bucket"); + } + outInstructions.add(outputs.get(0)); + if (truncates.size() != 0) { + if (group.type() != GroupDescription.Type.CLONE) { + throw new PiTranslationException("only CLONE group support truncate instruction"); + } + if (truncates.size() != 1) { + throw new PiTranslationException( + "support only groups with just one TRUNCATE instruction per bucket"); + } + int truncateInstMaxLen = truncates.get(0).maxLen(); + if (truncateMaxLen != PiCloneSessionEntry.DO_NOT_TRUNCATE && + truncateMaxLen != truncateInstMaxLen) { + throw new PiTranslationException("all TRUNCATE instruction must be the same in a CLONE group"); + } + truncateMaxLen = truncateInstMaxLen; + } else if (truncateMaxLen != PiCloneSessionEntry.DO_NOT_TRUNCATE) { + // No truncate instruction found in this bucket, but previous bucket contains one. + throw new PiTranslationException("all TRUNCATE instruction must be the same in a CLONE group"); + } + if (numInstructionsInBucket != outputs.size() + truncates.size()) { + throw new PiTranslationException("bucket contains unsupported instruction(s)"); + } } - final List outInstructions = instructions.stream() - .map(i -> (OutputInstruction) i) - .collect(Collectors.toList()); - switch (group.type()) { case ALL: return PiMulticastGroupEntry.builder() @@ -96,6 +118,7 @@ static PiPreEntry translate(Group group, PiPipeconf pipeconf, Device device) return PiCloneSessionEntry.builder() .withSessionId(group.id().id()) .addReplicas(getReplicas(outInstructions, device)) + .withMaxPacketLengthBytes(truncateMaxLen) .build(); default: throw new PiTranslationException(format( @@ -133,11 +156,20 @@ private static PortNumber logicalToPipelineSpecific( "missing interpreter, cannot map logical port " + logicalPort.toString()); } final PiPipelineInterpreter interpreter = device.as(PiPipelineInterpreter.class); - Optional mappedPort = interpreter.mapLogicalPortNumber(logicalPort); + Optional mappedPort = interpreter.mapLogicalPort(logicalPort); if (!mappedPort.isPresent()) { throw new PiTranslationException( "interpreter cannot map logical port " + logicalPort.toString()); } return PortNumber.portNumber(mappedPort.get()); } + + private static List getInstructions(GroupBucket bucket, + Instruction.Type type, + Class instructionClass) { + return bucket.treatment().allInstructions().stream() + .filter(i -> i.type() == type) + .map(instructionClass::cast) + .collect(Collectors.toList()); + } } diff --git a/core/net/src/main/java/org/onosproject/net/region/impl/RegionManager.java b/core/net/src/main/java/org/onosproject/net/region/impl/RegionManager.java index c1b932752db..fa27c876a67 100644 --- a/core/net/src/main/java/org/onosproject/net/region/impl/RegionManager.java +++ b/core/net/src/main/java/org/onosproject/net/region/impl/RegionManager.java @@ -139,7 +139,7 @@ public Region createRegion(RegionId regionId, String name, Region.Type type, List> masterNodeIds) { checkNotNull(regionId, REGION_ID_NULL); checkNotNull(name, NAME_NULL); - checkNotNull(name, REGION_TYPE_NULL); + checkNotNull(type, REGION_TYPE_NULL); return store.createRegion(regionId, name, type, genAnnots(regionId), masterNodeIds == null ? of() : masterNodeIds); @@ -150,7 +150,7 @@ public Region updateRegion(RegionId regionId, String name, Region.Type type, List> masterNodeIds) { checkNotNull(regionId, REGION_ID_NULL); checkNotNull(name, NAME_NULL); - checkNotNull(name, REGION_TYPE_NULL); + checkNotNull(type, REGION_TYPE_NULL); return store.updateRegion(regionId, name, type, genAnnots(regionId), masterNodeIds == null ? of() : masterNodeIds); diff --git a/core/net/src/main/java/org/onosproject/net/topology/impl/TopologyManager.java b/core/net/src/main/java/org/onosproject/net/topology/impl/TopologyManager.java index d972601d7ad..280df9ea419 100644 --- a/core/net/src/main/java/org/onosproject/net/topology/impl/TopologyManager.java +++ b/core/net/src/main/java/org/onosproject/net/topology/impl/TopologyManager.java @@ -116,7 +116,7 @@ public Set getClusters(Topology topology) { public TopologyCluster getCluster(Topology topology, ClusterId clusterId) { checkPermission(TOPOLOGY_READ); checkNotNull(topology, TOPOLOGY_NULL); - checkNotNull(topology, CLUSTER_ID_NULL); + checkNotNull(clusterId, CLUSTER_ID_NULL); return store.getCluster(topology, clusterId); } @@ -124,7 +124,7 @@ public TopologyCluster getCluster(Topology topology, ClusterId clusterId) { public Set getClusterDevices(Topology topology, TopologyCluster cluster) { checkPermission(TOPOLOGY_READ); checkNotNull(topology, TOPOLOGY_NULL); - checkNotNull(topology, CLUSTER_NULL); + checkNotNull(cluster, CLUSTER_NULL); return store.getClusterDevices(topology, cluster); } @@ -132,7 +132,7 @@ public Set getClusterDevices(Topology topology, TopologyCluster cluste public Set getClusterLinks(Topology topology, TopologyCluster cluster) { checkPermission(TOPOLOGY_READ); checkNotNull(topology, TOPOLOGY_NULL); - checkNotNull(topology, CLUSTER_NULL); + checkNotNull(cluster, CLUSTER_NULL); return store.getClusterLinks(topology, cluster); } diff --git a/core/net/src/test/java/org/onosproject/app/impl/ApplicationManagerTest.java b/core/net/src/test/java/org/onosproject/app/impl/ApplicationManagerTest.java index 203abb78017..8c835c195a7 100644 --- a/core/net/src/test/java/org/onosproject/app/impl/ApplicationManagerTest.java +++ b/core/net/src/test/java/org/onosproject/app/impl/ApplicationManagerTest.java @@ -85,14 +85,6 @@ private void validate(Application app) { assertEquals("incorrect features", FEATURES, app.features()); } - @Test - public void testGetRegisteredApps() { - mgr.versionService = new TestVersionService(); - Set apps = mgr.getRegisteredApplications(); - System.out.println(apps); - assertFalse("SET contains less Apps than it should", apps.size() < 158); - } - private static class TestVersionService extends VersionServiceAdapter { @Override diff --git a/core/net/src/test/java/org/onosproject/cluster/impl/MastershipManagerTest.java b/core/net/src/test/java/org/onosproject/cluster/impl/MastershipManagerTest.java index 50fc37794fc..2666910ac5b 100644 --- a/core/net/src/test/java/org/onosproject/cluster/impl/MastershipManagerTest.java +++ b/core/net/src/test/java/org/onosproject/cluster/impl/MastershipManagerTest.java @@ -21,6 +21,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; import org.easymock.EasyMock; import org.junit.After; import org.junit.Before; @@ -33,6 +34,7 @@ import org.onosproject.cluster.DefaultControllerNode; import org.onosproject.cluster.NodeId; import org.onosproject.common.event.impl.TestEventDispatcher; +import org.onosproject.mastership.MastershipInfo; import org.onosproject.mastership.MastershipService; import org.onosproject.mastership.MastershipStore; import org.onosproject.mastership.MastershipTermService; @@ -354,6 +356,32 @@ public void balanceWithRegion2() { checkDeviceMasters(deviceIds, expectedMasters); } + @Test + public void demote() { + mgr.setRole(NID1, DID1, MASTER); + mgr.setRole(NID2, DID1, STANDBY); + mgr.setRole(NID3, DID1, STANDBY); + List stdbys = Lists.newArrayList(NID2, NID3); + MastershipInfo mastershipInfo = mgr.getMastershipFor(DID1); + assertTrue(mastershipInfo.master().isPresent()); + assertEquals("wrong role", NID1, mastershipInfo.master().get()); + assertEquals("wrong backups", stdbys, mastershipInfo.backups()); + // No effect, it is the master + mgr.demote(NID1, DID1); + assertEquals("wrong role", NID1, mastershipInfo.master().get()); + assertEquals("wrong backups", stdbys, mastershipInfo.backups()); + // No effect, it is not part of the mastership + mgr.demote(NID4, DID1); + assertEquals("wrong role", NID1, mastershipInfo.master().get()); + assertEquals("wrong backups", stdbys, mastershipInfo.backups()); + // Demote N2 + mgr.demote(NID2, DID1); + stdbys = Lists.newArrayList(NID3, NID2); + mastershipInfo = mgr.getMastershipFor(DID1); + assertEquals("wrong role", NID1, mastershipInfo.master().get()); + assertEquals("wrong backups", stdbys, mastershipInfo.backups()); + } + private void checkDeviceMasters(Set deviceIds, Set expectedMasters) { checkDeviceMasters(deviceIds, expectedMasters, null); } diff --git a/core/net/src/test/java/org/onosproject/net/device/impl/DeviceManagerTest.java b/core/net/src/test/java/org/onosproject/net/device/impl/DeviceManagerTest.java index 3e1e4d1e8fa..7406cf63f49 100644 --- a/core/net/src/test/java/org/onosproject/net/device/impl/DeviceManagerTest.java +++ b/core/net/src/test/java/org/onosproject/net/device/impl/DeviceManagerTest.java @@ -19,8 +19,10 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.onlab.osgi.ComponentContextAdapter; import org.onlab.packet.ChassisId; import org.onlab.packet.IpAddress; +import org.onosproject.cfg.ComponentConfigAdapter; import org.onosproject.cluster.ClusterServiceAdapter; import org.onosproject.cluster.ControllerNode; import org.onosproject.cluster.DefaultControllerNode; @@ -100,6 +102,7 @@ public void setUp() { service = mgr; admin = mgr; registry = mgr; + mgr.cfgService = new ComponentConfigAdapter(); mgr.store = new SimpleDeviceStore(); injectEventDispatcher(mgr, new TestEventDispatcher()); TestMastershipManager mastershipManager = new TestMastershipManager(); @@ -108,7 +111,7 @@ public void setUp() { mgr.clusterService = new TestClusterService(); mgr.networkConfigService = new TestNetworkConfigService(); mgr.communicationService = new TestClusterCommunicationService(); - mgr.activate(); + mgr.activate(new ComponentContextAdapter()); service.addListener(listener); @@ -125,7 +128,7 @@ public void tearDown() { assertFalse("provider should not be registered", registry.getProviders().contains(provider.id())); service.removeListener(listener); - mgr.deactivate(); + mgr.deactivate(new ComponentContextAdapter()); } private void connectDevice(DeviceId deviceId, String swVersion) { @@ -361,6 +364,11 @@ public ControllerNode getLocalNode() { return local; } + @Override + public ControllerNode.State getState(NodeId nodeId) { + return ControllerNode.State.READY; + } + } private class TestNetworkConfigService extends NetworkConfigServiceAdapter { diff --git a/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java b/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java index 38013888336..4be82206761 100644 --- a/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java +++ b/core/net/src/test/java/org/onosproject/net/flow/impl/FlowRuleManagerTest.java @@ -207,7 +207,7 @@ private FlowRule addFlowRule(int hval) { FlowRule rule = flowRule(hval, hval); service.applyFlowRules(rule); - assertNotNull("rule should be found", service.getFlowEntries(DID)); + assertNotNull("rule should be found", service.getFlowEntry(rule)); return rule; } @@ -233,6 +233,24 @@ private int flowCount() { return Sets.newHashSet(service.getFlowEntries(DID)).size(); } + @Test + public void getFlowEntry() { + assertTrue("store should be empty", + Sets.newHashSet(service.getFlowEntries(DID)).isEmpty()); + FlowRule f1 = addFlowRule(1); + FlowRule f2 = addFlowRule(2); + + FlowEntry fe1 = new DefaultFlowEntry(f1); + FlowEntry fe2 = new DefaultFlowEntry(f2); + assertEquals("2 rules should exist", 2, flowCount()); + + FlowEntry actual1 = service.getFlowEntry(f1); + FlowEntry actual2 = service.getFlowEntry(f2); + + assertEquals(fe1, actual1); + assertEquals(fe2, actual2); + } + @Test public void getFlowEntries() { assertTrue("store should be empty", @@ -525,6 +543,14 @@ public Iterable getAvailableDevices() { public Device getDevice(DeviceId deviceId) { return deviceId.equals(FOO_DID) ? FOO_DEV : DEV; } + + @Override + public boolean isAvailable(DeviceId deviceId) { + if (deviceId.equals(DID) || deviceId.equals(FOO_DID)) { + return true; + } + return false; + } } private class TestProvider extends AbstractProvider implements FlowRuleProvider { diff --git a/core/net/src/test/java/org/onosproject/net/host/impl/HostMonitorTest.java b/core/net/src/test/java/org/onosproject/net/host/impl/HostMonitorTest.java index 37ae0d39f44..d492e39f569 100644 --- a/core/net/src/test/java/org/onosproject/net/host/impl/HostMonitorTest.java +++ b/core/net/src/test/java/org/onosproject/net/host/impl/HostMonitorTest.java @@ -126,7 +126,7 @@ private void testMonitorHostExists(IpAddress hostIp) throws Exception { expectLastCall().times(2); replay(hostProvider); - hostMonitor = new HostMonitor(null, hostManager, null, edgePortService); + hostMonitor = new HostMonitor(null, hostManager, null, edgePortService, null); hostMonitor.registerHostProvider(hostProvider); hostMonitor.addMonitoringFor(hostIp); @@ -151,6 +151,7 @@ public void testMonitorIpv4HostDoesNotExist() throws Exception { Port port = createMock(Port.class); expect(port.number()).andReturn(portNum).anyTimes(); + expect(port.isEnabled()).andReturn(true).anyTimes(); replay(port); TestDeviceService deviceService = new TestDeviceService(); @@ -173,7 +174,7 @@ public void testMonitorIpv4HostDoesNotExist() throws Exception { // Run the test - hostMonitor = new HostMonitor(packetService, hostManager, interfaceService, edgePortService); + hostMonitor = new HostMonitor(packetService, hostManager, interfaceService, edgePortService, deviceService); hostMonitor.addMonitoringFor(TARGET_IPV4_ADDR); hostMonitor.run(); @@ -220,6 +221,7 @@ public void testMonitorIpv6HostDoesNotExist() throws Exception { Port port = createMock(Port.class); expect(port.number()).andReturn(portNum).anyTimes(); + expect(port.isEnabled()).andReturn(true).anyTimes(); replay(port); TestDeviceService deviceService = new TestDeviceService(); @@ -242,7 +244,7 @@ public void testMonitorIpv6HostDoesNotExist() throws Exception { // Run the test - hostMonitor = new HostMonitor(packetService, hostManager, interfaceService, edgePortService); + hostMonitor = new HostMonitor(packetService, hostManager, interfaceService, edgePortService, deviceService); hostMonitor.addMonitoringFor(TARGET_IPV6_ADDR); hostMonitor.run(); @@ -291,6 +293,7 @@ public void testMonitorIpv4HostDoesNotExistWithVlan() throws Exception { Port port = createMock(Port.class); expect(port.number()).andReturn(portNum).anyTimes(); + expect(port.isEnabled()).andReturn(true).anyTimes(); replay(port); TestDeviceService deviceService = new TestDeviceService(); @@ -313,7 +316,7 @@ public void testMonitorIpv4HostDoesNotExistWithVlan() throws Exception { // Run the test - hostMonitor = new HostMonitor(packetService, hostManager, interfaceService, edgePortService); + hostMonitor = new HostMonitor(packetService, hostManager, interfaceService, edgePortService, deviceService); hostMonitor.addMonitoringFor(TARGET_IPV4_ADDR); hostMonitor.run(); @@ -361,6 +364,7 @@ public void testMonitorIpv6HostDoesNotExistWithVlan() throws Exception { Port port = createMock(Port.class); expect(port.number()).andReturn(portNum).anyTimes(); + expect(port.isEnabled()).andReturn(true).anyTimes(); replay(port); TestDeviceService deviceService = new TestDeviceService(); @@ -383,7 +387,7 @@ public void testMonitorIpv6HostDoesNotExistWithVlan() throws Exception { // Run the test - hostMonitor = new HostMonitor(packetService, hostManager, interfaceService, edgePortService); + hostMonitor = new HostMonitor(packetService, hostManager, interfaceService, edgePortService, deviceService); hostMonitor.addMonitoringFor(TARGET_IPV6_ADDR); hostMonitor.run(); @@ -451,5 +455,12 @@ public List getPorts(DeviceId deviceId) { } return ports; } + + @Override + public Port getPort(ConnectPoint cp) { + return devicePorts.get(cp.deviceId()).stream() + .filter(p -> p.number().equals(cp.port())) + .findAny().orElse(null); + } } } diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java index 14fb3803708..db92800ee53 100644 --- a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java +++ b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java @@ -32,6 +32,7 @@ import org.onosproject.common.event.impl.TestEventDispatcher; import org.onosproject.core.ApplicationId; import org.onosproject.core.impl.TestCoreManager; +import org.onosproject.net.NetTestTools; import org.onosproject.net.NetworkResource; import org.onosproject.net.flow.FlowRuleOperations; import org.onosproject.net.flow.FlowRuleOperationsContext; @@ -557,8 +558,8 @@ public void testIntentFetching() { intents = Lists.newArrayList(service.getIntents()); assertThat(intents, hasSize(0)); - final MockIntent intent1 = new MockIntent(MockIntent.nextId()); - final MockIntent intent2 = new MockIntent(MockIntent.nextId()); + final MockIntent intent1 = new MockIntent(MockIntent.nextId(), NetTestTools.APP_ID); + final MockIntent intent2 = new MockIntent(MockIntent.nextId(), NetTestTools.APP_ID_2); listener.setLatch(2, Type.INSTALL_REQ); listener.setLatch(2, Type.INSTALLED); @@ -575,6 +576,15 @@ public void testIntentFetching() { assertThat(intents, hasIntentWithId(intent1.id())); assertThat(intents, hasIntentWithId(intent2.id())); verifyState(); + + List intentsAppId = Lists.newArrayList(service.getIntentsByAppId(NetTestTools.APP_ID)); + assertThat(intentsAppId, hasSize(1)); + assertThat(intentsAppId, hasIntentWithId(intent1.id())); + + List intentsAppId2 = Lists.newArrayList(service.getIntentsByAppId(NetTestTools.APP_ID_2)); + assertThat(intentsAppId2, hasSize(1)); + assertThat(intentsAppId2, hasIntentWithId(intent2.id())); + verifyState(); } /** diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/installer/FlowRuleIntentInstallerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/installer/FlowRuleIntentInstallerTest.java index 712f8bfe631..5c00a8387d7 100644 --- a/core/net/src/test/java/org/onosproject/net/intent/impl/installer/FlowRuleIntentInstallerTest.java +++ b/core/net/src/test/java/org/onosproject/net/intent/impl/installer/FlowRuleIntentInstallerTest.java @@ -26,10 +26,13 @@ import org.onlab.packet.VlanId; import org.onosproject.cfg.ComponentConfigService; import org.onosproject.net.ConnectPoint; +import org.onosproject.net.DeviceId; import org.onosproject.net.NetworkResource; +import org.onosproject.net.flow.DefaultFlowEntry; import org.onosproject.net.flow.DefaultFlowRule; import org.onosproject.net.flow.DefaultTrafficSelector; import org.onosproject.net.flow.DefaultTrafficTreatment; +import org.onosproject.net.flow.FlowEntry; import org.onosproject.net.flow.FlowRule; import org.onosproject.net.flow.FlowRuleOperation; import org.onosproject.net.flow.FlowRuleOperations; @@ -141,6 +144,8 @@ public void testUninstallOnly() { IntentInstallationContext context = new IntentInstallationContext(toUninstall, toInstall); operationContext = new IntentOperationContext(intentsToUninstall, intentsToInstall, context); + flowRuleService.load(operationContext.intentsToUninstall()); + installer.apply(operationContext); IntentOperationContext successContext = intentInstallCoordinator.successContext; @@ -155,6 +160,36 @@ public void testUninstallOnly() { assertEquals(expectedFlowRules, flowRuleService.flowRulesRemove); } + /** + * Uninstalls Intents only, no Intents to be install. However, the flow rules do not exist + * in the FlowRuleService. + */ + @Test + public void testUninstallOnlyMissing() { + List intentsToInstall = Lists.newArrayList(); + List intentsToUninstall = createFlowRuleIntents(); + + IntentData toInstall = null; + IntentData toUninstall = new IntentData(createP2PIntent(), + IntentState.WITHDRAWING, + new WallClockTimestamp()); + toUninstall = IntentData.compiled(toUninstall, intentsToUninstall); + + + IntentOperationContext operationContext; + IntentInstallationContext context = new IntentInstallationContext(toUninstall, toInstall); + operationContext = new IntentOperationContext(intentsToUninstall, intentsToInstall, context); + + installer.apply(operationContext); + + IntentOperationContext successContext = intentInstallCoordinator.successContext; + assertEquals(successContext, operationContext); + + assertEquals(0, flowRuleService.flowRulesRemove.size()); + assertEquals(0, flowRuleService.flowRulesAdd.size()); + assertEquals(0, flowRuleService.flowRulesModify.size()); + } + /** * Do both install and uninstall Intents with different flow rules. */ @@ -176,6 +211,8 @@ public void testUninstallAndInstall() { IntentInstallationContext context = new IntentInstallationContext(toUninstall, toInstall); operationContext = new IntentOperationContext(intentsToUninstall, intentsToInstall, context); + flowRuleService.load(operationContext.intentsToUninstall()); + installer.apply(operationContext); IntentOperationContext successContext = intentInstallCoordinator.successContext; @@ -198,6 +235,46 @@ public void testUninstallAndInstall() { assertEquals(expectedFlowRules, flowRuleService.flowRulesAdd); } + /** + * Do both install and uninstall Intents with different flow rules. However, the flow rules do not exist + * in the FlowRuleService. + */ + @Test + public void testUninstallAndInstallMissing() { + List intentsToInstall = createAnotherFlowRuleIntents(); + List intentsToUninstall = createFlowRuleIntents(); + + IntentData toInstall = new IntentData(createP2PIntent(), + IntentState.INSTALLING, + new WallClockTimestamp()); + toInstall = IntentData.compiled(toInstall, intentsToInstall); + IntentData toUninstall = new IntentData(createP2PIntent(), + IntentState.INSTALLED, + new WallClockTimestamp()); + toUninstall = IntentData.compiled(toUninstall, intentsToUninstall); + + IntentOperationContext operationContext; + IntentInstallationContext context = new IntentInstallationContext(toUninstall, toInstall); + operationContext = new IntentOperationContext(intentsToUninstall, intentsToInstall, context); + + installer.apply(operationContext); + + IntentOperationContext successContext = intentInstallCoordinator.successContext; + assertEquals(successContext, operationContext); + + Set expectedFlowRules = Sets.newHashSet(); + + assertEquals(expectedFlowRules, flowRuleService.flowRulesRemove); + + expectedFlowRules = intentsToInstall.stream() + .map(intent -> (FlowRuleIntent) intent) + .map(FlowRuleIntent::flowRules) + .flatMap(Collection::stream) + .collect(Collectors.toSet()); + + assertEquals(expectedFlowRules, flowRuleService.flowRulesAdd); + } + /** * Do both install and uninstall Intents with same flow rules. */ @@ -219,6 +296,8 @@ public void testUninstallAndInstallUnchanged() { IntentInstallationContext context = new IntentInstallationContext(toUninstall, toInstall); operationContext = new IntentOperationContext(intentsToUninstall, intentsToInstall, context); + flowRuleService.load(operationContext.intentsToUninstall()); + installer.apply(operationContext); IntentOperationContext successContext = intentInstallCoordinator.successContext; @@ -229,6 +308,38 @@ public void testUninstallAndInstallUnchanged() { assertEquals(0, flowRuleService.flowRulesModify.size()); } + /** + * Do both install and uninstall Intents with same flow rules. However, the flow rules do not exist + * in the FlowRuleService. + */ + @Test + public void testUninstallAndInstallUnchangedMissing() { + List intentsToInstall = createFlowRuleIntents(); + List intentsToUninstall = createFlowRuleIntents(); + + IntentData toInstall = new IntentData(createP2PIntent(), + IntentState.INSTALLING, + new WallClockTimestamp()); + toInstall = IntentData.compiled(toInstall, intentsToInstall); + IntentData toUninstall = new IntentData(createP2PIntent(), + IntentState.INSTALLED, + new WallClockTimestamp()); + toUninstall = IntentData.compiled(toUninstall, intentsToUninstall); + + IntentOperationContext operationContext; + IntentInstallationContext context = new IntentInstallationContext(toUninstall, toInstall); + operationContext = new IntentOperationContext(intentsToUninstall, intentsToInstall, context); + + installer.apply(operationContext); + + IntentOperationContext successContext = intentInstallCoordinator.successContext; + assertEquals(successContext, operationContext); + + assertEquals(0, flowRuleService.flowRulesRemove.size()); + assertEquals(1, flowRuleService.flowRulesAdd.size()); + assertEquals(0, flowRuleService.flowRulesModify.size()); + } + /** * Do both install and uninstall Intents with same flow rule Intent. */ @@ -250,6 +361,8 @@ public void testUninstallAndInstallSame() { IntentInstallationContext context = new IntentInstallationContext(toUninstall, toInstall); operationContext = new IntentOperationContext(intentsToUninstall, intentsToInstall, context); + flowRuleService.load(operationContext.intentsToUninstall()); + installer.apply(operationContext); IntentOperationContext successContext = intentInstallCoordinator.successContext; @@ -260,6 +373,38 @@ public void testUninstallAndInstallSame() { assertEquals(0, flowRuleService.flowRulesModify.size()); } + /** + * Do both install and uninstall Intents with same flow rule Intent. However, the flow rules do not exist + * in the FlowRuleService. + */ + @Test + public void testUninstallAndInstallSameMissing() { + List intentsToInstall = createFlowRuleIntents(); + List intentsToUninstall = intentsToInstall; + + IntentData toInstall = new IntentData(createP2PIntent(), + IntentState.INSTALLING, + new WallClockTimestamp()); + toInstall = IntentData.compiled(toInstall, intentsToInstall); + IntentData toUninstall = new IntentData(createP2PIntent(), + IntentState.INSTALLED, + new WallClockTimestamp()); + toUninstall = IntentData.compiled(toUninstall, intentsToUninstall); + + IntentOperationContext operationContext; + IntentInstallationContext context = new IntentInstallationContext(toUninstall, toInstall); + operationContext = new IntentOperationContext(intentsToUninstall, intentsToInstall, context); + + installer.apply(operationContext); + + IntentOperationContext successContext = intentInstallCoordinator.successContext; + assertEquals(successContext, operationContext); + + assertEquals(0, flowRuleService.flowRulesRemove.size()); + assertEquals(1, flowRuleService.flowRulesAdd.size()); + assertEquals(0, flowRuleService.flowRulesModify.size()); + } + /** * Nothing to uninstall or install. */ @@ -327,6 +472,8 @@ public void testRuleModify() { IntentInstallationContext context = new IntentInstallationContext(toUninstall, toInstall); operationContext = new IntentOperationContext(intentsToUninstall, intentsToInstall, context); + flowRuleService.load(operationContext.intentsToUninstall()); + installer.apply(operationContext); IntentOperationContext successContext = intentInstallCoordinator.successContext; @@ -341,6 +488,42 @@ public void testRuleModify() { assertTrue(flowRuleService.flowRulesModify.containsAll(installedIntent.flowRules())); } + /** + * Test intents with same match rules, should do modify instead of add. However, the flow rules do not exist + * in the FlowRuleService. + */ + @Test + public void testRuleModifyMissing() { + List intentsToInstall = createFlowRuleIntents(); + List intentsToUninstall = createFlowRuleIntentsWithSameMatch(); + + IntentData toInstall = new IntentData(createP2PIntent(), + IntentState.INSTALLING, + new WallClockTimestamp()); + toInstall = IntentData.compiled(toInstall, intentsToInstall); + IntentData toUninstall = new IntentData(createP2PIntent(), + IntentState.INSTALLED, + new WallClockTimestamp()); + toUninstall = IntentData.compiled(toUninstall, intentsToUninstall); + + IntentOperationContext operationContext; + IntentInstallationContext context = new IntentInstallationContext(toUninstall, toInstall); + operationContext = new IntentOperationContext(intentsToUninstall, intentsToInstall, context); + + installer.apply(operationContext); + + IntentOperationContext successContext = intentInstallCoordinator.successContext; + assertEquals(successContext, operationContext); + + assertEquals(0, flowRuleService.flowRulesRemove.size()); + assertEquals(1, flowRuleService.flowRulesAdd.size()); + assertEquals(0, flowRuleService.flowRulesModify.size()); + + FlowRuleIntent installedIntent = (FlowRuleIntent) intentsToInstall.get(0); + assertEquals(flowRuleService.flowRulesAdd.size(), installedIntent.flowRules().size()); + assertTrue(flowRuleService.flowRulesAdd.containsAll(installedIntent.flowRules())); + } + /** * Testing the non-disruptive reallocation. */ @@ -690,15 +873,43 @@ public List createAnotherFlowRuleIntentsNonDisruptive() { return flowRuleIntents; } + + /** * The FlowRuleService for test; always success for any flow rule operations. */ class TestFlowRuleService extends FlowRuleServiceAdapter { + Set flowEntries = Sets.newHashSet(); Set flowRulesAdd = Sets.newHashSet(); Set flowRulesModify = Sets.newHashSet(); Set flowRulesRemove = Sets.newHashSet(); + @Override + public FlowEntry getFlowEntry(FlowRule flowRule) { + for (FlowEntry entry : flowEntries) { + if (entry.id().equals(flowRule.id()) && entry.deviceId().equals(flowRule.deviceId())) { + return entry; + } + } + return null; + } + + @Override + public Iterable getFlowEntries(DeviceId deviceId) { + return flowEntries.stream() + .filter(flow -> flow.deviceId().equals(deviceId)) + .collect(Collectors.toList()); + } + + public void load(List intents) { + for (FlowRuleIntent flowRuleIntent : intents) { + for (FlowRule flowRule : flowRuleIntent.flowRules()) { + flowEntries.add(new DefaultFlowEntry(flowRule, FlowEntry.FlowEntryState.ADDED)); + } + } + } + public void record(FlowRuleOperations ops) { flowRulesAdd.clear(); flowRulesRemove.clear(); @@ -706,12 +917,15 @@ public void record(FlowRuleOperations ops) { stage.forEach(op -> { switch (op.type()) { case ADD: + flowEntries.add(new DefaultFlowEntry(op.rule(), FlowEntry.FlowEntryState.ADDED)); flowRulesAdd.add(op.rule()); break; case REMOVE: + flowEntries.remove(new DefaultFlowEntry(op.rule(), FlowEntry.FlowEntryState.ADDED)); flowRulesRemove.add(op.rule()); break; case MODIFY: + flowEntries.add(new DefaultFlowEntry(op.rule(), FlowEntry.FlowEntryState.ADDED)); flowRulesModify.add(op.rule()); default: break; diff --git a/core/net/src/test/java/org/onosproject/net/mcast/impl/MulticastRouteManagerTest.java b/core/net/src/test/java/org/onosproject/net/mcast/impl/MulticastRouteManagerTest.java index f5b26c27462..9272668a762 100644 --- a/core/net/src/test/java/org/onosproject/net/mcast/impl/MulticastRouteManagerTest.java +++ b/core/net/src/test/java/org/onosproject/net/mcast/impl/MulticastRouteManagerTest.java @@ -34,6 +34,7 @@ import org.onosproject.net.mcast.McastRoute; import org.onosproject.store.service.TestStorageService; +import java.util.Arrays; import java.util.List; import static junit.framework.Assert.fail; @@ -141,13 +142,13 @@ public void testRemoveSink() { private void validateEvents(McastEvent.Type... evs) { if (events.size() != evs.length) { fail(String.format("Mismatch number of events# obtained -> %s : expected %s", - events, evs)); + events, Arrays.toString(evs))); } for (int i = 0; i < evs.length; i++) { if (evs[i] != events.get(i).type()) { fail(String.format("Mismatched events# obtained -> %s : expected %s", - events, evs)); + events, Arrays.toString(evs))); } } } diff --git a/core/net/src/test/java/org/onosproject/net/meter/impl/MeterManagerTest.java b/core/net/src/test/java/org/onosproject/net/meter/impl/MeterManagerTest.java index 52970dd2b3b..8e5e33b8a5a 100644 --- a/core/net/src/test/java/org/onosproject/net/meter/impl/MeterManagerTest.java +++ b/core/net/src/test/java/org/onosproject/net/meter/impl/MeterManagerTest.java @@ -57,6 +57,7 @@ import org.onosproject.net.meter.DefaultMeterFeatures; import org.onosproject.net.meter.DefaultMeterRequest; import org.onosproject.net.meter.Meter; +import org.onosproject.net.meter.MeterCellId; import org.onosproject.net.meter.MeterFeatures; import org.onosproject.net.meter.MeterId; import org.onosproject.net.meter.MeterOperation; @@ -66,9 +67,11 @@ import org.onosproject.net.meter.MeterProviderRegistry; import org.onosproject.net.meter.MeterProviderService; import org.onosproject.net.meter.MeterRequest; -import org.onosproject.net.meter.MeterService; +import org.onosproject.net.meter.MeterScope; import org.onosproject.net.meter.MeterState; import org.onosproject.net.pi.PiPipeconfServiceAdapter; +import org.onosproject.net.pi.model.PiMeterId; +import org.onosproject.net.pi.runtime.PiMeterCellId; import org.onosproject.net.provider.AbstractProvider; import org.onosproject.net.provider.ProviderId; import org.onosproject.store.meter.impl.DistributedMeterStore; @@ -88,6 +91,7 @@ import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.replay; +import static org.easymock.EasyMock.reset; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -97,20 +101,17 @@ import static org.onosproject.net.NetTestTools.APP_ID; import static org.onosproject.net.NetTestTools.did; import static org.onosproject.net.NetTestTools.injectEventDispatcher; +import static org.onosproject.net.OsgiPropertyConstants.MM_USER_DEFINED_INDEX; /** * Meter manager tests. */ public class MeterManagerTest { - // Test node id private static final NodeId NID_LOCAL = new NodeId("local"); - - // Test ip address private static final IpAddress LOCALHOST = IpAddress.valueOf("127.0.0.1"); private static final ProviderId PID = new ProviderId("of", "foo"); - private static final ProviderId PROGRAMMABLE_PROVIDER = new ProviderId("foo", "foo"); private static final DeviceId PROGRAMMABLE_DID = DeviceId.deviceId("test:002"); @@ -121,43 +122,23 @@ public class MeterManagerTest { new DefaultDevice(PROGRAMMABLE_PROVIDER, PROGRAMMABLE_DID, Device.Type.SWITCH, "", "", "", "", null, ANNOTATIONS); - private MeterService service; - - // Test Driver service used during the tests - private DriverManager driverService; - - // Test device service used during the tests - private DeviceService deviceService; - - // Test provider used during the tests private TestProvider provider; - - // Meter manager private MeterManager manager; - - // Meter provider registry private MeterProviderRegistry registry; - - // Meter provider service private MeterProviderService providerService; - - // Store under testing private DistributedMeterStore meterStore; - // Device ids used during the tests private DeviceId did1 = did("1"); private DeviceId did2 = did("2"); - // Meter ids used during the tests private MeterId mid1 = MeterId.meterId(1); + private MeterCellId cid0 = PiMeterCellId.ofIndirect(PiMeterId.of("foo"), 0L); - // Bands used during the tests private static Band b1 = DefaultBand.builder() .ofType(Band.Type.DROP) .withRate(500) .build(); - // Meters used during the tests private Meter m1 = DefaultMeter.builder() .forDevice(did1) .fromApp(APP_ID) @@ -172,7 +153,6 @@ public class MeterManagerTest { .withUnit(Meter.Unit.KB_PER_SEC) .withBands(Collections.singletonList(b1)) .build(); - private static Meter mProgrammable = DefaultMeter.builder() .forDevice(PROGRAMMABLE_DID) .fromApp(APP_ID) @@ -180,8 +160,21 @@ public class MeterManagerTest { .withUnit(Meter.Unit.KB_PER_SEC) .withBands(Collections.singletonList(b1)) .build(); + private static Meter mProgrammable2 = DefaultMeter.builder() + .forDevice(PROGRAMMABLE_DID) + .fromApp(APP_ID) + .withId(MeterId.meterId(2)) + .withUnit(Meter.Unit.KB_PER_SEC) + .withBands(Collections.singletonList(b1)) + .build(); + private static Meter mUserDefined = DefaultMeter.builder() + .forDevice(PROGRAMMABLE_DID) + .fromApp(APP_ID) + .withCellId(PiMeterCellId.ofIndirect(PiMeterId.of("foo"), 0L)) + .withUnit(Meter.Unit.KB_PER_SEC) + .withBands(Collections.singletonList(b1)) + .build(); - // Meter requests used during the tests private MeterRequest.Builder m1Request = DefaultMeterRequest.builder() .forDevice(did1) .fromApp(APP_ID) @@ -192,14 +185,24 @@ public class MeterManagerTest { .fromApp(APP_ID) .withUnit(Meter.Unit.KB_PER_SEC) .withBands(Collections.singletonList(b1)); - private MeterRequest.Builder mProgrammableRequest = DefaultMeterRequest.builder() .forDevice(PROGRAMMABLE_DID) .fromApp(APP_ID) .withUnit(Meter.Unit.KB_PER_SEC) .withBands(Collections.singletonList(b1)); + private MeterRequest.Builder mProgrammableRequest2 = DefaultMeterRequest.builder() + .forDevice(PROGRAMMABLE_DID) + .fromApp(APP_ID) + .withUnit(Meter.Unit.KB_PER_SEC) + .withBands(Collections.singletonList(b1)); + private MeterRequest.Builder userDefinedRequest = DefaultMeterRequest.builder() + .forDevice(PROGRAMMABLE_DID) + .fromApp(APP_ID) + .withUnit(Meter.Unit.KB_PER_SEC) + .withBands(Collections.singletonList(b1)) + .withScope(MeterScope.of("foo")) + .withIndex(0L); - // Meter features used during the tests private MeterFeatures mef1 = DefaultMeterFeatures.builder().forDevice(did1) .withMaxMeters(3L) .withBandTypes(new HashSet<>()) @@ -218,184 +221,266 @@ public class MeterManagerTest { .withMaxBands((byte) 0) .withMaxColors((byte) 0) .build(); + private MeterFeatures programmableMef1 = DefaultMeterFeatures.builder().forDevice(PROGRAMMABLE_DID) + .withStartIndex(1) + .withEndIndex(10L) + .withBandTypes(new HashSet<>()) + .withUnits(new HashSet<>()) + .hasStats(false) + .hasBurst(false) + .withMaxBands((byte) 0) + .withMaxColors((byte) 0) + .build(); + private MeterFeatures programmableMef2 = DefaultMeterFeatures.builder().forDevice(PROGRAMMABLE_DID) + .withStartIndex(0) + .withEndIndex(10L) + .withScope(MeterScope.of("foo")) + .withBandTypes(new HashSet<>()) + .withUnits(new HashSet<>()) + .hasStats(false) + .hasBurst(false) + .withMaxBands((byte) 0) + .withMaxColors((byte) 0) + .build(); + private ComponentContext componentContext = EasyMock.createMock(ComponentContext.class); @Before public void setup() { - //Init step for the deviceService - deviceService = new TestDeviceService(); - //Init step for the driver registry and driver service. + DeviceService deviceService = new TestDeviceService(); DriverRegistryManager driverRegistry = new DriverRegistryManager(); - driverService = new TestDriverManager(driverRegistry, deviceService, new NetworkConfigServiceAdapter()); + DriverManager driverService = new TestDriverManager(driverRegistry, deviceService, + new NetworkConfigServiceAdapter()); driverRegistry.addDriver(new DefaultDriver("foo", ImmutableList.of(), "", "", "", ImmutableMap.of(MeterProgrammable.class, TestMeterProgrammable.class, MeterQuery.class, TestMeterQuery.class), ImmutableMap.of())); - - // Init step for the store meterStore = new DistributedMeterStore(); - // Let's initialize some internal services of the store TestUtils.setField(meterStore, "storageService", new TestStorageService()); TestUtils.setField(meterStore, "driverService", driverService); - - // Inject TestApplicationId into the DistributedMeterStore serializer KryoNamespace.Builder testKryoBuilder = TestUtils.getField(meterStore, "APP_KRYO_BUILDER"); testKryoBuilder.register(TestApplicationId.class); Serializer testSerializer = Serializer.using(Lists.newArrayList(testKryoBuilder.build())); TestUtils.setField(meterStore, "serializer", testSerializer); - // Activate the store meterStore.activate(); - // Init step for the manager + manager = new MeterManager(); - // Let's initialize some internal services of the manager TestUtils.setField(manager, "store", meterStore); injectEventDispatcher(manager, new TestEventDispatcher()); manager.deviceService = deviceService; manager.mastershipService = new TestMastershipService(); manager.cfgService = new ComponentConfigAdapter(); manager.clusterService = new TestClusterService(); - // Init the reference of the registry registry = manager; - manager.driverService = driverService; - // Activate the manager Dictionary cfgDict = new Hashtable<>(); - ComponentContext componentContext = EasyMock.createMock(ComponentContext.class); expect(componentContext.getProperties()).andReturn(cfgDict); replay(componentContext); manager.activate(componentContext); - // Initialize the test provider provider = new TestProvider(PID); - // Register the provider against the manager providerService = registry.register(provider); - // Verify register assertTrue("provider should be registered", registry.getProviders().contains(provider.id())); } @After public void tearDown() { - // Unregister provider registry.unregister(provider); - // Verify unregister assertFalse("provider should not be registered", registry.getProviders().contains(provider.id())); - // Deactivate manager manager.deactivate(); - // Remove event dispatcher injectEventDispatcher(manager, null); - // Deactivate store meterStore.deactivate(); } + // Store meter features for all the devices private void initMeterStore() { - // Let's store feature for device 1 meterStore.storeMeterFeatures(mef1); - // Let's store feature for device 2 meterStore.storeMeterFeatures(mef2); + meterStore.storeMeterFeatures(programmableMef1); + meterStore.storeMeterFeatures(programmableMef2); } // Emulate metrics coming from the dataplane private void pushMetrics(MeterOperation.Type type, Meter meter) { - // If it is an add operation if (type == MeterOperation.Type.ADD) { - // Update state to added ((DefaultMeter) meter).setState(MeterState.ADDED); - // Push the update in the store providerService.pushMeterMetrics(meter.deviceId(), Collections.singletonList(meter)); } else { providerService.pushMeterMetrics(meter.deviceId(), Collections.emptyList()); } } + /** + * Verify enabling user defined index mode in meter service. + */ + @Test + public void testEnableUserDefinedIndex() { + reset(componentContext); + Dictionary cfgDict = new Hashtable<>(); + cfgDict.put(MM_USER_DEFINED_INDEX, true); + expect(componentContext.getProperties()).andReturn(cfgDict); + replay(componentContext); + + Object returnValue = TestUtils.callMethod(manager, "readComponentConfiguration", + ComponentContext.class, componentContext); + assertNull(returnValue); + assertTrue(manager.userDefinedIndex); + } + + /** + * Verify disabling user defined index mode in meter service. + */ + @Test + public void testDisableUserDefinedIndex() { + testEnableUserDefinedIndex(); + + reset(componentContext); + Dictionary cfgDict = new Hashtable<>(); + cfgDict.put(MM_USER_DEFINED_INDEX, false); + expect(componentContext.getProperties()).andReturn(cfgDict); + replay(componentContext); + + Object returnValue = TestUtils.callMethod(manager, "readComponentConfiguration", + ComponentContext.class, componentContext); + assertNull(returnValue); + assertFalse(manager.userDefinedIndex); + } + /** * Test add meter. */ @Test public void testAdd() { - // Init store initMeterStore(); - // Submit meter request manager.submit(m1Request.add()); - // Verify add + assertEquals("The meter was not added", 1, manager.getAllMeters().size()); assertEquals("The meter was not added", 1, manager.getMeters(did1).size()); - // Get Meter Meter installingMeter = manager.getMeter(did1, mid1); - // Verify add of installingMeter and pending add state assertThat(installingMeter, is(m1)); - // Verify pending add state assertThat(installingMeter.state(), is(MeterState.PENDING_ADD)); - // Let's simulate a working data-plane + pushMetrics(MeterOperation.Type.ADD, installingMeter); - // Get meter + Meter installedMeter = manager.getMeter(did1, mid1); - // Verify installation assertThat(installedMeter.state(), is(MeterState.ADDED)); assertEquals("The meter was not installed", 1, manager.getAllMeters().size()); assertEquals("The meter was not installed", 1, manager.getMeters(did1).size()); } + /** + * Test add meter with user defined index. + */ + @Test + public void testAddWithUserDefinedIndex() { + initMeterStore(); + testEnableUserDefinedIndex(); + + manager.submit(userDefinedRequest.add()); + assertEquals("The meter was not added", 1, manager.getAllMeters().size()); + assertEquals("The meter was not added", 1, manager.getMeters(PROGRAMMABLE_DID).size()); + Meter installingMeter = manager.getMeter(PROGRAMMABLE_DID, cid0); + assertThat(installingMeter, is(mUserDefined)); + assertThat(installingMeter.state(), is(MeterState.PENDING_ADD)); + + pushMetrics(MeterOperation.Type.ADD, installingMeter); + Meter installedMeter = manager.getMeter(PROGRAMMABLE_DID, cid0); + assertThat(installedMeter.state(), is(MeterState.ADDED)); + assertEquals("The meter was not installed", 1, manager.getAllMeters().size()); + assertEquals("The meter was not installed", 1, manager.getMeters(PROGRAMMABLE_DID).size()); + } + + /** + * Test wrong add meter. + */ + @Test(expected = IllegalArgumentException.class) + public void testWrongAdd() { + initMeterStore(); + + manager.submit(userDefinedRequest.add()); + } + + /** + * Test wrong add meter in user defined index mode. + */ + @Test(expected = IllegalArgumentException.class) + public void testWrongAddInUserDefinedIndexMode() { + initMeterStore(); + testEnableUserDefinedIndex(); + + manager.submit(m1Request.add()); + } + /** * Test remove meter. */ @Test public void testRemove() { - // Init store initMeterStore(); - // Submit meter request manager.submit(m1Request.add()); - // Withdraw meter manager.withdraw(m1Request.remove(), m1.id()); - // Get Meter + Meter withdrawingMeter = manager.getMeter(did1, mid1); - // Verify withdrawing assertThat(withdrawingMeter.state(), is(MeterState.PENDING_REMOVE)); assertEquals("The meter was not withdrawn", 1, manager.getAllMeters().size()); assertEquals("The meter was not withdrawn", 1, manager.getMeters(did1).size()); - // Let's simulate a working data-plane + pushMetrics(MeterOperation.Type.REMOVE, withdrawingMeter); - // Verify withdrawn assertNull(manager.getMeter(did1, mid1)); assertEquals("The meter was not removed", 0, manager.getAllMeters().size()); assertEquals("The meter was not removed", 0, manager.getMeters(did1).size()); } /** - * Test add multiple device. + * Test remove meter in user defined index mode. + */ + @Test + public void testRemoveInUserDefinedIndexMode() { + initMeterStore(); + testEnableUserDefinedIndex(); + + manager.submit(userDefinedRequest.add()); + + manager.withdraw(userDefinedRequest.remove(), cid0); + Meter withdrawingMeter = manager.getMeter(PROGRAMMABLE_DID, cid0); + assertThat(withdrawingMeter.state(), is(MeterState.PENDING_REMOVE)); + assertEquals("The meter was not withdrawn", 1, manager.getAllMeters().size()); + assertEquals("The meter was not withdrawn", 1, manager.getMeters(PROGRAMMABLE_DID).size()); + + pushMetrics(MeterOperation.Type.REMOVE, withdrawingMeter); + assertNull(manager.getMeter(PROGRAMMABLE_DID, cid0)); + assertEquals("The meter was not removed", 0, manager.getAllMeters().size()); + assertEquals("The meter was not removed", 0, manager.getMeters(PROGRAMMABLE_DID).size()); + } + + /** + * Test add multiple devices. */ @Test public void testAddMultipleDevice() { - // Init store initMeterStore(); - // Submit meter 1 manager.submit(m1Request.add()); - // Submit meter 2 manager.submit(m2Request.add()); - // Verify add + assertEquals("The meter was not added", 2, manager.getAllMeters().size()); assertEquals("The meter was not added", 1, manager.getMeters(did1).size()); assertEquals("The meter was not added", 1, manager.getMeters(did2).size()); - // Get Meters Meter installingMeter1 = manager.getMeter(did1, mid1); Meter installingMeter2 = manager.getMeter(did2, mid1); - // Verify add of installingMeter assertThat(installingMeter1, is(m1)); assertThat(installingMeter2, is(m2)); - // Verify pending add state assertThat(installingMeter1.state(), is(MeterState.PENDING_ADD)); assertThat(installingMeter2.state(), is(MeterState.PENDING_ADD)); - // Let's simulate a working data-plane + pushMetrics(MeterOperation.Type.ADD, installingMeter1); pushMetrics(MeterOperation.Type.ADD, installingMeter2); - // Get meter Meter installedMeter1 = manager.getMeter(did1, mid1); Meter installedMeter2 = manager.getMeter(did2, mid1); - // Verify installation assertThat(installedMeter1.state(), is(MeterState.ADDED)); assertThat(installedMeter2.state(), is(MeterState.ADDED)); assertEquals("The meter was not installed", 2, manager.getAllMeters().size()); @@ -404,33 +489,26 @@ public void testAddMultipleDevice() { } /** - * Test remove meter. + * Test remove multiple devices. */ @Test public void testRemoveMultipleDevice() { - // Init store initMeterStore(); - // Submit meter 1 manager.submit(m1Request.add()); - // Submit meter 2 manager.submit(m2Request.add()); - // Withdraw meter manager.withdraw(m1Request.remove(), m1.id()); - // Withdraw meter manager.withdraw(m2Request.remove(), m2.id()); - // Get Meters + Meter withdrawingMeter1 = manager.getMeter(did1, mid1); Meter withdrawingMeter2 = manager.getMeter(did2, mid1); - // Verify withdrawing assertThat(withdrawingMeter1.state(), is(MeterState.PENDING_REMOVE)); assertThat(withdrawingMeter2.state(), is(MeterState.PENDING_REMOVE)); assertEquals("The meter was not withdrawn", 2, manager.getAllMeters().size()); assertEquals("The meter was not withdrawn", 1, manager.getMeters(did1).size()); assertEquals("The meter was not withdrawn", 1, manager.getMeters(did2).size()); - // Let's simulate a working data-plane + pushMetrics(MeterOperation.Type.REMOVE, withdrawingMeter1); pushMetrics(MeterOperation.Type.REMOVE, withdrawingMeter2); - // Verify withdrawn assertNull(manager.getMeter(did1, mid1)); assertNull(manager.getMeter(did2, mid1)); assertEquals("The meter was not removed", 0, manager.getAllMeters().size()); @@ -443,40 +521,43 @@ public void testRemoveMultipleDevice() { */ @Test public void testPurge() { - // Init store initMeterStore(); - // Submit meter request manager.submit(m1Request.add()); - // Verify submit + Meter submittingMeter = manager.getMeter(did1, mid1); assertThat(submittingMeter.state(), is(MeterState.PENDING_ADD)); assertEquals("The meter was not added", 1, manager.getAllMeters().size()); assertEquals("The meter was not added", 1, manager.getMeters(did1).size()); - // Purge the meters + manager.purgeMeters(did1); - // Verify purge assertNull(manager.getMeter(did1, mid1)); assertEquals("The meter was not purged", 0, manager.getAllMeters().size()); assertEquals("The meter was not purged", 0, manager.getMeters(did1).size()); } + /** + * Test submit for programmable devices. + */ @Test public void testAddFromMeterProgrammable() { - // Init store initMeterStore(); manager.submit(mProgrammableRequest.add()); + TestTools.assertAfter(500, () -> { assertEquals("The meter was not added", 1, manager.getAllMeters().size()); assertThat(manager.getMeter(PROGRAMMABLE_DID, MeterId.meterId(1)), is(mProgrammable)); }); } + /** + * Test batch submission for meter programmable. + */ @Test public void testAddBatchFromMeterProgrammable() { - // Init store initMeterStore(); List operations = ImmutableList.of(new MeterOperation(mProgrammable, MeterOperation.Type.ADD)); manager.defaultProvider().performMeterOperation(PROGRAMMABLE_DID, new MeterOperations(operations)); + TestTools.assertAfter(500, () -> { assertEquals("The meter was not added", 1, meterOperations.size()); assertEquals("Wrong Meter Operation", meterOperations.get(0).meter().id(), mProgrammable.id()); @@ -484,13 +565,16 @@ public void testAddBatchFromMeterProgrammable() { } + /** + * Verify get from meter programmable. + */ @Test public void testGetFromMeterProgrammable() { - // Init store initMeterStore(); MeterDriverProvider fallback = (MeterDriverProvider) manager.defaultProvider(); testAddFromMeterProgrammable(); fallback.init(manager.deviceService, fallback.meterProviderService, manager.mastershipService, 1); + TestTools.assertAfter(2000, () -> { assertEquals("The meter was not added", 1, manager.getAllMeters().size()); Meter m = manager.getMeters(PROGRAMMABLE_DID).iterator().next(); @@ -498,7 +582,89 @@ public void testGetFromMeterProgrammable() { }); } - // Test cluster service + /** + * Verify installation of missing meters when using meter programmable devices. + */ + @Test + public void testMissingFromMeterProgrammable() { + // Workaround when running the tests all together + meterOperations.clear(); + testGetFromMeterProgrammable(); + + assertThat(meterOperations.size(), is(1)); + manager.submit(mProgrammableRequest2.add()); + TestTools.assertAfter(500, () -> { + assertEquals("The meter was not added", 2, manager.getAllMeters().size()); + assertThat(manager.getMeter(PROGRAMMABLE_DID, MeterId.meterId(2)), is(mProgrammable2)); + assertThat(meterOperations.size(), is(2)); + assertThat(meterOperations.get(meterOperations.size() - 1), is(new MeterOperation(mProgrammable2, + MeterOperation.Type.ADD))); + }); + + TestTools.assertAfter(2000, () -> { + assertEquals("The meter was not added", 2, manager.getAllMeters().size()); + Meter pendingMeter = manager.getMeter(PROGRAMMABLE_DID, MeterId.meterId(2)); + assertThat(pendingMeter, is(mProgrammable2)); + assertEquals("incorrect state", MeterState.PENDING_ADD, pendingMeter.state()); + assertThat(meterOperations.size(), is(3)); + assertThat(meterOperations.get(meterOperations.size() - 1), is(new MeterOperation(mProgrammable2, + MeterOperation.Type.ADD))); + }); + } + + /** + * Verify removal of unknown meters when using meter programmable devices. + */ + @Test + public void testUnknownFromMeterProgrammable() { + meterOperations.clear(); + testGetFromMeterProgrammable(); + TestMeterProgrammable.unknownMeter = true; + + assertThat(meterOperations.size(), is(1)); + TestTools.assertAfter(2000, () -> { + assertEquals("The meter was not added", 1, manager.getAllMeters().size()); + Meter pendingMeter = manager.getMeter(PROGRAMMABLE_DID, MeterId.meterId(2)); + assertNull(pendingMeter); + assertThat(meterOperations.size(), is(2)); + assertThat(meterOperations.get(meterOperations.size() - 1), is(new MeterOperation(mProgrammable2, + MeterOperation.Type.REMOVE))); + }); + } + + /** + * Verify removal of meters when using meter programmable devices. + */ + @Test + public void testRemoveFromMeterProgrammable() { + testEnableUserDefinedIndex(); + initMeterStore(); + MeterDriverProvider fallback = (MeterDriverProvider) manager.defaultProvider(); + fallback.init(manager.deviceService, fallback.meterProviderService, manager.mastershipService, 1); + + manager.submit(mProgrammableRequest2.withIndex(2L).add()); + TestTools.assertAfter(500, () -> { + assertEquals("The meter was not added", 1, manager.getAllMeters().size()); + Meter pendingMeter = manager.getMeter(PROGRAMMABLE_DID, MeterId.meterId(2)); + assertThat(pendingMeter, is(mProgrammable2)); + assertEquals("incorrect state", MeterState.PENDING_ADD, pendingMeter.state()); + }); + + manager.withdraw(mProgrammableRequest2.remove(), MeterId.meterId(2)); + TestTools.assertAfter(500, () -> { + assertEquals("The meter was not withdrawn", 1, manager.getAllMeters().size()); + Meter pendingMeter = manager.getMeter(PROGRAMMABLE_DID, MeterId.meterId(2)); + assertThat(pendingMeter, is(mProgrammable2)); + assertEquals("incorrect state", MeterState.PENDING_REMOVE, pendingMeter.state()); + }); + + TestTools.assertAfter(2000, () -> { + assertEquals("The meter was not removed", 0, manager.getAllMeters().size()); + Meter pendingMeter = manager.getMeter(PROGRAMMABLE_DID, MeterId.meterId(2)); + assertNull(pendingMeter); + }); + } + private final class TestClusterService extends ClusterServiceAdapter { private ControllerNode local = new DefaultControllerNode(NID_LOCAL, LOCALHOST); @@ -563,6 +729,8 @@ public long getMaxMeters() { public static class TestMeterProgrammable extends AbstractHandlerBehaviour implements MeterProgrammable { + private static boolean unknownMeter; + @Override public CompletableFuture performMeterOperation(MeterOperation meterOp) { return CompletableFuture.completedFuture(meterOperations.add(meterOp)); @@ -570,10 +738,22 @@ public CompletableFuture performMeterOperation(MeterOperation meterOp) @Override public CompletableFuture> getMeters() { - //ADD METER + // ADD METER + Collection meters = Lists.newArrayList(); DefaultMeter mProgrammableAdded = (DefaultMeter) mProgrammable; mProgrammableAdded.setState(MeterState.ADDED); - return CompletableFuture.completedFuture(ImmutableList.of(mProgrammableAdded)); + meters.add(mProgrammableAdded); + if (unknownMeter) { + DefaultMeter mProgrammable2Added = (DefaultMeter) mProgrammable2; + mProgrammable2Added.setState(MeterState.ADDED); + meters.add(mProgrammable2Added); + } + return CompletableFuture.completedFuture(meters); + } + + @Override + public CompletableFuture> getMeterFeatures() { + return CompletableFuture.completedFuture(Collections.emptySet()); } } @@ -585,16 +765,15 @@ protected TestProvider(ProviderId id) { @Override public void performMeterOperation(DeviceId deviceId, MeterOperations meterOps) { - //Currently unused. + } @Override public void performMeterOperation(DeviceId deviceId, MeterOperation meterOp) { - //Currently unused + } } - // Test mastership service private final class TestMastershipService extends MastershipServiceAdapter { @Override public NodeId getMasterFor(DeviceId deviceId) { diff --git a/core/net/src/test/java/org/onosproject/net/pi/impl/PiCriterionTranslatorsTest.java b/core/net/src/test/java/org/onosproject/net/pi/impl/PiCriterionTranslatorsTest.java index ee27ef2a244..ce3584f732b 100644 --- a/core/net/src/test/java/org/onosproject/net/pi/impl/PiCriterionTranslatorsTest.java +++ b/core/net/src/test/java/org/onosproject/net/pi/impl/PiCriterionTranslatorsTest.java @@ -319,7 +319,7 @@ public void testMplsBosCriterion() throws Exception { @Test public void testMplsCriterion() throws Exception { - MplsLabel mplsLabel = MplsLabel.mplsLabel(random.nextInt(2 ^ 20)); + MplsLabel mplsLabel = MplsLabel.mplsLabel(random.nextInt(1 << 20)); int bitWidth = 32; MplsCriterion criterion = (MplsCriterion) Criteria.matchMplsLabel(mplsLabel); @@ -357,9 +357,9 @@ public void testPbbIsidCriterion() throws Exception { @Test public void testSctpPortCriterion() throws Exception { - TpPort value1 = TpPort.tpPort(random.nextInt(2 ^ 16)); - TpPort value2 = TpPort.tpPort(random.nextInt(2 ^ 16)); - TpPort mask = TpPort.tpPort(random.nextInt(2 ^ 16)); + TpPort value1 = TpPort.tpPort(random.nextInt(1 << 16)); + TpPort value2 = TpPort.tpPort(random.nextInt(1 << 16)); + TpPort mask = TpPort.tpPort(random.nextInt(1 << 16)); int bitWidth = 16; @@ -377,7 +377,7 @@ public void testSctpPortCriterion() throws Exception { @Test public void testTcpFlagsCriterion() throws Exception { - int pbbIsid = random.nextInt(2 ^ 12); + int pbbIsid = random.nextInt(1 << 12); int bitWidth = 12; TcpFlagsCriterion criterion = (TcpFlagsCriterion) Criteria.matchTcpFlags(pbbIsid); @@ -389,9 +389,9 @@ public void testTcpFlagsCriterion() throws Exception { @Test public void testTcpPortCriterion() throws Exception { - TpPort value1 = TpPort.tpPort(random.nextInt(2 ^ 16)); - TpPort value2 = TpPort.tpPort(random.nextInt(2 ^ 16)); - TpPort mask = TpPort.tpPort(random.nextInt(2 ^ 16)); + TpPort value1 = TpPort.tpPort(random.nextInt(1 << 16)); + TpPort value2 = TpPort.tpPort(random.nextInt(1 << 16)); + TpPort mask = TpPort.tpPort(random.nextInt(1 << 16)); int bitWidth = 16; diff --git a/core/net/src/test/java/org/onosproject/net/pi/impl/PiFlowRuleTranslatorAdapter.java b/core/net/src/test/java/org/onosproject/net/pi/impl/PiFlowRuleTranslatorAdapter.java new file mode 100644 index 00000000000..07f47b160b3 --- /dev/null +++ b/core/net/src/test/java/org/onosproject/net/pi/impl/PiFlowRuleTranslatorAdapter.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.pi.impl; + +import com.google.common.collect.Maps; +import org.onosproject.net.flow.FlowRule; +import org.onosproject.net.pi.model.PiPipeconf; +import org.onosproject.net.pi.runtime.PiHandle; +import org.onosproject.net.pi.runtime.PiTableEntry; +import org.onosproject.net.pi.service.PiFlowRuleTranslator; +import org.onosproject.net.pi.service.PiTranslatedEntity; +import org.onosproject.net.pi.service.PiTranslationException; + +import java.util.Map; +import java.util.Optional; + +/** + * Adapter implementation of PiFlowRuleTranslator. + */ +public class PiFlowRuleTranslatorAdapter implements PiFlowRuleTranslator { + + private final Map> store = Maps.newHashMap(); + + @Override + public PiTableEntry translate(FlowRule original, PiPipeconf pipeconf) throws PiTranslationException { + // NOTE Passing device equals to null is meant only for testing purposes + return PiFlowRuleTranslatorImpl.translate(original, pipeconf, null); + } + + @Override + public void learn(PiHandle handle, PiTranslatedEntity entity) { + store.put(handle, entity); + } + + @Override + public Optional> lookup(PiHandle handle) { + return Optional.ofNullable(store.get(handle)); + } + + @Override + public void forget(PiHandle handle) { + store.remove(handle); + } +} diff --git a/core/net/src/test/java/org/onosproject/net/pi/impl/PiGroupTranslatorAdapter.java b/core/net/src/test/java/org/onosproject/net/pi/impl/PiGroupTranslatorAdapter.java new file mode 100644 index 00000000000..66383b3c763 --- /dev/null +++ b/core/net/src/test/java/org/onosproject/net/pi/impl/PiGroupTranslatorAdapter.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.pi.impl; + +import com.google.common.collect.Maps; +import org.onosproject.net.group.Group; +import org.onosproject.net.pi.model.PiPipeconf; +import org.onosproject.net.pi.runtime.PiActionProfileGroup; +import org.onosproject.net.pi.runtime.PiHandle; +import org.onosproject.net.pi.service.PiGroupTranslator; +import org.onosproject.net.pi.service.PiTranslatedEntity; +import org.onosproject.net.pi.service.PiTranslationException; + +import java.util.Map; +import java.util.Optional; + +/** + * Adapter implementation of PiGroupTranslator. + */ +public class PiGroupTranslatorAdapter implements PiGroupTranslator { + + private final Map> store = Maps.newHashMap(); + + @Override + public PiActionProfileGroup translate(Group original, PiPipeconf pipeconf) throws PiTranslationException { + // NOTE Passing device equals to null is meant only for testing purposes + return PiGroupTranslatorImpl.translate(original, pipeconf, null); + } + + @Override + public void learn(PiHandle handle, PiTranslatedEntity entity) { + store.put(handle, entity); + } + + @Override + public Optional> lookup(PiHandle handle) { + return Optional.ofNullable(store.get(handle)); + } + + @Override + public void forget(PiHandle handle) { + store.remove(handle); + } +} diff --git a/core/net/src/test/java/org/onosproject/net/pi/impl/PiReplicationGroupTranslatorAdapter.java b/core/net/src/test/java/org/onosproject/net/pi/impl/PiReplicationGroupTranslatorAdapter.java new file mode 100644 index 00000000000..8f6f48614b5 --- /dev/null +++ b/core/net/src/test/java/org/onosproject/net/pi/impl/PiReplicationGroupTranslatorAdapter.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.net.pi.impl; + +import com.google.common.collect.Maps; +import org.onosproject.net.group.Group; +import org.onosproject.net.pi.model.PiPipeconf; +import org.onosproject.net.pi.runtime.PiHandle; +import org.onosproject.net.pi.runtime.PiPreEntry; +import org.onosproject.net.pi.service.PiReplicationGroupTranslator; +import org.onosproject.net.pi.service.PiTranslatedEntity; +import org.onosproject.net.pi.service.PiTranslationException; + +import java.util.Map; +import java.util.Optional; + +/** + * Adapter implementation of PiGroupTranslator. + */ +public class PiReplicationGroupTranslatorAdapter implements PiReplicationGroupTranslator { + + private final Map> store = Maps.newHashMap(); + + @Override + public PiPreEntry translate(Group original, PiPipeconf pipeconf) throws PiTranslationException { + // NOTE Passing device equals to null is meant only for testing purposes + return PiReplicationGroupTranslatorImpl.translate(original, pipeconf, null); + } + + @Override + public void learn(PiHandle handle, PiTranslatedEntity entity) { + store.put(handle, entity); + } + + @Override + public Optional> lookup(PiHandle handle) { + return Optional.ofNullable(store.get(handle)); + } + + @Override + public void forget(PiHandle handle) { + store.remove(handle); + } +} diff --git a/core/net/src/test/java/org/onosproject/net/pi/impl/PiReplicationGroupTranslatorImplTest.java b/core/net/src/test/java/org/onosproject/net/pi/impl/PiReplicationGroupTranslatorImplTest.java index 8ca78cfa568..00ad506df54 100644 --- a/core/net/src/test/java/org/onosproject/net/pi/impl/PiReplicationGroupTranslatorImplTest.java +++ b/core/net/src/test/java/org/onosproject/net/pi/impl/PiReplicationGroupTranslatorImplTest.java @@ -19,6 +19,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.testing.EqualsTester; +import org.junit.Assert; import org.junit.Test; import org.onosproject.TestApplicationId; import org.onosproject.core.ApplicationId; @@ -40,6 +41,7 @@ import org.onosproject.net.pi.runtime.PiMulticastGroupEntry; import org.onosproject.net.pi.runtime.PiPreEntry; import org.onosproject.net.pi.runtime.PiPreReplica; +import org.onosproject.net.pi.service.PiTranslationException; import java.util.List; import java.util.Set; @@ -57,21 +59,75 @@ public class PiReplicationGroupTranslatorImplTest { private static final GroupId GROUP_ID = GroupId.valueOf(ENTRY_ID); private static final GroupKey GROUP_KEY = new DefaultGroupKey( String.valueOf(GROUP_ID.id()).getBytes()); + private static final int TRUNCATE_MAC_LEN = 1400; private static final List BUCKET_LIST = ImmutableList.of( allOutputBucket(1), allOutputBucket(2), allOutputBucket(3)); - private static final List CLONE_BUCKET_LIST = ImmutableList.of( - cloneOutputBucket(1), - cloneOutputBucket(2), - cloneOutputBucket(3)); private static final List BUCKET_LIST_2 = ImmutableList.of( allOutputBucket(1), allOutputBucket(2), allOutputBucket(2), allOutputBucket(3), allOutputBucket(3)); + private static final List CLONE_BUCKET_LIST = ImmutableList.of( + cloneOutputBucket(1), + cloneOutputBucket(2), + cloneOutputBucket(3)); + private static final List CLONE_BUCKET_LIST_2 = ImmutableList.of( + cloneOutputBucket(1, TRUNCATE_MAC_LEN), + cloneOutputBucket(2, TRUNCATE_MAC_LEN), + cloneOutputBucket(3, TRUNCATE_MAC_LEN)); + private static final List INVALID_BUCKET_LIST = ImmutableList.of( + DefaultGroupBucket.createAllGroupBucket( + DefaultTrafficTreatment.emptyTreatment() + ) + ); + // This is invalid since we can only use truncate instruction in a clone group. + private static final List INVALID_BUCKET_LIST_2 = ImmutableList.of( + DefaultGroupBucket.createAllGroupBucket( + DefaultTrafficTreatment.builder() + .setOutput(PortNumber.portNumber(1)) + .truncate(TRUNCATE_MAC_LEN) + .build() + ) + ); + // Unsupported instruction. + private static final List INVALID_BUCKET_LIST_3 = ImmutableList.of( + DefaultGroupBucket.createAllGroupBucket( + DefaultTrafficTreatment.builder() + .setOutput(PortNumber.portNumber(1)) + .popVlan() + .build() + ) + ); + private static final List INVALID_CLONE_BUCKET_LIST = ImmutableList.of( + DefaultGroupBucket.createCloneGroupBucket( + DefaultTrafficTreatment.emptyTreatment() + ) + ); + // This is invalid since all truncate instruction must be the same. + private static final List INVALID_CLONE_BUCKET_LIST_2 = ImmutableList.of( + cloneOutputBucket(1, TRUNCATE_MAC_LEN), + cloneOutputBucket(2, TRUNCATE_MAC_LEN + 1) + ); + // This is invalid since only one truncate instruction is allowed per bucket. + private static final List INVALID_CLONE_BUCKET_LIST_3 = ImmutableList.of( + DefaultGroupBucket.createCloneGroupBucket( + DefaultTrafficTreatment.builder() + .setOutput(PortNumber.portNumber(1)) + .truncate(TRUNCATE_MAC_LEN) + .truncate(TRUNCATE_MAC_LEN) + .build() + ) + ); + // Inconsistent truncate instructions. + private static final List INVALID_CLONE_BUCKET_LIST_4 = ImmutableList.of( + cloneOutputBucket(1, TRUNCATE_MAC_LEN), + cloneOutputBucket(2, TRUNCATE_MAC_LEN), + cloneOutputBucket(3) + ); private static final Set REPLICAS = ImmutableSet.of( new PiPreReplica(PortNumber.portNumber(1), 0), @@ -89,32 +145,34 @@ public class PiReplicationGroupTranslatorImplTest { .withGroupId(GROUP_ID.id()) .addReplicas(REPLICAS) .build(); + private static final PiMulticastGroupEntry PI_MULTICAST_GROUP_2 = + PiMulticastGroupEntry.builder() + .withGroupId(GROUP_ID.id()) + .addReplicas(REPLICAS_2) + .build(); private static final PiCloneSessionEntry PI_CLONE_SESSION_ENTRY = PiCloneSessionEntry.builder() .withSessionId(ENTRY_ID) .addReplicas(REPLICAS) .build(); - private static final PiMulticastGroupEntry PI_MULTICAST_GROUP_2 = - PiMulticastGroupEntry.builder() - .withGroupId(GROUP_ID.id()) - .addReplicas(REPLICAS_2) + private static final PiCloneSessionEntry PI_CLONE_SESSION_ENTRY_2 = + PiCloneSessionEntry.builder() + .withSessionId(ENTRY_ID) + .addReplicas(REPLICAS) + .withMaxPacketLengthBytes(TRUNCATE_MAC_LEN) .build(); - private static final GroupBuckets BUCKETS = new GroupBuckets(BUCKET_LIST); - private static final GroupBuckets CLONE_BUCKETS = new GroupBuckets(CLONE_BUCKET_LIST); - private static final GroupBuckets BUCKETS_2 = new GroupBuckets(BUCKET_LIST_2); - - private static final GroupDescription ALL_GROUP_DESC = new DefaultGroupDescription( - DEVICE_ID, ALL, BUCKETS, GROUP_KEY, GROUP_ID.id(), APP_ID); - private static final Group ALL_GROUP = new DefaultGroup(GROUP_ID, ALL_GROUP_DESC); - - private static final GroupDescription CLONE_GROUP_DESC = new DefaultGroupDescription( - DEVICE_ID, CLONE, CLONE_BUCKETS, GROUP_KEY, GROUP_ID.id(), APP_ID); - private static final Group CLONE_GROUP = new DefaultGroup(GROUP_ID, CLONE_GROUP_DESC); - - private static final GroupDescription ALL_GROUP_DESC_2 = new DefaultGroupDescription( - DEVICE_ID, ALL, BUCKETS_2, GROUP_KEY, GROUP_ID.id(), APP_ID); - private static final Group ALL_GROUP_2 = new DefaultGroup(GROUP_ID, ALL_GROUP_DESC_2); + private static final Group ALL_GROUP = createGroup(BUCKET_LIST, ALL); + private static final Group ALL_GROUP_2 = createGroup(BUCKET_LIST_2, ALL); + private static final Group CLONE_GROUP = createGroup(CLONE_BUCKET_LIST, CLONE); + private static final Group CLONE_GROUP_2 = createGroup(CLONE_BUCKET_LIST_2, CLONE); + private static final Group INVALID_ALL_GROUP = createGroup(INVALID_BUCKET_LIST, ALL); + private static final Group INVALID_ALL_GROUP_2 = createGroup(INVALID_BUCKET_LIST_2, ALL); + private static final Group INVALID_ALL_GROUP_3 = createGroup(INVALID_BUCKET_LIST_3, ALL); + private static final Group INVALID_CLONE_GROUP = createGroup(INVALID_CLONE_BUCKET_LIST, CLONE); + private static final Group INVALID_CLONE_GROUP_2 = createGroup(INVALID_CLONE_BUCKET_LIST_2, CLONE); + private static final Group INVALID_CLONE_GROUP_3 = createGroup(INVALID_CLONE_BUCKET_LIST_3, CLONE); + private static final Group INVALID_CLONE_GROUP_4 = createGroup(INVALID_CLONE_BUCKET_LIST_4, CLONE); private static GroupBucket allOutputBucket(int portNum) { @@ -131,20 +189,96 @@ private static GroupBucket cloneOutputBucket(int portNum) { return DefaultGroupBucket.createCloneGroupBucket(treatment); } + private static GroupBucket cloneOutputBucket(int portNum, int truncateMaxLen) { + TrafficTreatment treatment = DefaultTrafficTreatment.builder() + .setOutput(PortNumber.portNumber(portNum)) + .truncate(truncateMaxLen) + .build(); + return DefaultGroupBucket.createCloneGroupBucket(treatment); + } + + private static Group createGroup(List bucketList, GroupDescription.Type type) { + final GroupBuckets buckets = new GroupBuckets(bucketList); + final GroupDescription groupDesc = new DefaultGroupDescription( + DEVICE_ID, type, buckets, GROUP_KEY, GROUP_ID.id(), APP_ID); + return new DefaultGroup(GROUP_ID, groupDesc); + } + @Test public void testTranslatePreGroups() throws Exception { - PiPreEntry multicastGroup = PiReplicationGroupTranslatorImpl .translate(ALL_GROUP, null, null); PiPreEntry multicastGroup2 = PiReplicationGroupTranslatorImpl .translate(ALL_GROUP_2, null, null); PiPreEntry cloneSessionEntry = PiReplicationGroupTranslatorImpl .translate(CLONE_GROUP, null, null); + PiPreEntry cloneSessionEntry2 = PiReplicationGroupTranslatorImpl + .translate(CLONE_GROUP_2, null, null); new EqualsTester() .addEqualityGroup(multicastGroup, PI_MULTICAST_GROUP) .addEqualityGroup(multicastGroup2, PI_MULTICAST_GROUP_2) .addEqualityGroup(cloneSessionEntry, PI_CLONE_SESSION_ENTRY) + .addEqualityGroup(cloneSessionEntry2, PI_CLONE_SESSION_ENTRY_2) .testEquals(); } + + @Test + public void testInvalidPreGroups() { + try { + PiReplicationGroupTranslatorImpl + .translate(INVALID_ALL_GROUP, null, null); + Assert.fail("Did not get expected exception."); + } catch (PiTranslationException ex) { + Assert.assertEquals("support only groups with just one OUTPUT instruction per bucket", ex.getMessage()); + } + + try { + PiReplicationGroupTranslatorImpl + .translate(INVALID_ALL_GROUP_2, null, null); + Assert.fail("Did not get expected exception."); + } catch (PiTranslationException ex) { + Assert.assertEquals("only CLONE group support truncate instruction", ex.getMessage()); + } + + try { + PiReplicationGroupTranslatorImpl + .translate(INVALID_ALL_GROUP_3, null, null); + Assert.fail("Did not get expected exception."); + } catch (PiTranslationException ex) { + Assert.assertEquals("bucket contains unsupported instruction(s)", ex.getMessage()); + } + + try { + PiReplicationGroupTranslatorImpl + .translate(INVALID_CLONE_GROUP, null, null); + Assert.fail("Did not get expected exception."); + } catch (PiTranslationException ex) { + Assert.assertEquals("support only groups with just one OUTPUT instruction per bucket", ex.getMessage()); + } + + try { + PiReplicationGroupTranslatorImpl + .translate(INVALID_CLONE_GROUP_2, null, null); + Assert.fail("Did not get expected exception."); + } catch (PiTranslationException ex) { + Assert.assertEquals("all TRUNCATE instruction must be the same in a CLONE group", ex.getMessage()); + } + + try { + PiReplicationGroupTranslatorImpl + .translate(INVALID_CLONE_GROUP_3, null, null); + Assert.fail("Did not get expected exception."); + } catch (PiTranslationException ex) { + Assert.assertEquals("support only groups with just one TRUNCATE instruction per bucket", ex.getMessage()); + } + + try { + PiReplicationGroupTranslatorImpl + .translate(INVALID_CLONE_GROUP_4, null, null); + Assert.fail("Did not get expected exception."); + } catch (PiTranslationException ex) { + Assert.assertEquals("all TRUNCATE instruction must be the same in a CLONE group", ex.getMessage()); + } + } } diff --git a/core/protobuf/models/proto/net/meter/MeterEnumsProto.proto b/core/protobuf/models/proto/net/meter/MeterEnumsProto.proto index 1b0bbf5cc5b..63a35b6e768 100644 --- a/core/protobuf/models/proto/net/meter/MeterEnumsProto.proto +++ b/core/protobuf/models/proto/net/meter/MeterEnumsProto.proto @@ -28,6 +28,11 @@ enum MeterUnitProto { * Kilo bits per second. */ KB_PER_SEC = 1; + + /** + * Bytes per second. + */ + BYTES_PER_SEC = 2; } enum MeterStateProto { @@ -45,11 +50,6 @@ enum MeterStateProto { * The meter is in the process of being removed. */ PENDING_REMOVE = 2; - - /** - * The meter has been removed. - */ - REMOVED = 3; } enum MeterRequestTypeProto { diff --git a/core/protobuf/models/src/main/java/org/onosproject/incubator/protobuf/models/net/meter/MeterEnumsProtoTranslator.java b/core/protobuf/models/src/main/java/org/onosproject/incubator/protobuf/models/net/meter/MeterEnumsProtoTranslator.java index b73117c0c59..bb416de84f8 100644 --- a/core/protobuf/models/src/main/java/org/onosproject/incubator/protobuf/models/net/meter/MeterEnumsProtoTranslator.java +++ b/core/protobuf/models/src/main/java/org/onosproject/incubator/protobuf/models/net/meter/MeterEnumsProtoTranslator.java @@ -42,6 +42,8 @@ public static Optional translate(MeterEnumsProto.MeterUnitProto unit return Optional.of(Meter.Unit.PKTS_PER_SEC); case KB_PER_SEC: return Optional.of(Meter.Unit.KB_PER_SEC); + case BYTES_PER_SEC: + return Optional.of(Meter.Unit.BYTES_PER_SEC); default: log.warn("Unrecognized MeterUnit gRPC message: {}", unit); return Optional.empty(); @@ -60,6 +62,8 @@ public static MeterEnumsProto.MeterUnitProto translate(Meter.Unit unit) { return MeterEnumsProto.MeterUnitProto.PKTS_PER_SEC; case KB_PER_SEC: return MeterEnumsProto.MeterUnitProto.KB_PER_SEC; + case BYTES_PER_SEC: + return MeterEnumsProto.MeterUnitProto.BYTES_PER_SEC; default: log.warn("Unrecognized MeterUnit ONOS message: {}", unit); return MeterEnumsProto.MeterUnitProto.UNRECOGNIZED; @@ -80,8 +84,6 @@ public static MeterEnumsProto.MeterStateProto translate(MeterState meterState) { return MeterEnumsProto.MeterStateProto.ADDED; case PENDING_REMOVE: return MeterEnumsProto.MeterStateProto.PENDING_REMOVE; - case REMOVED: - return MeterEnumsProto.MeterStateProto.REMOVED; default: log.warn("Unrecognized MeterState ONOS message: {}", meterState); return MeterEnumsProto.MeterStateProto.UNRECOGNIZED; diff --git a/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java b/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java index 2737b586647..79e19b9e71f 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java @@ -153,6 +153,9 @@ public enum InternalState { private ApplicationId coreAppId; + // Apps started in this node. + private final Set localStartedApps = Sets.newConcurrentHashSet(); + @Activate public void activate() { messageHandlingExecutor = newSingleThreadExecutor(groupedThreads("onos/store/app", @@ -184,6 +187,12 @@ public void activate() { .withCompatibilityFunction(this::convertApplication) .build(); + /* To update the version in application store if it does not matche with the local system. + This will happen only when upgrading onos using issu or during rollback if upgrade does not work. + */ + apps.asJavaMap().forEach((appId, holder) -> apps.asJavaMap() + .put(appId, convertApplication(holder, versionService.version()))); + appActivationTopic = storageService.topicBuilder() .withName("onos-apps-activation-topic") .withSerializer(Serializer.using(KryoNamespaces.API)) @@ -212,13 +221,20 @@ public void activate() { } /** - * Converts the versions of stored applications propagated from the prior version to the local application versions. + * Converts the version of the application in store to the version of the local application. */ private InternalApplicationHolder convertApplication(InternalApplicationHolder appHolder, Version version) { // Load the application description from disk. If the version doesn't match the persisted // version, update the stored application with the new version. - ApplicationDescription appDesc = getApplicationDescription(appHolder.app.id().name()); - if (!appDesc.version().equals(appHolder.app().version())) { + ApplicationDescription appDesc = null; + try { + appDesc = getApplicationDescription(appHolder.app.id().name()); + } catch (ApplicationException e) { + // If external application is not present then just ignore it as it will be installed from other onos nodes + log.warn("Application : {} not found in disk", appHolder.app.id().name()); + } + if (appDesc != null && !appDesc.version().equals(appHolder.app().version())) { + log.info("Updating app version to : {} in store for app : {}", appDesc.version(), appHolder.app.id()); Application newApplication = DefaultApplication.builder(appDesc) .withAppId(appHolder.app.id()) .build(); @@ -247,6 +263,7 @@ private Application convertApplication(Application app, Version version) { * Downloads any missing bits for installed applications. */ private void downloadMissingApplications() { + log.info("Going to download missing applications"); apps.asJavaMap().forEach((appId, holder) -> fetchBitsIfNeeded(holder.app)); } @@ -254,6 +271,7 @@ private void downloadMissingApplications() { * Activates applications that should be activated according to the distributed store. */ private void activateExistingApplications() { + log.info("Going to activate existing applications"); getApplicationNames().forEach(appName -> { // Only update the application version if the application has already been installed. ApplicationId appId = getId(appName); @@ -261,10 +279,16 @@ private void activateExistingApplications() { ApplicationDescription appDesc = getApplicationDescription(appName); InternalApplicationHolder appHolder = Versioned.valueOrNull(apps.get(appId)); + if (appHolder != null && appHolder.state == ACTIVATED) { + log.debug("App name and version from local system : {}, {}", appDesc.name(), appDesc.version()); + log.debug("App name and version from app store : {}, {}", appHolder.app.id(), + appHolder.app().version()); + } // If the application has already been activated, set the local state to active. if (appHolder != null && appDesc.version().equals(appHolder.app().version()) && appHolder.state == ACTIVATED) { + log.info("Going to activate app : {}", appHolder.app.id()); setActive(appName); updateTime(appName); } @@ -453,6 +477,9 @@ private void activate(ApplicationId appId, ApplicationId forAppId) { private void activate(ApplicationId appId, boolean updateTime) { Versioned vAppHolder = apps.get(appId); if (vAppHolder != null) { + if (log.isTraceEnabled()) { + log.trace("Activating {}", appId); + } if (updateTime) { updateTime(appId.name()); } @@ -531,6 +558,9 @@ public void setPermissions(ApplicationId appId, Set permissions) { return new InternalApplicationHolder(v.app(), v.state(), ImmutableSet.copyOf(permissions)); }); if (permissionsChanged.get()) { + if (log.isTraceEnabled()) { + log.trace("Permission changed for {}", appId); + } notifyDelegate(new ApplicationEvent(APP_PERMISSIONS_CHANGED, appHolder.value().app())); } } @@ -544,10 +574,21 @@ private class AppActivator implements Consumer { @Override public void accept(Application app) { if (app != null) { // FIXME: Once ONOS-6977 is fixed + if (log.isTraceEnabled()) { + log.trace("Received an activation for {}", app.id()); + } String appName = app.id().name(); installAppIfNeeded(app); setActive(appName); - notifyDelegate(new ApplicationEvent(APP_ACTIVATED, app)); + boolean ready = localStartedApps.containsAll(app.requiredApps()); + if (ready && delegate != null) { + notifyDelegate(new ApplicationEvent(APP_ACTIVATED, app)); + localStartedApps.add(appName); + } else if (delegate == null) { + log.warn("Postponing app activation {} due to the delegate being null", app.id()); + } else { + log.warn("Postponing app activation {} due to req apps being not ready", app.id()); + } } } } @@ -574,8 +615,12 @@ public void event(MapEvent event) { if ((event.type() == MapEvent.Type.INSERT || event.type() == MapEvent.Type.UPDATE) && newApp != null) { setupApplicationAndNotify(appId, newApp.app(), newApp.state()); } else if (event.type() == MapEvent.Type.REMOVE && oldApp != null) { + if (log.isTraceEnabled()) { + log.trace("{} has been uninstalled", appId); + } notifyDelegate(new ApplicationEvent(APP_UNINSTALLED, oldApp.app())); purgeApplication(appId.name()); + localStartedApps.remove(appId.name()); } else { log.warn("Can't perform {} on application {}", event.type(), event.key()); } @@ -586,10 +631,17 @@ private void setupApplicationAndNotify(ApplicationId appId, Application app, Int // ACTIVATED state is handled separately in NextAppToActivateValueListener if (state == INSTALLED) { fetchBitsIfNeeded(app); + if (log.isTraceEnabled()) { + log.trace("{} has been installed", app.id()); + } notifyDelegate(new ApplicationEvent(APP_INSTALLED, app)); } else if (state == DEACTIVATED) { + if (log.isTraceEnabled()) { + log.trace("{} has been deactivated", app.id()); + } clearActive(appId.name()); notifyDelegate(new ApplicationEvent(APP_DEACTIVATED, app)); + localStartedApps.remove(appId.name()); } } @@ -632,7 +684,7 @@ private void fetchBits(Application app, boolean delegateInstallation) { // FIXME: send message with name & version to make sure we don't get served old bits - log.info("Downloading bits for application {}", app.id().name()); + log.info("Downloading bits for application {} for version : {}", app.id().name(), app.version()); for (ControllerNode node : clusterService.getNodes()) { if (latch.getCount() == 0) { break; @@ -652,6 +704,9 @@ private void fetchBits(Application app, boolean delegateInstallation) { app.id().name(), node.id()); latch.countDown(); if (delegateInstallation) { + if (log.isTraceEnabled()) { + log.trace("Delegate installation for {}", app.id()); + } notifyDelegate(new ApplicationEvent(APP_INSTALLED, app)); } } else if (error != null) { diff --git a/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/DistributedLeadershipStore.java b/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/DistributedLeadershipStore.java index 43959de9f1d..3e4b68fd948 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/DistributedLeadershipStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/DistributedLeadershipStore.java @@ -263,6 +263,11 @@ public Map getLeaderships() { e -> new Leadership(parseTopic(e.getKey()), e.getValue().leader(), e.getValue().candidates()))); } + @Override + public boolean demote(String topic, NodeId nodeId) { + return leaderElector.demote(getTopicFor(topic, nodeId), nodeId); + } + /** * Returns a leader elector topic namespaced with the local node's version. * diff --git a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java index 5760e235085..2bd4dfe38da 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java @@ -1036,6 +1036,20 @@ public PortDescription getPortDescription(ProviderId pid, .orElse(null); } + @Override + public DeviceDescription getDeviceDescription(ProviderId providerId, DeviceId deviceId) { + if (devices.containsKey(deviceId)) { + Map descs = getOrCreateDeviceDescriptionsMap(deviceId); + synchronized (descs) { + DeviceDescriptions deviceDescriptions = descs.get(providerId); + return deviceDescriptions != null ? deviceDescriptions.getDeviceDesc().value() : null; + } + } else { + log.warn("Device {} does not exist in store", deviceId); + } + return null; + } + @Override public boolean isAvailable(DeviceId deviceId) { return availableDevices.contains(deviceId); @@ -1403,7 +1417,13 @@ private DeviceAntiEntropyAdvertisement createAdvertisement() { * @param advertisement to respond to */ private void handleAdvertisement(DeviceAntiEntropyAdvertisement advertisement) { - + /* + * NOTE that when an instance rejoins the cluster, it will generate + * device events and send to the local apps through the delegate. This + * approach might be not the best if the apps are not enough robust or + * if there is no proper coordination in the cluster. Also, note that + * any ECMap will act on the same way during the bootstrap process + */ final NodeId sender = advertisement.sender(); Map devAds = new HashMap<>(advertisement.deviceFingerPrints()); @@ -1437,9 +1457,12 @@ private void handleAdvertisement(DeviceAntiEntropyAdvertisement advertisement) { if (advDevTimestamp == null || lProvDevice.isNewerThan( advDevTimestamp)) { // remote does not have it or outdated, suggest + log.trace("send to {} device update {} for {}", sender, lProvDevice, deviceId); notifyPeer(sender, new InternalDeviceEvent(provId, deviceId, lProvDevice)); } else if (!lProvDevice.timestamp().equals(advDevTimestamp)) { // local is outdated, request + log.trace("need update {} < {} for device {} from {}", lProvDevice.timestamp(), + advDevTimestamp, deviceId, sender); reqDevices.add(devFragId); } @@ -1456,10 +1479,12 @@ private void handleAdvertisement(DeviceAntiEntropyAdvertisement advertisement) { if (advPortTimestamp == null || lPort.isNewerThan( advPortTimestamp)) { // remote does not have it or outdated, suggest + log.trace("send to {} port update {} for {}/{}", sender, lPort, deviceId, num); notifyPeer(sender, new InternalPortStatusEvent(provId, deviceId, lPort)); } else if (!lPort.timestamp().equals(advPortTimestamp)) { // local is outdated, request - log.trace("need update {} < {}", lPort.timestamp(), advPortTimestamp); + log.trace("need update {} < {} for port {} from {}", lPort.timestamp(), + advPortTimestamp, num, sender); reqPorts.add(portFragId); } @@ -1483,12 +1508,15 @@ private void handleAdvertisement(DeviceAntiEntropyAdvertisement advertisement) { if (localLatest == null || (rOffline != null && rOffline.compareTo(localLatest) > 0)) { // remote offline timestamp suggests that the // device is off-line + log.trace("remote offline timestamp from {} suggests that the device {} is off-line", + sender, deviceId); markOfflineInternal(deviceId, rOffline); } Timestamp lOffline = offline.get(deviceId); if (lOffline != null && rOffline == null) { // locally offline, but remote is online, suggest offline + log.trace("suggest to {} sthat the device {} is off-line", sender, deviceId); notifyPeer(sender, new InternalDeviceStatusChangeEvent(deviceId, lOffline, false)); } diff --git a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java index c438885d5d7..7f0c04171ed 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java +++ b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java @@ -33,19 +33,21 @@ import java.util.stream.Collectors; import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import org.onlab.util.KryoNamespace; import org.onlab.util.Tools; import org.onosproject.cluster.ClusterService; import org.onosproject.cluster.NodeId; +import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; import org.onosproject.net.device.DeviceService; import org.onosproject.net.flow.FlowEntry; import org.onosproject.net.flow.FlowId; import org.onosproject.net.flow.FlowRule; -import org.onosproject.net.flow.StoredFlowEntry; import org.onosproject.net.flow.FlowRuleStoreException; +import org.onosproject.net.flow.StoredFlowEntry; import org.onosproject.store.LogicalTimestamp; import org.onosproject.store.cluster.messaging.ClusterCommunicationService; import org.onosproject.store.cluster.messaging.MessageSubject; @@ -666,10 +668,11 @@ private void syncFlows(DeviceReplicaInfo prevReplicaInfo, DeviceReplicaInfo newR * @param newReplicaInfo the new replica info */ private void syncFlowsOnMaster(DeviceReplicaInfo prevReplicaInfo, DeviceReplicaInfo newReplicaInfo) { + log.info("syncFlowsOnMaster {}", prevReplicaInfo.master()); syncFlowsOn(prevReplicaInfo.master()) .whenCompleteAsync((result, error) -> { if (error != null) { - log.debug("Failed to synchronize flows on previous master {}", prevReplicaInfo.master(), error); + log.warn("Failed to synchronize flows on previous master {}", prevReplicaInfo.master(), error); syncFlowsOnBackups(prevReplicaInfo, newReplicaInfo); } else { activateMaster(newReplicaInfo); @@ -688,10 +691,11 @@ private void syncFlowsOnBackups(DeviceReplicaInfo prevReplicaInfo, DeviceReplica .stream() .filter(nodeId -> !nodeId.equals(localNodeId)) .collect(Collectors.toList()); + log.info("syncFlowsOnBackups {}", backups); syncFlowsOn(backups) .whenCompleteAsync((result, error) -> { if (error != null) { - log.debug("Failed to synchronize flows on previous backup nodes {}", backups, error); + log.warn("Failed to synchronize flows on previous backup nodes {}", backups, error); } activateMaster(newReplicaInfo); }, executor); @@ -719,6 +723,7 @@ private CompletableFuture syncFlowsOn(Collection nodes) { * @return a future to be completed once the flows have been synchronizes */ private CompletableFuture syncFlowsOn(NodeId nodeId) { + log.info("syncFlowsOn {}", nodeId); return requestDigests(nodeId) .thenCompose(digests -> Tools.allOf(digests.stream() .filter(digest -> digest.isNewerThan(getDigest(digest.bucket()))) @@ -735,6 +740,7 @@ private CompletableFuture syncFlowsOn(NodeId nodeId) { * @return a future to be completed once the bucket has been synchronizes */ private CompletableFuture syncBucketOn(NodeId nodeId, int bucketNumber) { + log.info("syncBucket {} on {}", bucketNumber, nodeId); return requestBucket(nodeId, bucketNumber) .thenAcceptAsync(flowBucket -> { flowBuckets.compute(flowBucket.bucketId().bucket(), @@ -750,7 +756,7 @@ private CompletableFuture syncBucketOn(NodeId nodeId, int bucketNumber) { * @return a future to be completed with the bucket */ private CompletableFuture requestBucket(NodeId nodeId, int bucket) { - log.debug("Requesting flow bucket {} from {}", bucket, nodeId); + log.info("Requesting flow bucket {} from {}", bucket, nodeId); return sendWithTimestamp(bucket, getBucketSubject, nodeId); } @@ -771,7 +777,7 @@ private FlowBucket onGetBucket(int bucketId) { */ private void activateMaster(DeviceReplicaInfo replicaInfo) { if (replicaInfo.isMaster(localNodeId)) { - log.debug("Activating term {} for device {}", replicaInfo.term(), deviceId); + log.info("Activating term {} for device {}", replicaInfo.term(), deviceId); for (int i = 0; i < NUM_BUCKETS; i++) { activateBucket(i); } @@ -959,6 +965,51 @@ public void purge() { inFlightUpdates.clear(); } + /** + * Purges the flows with the given application id. + * + * @param appId the application id + * @return a future to be completed once flow rules with given application + * id have been purged on all buckets + */ + public CompletableFuture purge(ApplicationId appId) { + DeviceReplicaInfo replicaInfo = lifecycleManager.getReplicaInfo(); + if (!replicaInfo.isMaster(localNodeId)) { + return Tools.exceptionalFuture(new IllegalStateException()); + } + + // If the master's term is not currently active (has not been synchronized + // with prior replicas), enqueue the changes to be executed once the master + // has been synchronized. + final long term = replicaInfo.term(); + List> completablePurges = Lists.newArrayList(); + if (activeTerm < term) { + log.debug("Enqueueing operations for device {}", deviceId); + flowBuckets.values().forEach( + bucket -> { + CompletableFuture future = new CompletableFuture<>(); + completablePurges.add(future); + flowTasks.computeIfAbsent(bucket.bucketId().bucket(), + b -> new LinkedList<>()) + .add(() -> future.complete(apply((bkt, trm) -> { + bkt.purge(appId, trm, clock); + return null; + }, bucket, term))); + }); + + } else { + flowBuckets.values().forEach(bucket -> { + CompletableFuture future = new CompletableFuture<>(); + completablePurges.add(future); + future.complete(apply((bkt, trm) -> { + bkt.purge(appId, trm, clock); + return null; + }, bucket, term)); + }); + } + return CompletableFuture.allOf(completablePurges.toArray(new CompletableFuture[0])); + } + /** * Closes the device flow table. */ diff --git a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/ECFlowRuleStore.java b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/ECFlowRuleStore.java index 354b494a70e..602f4d31a59 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/ECFlowRuleStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/ECFlowRuleStore.java @@ -44,6 +44,7 @@ import org.onosproject.cfg.ComponentConfigService; import org.onosproject.cluster.ClusterService; import org.onosproject.cluster.NodeId; +import org.onosproject.core.ApplicationId; import org.onosproject.core.CoreService; import org.onosproject.core.IdGenerator; import org.onosproject.event.AbstractListenerManager; @@ -54,6 +55,7 @@ import org.onosproject.net.device.DeviceService; import org.onosproject.net.flow.CompletedBatchOperation; import org.onosproject.net.flow.DefaultFlowEntry; +import org.onosproject.net.flow.DefaultFlowRule; import org.onosproject.net.flow.FlowEntry; import org.onosproject.net.flow.FlowEntry.FlowEntryState; import org.onosproject.net.flow.FlowRule; @@ -62,8 +64,8 @@ import org.onosproject.net.flow.FlowRuleService; import org.onosproject.net.flow.FlowRuleStore; import org.onosproject.net.flow.FlowRuleStoreDelegate; -import org.onosproject.net.flow.StoredFlowEntry; import org.onosproject.net.flow.FlowRuleStoreException; +import org.onosproject.net.flow.StoredFlowEntry; import org.onosproject.net.flow.TableStatisticsEntry; import org.onosproject.net.flow.oldbatch.FlowRuleBatchEntry; import org.onosproject.net.flow.oldbatch.FlowRuleBatchEntry.FlowRuleOperation; @@ -109,6 +111,7 @@ import static org.onosproject.store.flow.impl.ECFlowRuleStoreMessageSubjects.FLOW_TABLE_BACKUP; import static org.onosproject.store.flow.impl.ECFlowRuleStoreMessageSubjects.GET_DEVICE_FLOW_COUNT; import static org.onosproject.store.flow.impl.ECFlowRuleStoreMessageSubjects.GET_FLOW_ENTRY; +import static org.onosproject.store.flow.impl.ECFlowRuleStoreMessageSubjects.PURGE_FLOW_RULES; import static org.onosproject.store.flow.impl.ECFlowRuleStoreMessageSubjects.REMOTE_APPLY_COMPLETED; import static org.onosproject.store.flow.impl.ECFlowRuleStoreMessageSubjects.REMOVE_FLOW_ENTRY; import static org.slf4j.LoggerFactory.getLogger; @@ -136,6 +139,7 @@ public class ECFlowRuleStore private final Logger log = getLogger(getClass()); private static final long FLOW_RULE_STORE_TIMEOUT_MILLIS = 5000; + private static final long PURGE_TIMEOUT_MILLIS = 30000; private static final int GET_FLOW_ENTRIES_TIMEOUT = 30; //seconds /** Number of threads in the message handler pool. */ @@ -339,6 +343,11 @@ private void registerMessageHandlers(ExecutorService executor) { serializer::encode, executor); clusterCommunicator.addSubscriber( REMOVE_FLOW_ENTRY, serializer::decode, this::removeFlowRuleInternal, serializer::encode, executor); + clusterCommunicator., Boolean>addSubscriber( + PURGE_FLOW_RULES, + serializer::decode, + p -> flowTable.purgeFlowRules(p.getLeft(), p.getRight()), + serializer::encode, executor); } private void unregisterMessageHandlers() { @@ -371,7 +380,7 @@ public int getFlowRuleCount(DeviceId deviceId) { public int getFlowRuleCount(DeviceId deviceId, FlowEntryState state) { NodeId master = mastershipService.getMasterFor(deviceId); if (master == null && deviceService.isAvailable(deviceId)) { - log.debug("Failed to getFlowRuleCount: No master for {}", deviceId); + log.warn("Failed to getFlowRuleCount: No master for {}", deviceId); return 0; } @@ -396,7 +405,7 @@ public FlowEntry getFlowEntry(FlowRule rule) { NodeId master = mastershipService.getMasterFor(rule.deviceId()); if (master == null && deviceService.isAvailable(rule.deviceId())) { - log.debug("Failed to getFlowEntry: No master for {}", rule.deviceId()); + log.warn("Failed to getFlowEntry: No master for {}", rule.deviceId()); return null; } @@ -442,7 +451,7 @@ public void storeBatch(FlowRuleBatchOperation operation) { NodeId master = mastershipService.getMasterFor(deviceId); if (master == null) { - log.warn("No master for {} ", deviceId); + log.warn("Failed to storeBatch: No master for {}", deviceId); Set allFailures = operation.getOperations() .stream() @@ -518,7 +527,9 @@ private Set updateStoreInternal(FlowRuleBatchOperation opera return flowTable.update(op.target(), stored -> { stored.setState(FlowEntryState.PENDING_REMOVE); log.debug("Setting state of rule to pending remove: {}", stored); - return op; + // Using the stored value instead of op to allow the removal + // of flows that do not specify actions or have empty treatment + return new FlowRuleBatchEntry(op.operator(), new DefaultFlowRule(stored)); }); default: log.warn("Unknown flow operation operator: {}", op.operator()); @@ -630,6 +641,35 @@ public void purgeFlowRule(DeviceId deviceId) { flowTable.purgeFlowRule(deviceId); } + @Override + public boolean purgeFlowRules(DeviceId deviceId, ApplicationId appId) { + NodeId master = mastershipService.getMasterFor(deviceId); + + if (Objects.equals(local, master)) { + // bypass and handle it locally + return flowTable.purgeFlowRules(deviceId, appId); + } + + if (master == null) { + log.warn("Failed to purgeFlowRules: No master for {}", deviceId); + return false; + } + + log.trace("Forwarding purgeFlowRules to {}, which is the master for device {}", + master, deviceId); + + return Tools.futureGetOrElse( + clusterCommunicator.sendAndReceive( + Pair.of(deviceId, appId), + PURGE_FLOW_RULES, + serializer::encode, + serializer::decode, + master), + FLOW_RULE_STORE_TIMEOUT_MILLIS, + TimeUnit.MILLISECONDS, + false); + } + @Override public void purgeFlowRules() { flowTable.purgeFlowRules(); @@ -870,6 +910,33 @@ public void purgeFlowRule(DeviceId deviceId) { } } + /** + * Purges flow rules for the given device and application id. + * + * @param deviceId the device for which to purge flow rules + * @param appId the application id for with to purge flow rules + * @return true if purge is successful, false otherwise + */ + public boolean purgeFlowRules(DeviceId deviceId, ApplicationId appId) { + DeviceFlowTable flowTable = flowTables.get(deviceId); + if (flowTable != null) { + // flowTable.purge() returns a CompletableFuture, we want + // to return true when the completable future returns correctly + // within the timeout, otherwise return false. + try { + // Use higher timeout, purge(appId) may require more time + // than normal operations because it's applying the purge + // operation on every single flow table bucket. + flowTable.purge(appId).get(PURGE_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); + return true; + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } catch (ExecutionException | TimeoutException ignored) { + } + } + return false; + } + /** * Purges all flow rules from the table. */ @@ -893,7 +960,7 @@ public Iterable getTableStatistics(DeviceId deviceId) { NodeId master = mastershipService.getMasterFor(deviceId); if (master == null && deviceService.isAvailable(deviceId)) { - log.debug("Failed to getTableStats: No master for {}", deviceId); + log.warn("Failed to getTableStats: No master for {}", deviceId); return Collections.emptyList(); } diff --git a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/ECFlowRuleStoreMessageSubjects.java b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/ECFlowRuleStoreMessageSubjects.java index e5a7631436e..80f376e36ac 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/ECFlowRuleStoreMessageSubjects.java +++ b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/ECFlowRuleStoreMessageSubjects.java @@ -40,4 +40,7 @@ private ECFlowRuleStoreMessageSubjects() {} public static final MessageSubject FLOW_TABLE_BACKUP = new MessageSubject("peer-flow-table-backup"); + + public static final MessageSubject PURGE_FLOW_RULES + = new MessageSubject("peer-purge-flow-rules"); } diff --git a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/FlowBucket.java b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/FlowBucket.java index ea1887df9f7..020559fa5fb 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/FlowBucket.java +++ b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/FlowBucket.java @@ -21,6 +21,7 @@ import java.util.stream.Collectors; import com.google.common.collect.Maps; +import org.onosproject.core.ApplicationId; import org.onosproject.net.flow.DefaultFlowEntry; import org.onosproject.net.flow.FlowEntry; import org.onosproject.net.flow.FlowId; @@ -270,6 +271,24 @@ public void purge() { flowBucket.clear(); } + /** + * Purge the entries with the given application ID. + * + * @param appId the application ID + * @param term the term in which the purge occurred + * @param clock the logical clock + */ + public void purge(ApplicationId appId, long term, LogicalClock clock) { + boolean anythingRemoved = flowBucket.values().removeIf(flowEntryMap -> { + flowEntryMap.values().removeIf(storedFlowEntry -> storedFlowEntry.appId() == appId.id()); + return flowEntryMap.isEmpty(); + }); + if (anythingRemoved) { + recordUpdate(term, clock.getTimestamp()); + } + } + + /** * Clears the bucket. */ diff --git a/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java b/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java index 2734b8bdb46..9032a23e6b0 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java @@ -23,6 +23,7 @@ import org.onosproject.cfg.ComponentConfigService; import org.onosproject.cluster.ClusterService; import org.onosproject.cluster.NodeId; +import org.onosproject.core.ApplicationId; import org.onosproject.core.GroupId; import org.onosproject.mastership.MastershipService; import org.onosproject.net.DeviceId; @@ -30,9 +31,7 @@ import org.onosproject.net.device.DeviceService; import org.onosproject.net.driver.DriverService; import org.onosproject.net.group.DefaultGroup; -import org.onosproject.net.group.DefaultGroupBucket; import org.onosproject.net.group.DefaultGroupDescription; -import org.onosproject.net.group.DefaultGroupKey; import org.onosproject.net.group.Group; import org.onosproject.net.group.Group.GroupState; import org.onosproject.net.group.GroupBucket; @@ -192,14 +191,7 @@ public void activate(ComponentContext context) { KryoNamespace.Builder kryoBuilder = new KryoNamespace.Builder() .register(KryoNamespaces.API) .nextId(KryoNamespaces.BEGIN_USER_CUSTOM_ID) - .register(DefaultGroup.class, - DefaultGroupBucket.class, - DefaultGroupDescription.class, - DefaultGroupKey.class, - GroupDescription.Type.class, - Group.GroupState.class, - GroupBuckets.class, - GroupStoreMessage.class, + .register(GroupStoreMessage.class, GroupStoreMessage.Type.class, UpdateType.class, GroupStoreMessageSubjects.class, @@ -452,11 +444,13 @@ private int getFreeGroupIdValue(DeviceId deviceId) { */ @Override public void storeGroupDescription(GroupDescription groupDesc) { - log.debug("In storeGroupDescription"); + log.debug("In storeGroupDescription id {} for dev {}", + groupDesc.givenGroupId() != null ? "0x" + Integer.toHexString(groupDesc.givenGroupId()) : "N/A", + groupDesc.deviceId()); // Check if a group is existing with the same key Group existingGroup = getGroup(groupDesc.deviceId(), groupDesc.appCookie()); if (existingGroup != null) { - log.debug("Group already exists with the same key {} in dev:{} with id:0x{}", + log.debug("Group already exists with the same key {} in dev:{} with id:{}", groupDesc.appCookie(), groupDesc.deviceId(), Integer.toHexString(existingGroup.id().id())); return; @@ -468,8 +462,9 @@ public void storeGroupDescription(GroupDescription groupDesc) { groupDesc.deviceId()); if (mastershipService.getMasterFor(groupDesc.deviceId()) == null) { log.debug("No Master for device {}..." - + "Queuing Group ADD request", - groupDesc.deviceId()); + + "Queuing Group id {} ADD request", + groupDesc.deviceId(), + groupDesc.givenGroupId() != null ? "0x" + Integer.toHexString(groupDesc.givenGroupId()) : "N/A"); addToPendingAudit(groupDesc); return; } @@ -483,22 +478,25 @@ public void storeGroupDescription(GroupDescription groupDesc) { mastershipService.getMasterFor(groupDesc.deviceId())) .whenComplete((result, error) -> { if (error != null) { - log.warn("Failed to send request to master: {} to {}", - groupOp, + log.warn("Failed to send request to master: id {} to {}", + groupDesc.givenGroupId() != null ? + "0x" + Integer.toHexString(groupDesc.givenGroupId()) : "N/A", mastershipService.getMasterFor(groupDesc.deviceId())); //TODO: Send Group operation failure event } else { - log.debug("Sent Group operation request for device {} " + log.debug("Sent Group operation id {} request for device {} " + "to remote MASTER {}", - groupDesc.deviceId(), - mastershipService.getMasterFor(groupDesc.deviceId())); + groupDesc.givenGroupId() != null ? + "0x" + Integer.toHexString(groupDesc.givenGroupId()) : "N/A", + groupDesc.deviceId(), mastershipService.getMasterFor(groupDesc.deviceId())); } }); return; } - log.debug("Store group for device {} is getting handled locally", - groupDesc.deviceId()); + log.debug("Store group id {} for device {} is getting handled locally", + groupDesc.givenGroupId() != null ? "0x" + Integer.toHexString(groupDesc.givenGroupId()) : "N/A", + groupDesc.deviceId()); storeGroupDescriptionInternal(groupDesc); } @@ -548,20 +546,24 @@ private void storeGroupDescriptionInternal(GroupDescription groupDesc) { return; } - if (deviceAuditStatus.get(groupDesc.deviceId()) == null) { - // Device group audit has not completed yet - // Add this group description to pending group key table - // Create a group entry object with Dummy Group ID - log.debug("storeGroupDescriptionInternal: Device {} AUDIT pending...Queuing Group ADD request", - groupDesc.deviceId()); - StoredGroupEntry group = new DefaultGroup(dummyGroupId, groupDesc); - group.setState(GroupState.WAITING_AUDIT_COMPLETE); - Map pendingKeyTable = - getPendingGroupKeyTable(); - pendingKeyTable.put(new GroupStoreKeyMapKey(groupDesc.deviceId(), - groupDesc.appCookie()), - group); - return; + synchronized (deviceAuditStatus) { + if (deviceAuditStatus.get(groupDesc.deviceId()) == null) { + // Device group audit has not completed yet + // Add this group description to pending group key table + // Create a group entry object with Dummy Group ID + log.debug("storeGroupDescriptionInternal: Device {} AUDIT pending...Queuing Group id {} ADD request", + groupDesc.deviceId(), + groupDesc.givenGroupId() != null ? + "0x" + Integer.toHexString(groupDesc.givenGroupId()) : "N/A"); + StoredGroupEntry group = new DefaultGroup(dummyGroupId, groupDesc); + group.setState(GroupState.WAITING_AUDIT_COMPLETE); + Map pendingKeyTable = + getPendingGroupKeyTable(); + pendingKeyTable.put(new GroupStoreKeyMapKey(groupDesc.deviceId(), + groupDesc.appCookie()), + group); + return; + } } Group matchingExtraneousGroup = null; @@ -711,8 +713,8 @@ public void updateGroupDescription(DeviceId deviceId, deviceId); if (mastershipService.getMasterFor(deviceId) == null) { log.error("No Master for device {}..." - + "Can not perform update group operation", - deviceId); + + "Can not perform update group (appCookie {}) operation", + deviceId, newAppCookie); //TODO: Send Group operation failure event return; } @@ -729,15 +731,14 @@ public void updateGroupDescription(DeviceId deviceId, mastershipService.getMasterFor(deviceId)).whenComplete((result, error) -> { if (error != null) { log.warn("Failed to send request to master: {} to {}", - groupOp, - mastershipService.getMasterFor(deviceId), error); + groupOp, mastershipService.getMasterFor(deviceId), error); } //TODO: Send Group operation failure event }); return; } - log.debug("updateGroupDescription for device {} is getting handled locally", - deviceId); + log.debug("updateGroupDescription for device {} is getting handled locally (appCookie {})", + deviceId, newAppCookie); updateGroupDescriptionInternal(deviceId, oldAppCookie, type, @@ -754,7 +755,8 @@ private void updateGroupDescriptionInternal(DeviceId deviceId, Group oldGroup = getGroup(deviceId, oldAppCookie); if (oldGroup == null) { log.warn("updateGroupDescriptionInternal: Group not found...strange. " - + "GroupKey:{} DeviceId:{}", oldAppCookie, deviceId); + + "GroupKey:{} DeviceId:{} newGroupKey:{}", + oldAppCookie, deviceId, newAppCookie); return; } @@ -785,15 +787,15 @@ private void updateGroupDescriptionInternal(DeviceId deviceId, //Update the group entry in groupkey based map. //Update to groupid based map will happen in the //groupkey based map update listener - log.debug("updateGroupDescriptionInternal with type {}: Group updated with buckets", - type); + log.debug("updateGroupDescriptionInternal with type {}: Group {} updated with buckets", + type, newGroup.id()); getGroupStoreKeyMap(). put(new GroupStoreKeyMapKey(newGroup.deviceId(), newGroup.appCookie()), newGroup); notifyDelegate(new GroupEvent(Type.GROUP_UPDATE_REQUESTED, newGroup)); } else { - log.warn("updateGroupDescriptionInternal with type {}: No " - + "change in the buckets in update", type); + log.warn("updateGroupDescriptionInternal with type {}: Group {} No " + + "change in the buckets in update", type, oldGroup.id()); } } @@ -869,8 +871,8 @@ public void deleteGroupDescription(DeviceId deviceId, deviceId); if (mastershipService.getMasterFor(deviceId) == null) { log.error("No Master for device {}..." - + "Can not perform delete group operation", - deviceId); + + "Can not perform delete group (appCookie {}) operation", + deviceId, appCookie); //TODO: Send Group operation failure event return; } @@ -884,15 +886,14 @@ public void deleteGroupDescription(DeviceId deviceId, mastershipService.getMasterFor(deviceId)).whenComplete((result, error) -> { if (error != null) { log.warn("Failed to send request to master: {} to {}", - groupOp, - mastershipService.getMasterFor(deviceId), error); + groupOp, mastershipService.getMasterFor(deviceId), error); } //TODO: Send Group operation failure event }); return; } - log.debug("deleteGroupDescription in device {} is getting handled locally", - deviceId); + log.debug("deleteGroupDescription in device {} is getting handled locally (appCookie {})", + deviceId, appCookie); deleteGroupDescriptionInternal(deviceId, appCookie); } @@ -915,8 +916,8 @@ private void deleteGroupDescriptionInternal(DeviceId deviceId, put(new GroupStoreKeyMapKey(existing.deviceId(), existing.appCookie()), existing); } - log.debug("deleteGroupDescriptionInternal: in device {} issuing GROUP_REMOVE_REQUESTED", - deviceId); + log.debug("deleteGroupDescriptionInternal: in device {} issuing GROUP_REMOVE_REQUESTED for {}", + deviceId, existing.id()); notifyDelegate(new GroupEvent(Type.GROUP_REMOVE_REQUESTED, existing)); } @@ -940,7 +941,7 @@ private void updateGroupEntryStatsInternal(Group group, StoredGroupEntry existin get()).setBytes(bucket.bytes()); } else { log.warn("updateGroupEntryStatsInternal: No matching bucket {}" + - " to update stats", bucket); + " to update stats for group {}", bucket, group.id()); } } existing.setLife(group.life()); @@ -1099,11 +1100,47 @@ public void purgeGroupEntry(DeviceId deviceId) { .forEach(entriesPendingRemove::add); purgeGroupEntries(entriesPendingRemove); + + // it is unlikely to happen but better clear also the + // pending groups: device disconnected before we got + // the first stats and the apps were able to push groups. + entriesPendingRemove.clear(); + getPendingGroupKeyTable().entrySet().stream() + .filter(entry -> entry.getKey().deviceId().equals(deviceId)) + .forEach(entriesPendingRemove::add); + + purgeGroupEntries(entriesPendingRemove); + } + + @Override + public void purgeGroupEntries(DeviceId deviceId, ApplicationId appId) { + Set> entriesPendingRemove = + new HashSet<>(); + + getGroupStoreKeyMap().entrySet().stream() + .filter(entry -> entry.getKey().deviceId().equals(deviceId) && entry.getValue().appId().equals(appId)) + .forEach(entriesPendingRemove::add); + + purgeGroupEntries(entriesPendingRemove); + + // it is unlikely to happen but better clear also the + // pending groups: device disconnected before we got + // the first stats and the apps were able to push groups. + entriesPendingRemove.clear(); + getPendingGroupKeyTable().entrySet().stream() + .filter(entry -> entry.getKey().deviceId().equals(deviceId) && entry.getValue().appId().equals(appId)) + .forEach(entriesPendingRemove::add); + + purgeGroupEntries(entriesPendingRemove); } @Override public void purgeGroupEntries() { purgeGroupEntries(getGroupStoreKeyMap().entrySet()); + // it is unlikely to happen but better clear also the + // pending groups: device disconnected before we got + // the first stats and the apps were able to push groups. + purgeGroupEntries(getPendingGroupKeyTable().entrySet()); } @Override @@ -1115,15 +1152,26 @@ public void deviceInitialAuditCompleted(DeviceId deviceId, deviceId); deviceAuditStatus.put(deviceId, true); // Execute all pending group requests - List pendingGroupRequests = - getPendingGroupKeyTable().values() - .stream() - .filter(g -> g.deviceId().equals(deviceId)) - .collect(Collectors.toList()); - log.debug("processing pending group add requests for device {} and number of pending requests {}", - deviceId, - pendingGroupRequests.size()); + List pendingGroupRequests = getPendingGroupKeyTable().values() + .stream() + .filter(g -> g.deviceId().equals(deviceId)) + .collect(Collectors.toList()); + if (log.isDebugEnabled()) { + List pendingIds = pendingGroupRequests.stream() + .map(GroupDescription::givenGroupId) + .map(id -> id != null ? "0x" + Integer.toHexString(id) : "N/A") + .collect(Collectors.toList()); + log.debug("processing pending group add requests for device {}: {}", + deviceId, pendingIds); + } + NodeId master; for (Group group : pendingGroupRequests) { + // Mastership change can occur during this iteration + if (!shouldHandle(deviceId)) { + log.warn("Tried to process pending groups while the node was not the master" + + " or the device {} was not available", deviceId); + return; + } GroupDescription tmp = new DefaultGroupDescription( group.deviceId(), group.type(), @@ -1211,7 +1259,7 @@ public void groupOperationFailed(DeviceId deviceId, GroupOperation operation) { if (existing.state() == GroupState.PENDING_ADD || existing.state() == GroupState.PENDING_ADD_RETRY) { notifyDelegate(new GroupEvent(Type.GROUP_ADD_FAILED, existing)); - log.warn("groupOperationFailed: cleaningup " + log.warn("groupOperationFailed: cleaning up " + "group {} from store in device {}....", existing.id(), existing.deviceId()); @@ -1335,7 +1383,8 @@ private void process(GroupStoreMessage groupOp) { groupOp.type(), groupOp.deviceId()); if (!mastershipService.isLocalMaster(groupOp.deviceId())) { - log.warn("This node is not MASTER for device {}", groupOp.deviceId()); + log.warn("This node is not MASTER for device {} discard {}", + groupOp.deviceId(), groupOp); return; } if (groupOp.type() == GroupStoreMessage.Type.ADD) { @@ -1452,6 +1501,11 @@ public int hashCode() { } } + private boolean shouldHandle(DeviceId deviceId) { + NodeId master = mastershipService.getMasterFor(deviceId); + return Objects.equals(local, master) && deviceService.isAvailable(deviceId); + } + @Override public void pushGroupMetrics(DeviceId deviceId, Collection groupEntries) { @@ -1486,9 +1540,9 @@ public void pushGroupMetrics(DeviceId deviceId, // update stats for (Iterator it2 = southboundGroupEntries.iterator(); it2.hasNext();) { // Mastership change can occur during this iteration - master = mastershipService.getMasterFor(deviceId); - if (!Objects.equals(local, master)) { - log.warn("Tried to update the group stats while the node was not the master"); + if (!shouldHandle(deviceId)) { + log.warn("Tried to update the group stats while the node was not the master" + + " or the device {} was not available", deviceId); return; } Group group = it2.next(); @@ -1516,9 +1570,9 @@ public void pushGroupMetrics(DeviceId deviceId, } } else { // Mastership change can occur during this iteration - master = mastershipService.getMasterFor(deviceId); - if (!Objects.equals(local, master)) { - log.warn("Tried to process extraneous groups while the node was not the master"); + if (!shouldHandle(deviceId)) { + log.warn("Tried to process extraneous groups while the node was not the master" + + " or the device {} was not available", deviceId); return; } // there are groups in the switch that aren't in the store @@ -1536,9 +1590,9 @@ public void pushGroupMetrics(DeviceId deviceId, // missing groups in the dataplane for (StoredGroupEntry group : storedGroupEntries) { // Mastership change can occur during this iteration - master = mastershipService.getMasterFor(deviceId); - if (!Objects.equals(local, master)) { - log.warn("Tried to process missing groups while the node was not the master"); + if (!shouldHandle(deviceId)) { + log.warn("Tried to process missing groups while the node was not the master" + + " or the device {} was not available", deviceId); return; } // there are groups in the store that aren't in the switch @@ -1550,9 +1604,9 @@ public void pushGroupMetrics(DeviceId deviceId, // extraneous groups in the store for (Group group : extraneousStoredEntries) { // Mastership change can occur during this iteration - master = mastershipService.getMasterFor(deviceId); - if (!Objects.equals(local, master)) { - log.warn("Tried to process node extraneous groups while the node was not the master"); + if (!shouldHandle(deviceId)) { + log.warn("Tried to process node extraneous groups while the node was not the master" + + " or the device {} was not available", deviceId); return; } // there are groups in the extraneous store that diff --git a/core/store/dist/src/main/java/org/onosproject/store/group/impl/GroupStoreMessage.java b/core/store/dist/src/main/java/org/onosproject/store/group/impl/GroupStoreMessage.java index cb009b27bfc..4b1eec26e08 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/group/impl/GroupStoreMessage.java +++ b/core/store/dist/src/main/java/org/onosproject/store/group/impl/GroupStoreMessage.java @@ -194,4 +194,19 @@ public GroupKey newAppCookie() { public Type type() { return type; } + + @Override + public String toString() { + if (type == Type.ADD) { + return "groupId=0x" + Integer.toHexString(groupDesc.givenGroupId()); + } else if (type == Type.DELETE) { + return "appCookie= " + appCookie; + } else if (type == Type.UPDATE) { + return "appCookie= " + newAppCookie; + } else if (type == Type.FAILOVER) { + return "groupId=0x" + Integer.toHexString(groupDesc.givenGroupId()); + } else { + return super.toString(); + } + } } diff --git a/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/ConsistentDeviceMastershipStore.java b/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/ConsistentDeviceMastershipStore.java index 3c27df279b6..1b540247740 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/ConsistentDeviceMastershipStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/ConsistentDeviceMastershipStore.java @@ -300,6 +300,12 @@ public void relinquishAllRole(NodeId nodeId) { // Noop. LeadershipService already takes care of detecting and purging stale locks. } + @Override + public void demote(NodeId instance, DeviceId deviceId) { + String leadershipTopic = createDeviceMastershipTopic(deviceId); + leadershipAdminService.demote(leadershipTopic, instance); + } + private MastershipInfo buildMastershipFromLeadership(Leadership leadership) { ImmutableMap.Builder builder = ImmutableMap.builder(); if (leadership.leaderNodeId() != null) { diff --git a/core/store/dist/src/main/java/org/onosproject/store/meter/impl/DistributedMeterStore.java b/core/store/dist/src/main/java/org/onosproject/store/meter/impl/DistributedMeterStore.java index 11570f7127f..17f85ff9992 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/meter/impl/DistributedMeterStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/meter/impl/DistributedMeterStore.java @@ -22,6 +22,7 @@ import com.google.common.collect.Maps; import org.apache.commons.lang.math.RandomUtils; import org.onlab.util.KryoNamespace; +import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; import org.onosproject.net.behaviour.MeterQuery; import org.onosproject.net.driver.DriverHandler; @@ -31,18 +32,22 @@ import org.onosproject.net.meter.DefaultMeter; import org.onosproject.net.meter.DefaultMeterFeatures; import org.onosproject.net.meter.Meter; +import org.onosproject.net.meter.MeterCellId; import org.onosproject.net.meter.MeterEvent; import org.onosproject.net.meter.MeterFailReason; import org.onosproject.net.meter.MeterFeatures; import org.onosproject.net.meter.MeterFeaturesFlag; -import org.onosproject.net.meter.MeterFeaturesKey; import org.onosproject.net.meter.MeterId; import org.onosproject.net.meter.MeterKey; import org.onosproject.net.meter.MeterOperation; +import org.onosproject.net.meter.MeterScope; import org.onosproject.net.meter.MeterState; import org.onosproject.net.meter.MeterStore; import org.onosproject.net.meter.MeterStoreDelegate; import org.onosproject.net.meter.MeterStoreResult; +import org.onosproject.net.meter.MeterTableKey; +import org.onosproject.net.pi.model.PiMeterId; +import org.onosproject.net.pi.runtime.PiMeterCellId; import org.onosproject.store.AbstractStore; import org.onosproject.store.primitives.DefaultDistributedSet; import org.onosproject.store.serializers.KryoNamespaces; @@ -50,12 +55,16 @@ import org.onosproject.store.service.ConsistentMap; import org.onosproject.store.service.DistributedPrimitive; import org.onosproject.store.service.DistributedSet; +import org.onosproject.store.service.EventuallyConsistentMap; +import org.onosproject.store.service.EventuallyConsistentMapEvent; +import org.onosproject.store.service.EventuallyConsistentMapListener; import org.onosproject.store.service.MapEvent; import org.onosproject.store.service.MapEventListener; import org.onosproject.store.service.Serializer; import org.onosproject.store.service.StorageException; import org.onosproject.store.service.StorageService; import org.onosproject.store.service.Versioned; +import org.onosproject.store.service.WallClockTimestamp; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Deactivate; @@ -64,6 +73,8 @@ import org.slf4j.Logger; import java.util.Collection; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.ConcurrentHashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -71,8 +82,12 @@ import java.util.concurrent.CompletableFuture; import java.util.stream.Collectors; +import static com.google.common.base.Preconditions.checkArgument; import static org.onosproject.store.meter.impl.DistributedMeterStore.ReuseStrategy.FIRST_FIT; import static org.onosproject.net.meter.MeterFailReason.TIMEOUT; +import static org.onosproject.net.meter.MeterCellId.MeterCellType.INDEX; +import static org.onosproject.net.meter.MeterCellId.MeterCellType.PIPELINE_INDEPENDENT; +import static org.onosproject.net.meter.MeterStoreResult.Type.FAIL; import static org.slf4j.LoggerFactory.getLogger; /** @@ -88,22 +103,22 @@ public class DistributedMeterStore extends AbstractStore meters; - private MapEventListener mapListener = new InternalMapEventListener(); + private MapEventListener metersMapListener = new InternalMetersMapEventListener(); private Map metersMap; // Meters features related objects private static final String METERFEATURESSTORE = "onos-meter-features-store"; - private ConsistentMap meterFeatures; + private EventuallyConsistentMap metersFeatures; + private EventuallyConsistentMapListener featuresMapListener = + new InternalFeaturesMapEventListener(); // Meters id related objects private static final String AVAILABLEMETERIDSTORE = "onos-meters-available-store"; - // Available meter identifiers - private DistributedSet availableMeterIds; - // Atomic counter map for generation of new identifiers; + protected final ConcurrentMap> availableMeterIds = + new ConcurrentHashMap<>(); private static final String METERIDSTORE = "onos-meters-id-store"; - private AtomicCounterMap meterIdGenerators; + private AtomicCounterMap meterIdGenerators; - // Serializer related objects private static final KryoNamespace.Builder APP_KRYO_BUILDER = KryoNamespace.newBuilder() .register(KryoNamespaces.API) .register(MeterKey.class) @@ -113,7 +128,12 @@ public class DistributedMeterStore extends AbstractStore> futures = Maps.newConcurrentMap(); + // Control the user defined index mode for the store. + protected boolean userDefinedIndexMode = false; + /** * Defines possible selection strategies to reuse meter ids. */ @@ -143,78 +166,78 @@ enum ReuseStrategy { @Activate public void activate() { - // Init meters map and setup the map listener meters = storageService.consistentMapBuilder() .withName(METERSTORE) .withSerializer(serializer).build(); - meters.addListener(mapListener); - // Init meter features map (meaningful only for OpenFlow protocol) - meterFeatures = storageService.consistentMapBuilder() - .withName(METERFEATURESSTORE) - .withSerializer(Serializer.using(KryoNamespaces.API, - MeterFeaturesKey.class, - MeterFeatures.class, - DefaultMeterFeatures.class, - Band.Type.class, - Meter.Unit.class, - MeterFailReason.class, - MeterFeaturesFlag.class)).build(); + meters.addListener(metersMapListener); metersMap = meters.asJavaMap(); - // Init the set of the available ids - availableMeterIds = new DefaultDistributedSet<>(storageService.setBuilder() - .withName(AVAILABLEMETERIDSTORE) - .withSerializer(Serializer.using(KryoNamespaces.API, - MeterKey.class)).build(), - DistributedPrimitive.DEFAULT_OPERATION_TIMEOUT_MILLIS); - // Init atomic map counters - meterIdGenerators = storageService.atomicCounterMapBuilder() + + metersFeatures = storageService.eventuallyConsistentMapBuilder() + .withName(METERFEATURESSTORE) + .withTimestampProvider((key, features) -> new WallClockTimestamp()) + .withSerializer(APP_KRYO_BUILDER).build(); + metersFeatures.addListener(featuresMapListener); + + meterIdGenerators = storageService.atomicCounterMapBuilder() .withName(METERIDSTORE) - .withSerializer(Serializer.using(KryoNamespaces.API)).build(); + .withSerializer(Serializer.using(KryoNamespaces.API, + MeterTableKey.class, + MeterScope.class)).build(); + log.info("Started"); } @Deactivate public void deactivate() { - meters.removeListener(mapListener); + meters.removeListener(metersMapListener); + metersFeatures.removeListener(featuresMapListener); + + // EC map does clean only the local state + metersFeatures.destroy(); + // Distributed set does not override the default behavior + availableMeterIds.forEach((key, set) -> set.destroy()); + log.info("Stopped"); } @Override - public CompletableFuture storeMeter(Meter meter) { - // Init steps + public CompletableFuture addOrUpdateMeter(Meter meter) { + checkArgument(validIndex(meter), "Meter index is not valid"); CompletableFuture future = new CompletableFuture<>(); - MeterKey key = MeterKey.key(meter.deviceId(), meter.id()); - // Store the future related to the operation - futures.put(key, future); - // Store the meter data + MeterKey key = MeterKey.key(meter.deviceId(), meter.meterCellId()); MeterData data = new MeterData(meter, null); + futures.put(key, future); try { - meters.put(key, data); + meters.compute(key, (k, v) -> data); } catch (StorageException e) { log.error("{} thrown a storage exception: {}", e.getStackTrace()[0].getMethodName(), e.getMessage(), e); futures.remove(key); future.completeExceptionally(e); } - // Done, return the future return future; } @Override public CompletableFuture deleteMeter(Meter meter) { - // Init steps CompletableFuture future = new CompletableFuture<>(); - MeterKey key = MeterKey.key(meter.deviceId(), meter.id()); - // Store the future related to the operation + MeterKey key = MeterKey.key(meter.deviceId(), meter.meterCellId()); futures.put(key, future); - // Create the meter data - MeterData data = new MeterData(meter, null); // Update the state of the meter. It will be pruned by observing // that it has been removed from the dataplane. try { - // If it does not exist in the system - if (meters.computeIfPresent(key, (k, v) -> data) == null) { - // Complete immediately + Versioned versionedData = meters.computeIfPresent(key, (k, v) -> { + DefaultMeter m = (DefaultMeter) v.meter(); + MeterState meterState = m.state(); + if (meterState == MeterState.PENDING_REMOVE) { + return v; + } + m.setState(meter.state()); + return new MeterData(m, v.reason().isPresent() ? v.reason().get() : null); + }); + // If it does not exist in the system, completes immediately + if (versionedData == null) { + futures.remove(key); future.complete(MeterStoreResult.success()); } } catch (StorageException e) { @@ -223,17 +246,16 @@ public CompletableFuture deleteMeter(Meter meter) { futures.remove(key); future.completeExceptionally(e); } - // Done, return the future return future; } @Override public MeterStoreResult storeMeterFeatures(MeterFeatures meterfeatures) { - // Store meter features, this is done once for each device + // Store meter features, this is done once for each features of every device MeterStoreResult result = MeterStoreResult.success(); - MeterFeaturesKey key = MeterFeaturesKey.key(meterfeatures.deviceId()); + MeterTableKey key = MeterTableKey.key(meterfeatures.deviceId(), meterfeatures.scope()); try { - meterFeatures.putIfAbsent(key, meterfeatures); + metersFeatures.put(key, meterfeatures); } catch (StorageException e) { log.error("{} thrown a storage exception: {}", e.getStackTrace()[0].getMethodName(), e.getMessage(), e); @@ -242,46 +264,58 @@ public MeterStoreResult storeMeterFeatures(MeterFeatures meterfeatures) { return result; } + @Override + public MeterStoreResult storeMeterFeatures(Collection meterfeatures) { + // These store operations is treated as one single operation + // If one of them is failed, Fail is returned + // But the failed operation will not block the rest. + MeterStoreResult result = MeterStoreResult.success(); + for (MeterFeatures mf : meterfeatures) { + if (storeMeterFeatures(mf).type() == FAIL) { + result = MeterStoreResult.fail(TIMEOUT); + } + } + return result; + } + @Override public MeterStoreResult deleteMeterFeatures(DeviceId deviceId) { - // Remove meter features - these ops are meaningful only for OpenFlow MeterStoreResult result = MeterStoreResult.success(); - MeterFeaturesKey key = MeterFeaturesKey.key(deviceId); try { - meterFeatures.remove(key); + Set keys = metersFeatures.keySet().stream() + .filter(key -> key.deviceId().equals(deviceId)) + .collect(Collectors.toUnmodifiableSet()); + keys.forEach(k -> metersFeatures.remove(k)); } catch (StorageException e) { log.error("{} thrown a storage exception: {}", e.getStackTrace()[0].getMethodName(), - e.getMessage(), e); + e.getMessage(), e); result = MeterStoreResult.fail(TIMEOUT); } return result; } @Override - // TODO Should we remove it ? We are not using it - public CompletableFuture updateMeter(Meter meter) { - CompletableFuture future = new CompletableFuture<>(); - MeterKey key = MeterKey.key(meter.deviceId(), meter.id()); - futures.put(key, future); - - MeterData data = new MeterData(meter, null); - try { - if (meters.computeIfPresent(key, (k, v) -> data) == null) { - future.complete(MeterStoreResult.fail(MeterFailReason.INVALID_METER)); + public MeterStoreResult deleteMeterFeatures(Collection meterfeatures) { + // Same logic of storeMeterFeatures + MeterStoreResult result = MeterStoreResult.success(); + for (MeterFeatures mf : meterfeatures) { + try { + MeterTableKey key = MeterTableKey.key(mf.deviceId(), mf.scope()); + metersFeatures.remove(key); + } catch (StorageException e) { + log.error("{} thrown a storage exception: {}", e.getStackTrace()[0].getMethodName(), + e.getMessage(), e); + result = MeterStoreResult.fail(TIMEOUT); } - } catch (StorageException e) { - log.error("{} thrown a storage exception: {}", e.getStackTrace()[0].getMethodName(), - e.getMessage(), e); - futures.remove(key); - future.completeExceptionally(e); } - return future; + + return result; } @Override public Meter updateMeterState(Meter meter) { // Update meter if present (stats workflow) - MeterKey key = MeterKey.key(meter.deviceId(), meter.id()); + MeterKey key = MeterKey.key(meter.deviceId(), meter.meterCellId()); Versioned value = meters.computeIfPresent(key, (k, v) -> { DefaultMeter m = (DefaultMeter) v.meter(); MeterState meterState = m.state(); @@ -318,22 +352,46 @@ public Collection getAllMeters(DeviceId deviceId) { MeterData::meter); } + @Override + public Collection getAllMeters(DeviceId deviceId, MeterScope scope) { + if (scope.equals(MeterScope.globalScope())) { + return Collections2.transform( + Collections2.filter(ImmutableSet.copyOf(metersMap.values()), + (MeterData m) -> m.meter().meterCellId().type() == INDEX && + m.meter().deviceId().equals(deviceId)), + MeterData::meter); + } + return Collections2.transform( + Collections2.filter(ImmutableSet.copyOf(metersMap.values()), + (MeterData m) -> m.meter().meterCellId().type() == PIPELINE_INDEPENDENT && + m.meter().deviceId().equals(deviceId) && + ((PiMeterCellId) m.meter().meterCellId()).meterId().id().equals(scope.id())), + MeterData::meter); + } + @Override public void failedMeter(MeterOperation op, MeterFailReason reason) { // Meter ops failed (got notification from the sb) - MeterKey key = MeterKey.key(op.meter().deviceId(), op.meter().id()); + MeterKey key = MeterKey.key(op.meter().deviceId(), op.meter().meterCellId()); meters.computeIfPresent(key, (k, v) -> new MeterData(v.meter(), reason)); } @Override - public void deleteMeterNow(Meter m) { - // Once we receive the ack from the sb - // create the key and remove definitely the meter - MeterKey key = MeterKey.key(m.deviceId(), m.id()); + public void purgeMeter(Meter m) { + // Once we receive the ack from the sb, create the key + // remove definitely the meter and free the id + MeterKey key = MeterKey.key(m.deviceId(), m.meterCellId()); try { if (Versioned.valueOrNull(meters.remove(key)) != null) { - // Free the id - freeMeterId(m.deviceId(), m.id()); + MeterScope scope; + if (m.meterCellId().type() == PIPELINE_INDEPENDENT) { + PiMeterCellId piMeterCellId = (PiMeterCellId) m.meterCellId(); + scope = MeterScope.of(piMeterCellId.meterId().id()); + } else { + scope = MeterScope.globalScope(); + } + MeterTableKey meterTableKey = MeterTableKey.key(m.deviceId(), scope); + freeMeterId(meterTableKey, m.meterCellId()); } } catch (StorageException e) { log.error("{} thrown a storage exception: {}", e.getStackTrace()[0].getMethodName(), @@ -342,132 +400,245 @@ public void deleteMeterNow(Meter m) { } @Override - public void purgeMeter(DeviceId deviceId) { - // Purge api (typically used when the device is offline) + public void purgeMeters(DeviceId deviceId) { List> metersPendingRemove = meters.stream() .filter(e -> Objects.equals(e.getKey().deviceId(), deviceId)) .map(Map.Entry::getValue) .collect(Collectors.toList()); - // Remove definitely the meter metersPendingRemove.forEach(versionedMeterKey - -> deleteMeterNow(versionedMeterKey.value().meter())); + -> purgeMeter(versionedMeterKey.value().meter())); + } + + @Override + public void purgeMeters(DeviceId deviceId, ApplicationId appId) { + List> metersPendingRemove = meters.stream() + .filter(e -> Objects.equals(e.getKey().deviceId(), deviceId) && + e.getValue().value().meter().appId().equals(appId)) + .map(Map.Entry::getValue) + .collect(Collectors.toList()); + metersPendingRemove.forEach(versionedMeterKey + -> purgeMeter(versionedMeterKey.value().meter())); } @Override - public long getMaxMeters(MeterFeaturesKey key) { - // Leverage the meter features to know the max id - MeterFeatures features = Versioned.valueOrElse(meterFeatures.get(key), null); + public boolean userDefinedIndexMode(boolean enable) { + if (meters.isEmpty() && meterIdGenerators.isEmpty()) { + userDefinedIndexMode = enable; + } else { + log.warn("Unable to {} user defined index mode as store did" + + "already some allocations", enable ? "activate" : "deactivate"); + } + return userDefinedIndexMode; + } + + protected long getMaxMeters(MeterTableKey key) { + MeterFeatures features = metersFeatures.get(key); return features == null ? 0L : features.maxMeter(); } - // queryMaxMeters is implemented in FullMetersAvailable behaviour. + // Validate index using the meter features, useful mainly + // when user defined index mode is enabled + private boolean validIndex(Meter meter) { + long index; + MeterTableKey key; + + if (meter.meterCellId().type() == PIPELINE_INDEPENDENT) { + PiMeterCellId piMeterCellId = (PiMeterCellId) meter.meterCellId(); + index = piMeterCellId.index(); + key = MeterTableKey.key(meter.deviceId(), MeterScope.of(piMeterCellId.meterId().id())); + } else if (meter.meterCellId().type() == INDEX) { + MeterId meterId = (MeterId) meter.meterCellId(); + index = meterId.id(); + key = MeterTableKey.key(meter.deviceId(), MeterScope.globalScope()); + } else { + log.warn("Unable to validate index unsupported cell type {}", meter.meterCellId().type()); + return false; + } + + MeterFeatures features = metersFeatures.get(key); + long startIndex = features == null ? -1L : features.startIndex(); + long endIndex = features == null ? -1L : features.endIndex(); + return index >= startIndex && index <= endIndex; + } + + private long getStartIndex(MeterTableKey key) { + MeterFeatures features = metersFeatures.get(key); + return features == null ? -1L : features.startIndex(); + } + + private long getEndIndex(MeterTableKey key) { + MeterFeatures features = metersFeatures.get(key); + return features == null ? -1L : features.endIndex(); + } + + // queryMaxMeters is implemented in MeterQuery behaviour implementations. private long queryMaxMeters(DeviceId device) { - // Get driver handler for this device DriverHandler handler = driverService.createHandler(device); - // If creation failed or the device does not have this behavior if (handler == null || !handler.hasBehaviour(MeterQuery.class)) { - // We cannot know max meter return 0L; } - // Get the behavior + + // FIXME architecturally this is not right, we should fallback to this + // behavior in the providers. Once we do that we can remove this code. MeterQuery query = handler.behaviour(MeterQuery.class); - // Return as max meter the result of the query + // This results to be necessary because the available ids sets are created + // in the meter features map listener if the device does not provide the meter + // feature this is the only chance to create this set. + String setName = AVAILABLEMETERIDSTORE + "-" + device + "global"; + MeterTableKey meterTableKey = MeterTableKey.key(device, MeterScope.globalScope()); + insertAvailableKeySet(meterTableKey, setName); + return query.getMaxMeters(); } - private boolean updateMeterIdAvailability(DeviceId deviceId, MeterId id, + private boolean updateMeterIdAvailability(MeterTableKey meterTableKey, MeterCellId id, boolean available) { + DistributedSet keySet = availableMeterIds.get(meterTableKey); + if (keySet == null) { + log.warn("Reusable Key set for device: {} scope: {} not found", + meterTableKey.deviceId(), meterTableKey.scope()); + return false; + } + // According to available, make available or unavailable a meter key - return available ? availableMeterIds.add(MeterKey.key(deviceId, id)) : - availableMeterIds.remove(MeterKey.key(deviceId, id)); + DeviceId deviceId = meterTableKey.deviceId(); + return available ? keySet.add(MeterKey.key(deviceId, id)) : + keySet.remove(MeterKey.key(deviceId, id)); } - private MeterId getNextAvailableId(Set availableIds) { - // If there are no available ids + private MeterCellId getNextAvailableId(Set availableIds) { if (availableIds.isEmpty()) { - // Just end the cycle return null; } - // If it is the first fit + if (reuseStrategy == FIRST_FIT || availableIds.size() == 1) { return availableIds.iterator().next(); } - // If it is random, get the size + + // If it is random, get the size and return a random element int size = availableIds.size(); - // Return a random element return Iterables.get(availableIds, RandomUtils.nextInt(size)); } - // Implements reuse strategy - private MeterId firstReusableMeterId(DeviceId deviceId) { - // Filter key related to device id, and reduce to meter ids - Set localAvailableMeterIds = availableMeterIds.stream() - .filter(meterKey -> meterKey.deviceId().equals(deviceId)) - .map(MeterKey::meterId) + // Implements reuse strategy of the meter cell ids + private MeterCellId firstReusableMeterId(MeterTableKey meterTableKey) { + DistributedSet keySet = availableMeterIds.get(meterTableKey); + if (keySet == null) { + log.warn("Reusable Key set for device: {} scope: {} not found", + meterTableKey.deviceId(), meterTableKey.scope()); + return null; + } + + Set localAvailableMeterIds = keySet.stream() + .filter(meterKey -> + meterKey.deviceId().equals(meterTableKey.deviceId())) + .map(MeterKey::meterCellId) .collect(Collectors.toSet()); - // Get next available id - MeterId meterId = getNextAvailableId(localAvailableMeterIds); - // Iterate until there are items + MeterCellId meterId = getNextAvailableId(localAvailableMeterIds); while (meterId != null) { - // If we are able to reserve the id - if (updateMeterIdAvailability(deviceId, meterId, false)) { - // Just end + if (updateMeterIdAvailability(meterTableKey, meterId, false)) { return meterId; } - // Update the set localAvailableMeterIds.remove(meterId); - // Try another time meterId = getNextAvailableId(localAvailableMeterIds); } - // No reusable ids + // there are no available ids that can be reused return null; } @Override - public MeterId allocateMeterId(DeviceId deviceId) { - // Init steps - MeterId meterId; + public MeterCellId allocateMeterId(DeviceId deviceId, MeterScope meterScope) { + if (userDefinedIndexMode) { + log.warn("Unable to allocate meter id when user defined index mode is enabled"); + return null; + } + MeterTableKey meterTableKey = MeterTableKey.key(deviceId, meterScope); + MeterCellId meterCellId; long id; - // Try to reuse meter id - meterId = firstReusableMeterId(deviceId); - // We found a reusable id, return - if (meterId != null) { - return meterId; + // First, search for reusable key + meterCellId = firstReusableMeterId(meterTableKey); + if (meterCellId != null) { + return meterCellId; } - // If there was no reusable MeterId we have to generate a new value - // using maxMeters as upper limit. - long maxMeters = getMaxMeters(MeterFeaturesKey.key(deviceId)); - // If the device does not give us MeterFeatures - if (maxMeters == 0L) { - // MeterFeatures couldn't be retrieved, fallback to queryMeters. - maxMeters = queryMaxMeters(deviceId); + // If there was no reusable meter id we have to generate a new value + // using start and end index as lower and upper bound respectively. + long startIndex = getStartIndex(meterTableKey); + long endIndex = getEndIndex(meterTableKey); + // If the device does not give us MeterFeatures fallback to queryMeters + if (startIndex == -1L || endIndex == -1L) { + // Only meaningful for OpenFlow today + long maxMeters = queryMaxMeters(deviceId); + if (maxMeters == 0L) { + return null; + } else { + // OpenFlow meter index starts from 1, ends with max + startIndex = 1L; + endIndex = maxMeters; + } } - // If we don't know the max, cannot proceed - if (maxMeters == 0L) { + + do { + id = meterIdGenerators.getAndIncrement(meterTableKey); + } while (id < startIndex); + if (id > endIndex) { return null; } - // Get a new value - id = meterIdGenerators.incrementAndGet(deviceId); - // Check with the max, and if the value is bigger, cannot proceed - if (id >= maxMeters) { - return null; + + // For backward compatibility if we are using global scope, + // return a MeterId, otherwise we create a PiMeterCellId + if (meterScope.isGlobal()) { + return MeterId.meterId(id); + } else { + return PiMeterCellId.ofIndirect(PiMeterId.of(meterScope.id()), id); } - // Done, return the value - return MeterId.meterId(id); + } @Override public void freeMeterId(DeviceId deviceId, MeterId meterId) { + MeterTableKey meterTableKey = MeterTableKey.key(deviceId, MeterScope.globalScope()); + freeMeterId(meterTableKey, meterId); + } + + protected void freeMeterId(DeviceId deviceId, MeterCellId meterCellId) { + MeterTableKey meterTableKey; + if (meterCellId.type() == PIPELINE_INDEPENDENT) { + meterTableKey = MeterTableKey.key(deviceId, + MeterScope.of(((PiMeterCellId) meterCellId).meterId().id())); + } else if (meterCellId.type() == INDEX) { + meterTableKey = MeterTableKey.key(deviceId, MeterScope.globalScope()); + } else { + log.warn("Unable to free meter id unsupported cell type {}", meterCellId.type()); + return; + } + freeMeterId(meterTableKey, meterCellId); + } + + protected void freeMeterId(MeterTableKey meterTableKey, MeterCellId meterCellId) { + if (userDefinedIndexMode) { + log.debug("Unable to free meter id when user defined index mode is enabled"); + return; + } + long index; + if (meterCellId.type() == PIPELINE_INDEPENDENT) { + PiMeterCellId piMeterCellId = (PiMeterCellId) meterCellId; + index = piMeterCellId.index(); + } else if (meterCellId.type() == INDEX) { + MeterId meterId = (MeterId) meterCellId; + index = meterId.id(); + } else { + log.warn("Unable to free meter id unsupported cell type {}", meterCellId.type()); + return; + } // Avoid to free meter not allocated - if (meterIdGenerators.get(deviceId) < meterId.id()) { + if (meterIdGenerators.get(meterTableKey) <= index) { return; } - // Update the availability - updateMeterIdAvailability(deviceId, meterId, true); + updateMeterIdAvailability(meterTableKey, meterCellId, true); } // Enabling the events distribution across the cluster - private class InternalMapEventListener implements MapEventListener { + private class InternalMetersMapEventListener implements MapEventListener { @Override public void event(MapEvent event) { MeterKey key = event.key(); @@ -501,8 +672,9 @@ public void event(MapEvent event) { return null; }); notifyDelegate(new MeterEvent(MeterEvent.Type.METER_ADDED, data.meter())); - // Update stats case - } else if (data.meter().referenceCount() == 0) { + // Update stats case - we report reference count zero only for INDEX based meters + } else if (data.meter().referenceCount() == 0 && + data.meter().meterCellId().type() == INDEX) { notifyDelegate(new MeterEvent(MeterEvent.Type.METER_REFERENCE_COUNT_ZERO, data.meter())); } @@ -512,19 +684,49 @@ public void event(MapEvent event) { } break; case REMOVE: - // Meter removal case futures.computeIfPresent(key, (k, v) -> { v.complete(MeterStoreResult.success()); return null; }); - // Finally notify the delegate notifyDelegate(new MeterEvent(MeterEvent.Type.METER_REMOVED, data.meter())); break; default: log.warn("Unknown Map event type {}", event.type()); } + } + } + private class InternalFeaturesMapEventListener implements + EventuallyConsistentMapListener { + @Override + public void event(EventuallyConsistentMapEvent event) { + MeterTableKey meterTableKey = event.key(); + MeterFeatures meterFeatures = event.value(); + switch (event.type()) { + case PUT: + String setName = AVAILABLEMETERIDSTORE + "-" + + meterFeatures.deviceId() + meterFeatures.scope().id(); + insertAvailableKeySet(meterTableKey, setName); + break; + case REMOVE: + DistributedSet set = availableMeterIds.remove(meterTableKey); + if (set != null) { + set.destroy(); + } + break; + default: + break; + } } } + private void insertAvailableKeySet(MeterTableKey meterTableKey, String setName) { + DistributedSet availableMeterIdSet = + new DefaultDistributedSet<>(storageService.setBuilder() + .withName(setName) + .withSerializer(Serializer.using(KryoNamespaces.API, + MeterKey.class)).build(), + DistributedPrimitive.DEFAULT_OPERATION_TIMEOUT_MILLIS); + availableMeterIds.put(meterTableKey, availableMeterIdSet); + } } diff --git a/core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java b/core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java index 50e890068b6..2c86d4a7e37 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java @@ -246,7 +246,7 @@ private boolean removeInternal(PacketRequest request) { private List requests() { List list = Lists.newArrayList(); - requests.values().forEach(v -> list.add(v)); + requests.forEach(entry -> list.add(entry.getValue())); list.sort((o1, o2) -> o1.priority().priorityValue() - o2.priority().priorityValue()); return list; } diff --git a/core/store/dist/src/test/java/org/onosproject/store/flow/impl/ECFlowRuleStoreTest.java b/core/store/dist/src/test/java/org/onosproject/store/flow/impl/ECFlowRuleStoreTest.java index 0dfc2a2b0ff..60261d69cdd 100644 --- a/core/store/dist/src/test/java/org/onosproject/store/flow/impl/ECFlowRuleStoreTest.java +++ b/core/store/dist/src/test/java/org/onosproject/store/flow/impl/ECFlowRuleStoreTest.java @@ -50,7 +50,6 @@ import org.onosproject.store.service.TestStorageService; import org.onlab.packet.Ip4Address; -import java.util.Iterator; import java.util.Optional; import org.osgi.service.component.ComponentContext; @@ -64,6 +63,7 @@ import static org.hamcrest.Matchers.notNullValue; import static org.junit.Assert.assertEquals; import static org.onosproject.net.NetTestTools.APP_ID; +import static org.onosproject.net.NetTestTools.APP_ID_2; import static org.onosproject.net.NetTestTools.did; /** @@ -83,6 +83,7 @@ public class ECFlowRuleStoreTest { private static final IntentTestsMocks.MockTreatment TREATMENT = new IntentTestsMocks.MockTreatment(); DeviceId deviceId = did("device1"); + DeviceId deviceId2 = did("device2"); FlowRule flowRule = DefaultFlowRule.builder() .forDevice(deviceId) @@ -101,6 +102,25 @@ public class ECFlowRuleStoreTest { .makeTemporary(44) .fromApp(APP_ID) .build(); + FlowRule flowRule2 = + DefaultFlowRule.builder() + .forDevice(deviceId) + .withSelector(SELECTOR) + .withTreatment(TREATMENT) + .withPriority(44) + .makePermanent() + .fromApp(APP_ID_2) + .build(); + FlowRule flowRule3 = + DefaultFlowRule.builder() + .forDevice(deviceId2) + .withSelector(SELECTOR) + .withTreatment(TREATMENT) + .withPriority(55) + .makePermanent() + .fromApp(APP_ID_2) + .build(); + static class MasterOfAll extends MastershipServiceAdapter { @Override @@ -247,14 +267,7 @@ public void testAddFlow() { assertEquals("PENDING_ADD", flowEntry1.state().toString()); flowStoreImpl.addOrUpdateFlowRule(flowEntry); - Iterable flows = flowStoreImpl.getFlowEntries(deviceId); - int sum = 0; - Iterator it = flows.iterator(); - while (it.hasNext()) { - it.next(); - sum++; - } - assertThat(sum, is(1)); + assertFlowsOnDevice(deviceId, 1); FlowEntry flowEntry2 = flowStoreImpl.getFlowEntry(flowRule); assertEquals("ADDED", flowEntry2.state().toString()); @@ -270,15 +283,7 @@ public void testRemoveFlow() { for (FlowEntry flow : flows1) { flowStoreImpl.removeFlowRule(flow); } - - Iterable flows2 = flowStoreImpl.getFlowEntries(deviceId); - int sum = 0; - Iterator it = flows2.iterator(); - while (it.hasNext()) { - it.next(); - sum++; - } - assertThat(sum, is(0)); + assertFlowsOnDevice(deviceId, 0); } /** @@ -291,23 +296,41 @@ public void testPurgeFlow() { FlowEntry flowEntry1 = new DefaultFlowEntry(flowRule1); flowStoreImpl.addOrUpdateFlowRule(flowEntry1); - Iterable flows1 = flowStoreImpl.getFlowEntries(deviceId); - int sum2 = 0; - Iterator it1 = flows1.iterator(); - while (it1.hasNext()) { - it1.next(); - sum2++; - } - assertThat(sum2, is(2)); + assertFlowsOnDevice(deviceId, 2); flowStoreImpl.purgeFlowRule(deviceId); - Iterable flows3 = flowStoreImpl.getFlowEntries(deviceId); - int sum3 = 0; - Iterator it3 = flows3.iterator(); - while (it3.hasNext()) { - it3.next(); - sum3++; + assertFlowsOnDevice(deviceId, 0); + } + + /** + * Tests purge flow for a device and an application. + */ + @Test + public void testPurgeFlowAppId() { + FlowEntry flowEntry1 = new DefaultFlowEntry(flowRule1); + flowStoreImpl.addOrUpdateFlowRule(flowEntry1); + + FlowEntry flowEntry2 = new DefaultFlowEntry(flowRule2); + flowStoreImpl.addOrUpdateFlowRule(flowEntry2); + + FlowEntry flowEntry3 = new DefaultFlowEntry(flowRule3); + flowStoreImpl.addOrUpdateFlowRule(flowEntry3); + + assertFlowsOnDevice(deviceId, 2); + assertFlowsOnDevice(deviceId2, 1); + + flowStoreImpl.purgeFlowRules(deviceId, APP_ID_2); + + assertFlowsOnDevice(deviceId, 1); + assertFlowsOnDevice(deviceId2, 1); + } + + private void assertFlowsOnDevice(DeviceId deviceId, int nFlows) { + Iterable flows1 = flowStoreImpl.getFlowEntries(deviceId); + int sum1 = 0; + for (FlowEntry flowEntry : flows1) { + sum1++; } - assertThat(sum3, is(0)); + assertThat(sum1, is(nFlows)); } } diff --git a/core/store/dist/src/test/java/org/onosproject/store/group/impl/DistributedGroupStoreTest.java b/core/store/dist/src/test/java/org/onosproject/store/group/impl/DistributedGroupStoreTest.java index 9e0dd9d9134..e3dc8a47753 100644 --- a/core/store/dist/src/test/java/org/onosproject/store/group/impl/DistributedGroupStoreTest.java +++ b/core/store/dist/src/test/java/org/onosproject/store/group/impl/DistributedGroupStoreTest.java @@ -69,6 +69,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.onosproject.net.NetTestTools.APP_ID; +import static org.onosproject.net.NetTestTools.APP_ID_2; import static org.onosproject.net.NetTestTools.did; import static org.onosproject.net.group.GroupDescription.Type.ALL; import static org.onosproject.net.group.GroupDescription.Type.INDIRECT; @@ -84,9 +85,13 @@ public class DistributedGroupStoreTest { private final GroupId groupId1 = new GroupId(1); private final GroupId groupId2 = new GroupId(2); private final GroupId groupId3 = new GroupId(3); + private final GroupId groupId4 = new GroupId(4); + private final GroupId groupId5 = new GroupId(5); private final GroupKey groupKey1 = new DefaultGroupKey("abc".getBytes()); private final GroupKey groupKey2 = new DefaultGroupKey("def".getBytes()); private final GroupKey groupKey3 = new DefaultGroupKey("ghi".getBytes()); + private final GroupKey groupKey4 = new DefaultGroupKey("jkl".getBytes()); + private final GroupKey groupKey5 = new DefaultGroupKey("mno".getBytes()); private final TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment(); private final TrafficTreatment treatment2 = DefaultTrafficTreatment.builder() @@ -118,6 +123,20 @@ public class DistributedGroupStoreTest { groupKey3, groupId3.id(), APP_ID); + private final GroupDescription groupDescription4 = new DefaultGroupDescription( + deviceId2, + INDIRECT, + indirectGroupBuckets, + groupKey4, + groupId4.id(), + APP_ID_2); + private final GroupDescription groupDescription5 = new DefaultGroupDescription( + deviceId1, + INDIRECT, + indirectGroupBuckets, + groupKey5, + groupId5.id(), + APP_ID_2); private DistributedGroupStore groupStoreImpl; private GroupStore groupStore; @@ -309,6 +328,30 @@ public void testRemoveGroupOnDevice() throws Exception { assertThat(groupStore.getGroupCount(deviceId2), is(0)); } + /** + * Tests removing all groups on the given device from a specific application. + */ + @Test + public void testRemoveGroupOnDeviceFromApp() throws Exception { + groupStore.deviceInitialAuditCompleted(deviceId1, true); + assertThat(groupStore.deviceInitialAuditStatus(deviceId1), is(true)); + groupStore.deviceInitialAuditCompleted(deviceId2, true); + assertThat(groupStore.deviceInitialAuditStatus(deviceId2), is(true)); + + // Make sure the pending list starts out empty + assertThat(auditPendingReqQueue.size(), is(0)); + + groupStore.storeGroupDescription(groupDescription3); + groupStore.storeGroupDescription(groupDescription4); + groupStore.storeGroupDescription(groupDescription5); + assertThat(groupStore.getGroupCount(deviceId1), is(1)); + assertThat(groupStore.getGroupCount(deviceId2), is(2)); + + groupStore.purgeGroupEntries(deviceId2, APP_ID_2); + assertThat(groupStore.getGroupCount(deviceId1), is(1)); + assertThat(groupStore.getGroupCount(deviceId2), is(1)); + } + /** * Tests adding and removing a group. */ diff --git a/core/store/dist/src/test/java/org/onosproject/store/meter/impl/DistributedMeterStoreTest.java b/core/store/dist/src/test/java/org/onosproject/store/meter/impl/DistributedMeterStoreTest.java index 4cddf547ac3..ee4d75c0b48 100644 --- a/core/store/dist/src/test/java/org/onosproject/store/meter/impl/DistributedMeterStoreTest.java +++ b/core/store/dist/src/test/java/org/onosproject/store/meter/impl/DistributedMeterStoreTest.java @@ -21,10 +21,8 @@ import org.junit.Before; import org.junit.Test; import org.onlab.junit.TestUtils; -import org.onlab.packet.IpAddress; import org.onlab.util.KryoNamespace; import org.onosproject.TestApplicationId; -import org.onosproject.cluster.NodeId; import org.onosproject.net.DeviceId; import org.onosproject.net.behaviour.MeterQuery; import org.onosproject.net.driver.Behaviour; @@ -37,11 +35,15 @@ import org.onosproject.net.meter.DefaultMeter; import org.onosproject.net.meter.DefaultMeterFeatures; import org.onosproject.net.meter.Meter; +import org.onosproject.net.meter.MeterCellId; import org.onosproject.net.meter.MeterFeatures; -import org.onosproject.net.meter.MeterFeaturesKey; import org.onosproject.net.meter.MeterId; import org.onosproject.net.meter.MeterKey; +import org.onosproject.net.meter.MeterScope; import org.onosproject.net.meter.MeterState; +import org.onosproject.net.meter.MeterTableKey; +import org.onosproject.net.pi.model.PiMeterId; +import org.onosproject.net.pi.runtime.PiMeterCellId; import org.onosproject.store.service.Serializer; import org.onosproject.store.service.TestStorageService; @@ -54,6 +56,7 @@ import static org.hamcrest.Matchers.is; import static org.junit.Assert.*; import static org.onosproject.net.NetTestTools.APP_ID; +import static org.onosproject.net.NetTestTools.APP_ID_2; import static org.onosproject.net.NetTestTools.did; /** @@ -61,33 +64,29 @@ */ public class DistributedMeterStoreTest { - // Test node id - private static final NodeId NID_LOCAL = new NodeId("local"); - - // Test ip address - private static final IpAddress LOCALHOST = IpAddress.valueOf("127.0.0.1"); - - // Store under testing private DistributedMeterStore meterStore; - // Device ids used during the tests private DeviceId did1 = did("1"); private DeviceId did2 = did("2"); private DeviceId did3 = did("3"); private DeviceId did4 = did("4"); - // Meter ids used during the tests private MeterId mid1 = MeterId.meterId(1); private MeterId mid2 = MeterId.meterId(2); + private MeterId mid3 = MeterId.meterId(3); + private MeterId mid5 = MeterId.meterId(5); + private MeterId mid6 = MeterId.meterId(6); private MeterId mid10 = MeterId.meterId(10); + private MeterCellId cid4 = PiMeterCellId.ofIndirect( + PiMeterId.of("foo"), 4); + private MeterCellId invalidCid = PiMeterCellId.ofIndirect( + PiMeterId.of("foo"), 11); - // Bands used during the tests private Band b1 = DefaultBand.builder() .ofType(Band.Type.DROP) .withRate(500) .build(); - // Meters used during the tests private Meter m1 = DefaultMeter.builder() .forDevice(did1) .fromApp(APP_ID) @@ -95,8 +94,28 @@ public class DistributedMeterStoreTest { .withUnit(Meter.Unit.KB_PER_SEC) .withBands(Collections.singletonList(b1)) .build(); + private Meter m2 = DefaultMeter.builder() + .forDevice(did1) + .fromApp(APP_ID_2) + .withCellId(mid2) + .withUnit(Meter.Unit.KB_PER_SEC) + .withBands(Collections.singletonList(b1)) + .build(); + private Meter m3 = DefaultMeter.builder() + .forDevice(did2) + .fromApp(APP_ID_2) + .withCellId(mid3) + .withUnit(Meter.Unit.KB_PER_SEC) + .withBands(Collections.singletonList(b1)) + .build(); + private Meter m4 = DefaultMeter.builder() + .forDevice(did3) + .fromApp(APP_ID) + .withCellId(cid4) + .withUnit(Meter.Unit.KB_PER_SEC) + .withBands(Collections.singletonList(b1)) + .build(); - // Meter features used during the tests private MeterFeatures mef1 = DefaultMeterFeatures.builder().forDevice(did1) .withMaxMeters(3L) .withBandTypes(new HashSet<>()) @@ -115,36 +134,42 @@ public class DistributedMeterStoreTest { .withMaxBands((byte) 0) .withMaxColors((byte) 0) .build(); + private MeterFeatures mef3 = DefaultMeterFeatures.builder().forDevice(did3) + .withStartIndex(0L) + .withEndIndex(10L) + .withScope(MeterScope.of("foo")) + .withBandTypes(new HashSet<>()) + .withUnits(new HashSet<>()) + .hasStats(false) + .hasBurst(false) + .withMaxBands((byte) 0) + .withMaxColors((byte) 0) + .build(); @Before public void setup() { - // Init step meterStore = new DistributedMeterStore(); - // Let's initialize some internal services + TestUtils.setField(meterStore, "storageService", new TestStorageService()); TestUtils.setField(meterStore, "driverService", new TestDriverService()); - - // Inject TestApplicationId into the DistributedMeterStore serializer KryoNamespace.Builder testKryoBuilder = TestUtils.getField(meterStore, "APP_KRYO_BUILDER"); testKryoBuilder.register(TestApplicationId.class); Serializer testSerializer = Serializer.using(Lists.newArrayList(testKryoBuilder.build())); TestUtils.setField(meterStore, "serializer", testSerializer); - // Activate the store meterStore.activate(); } @After public void tearDown() { - // Deactivate the store meterStore.deactivate(); } - private void initMeterStore() { - // Let's store feature for device 1 + private void initMeterStore(boolean enableUserDefinedIndex) { + meterStore.userDefinedIndexMode(enableUserDefinedIndex); meterStore.storeMeterFeatures(mef1); - // Let's store feature for device 2 meterStore.storeMeterFeatures(mef2); + meterStore.storeMeterFeatures(mef3); } /** @@ -152,14 +177,10 @@ private void initMeterStore() { */ @Test public void testStoreMeterFeatures() { - // Let's store feature for device 1 - meterStore.storeMeterFeatures(mef1); - // Verify store meter features - assertThat(meterStore.getMaxMeters(MeterFeaturesKey.key(did1)), is(3L)); - // Let's store feature for device 1 - meterStore.storeMeterFeatures(mef2); - // Verify store meter features - assertThat(meterStore.getMaxMeters(MeterFeaturesKey.key(did2)), is(10L)); + initMeterStore(false); + + assertThat(meterStore.getMaxMeters(MeterTableKey.key(did1, MeterScope.globalScope())), is(3L)); + assertThat(meterStore.getMaxMeters(MeterTableKey.key(did2, MeterScope.globalScope())), is(10L)); } /** @@ -167,14 +188,11 @@ public void testStoreMeterFeatures() { */ @Test public void testDeleteMeterFeatures() { - // Let's store feature for device 1 - meterStore.storeMeterFeatures(mef1); - // Verify store meter features - assertThat(meterStore.getMaxMeters(MeterFeaturesKey.key(did1)), is(3L)); - // Let's delete the features + initMeterStore(false); + assertThat(meterStore.getMaxMeters(MeterTableKey.key(did1, MeterScope.globalScope())), is(3L)); + meterStore.deleteMeterFeatures(did1); - // Verify delete meter features - assertThat(meterStore.getMaxMeters(MeterFeaturesKey.key(did1)), is(0L)); + assertThat(meterStore.getMaxMeters(MeterTableKey.key(did1, MeterScope.globalScope())), is(0L)); } /** @@ -182,12 +200,10 @@ public void testDeleteMeterFeatures() { */ @Test public void testAllocateId() { - // Init the store - initMeterStore(); - // Allocate a meter id and verify is equal to mid1 - assertThat(mid1, is(meterStore.allocateMeterId(did1))); - // Allocate a meter id and verify is equal to mid2 - assertThat(mid2, is(meterStore.allocateMeterId(did1))); + initMeterStore(false); + + assertThat(mid1, is(meterStore.allocateMeterId(did1, MeterScope.globalScope()))); + assertThat(mid2, is(meterStore.allocateMeterId(did1, MeterScope.globalScope()))); } /** @@ -195,18 +211,16 @@ public void testAllocateId() { */ @Test public void testFreeId() { - // Init the store - initMeterStore(); - // Allocate a meter id and verify is equal to mid1 - assertThat(mid1, is(meterStore.allocateMeterId(did1))); - // Free the above id + initMeterStore(false); + assertThat(mid1, is(meterStore.allocateMeterId(did1, MeterScope.globalScope()))); + + // Verify reuse strategy meterStore.freeMeterId(did1, mid1); - // Allocate a meter id and verify is equal to mid1 - assertThat(mid1, is(meterStore.allocateMeterId(did1))); - // Free an id not allocated + assertThat(mid1, is(meterStore.allocateMeterId(did1, MeterScope.globalScope()))); + + // Following free does not have effect meterStore.freeMeterId(did1, mid10); - // Allocate a meter id and verify is equal to mid2 - assertThat(mid2, is(meterStore.allocateMeterId(did1))); + assertThat(mid2, is(meterStore.allocateMeterId(did1, MeterScope.globalScope()))); } /** @@ -214,56 +228,39 @@ public void testFreeId() { */ @Test public void testReuseId() { - // Init the store - initMeterStore(); - // Reserve id 1 - MeterId meterIdOne = meterStore.allocateMeterId(did2); - // Free the above id + initMeterStore(false); + + MeterCellId meterIdOne = meterStore.allocateMeterId(did2, MeterScope.globalScope()); meterStore.freeMeterId(did2, meterIdOne); - // Start an async reservation - CompletableFuture future = CompletableFuture.supplyAsync( - () -> meterStore.allocateMeterId(did2) + CompletableFuture future = CompletableFuture.supplyAsync( + () -> meterStore.allocateMeterId(did2, MeterScope.globalScope()) ); - // Start another reservation - MeterId meterIdTwo = meterStore.allocateMeterId(did2); + MeterCellId meterIdTwo = meterStore.allocateMeterId(did2, MeterScope.globalScope()); try { meterIdOne = future.get(); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } - // Ids should be different, otherwise we had clash in the store assertNotEquals("Ids should be different", meterIdOne, meterIdTwo); - // Free the above id meterStore.freeMeterId(did1, meterIdOne); - // Free the above id meterStore.freeMeterId(did1, meterIdTwo); - // Reserve id 1 - meterIdOne = meterStore.allocateMeterId(did2); - // Reserve id 2 - meterStore.allocateMeterId(did2); - // Reserve id 3 - MeterId meterIdThree = meterStore.allocateMeterId(did2); - // Reserve id 4 - MeterId meterIdFour = meterStore.allocateMeterId(did2); - // Free the above id + meterIdOne = meterStore.allocateMeterId(did2, MeterScope.globalScope()); + meterStore.allocateMeterId(did2, MeterScope.globalScope()); + MeterCellId meterIdThree = meterStore.allocateMeterId(did2, MeterScope.globalScope()); + MeterCellId meterIdFour = meterStore.allocateMeterId(did2, MeterScope.globalScope()); meterStore.freeMeterId(did1, meterIdOne); - // Free the above id meterStore.freeMeterId(did1, meterIdThree); - // Free the above id meterStore.freeMeterId(did1, meterIdFour); - // Start an async reservation future = CompletableFuture.supplyAsync( - () -> meterStore.allocateMeterId(did2) + () -> meterStore.allocateMeterId(did2, MeterScope.globalScope()) ); - // Start another reservation - MeterId meterAnotherId = meterStore.allocateMeterId(did2); + MeterCellId meterAnotherId = meterStore.allocateMeterId(did2, MeterScope.globalScope()); try { meterAnotherId = future.get(); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } - // Ids should be different, otherwise we had clash in the store assertNotEquals("Ids should be different", meterAnotherId, meterIdOne); } @@ -272,12 +269,10 @@ public void testReuseId() { */ @Test public void testQueryMeters() { - // Init the store - initMeterStore(); - // Let's test queryMeters - assertThat(mid1, is(meterStore.allocateMeterId(did3))); - // Let's test queryMeters error - assertNull(meterStore.allocateMeterId(did4)); + initMeterStore(false); + + assertThat(mid1, is(meterStore.allocateMeterId(did3, MeterScope.globalScope()))); + assertNull(meterStore.allocateMeterId(did4, MeterScope.globalScope())); } /** @@ -285,14 +280,12 @@ public void testQueryMeters() { */ @Test public void testMaxMeterError() { - // Init the store - initMeterStore(); - // Reserve id 1 - assertThat(mid1, is(meterStore.allocateMeterId(did1))); - // Reserve id 2 - assertThat(mid2, is(meterStore.allocateMeterId(did1))); - // Max meter error - assertNull(meterStore.allocateMeterId(did1)); + initMeterStore(false); + + assertThat(mid1, is(meterStore.allocateMeterId(did1, MeterScope.globalScope()))); + assertThat(mid2, is(meterStore.allocateMeterId(did1, MeterScope.globalScope()))); + assertThat(mid3, is(meterStore.allocateMeterId(did1, MeterScope.globalScope()))); + assertNull(meterStore.allocateMeterId(did1, MeterScope.globalScope())); } /** @@ -300,13 +293,11 @@ public void testMaxMeterError() { */ @Test public void testStoreMeter() { - // Init the store - initMeterStore(); - // Simulate the allocation of an id - MeterId idOne = meterStore.allocateMeterId(did1); - // Verify the allocation + initMeterStore(false); + + MeterCellId idOne = meterStore.allocateMeterId(did1, MeterScope.globalScope()); assertThat(mid1, is(idOne)); - // Let's create a meter + Meter meterOne = DefaultMeter.builder() .forDevice(did1) .fromApp(APP_ID) @@ -314,13 +305,9 @@ public void testStoreMeter() { .withUnit(Meter.Unit.KB_PER_SEC) .withBands(Collections.singletonList(b1)) .build(); - // Set the state ((DefaultMeter) meterOne).setState(MeterState.PENDING_ADD); - // Store the meter - meterStore.storeMeter(meterOne); - // Let's create meter key + meterStore.addOrUpdateMeter(meterOne); MeterKey meterKey = MeterKey.key(did1, mid1); - // Verify the store assertThat(1, is(meterStore.getAllMeters().size())); assertThat(1, is(meterStore.getAllMeters(did1).size())); assertThat(m1, is(meterStore.getMeter(meterKey))); @@ -331,13 +318,11 @@ public void testStoreMeter() { */ @Test public void testDeleteMeter() { - // Init the store - initMeterStore(); - // Simulate the allocation of an id - MeterId idOne = meterStore.allocateMeterId(did1); - // Verify the allocation + initMeterStore(false); + + MeterCellId idOne = meterStore.allocateMeterId(did1, MeterScope.globalScope()); assertThat(mid1, is(idOne)); - // Let's create a meter + Meter meterOne = DefaultMeter.builder() .forDevice(did1) .fromApp(APP_ID) @@ -345,31 +330,23 @@ public void testDeleteMeter() { .withUnit(Meter.Unit.KB_PER_SEC) .withBands(Collections.singletonList(b1)) .build(); - // Set the state ((DefaultMeter) meterOne).setState(MeterState.PENDING_ADD); - // Store the meter - meterStore.storeMeter(meterOne); - // Set the state + meterStore.addOrUpdateMeter(meterOne); ((DefaultMeter) meterOne).setState(MeterState.PENDING_REMOVE); - // Let's create meter key MeterKey meterKey = MeterKey.key(did1, mid1); - // Delete meter meterStore.deleteMeter(meterOne); - // Start an async delete, simulating the operation of the provider CompletableFuture future = CompletableFuture.runAsync( - () -> meterStore.deleteMeterNow(meterOne) + () -> meterStore.purgeMeter(meterOne) ); - // Let's wait try { future.get(); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } - // Verify delete assertThat(0, is(meterStore.getAllMeters().size())); assertThat(0, is(meterStore.getAllMeters(did1).size())); assertNull(meterStore.getMeter(meterKey)); - assertThat(mid1, is(meterStore.allocateMeterId(did1))); + assertThat(mid1, is(meterStore.allocateMeterId(did1, MeterScope.globalScope()))); } /** @@ -377,13 +354,10 @@ public void testDeleteMeter() { */ @Test public void testNoDeleteMeter() { - // Init the store - initMeterStore(); - // Simulate the allocation of an id - MeterId idOne = meterStore.allocateMeterId(did1); - // Create the key + initMeterStore(false); + + MeterCellId idOne = meterStore.allocateMeterId(did1, MeterScope.globalScope()); MeterKey keyOne = MeterKey.key(did1, idOne); - // Let's create a meter Meter meterOne = DefaultMeter.builder() .forDevice(did1) .fromApp(APP_ID) @@ -391,11 +365,8 @@ public void testNoDeleteMeter() { .withUnit(Meter.Unit.KB_PER_SEC) .withBands(Collections.singletonList(b1)) .build(); - // Set the state ((DefaultMeter) meterOne).setState(MeterState.PENDING_REMOVE); - // Delete meter meterStore.deleteMeter(meterOne); - // Verify No delete assertThat(0, is(meterStore.getAllMeters().size())); assertThat(0, is(meterStore.getAllMeters(did1).size())); assertNull(meterStore.getMeter(keyOne)); @@ -405,30 +376,48 @@ public void testNoDeleteMeter() { * Test purge meter. */ @Test - public void testPurgeMeter() { - // add the meter + public void testPurgeMeters() { testStoreMeter(); - meterStore.purgeMeter(did1); - // Verify delete + + meterStore.purgeMeters(did1); MeterKey keyOne = MeterKey.key(did1, mid1); assertThat(0, is(meterStore.getAllMeters().size())); assertThat(0, is(meterStore.getAllMeters(did1).size())); assertNull(meterStore.getMeter(keyOne)); } + /** + * Test purge meter given device and application. + */ + @Test + public void testPurgeMetersDeviceAndApp() { + initMeterStore(false); + + ((DefaultMeter) m1).setState(MeterState.PENDING_ADD); + ((DefaultMeter) m2).setState(MeterState.PENDING_ADD); + ((DefaultMeter) m3).setState(MeterState.PENDING_ADD); + meterStore.addOrUpdateMeter(m1); + meterStore.addOrUpdateMeter(m2); + meterStore.addOrUpdateMeter(m3); + assertThat(3, is(meterStore.getAllMeters().size())); + + meterStore.purgeMeters(did1, APP_ID_2); + MeterKey keyTwo = MeterKey.key(did1, mid2); + assertThat(2, is(meterStore.getAllMeters().size())); + assertThat(1, is(meterStore.getAllMeters(did1).size())); + assertThat(1, is(meterStore.getAllMeters(did2).size())); + assertNull(meterStore.getMeter(keyTwo)); + } + /** * Test getMeters API immutability. */ @Test public void testGetMetersImmutability() { - // Init the store - initMeterStore(); + initMeterStore(false); - // Simulate the allocation of an id - MeterId idOne = meterStore.allocateMeterId(did1); - // Verify the allocation + MeterCellId idOne = meterStore.allocateMeterId(did1, MeterScope.globalScope()); assertThat(mid1, is(idOne)); - // Let's create a meter Meter meterOne = DefaultMeter.builder() .forDevice(did1) .fromApp(APP_ID) @@ -436,21 +425,16 @@ public void testGetMetersImmutability() { .withUnit(Meter.Unit.KB_PER_SEC) .withBands(Collections.singletonList(b1)) .build(); - // Set the state ((DefaultMeter) meterOne).setState(MeterState.PENDING_ADD); - // Store the meter - meterStore.storeMeter(meterOne); + meterStore.addOrUpdateMeter(meterOne); - // Verify the immutability Collection meters = meterStore.getAllMeters(); Collection metersDevice = meterStore.getAllMeters(did1); assertThat(1, is(meters.size())); assertThat(1, is(metersDevice.size())); - MeterId idTwo = meterStore.allocateMeterId(did1); - // Verify the allocation + MeterCellId idTwo = meterStore.allocateMeterId(did1, MeterScope.globalScope()); assertThat(mid2, is(idTwo)); - // Let's create a meter Meter meterTwo = DefaultMeter.builder() .forDevice(did1) .fromApp(APP_ID) @@ -458,23 +442,158 @@ public void testGetMetersImmutability() { .withUnit(Meter.Unit.KB_PER_SEC) .withBands(Collections.singletonList(b1)) .build(); - // Set the state ((DefaultMeter) meterTwo).setState(MeterState.PENDING_ADD); - // Store the meter - meterStore.storeMeter(meterTwo); + meterStore.addOrUpdateMeter(meterTwo); assertThat(1, is(meters.size())); assertThat(1, is(metersDevice.size())); - meters = meterStore.getAllMeters(); metersDevice = meterStore.getAllMeters(did1); assertThat(2, is(meters.size())); assertThat(2, is(metersDevice.size())); + } + + /** + * Test invalid allocation of a cell id. + */ + @Test(expected = IllegalArgumentException.class) + public void testInvalidCellId() { + initMeterStore(true); + + // MF defines an end index equals to 10 + Meter meterBad = DefaultMeter.builder() + .forDevice(did3) + .fromApp(APP_ID) + .withCellId(invalidCid) + .withUnit(Meter.Unit.KB_PER_SEC) + .withBands(Collections.singletonList(b1)) + .build(); + ((DefaultMeter) meterBad).setState(MeterState.PENDING_ADD); + meterStore.addOrUpdateMeter(meterBad); + } + + /** + * Test enabling user defined index mode. + */ + @Test + public void testEnableUserDefinedIndex() { + initMeterStore(false); + assertTrue(meterStore.userDefinedIndexMode(true)); + } + /** + * Test invalid enabling user defined index mode. + */ + @Test + public void testInvalidEnableUserDefinedIndex() { + testStoreMeter(); + + assertFalse(meterStore.userDefinedIndexMode(true)); + } + + /** + * Test disabling user defined index mode. + */ + @Test + public void testDisableUserDefinedIndex() { + initMeterStore(true); + + assertFalse(meterStore.userDefinedIndexMode(false)); + } + + /** + * Test store meter in user defined index mode. + */ + @Test + public void testStoreMeterInUserDefinedIndexMode() { + initMeterStore(true); + + Meter meterOne = DefaultMeter.builder() + .forDevice(did3) + .fromApp(APP_ID) + .withCellId(cid4) + .withUnit(Meter.Unit.KB_PER_SEC) + .withBands(Collections.singletonList(b1)) + .build(); + ((DefaultMeter) meterOne).setState(MeterState.PENDING_ADD); + meterStore.addOrUpdateMeter(meterOne); + MeterKey meterKey = MeterKey.key(did3, cid4); + assertThat(1, is(meterStore.getAllMeters().size())); + assertThat(1, is(meterStore.getAllMeters(did3).size())); + assertThat(m4, is(meterStore.getMeter(meterKey))); + } + + /** + * Test invalid disabling user defined index mode. + */ + @Test + public void testInvalidDisableUserDefinedIndex() { + testStoreMeterInUserDefinedIndexMode(); + + assertTrue(meterStore.userDefinedIndexMode(false)); + } + + /** + * Test allocation of meter ids in user defined index mode. + */ + @Test + public void testAllocateIdInUserDefinedIndexMode() { + initMeterStore(true); + + assertNull(meterStore.allocateMeterId(did1, MeterScope.globalScope())); + } + + /** + * Test free of meter ids in user defined index mode. + */ + @Test + public void testFreeIdInUserMode() { + initMeterStore(true); + + meterStore.freeMeterId(did1, mid1); + MeterTableKey globalKey = MeterTableKey.key(did1, MeterScope.globalScope()); + assertNotNull(meterStore.availableMeterIds.get(globalKey)); + assertTrue(meterStore.availableMeterIds.get(globalKey).isEmpty()); + } + + /** + * Test delete meter in user defined index mode. + */ + @Test + public void testDeleteMeterInUserDefinedIndexMode() { + initMeterStore(true); + + Meter meterOne = DefaultMeter.builder() + .forDevice(did3) + .fromApp(APP_ID) + .withCellId(cid4) + .withUnit(Meter.Unit.KB_PER_SEC) + .withBands(Collections.singletonList(b1)) + .build(); + ((DefaultMeter) meterOne).setState(MeterState.PENDING_ADD); + meterStore.addOrUpdateMeter(meterOne); + + ((DefaultMeter) meterOne).setState(MeterState.PENDING_REMOVE); + MeterKey meterKey = MeterKey.key(did3, cid4); + meterStore.deleteMeter(meterOne); + CompletableFuture future = CompletableFuture.runAsync( + () -> meterStore.purgeMeter(meterOne) + ); + + try { + future.get(); + } catch (InterruptedException | ExecutionException e) { + e.printStackTrace(); + } + assertThat(0, is(meterStore.getAllMeters().size())); + assertThat(0, is(meterStore.getAllMeters(did3).size())); + assertNull(meterStore.getMeter(meterKey)); + MeterTableKey globalKey = MeterTableKey.key(did1, MeterScope.globalScope()); + assertNotNull(meterStore.availableMeterIds.get(globalKey)); + assertTrue(meterStore.availableMeterIds.get(globalKey).isEmpty()); } - // Test class for driver service. private class TestDriverService extends DriverServiceAdapter { @Override public DriverHandler createHandler(DeviceId deviceId, String... credentials) { @@ -482,7 +601,6 @@ public DriverHandler createHandler(DeviceId deviceId, String... credentials) { } } - // Test class for driver handler. private class TestDriverHandler implements DriverHandler { @Override @@ -512,7 +630,6 @@ public boolean hasBehaviour(Class behaviourClass) { } } - // Test meter query private class TestMeterQuery implements MeterQuery { @Override diff --git a/core/store/primitives/src/main/java/org/onosproject/store/atomix/cluster/impl/AtomixClusterStore.java b/core/store/primitives/src/main/java/org/onosproject/store/atomix/cluster/impl/AtomixClusterStore.java index ca828916051..f53174680ee 100644 --- a/core/store/primitives/src/main/java/org/onosproject/store/atomix/cluster/impl/AtomixClusterStore.java +++ b/core/store/primitives/src/main/java/org/onosproject/store/atomix/cluster/impl/AtomixClusterStore.java @@ -47,6 +47,7 @@ import java.util.stream.Collectors; import static com.google.common.base.Preconditions.checkNotNull; +import static com.google.common.base.Strings.isNullOrEmpty; /** * Atomix cluster store. @@ -57,6 +58,8 @@ public class AtomixClusterStore extends AbstractStore getStorageNodes() { return membershipService.getMembers() .stream() - .filter(member -> !Objects.equals(member.properties().getProperty("type"), "onos")) + .filter(member -> !Objects.equals(member.properties().getProperty(TYPE_KEY), TYPE_ONOS)) .map(this::toControllerNode) .collect(Collectors.toSet()); } @@ -179,7 +183,7 @@ public Set getStorageNodes() { public Set getNodes() { return membershipService.getMembers() .stream() - .filter(member -> Objects.equals(member.properties().getProperty("type"), "onos")) + .filter(member -> Objects.equals(member.properties().getProperty(TYPE_KEY), TYPE_ONOS)) .map(this::toControllerNode) .collect(Collectors.toSet()); } @@ -221,8 +225,9 @@ public ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort) { nodes.put(node.id(), node); ControllerNode.State state = node.equals(localNode) ? ControllerNode.State.ACTIVE : ControllerNode.State.INACTIVE; - membershipService.getMember(node.id().id()).properties().setProperty(STATE_KEY, state.name()); - notifyDelegate(new ClusterEvent(ClusterEvent.Type.INSTANCE_ADDED, node)); + Member member = membershipService.getMember(node.id().id()); + member.properties().setProperty(STATE_KEY, state.name()); + notifyDelegate(clusterEvent(ClusterEvent.Type.INSTANCE_ADDED, member, node)); return node; } @@ -232,7 +237,20 @@ public void removeNode(NodeId nodeId) { ControllerNode node = nodes.remove(nodeId); if (node != null) { states.remove(nodeId); - notifyDelegate(new ClusterEvent(ClusterEvent.Type.INSTANCE_REMOVED, node)); + notifyDelegate(clusterEvent(ClusterEvent.Type.INSTANCE_REMOVED, + membershipService.getMember(node.id().id()), node)); } } + + private ClusterEvent clusterEvent(ClusterEvent.Type type, Member member, ControllerNode node) { + // Atomix nodes do not set the property TYPE. Nowadays, the internal else is not used. + if (member != null && !isNullOrEmpty(member.properties().getProperty(TYPE_KEY))) { + if (Objects.equals(member.properties().getProperty(TYPE_KEY), TYPE_ONOS)) { + return new ClusterEvent(type, node, ClusterEvent.InstanceType.ONOS); + } else { + return new ClusterEvent(type, node, ClusterEvent.InstanceType.STORAGE); + } + } + return new ClusterEvent(type, node, ClusterEvent.InstanceType.STORAGE); + } } diff --git a/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixConsistentMultimap.java b/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixConsistentMultimap.java index 96d7e8c564a..e444eb50b4c 100644 --- a/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixConsistentMultimap.java +++ b/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixConsistentMultimap.java @@ -108,11 +108,21 @@ public CompletableFuture>> removeAll(K key) { return adaptMapFuture(atomixMultimap.removeAll(key).thenApply(this::toVersioned)); } + @Override + public CompletableFuture removeAll(Map> mapping) { + return adaptMapFuture(atomixMultimap.removeAll(mapping)); + } + @Override public CompletableFuture putAll(K key, Collection values) { return adaptMapFuture(atomixMultimap.putAll(key, values)); } + @Override + public CompletableFuture putAll(Map> mapping) { + return adaptMapFuture(atomixMultimap.putAll(mapping)); + } + @Override @SuppressWarnings("unchecked") public CompletableFuture>> replaceValues(K key, Collection values) { diff --git a/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixLeaderElector.java b/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixLeaderElector.java index e92eafba079..b296da061fa 100644 --- a/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixLeaderElector.java +++ b/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/AtomixLeaderElector.java @@ -105,6 +105,11 @@ public CompletableFuture removeChangeListener(Consumer> return CompletableFuture.completedFuture(null); } + @Override + public CompletableFuture demote(String topic, NodeId nodeId) { + return adaptFuture(atomixElector.demote(topic, nodeId)); + } + private Leadership toLeadership(String topic, io.atomix.core.election.Leadership leadership) { return leadership != null ? new Leadership(topic, toLeader(leadership.leader()), leadership.candidates()) diff --git a/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/PartitionManager.java b/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/PartitionManager.java index 0e6c11c4276..c6a2e75cf90 100644 --- a/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/PartitionManager.java +++ b/core/store/primitives/src/main/java/org/onosproject/store/atomix/primitives/impl/PartitionManager.java @@ -124,4 +124,23 @@ public List partitionClientInfo() { .collect(Collectors.toList()))) .collect(Collectors.toList()); } + + @Override + public void snapshot() { + checkPermission(PARTITION_READ); + if (partitionGroup != null) { + partitionGroup.snapshot().join(); + } + } + + @Override + public void snapshot(PartitionId partitionId) { + checkPermission(PARTITION_READ); + io.atomix.primitive.partition.PartitionId atomixPartitionId = + io.atomix.primitive.partition.PartitionId.from(partitionGroup.name(), partitionId.id()); + if (partitionGroup != null && + partitionGroup.getPartition(atomixPartitionId) != null) { + partitionGroup.snapshot(atomixPartitionId).join(); + } + } } diff --git a/core/store/serializers/src/main/java/org/onosproject/store/serializers/ImmutableByteSequenceSerializer.java b/core/store/serializers/src/main/java/org/onosproject/store/serializers/ImmutableByteSequenceSerializer.java index 1cbd021f408..9670acd185f 100644 --- a/core/store/serializers/src/main/java/org/onosproject/store/serializers/ImmutableByteSequenceSerializer.java +++ b/core/store/serializers/src/main/java/org/onosproject/store/serializers/ImmutableByteSequenceSerializer.java @@ -38,12 +38,14 @@ public ImmutableByteSequenceSerializer() { @Override public void write(Kryo kryo, Output output, ImmutableByteSequence object) { byte[] data = object.asArray(); + output.writeBoolean(object.isAscii()); output.writeInt(data.length); output.write(data); } @Override public ImmutableByteSequence read(Kryo kryo, Input input, Class type) { + boolean isAscii = input.readBoolean(); int length = input.readInt(); byte[] data = new byte[length]; int bytesRead = input.read(data); @@ -51,6 +53,10 @@ public ImmutableByteSequence read(Kryo kryo, Input input, Classpax-logging-log4j2->log4j2-core->kafka-clients - "apache-karaf": "https://repo1.maven.org/maven2/org/onosproject/apache-karaf-offline/4.2.9-offline-20200706/apache-karaf-4.2.9-offline-20200706.tar.gz", + "apache-karaf": "https://repo1.maven.org/maven2/org/onosproject/apache-karaf-offline/4.2.14-offline-20220105/apache-karaf-4.2.14-offline-20220105.tar.gz", "bndlib": "mvn:biz.aQute.bnd:biz.aQute.bndlib:jar:4.1.0", "bndexe": "mvn:biz.aQute.bnd:biz.aQute.bnd:4.1.0", "libthrift": "mvn:org.apache.thrift:libthrift:0.11.0", @@ -284,7 +284,6 @@ "mibs-net-snmp": "mvn:org.onosproject:mibbler-mibs-net-snmp:1.0-20151221.1", "mibs-rfc": "mvn:org.onosproject:mibbler-mibs-rfc:1.0-20151221.1", "io.socket-client": "mvn:io.socket:socket.io-client:jar:0.8.3", - "json": "mvn:org.json:json:jar:20090211", "engine.io-client": "mvn:io.socket:engine.io-client:jar:0.8.3", "org_codehaus_mojo_animal_sniffer_annotations": "mvn:org.codehaus.mojo:animal-sniffer-annotations:1.17", diff --git a/drivers/barefoot/BUILD b/drivers/barefoot/BUILD index ee635409e70..1633a15fd6d 100644 --- a/drivers/barefoot/BUILD +++ b/drivers/barefoot/BUILD @@ -2,13 +2,16 @@ COMPILE_DEPS = CORE_DEPS + [ "//drivers/p4runtime:onos-drivers-p4runtime", ] +TEST_DEPS = TEST_ADAPTERS + BUNDLES = [ ":onos-drivers-barefoot", ] -osgi_jar( +osgi_jar_with_tests( resources = glob(["src/main/resources/**"]), resources_root = "src/main/resources", + test_deps = TEST_DEPS, deps = COMPILE_DEPS, ) diff --git a/drivers/barefoot/src/main/java/org/onosproject/drivers/barefoot/TofinoMeterProgrammable.java b/drivers/barefoot/src/main/java/org/onosproject/drivers/barefoot/TofinoMeterProgrammable.java new file mode 100644 index 00000000000..8d8c4503fdc --- /dev/null +++ b/drivers/barefoot/src/main/java/org/onosproject/drivers/barefoot/TofinoMeterProgrammable.java @@ -0,0 +1,88 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.drivers.barefoot; + +import org.onosproject.drivers.p4runtime.P4RuntimeMeterProgrammable; +import org.onosproject.net.meter.MeterProgrammable; +import org.onosproject.net.pi.runtime.PiMeterBand; +import org.onosproject.net.pi.runtime.PiMeterCellConfig; + +/** + * Implementation of the MeterProgrammable behaviour for a Tofino-based switch. + */ +public class TofinoMeterProgrammable extends P4RuntimeMeterProgrammable implements MeterProgrammable { + // More insights for these magic numbers can be found in this doc + // https://docs.google.com/document/d/1Vuf_2RaO0BJPTj_weE9h2spUBCMsiBX-iIMb4OoEIB0/edit?usp=sharing + private static final double RATE_ERROR = 0.02; + private static final long BURST_LOWER_DIVIDER = 126; + private static final long BURST_UPPER_DIVIDER = 125; + private static final long BURST_MULTIPLIER = 125; + + @Override + public boolean isSimilar(PiMeterCellConfig onosMeter, PiMeterCellConfig deviceMeter) { + final PiMeterBand onosCommittedBand = onosMeter.committedBand(); + final PiMeterBand onosPeakBand = onosMeter.peakBand(); + final PiMeterBand deviceCommittedBand = deviceMeter.committedBand(); + final PiMeterBand devicePeakBand = deviceMeter.peakBand(); + + // Fail fast, this can easily happen if we send a write very + // close to a read, read can still return the default config + if (deviceCommittedBand == null || devicePeakBand == null) { + return false; + } + + final long onosCir = onosCommittedBand.rate(); + final long onosCburst = onosCommittedBand.burst(); + final long onosPir = onosPeakBand.rate(); + final long onosPburst = onosPeakBand.burst(); + final long deviceCir = deviceCommittedBand.rate(); + final long deviceCburst = deviceCommittedBand.burst(); + final long devicePir = devicePeakBand.rate(); + final long devicePburst = devicePeakBand.burst(); + + return isRateSimilar(onosCir, deviceCir) && isRateSimilar(onosPir, devicePir) && + isBurstSimilar(onosCburst, deviceCburst) && isBurstSimilar(onosPburst, devicePburst); + } + + // Verify if device rate is included in the confidence interval + // derived from the rate stored in ONOS + private boolean isRateSimilar(long onosRate, long deviceRate) { + double lowerEnd = (double) onosRate * (1.0 - RATE_ERROR); + double upperEnd = (double) onosRate * (1.0 + RATE_ERROR); + + if (log.isDebugEnabled()) { + log.debug("isRateSimilar {} in [{}, {}]", deviceRate, lowerEnd, upperEnd); + } + + return deviceRate >= lowerEnd && deviceRate <= upperEnd; + } + + // Verify if device burst is included in the confidence interval + // derived from the burst stored in ONOS + private boolean isBurstSimilar(long onosBurst, long deviceBurst) { + // Rundown removing the decimal part + long lowerEnd = (onosBurst / BURST_LOWER_DIVIDER) * BURST_MULTIPLIER; + long upperEnd = (onosBurst / BURST_UPPER_DIVIDER) * BURST_MULTIPLIER; + + if (log.isDebugEnabled()) { + log.debug("isBurstSimilar {} in [{}, {}]", deviceBurst, lowerEnd, upperEnd); + } + + return deviceBurst >= lowerEnd && deviceBurst <= upperEnd; + } + +} diff --git a/drivers/barefoot/src/main/resources/barefoot-drivers.xml b/drivers/barefoot/src/main/resources/barefoot-drivers.xml index 559182e7b03..3b85dbe163c 100644 --- a/drivers/barefoot/src/main/resources/barefoot-drivers.xml +++ b/drivers/barefoot/src/main/resources/barefoot-drivers.xml @@ -27,7 +27,9 @@ hwVersion="Tofino" swVersion="Stratum" extends="stratum"> - false + + true diff --git a/drivers/barefoot/src/test/java/org/onosproject/drivers/barefoot/TofinoMeterProgrammableTest.java b/drivers/barefoot/src/test/java/org/onosproject/drivers/barefoot/TofinoMeterProgrammableTest.java new file mode 100644 index 00000000000..b4baf4c0add --- /dev/null +++ b/drivers/barefoot/src/test/java/org/onosproject/drivers/barefoot/TofinoMeterProgrammableTest.java @@ -0,0 +1,182 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.drivers.barefoot; + +import com.google.common.collect.ImmutableMap; +import org.junit.Before; +import org.junit.Test; +import org.onosproject.net.pi.model.PiMeterId; +import org.onosproject.net.pi.runtime.PiMeterBand; +import org.onosproject.net.pi.runtime.PiMeterBandType; +import org.onosproject.net.pi.runtime.PiMeterCellConfig; +import org.onosproject.net.pi.runtime.PiMeterCellId; + +import java.util.Map; + +import static junit.framework.TestCase.assertFalse; +import static junit.framework.TestCase.assertTrue; + +/** + * Test for TofinoMeterProgrammable behavior. + */ +public class TofinoMeterProgrammableTest { + + private TofinoMeterProgrammable meterProgrammable; + private PiMeterCellId meterCellId = PiMeterCellId.ofIndirect(PiMeterId.of("foo"), 0); + + private static final Map RATES = ImmutableMap.builder() + .put(125000L, 124500L) + .put(244800L, 244375L) + .put(300000L, 299125L) + .build(); + private static final Map WRONG_RATES = ImmutableMap.builder() + .put(12500L, 0L) + .put(60000L, 0L) + .put(124900L, 0L) + .put(12501L, 12000L) + .put(60001L, 58000L) + .put(124901L, 122400L) + .put(12502L, 12800L) + .put(60002L, 62000L) + .put(124902L, 128000L) + .build(); + + private static final Map BURSTS = ImmutableMap.builder() + .put(1482L, 1375L) + .put(7410L, 7375L) + .put(14820L, 14750L) + .build(); + + private static final Map WRONG_BURSTS = ImmutableMap.builder() + .put(1482L, 1374L) + .put(7410L, 7249L) + .put(14820L, 14624L) + .put(1483L, 1376L) + .put(7411L, 7376L) + .put(14821L, 14751L) + .build(); + + @Before + public void setup() { + meterProgrammable = new TofinoMeterProgrammable(); + } + + /** + * Test isRateSimilar check of the tofino behavior. + */ + @Test + public void testIsRateSimilar() { + PiMeterBand onosMeterBand; + PiMeterBand deviceMeterBand; + PiMeterCellConfig onosMeter; + PiMeterCellConfig deviceMeter; + for (Map.Entry entry : RATES.entrySet()) { + onosMeterBand = new PiMeterBand(PiMeterBandType.COMMITTED, entry.getKey(), 0); + deviceMeterBand = new PiMeterBand(PiMeterBandType.COMMITTED, entry.getValue(), 0); + onosMeter = PiMeterCellConfig.builder() + .withMeterCellId(meterCellId) + .withMeterBand(onosMeterBand) + .withMeterBand(new PiMeterBand(PiMeterBandType.PEAK, 0, 0)) + .build(); + deviceMeter = PiMeterCellConfig.builder() + .withMeterCellId(meterCellId) + .withMeterBand(deviceMeterBand) + .withMeterBand(new PiMeterBand(PiMeterBandType.PEAK, 0, 0)) + .build(); + assertTrue(meterProgrammable.isSimilar(onosMeter, deviceMeter)); + } + } + + /** + * Test wrong isRateSimilar of the tofino behavior. + */ + @Test + public void testWrongIsRateSimilar() { + PiMeterBand onosMeterBand; + PiMeterBand deviceMeterBand; + PiMeterCellConfig onosMeter; + PiMeterCellConfig deviceMeter; + for (Map.Entry entry : WRONG_RATES.entrySet()) { + onosMeterBand = new PiMeterBand(PiMeterBandType.COMMITTED, entry.getKey(), 0); + deviceMeterBand = new PiMeterBand(PiMeterBandType.COMMITTED, entry.getValue(), 0); + onosMeter = PiMeterCellConfig.builder() + .withMeterCellId(meterCellId) + .withMeterBand(onosMeterBand) + .withMeterBand(new PiMeterBand(PiMeterBandType.PEAK, 0, 0)) + .build(); + deviceMeter = PiMeterCellConfig.builder() + .withMeterCellId(meterCellId) + .withMeterBand(deviceMeterBand) + .withMeterBand(new PiMeterBand(PiMeterBandType.PEAK, 0, 0)) + .build(); + assertFalse(meterProgrammable.isSimilar(onosMeter, deviceMeter)); + } + } + + /** + * Test isBurstSimilar of the tofino behavior. + */ + @Test + public void testIsBurstSimilar() { + PiMeterBand onosMeterBand; + PiMeterBand deviceMeterBand; + PiMeterCellConfig onosMeter; + PiMeterCellConfig deviceMeter; + for (Map.Entry entry : BURSTS.entrySet()) { + onosMeterBand = new PiMeterBand(PiMeterBandType.COMMITTED, 0, entry.getKey()); + deviceMeterBand = new PiMeterBand(PiMeterBandType.COMMITTED, 0, entry.getValue()); + onosMeter = PiMeterCellConfig.builder() + .withMeterCellId(meterCellId) + .withMeterBand(onosMeterBand) + .withMeterBand(new PiMeterBand(PiMeterBandType.PEAK, 0, 0)) + .build(); + deviceMeter = PiMeterCellConfig.builder() + .withMeterCellId(meterCellId) + .withMeterBand(deviceMeterBand) + .withMeterBand(new PiMeterBand(PiMeterBandType.PEAK, 0, 0)) + .build(); + assertTrue(meterProgrammable.isSimilar(onosMeter, deviceMeter)); + } + } + + /** + * Test wrong isBurstSimilar of the tofino behavior. + */ + @Test + public void testWrongIsBurstSimilar() { + PiMeterBand onosMeterBand; + PiMeterBand deviceMeterBand; + PiMeterCellConfig onosMeter; + PiMeterCellConfig deviceMeter; + for (Map.Entry entry : WRONG_BURSTS.entrySet()) { + onosMeterBand = new PiMeterBand(PiMeterBandType.COMMITTED, 0, entry.getKey()); + deviceMeterBand = new PiMeterBand(PiMeterBandType.COMMITTED, 0, entry.getValue()); + onosMeter = PiMeterCellConfig.builder() + .withMeterCellId(meterCellId) + .withMeterBand(onosMeterBand) + .withMeterBand(new PiMeterBand(PiMeterBandType.PEAK, 0, 0)) + .build(); + deviceMeter = PiMeterCellConfig.builder() + .withMeterCellId(meterCellId) + .withMeterBand(deviceMeterBand) + .withMeterBand(new PiMeterBand(PiMeterBandType.PEAK, 0, 0)) + .build(); + assertFalse(meterProgrammable.isSimilar(onosMeter, deviceMeter)); + } + } + +} diff --git a/drivers/corsa/src/main/java/org/onosproject/drivers/corsa/AbstractCorsaPipeline.java b/drivers/corsa/src/main/java/org/onosproject/drivers/corsa/AbstractCorsaPipeline.java index b0b02befa95..b9fa750accb 100644 --- a/drivers/corsa/src/main/java/org/onosproject/drivers/corsa/AbstractCorsaPipeline.java +++ b/drivers/corsa/src/main/java/org/onosproject/drivers/corsa/AbstractCorsaPipeline.java @@ -647,4 +647,10 @@ public void onError(FlowRuleOperations ops) { } })); } + + @Override + public void purgeAll(ApplicationId appId) { + flowRuleService.purgeFlowRules(deviceId, appId); + groupService.purgeGroupEntries(deviceId, appId); + } } diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/CentecV350Pipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/CentecV350Pipeline.java index cad1a8832ae..dedc8102833 100644 --- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/CentecV350Pipeline.java +++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/CentecV350Pipeline.java @@ -289,6 +289,11 @@ public void next(NextObjective nextObjective) { } + @Override + public void purgeAll(ApplicationId appId) { + flowRuleService.purgeFlowRules(deviceId, appId); + } + private Collection processForward(ForwardingObjective fwd) { switch (fwd.flag()) { case SPECIFIC: diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java index 1b3d310e4a0..e66adb9c392 100644 --- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java +++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/DefaultSingleTablePipeline.java @@ -21,6 +21,7 @@ import com.google.common.cache.RemovalNotification; import org.onlab.osgi.ServiceDirectory; import org.onlab.util.KryoNamespace; +import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; import org.onosproject.net.behaviour.NextGroup; import org.onosproject.net.behaviour.Pipeliner; @@ -273,6 +274,11 @@ public void next(NextObjective nextObjective) { nextObjective.context().ifPresent(context -> context.onSuccess(nextObjective)); } + @Override + public void purgeAll(ApplicationId appId) { + flowRuleService.purgeFlowRules(deviceId, appId); + } + @Override public List getNextMappings(NextGroup nextGroup) { // Default single table pipeline does not use nextObjectives or groups diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/NokiaOltPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/NokiaOltPipeline.java deleted file mode 100644 index 667d8cf087e..00000000000 --- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/NokiaOltPipeline.java +++ /dev/null @@ -1,784 +0,0 @@ -/* - * Copyright 2016-present Open Networking Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.driver.pipeline; - -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; -import com.google.common.cache.RemovalCause; -import com.google.common.cache.RemovalNotification; -import com.google.common.collect.Lists; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; -import org.onlab.osgi.ServiceDirectory; -import org.onlab.packet.EthType; -import org.onlab.packet.IPv4; -import org.onlab.packet.VlanId; -import org.onlab.util.KryoNamespace; -import org.onosproject.core.ApplicationId; -import org.onosproject.core.CoreService; -import org.onosproject.net.DeviceId; -import org.onosproject.net.PortNumber; -import org.onosproject.net.behaviour.NextGroup; -import org.onosproject.net.behaviour.Pipeliner; -import org.onosproject.net.behaviour.PipelinerContext; -import org.onosproject.net.driver.AbstractHandlerBehaviour; -import org.onosproject.net.flow.DefaultFlowRule; -import org.onosproject.net.flow.DefaultTrafficSelector; -import org.onosproject.net.flow.DefaultTrafficTreatment; -import org.onosproject.net.flow.FlowRule; -import org.onosproject.net.flow.FlowRuleOperations; -import org.onosproject.net.flow.FlowRuleOperationsContext; -import org.onosproject.net.flow.FlowRuleService; -import org.onosproject.net.flow.TrafficSelector; -import org.onosproject.net.flow.TrafficTreatment; -import org.onosproject.net.flow.criteria.Criteria; -import org.onosproject.net.flow.criteria.Criterion; -import org.onosproject.net.flow.criteria.EthTypeCriterion; -import org.onosproject.net.flow.criteria.IPCriterion; -import org.onosproject.net.flow.criteria.IPProtocolCriterion; -import org.onosproject.net.flow.criteria.PortCriterion; -import org.onosproject.net.flow.criteria.VlanIdCriterion; -import org.onosproject.net.flow.instructions.Instruction; -import org.onosproject.net.flow.instructions.Instructions; -import org.onosproject.net.flow.instructions.L2ModificationInstruction; -import org.onosproject.net.flowobjective.FilteringObjective; -import org.onosproject.net.flowobjective.FlowObjectiveStore; -import org.onosproject.net.flowobjective.ForwardingObjective; -import org.onosproject.net.flowobjective.NextObjective; -import org.onosproject.net.flowobjective.Objective; -import org.onosproject.net.flowobjective.ObjectiveError; -import org.onosproject.net.group.DefaultGroupBucket; -import org.onosproject.net.group.DefaultGroupDescription; -import org.onosproject.net.group.DefaultGroupKey; -import org.onosproject.net.group.Group; -import org.onosproject.net.group.GroupBucket; -import org.onosproject.net.group.GroupBuckets; -import org.onosproject.net.group.GroupDescription; -import org.onosproject.net.group.GroupEvent; -import org.onosproject.net.group.GroupKey; -import org.onosproject.net.group.GroupListener; -import org.onosproject.net.group.GroupService; -import org.onosproject.store.serializers.KryoNamespaces; -import org.onosproject.store.service.StorageService; -import org.slf4j.Logger; - -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; -import java.util.Iterator; - - -import static org.slf4j.LoggerFactory.getLogger; - -/** - * Pipeliner for OLT device. - */ - -public class NokiaOltPipeline extends AbstractHandlerBehaviour implements Pipeliner { - - private static final Integer QQ_TABLE = 1; - private static final short MCAST_VLAN = 4000; - private static final String OLTCOOKIES = "olt-cookies-must-be-unique"; - private static final int EAPOL_FLOW_PRIORITY = 1200; - private final Logger log = getLogger(getClass()); - - private ServiceDirectory serviceDirectory; - private FlowRuleService flowRuleService; - private GroupService groupService; - private CoreService coreService; - private StorageService storageService; - - private DeviceId deviceId; - private ApplicationId appId; - - - protected FlowObjectiveStore flowObjectiveStore; - - private Cache pendingGroups; - - protected static KryoNamespace appKryo = new KryoNamespace.Builder() - .register(KryoNamespaces.API) - .register(GroupKey.class) - .register(DefaultGroupKey.class) - .register(OLTPipelineGroup.class) - .build("OltPipeline"); - @Override - public void init(DeviceId deviceId, PipelinerContext context) { - log.debug("Initiate OLT pipeline"); - this.serviceDirectory = context.directory(); - this.deviceId = deviceId; - - flowRuleService = serviceDirectory.get(FlowRuleService.class); - coreService = serviceDirectory.get(CoreService.class); - groupService = serviceDirectory.get(GroupService.class); - flowObjectiveStore = context.store(); - storageService = serviceDirectory.get(StorageService.class); - - appId = coreService.registerApplication( - "org.onosproject.driver.OLTPipeline"); - - - pendingGroups = CacheBuilder.newBuilder() - .expireAfterWrite(20, TimeUnit.SECONDS) - .removalListener((RemovalNotification notification) -> { - if (notification.getCause() == RemovalCause.EXPIRED) { - fail(notification.getValue(), ObjectiveError.GROUPINSTALLATIONFAILED); - } - }).build(); - - groupService.addListener(new InnerGroupListener()); - - } - - @Override - public void filter(FilteringObjective filter) { - Instructions.OutputInstruction output; - - if (filter.meta() != null && !filter.meta().immediate().isEmpty()) { - output = (Instructions.OutputInstruction) filter.meta().immediate().stream() - .filter(t -> t.type().equals(Instruction.Type.OUTPUT)) - .limit(1) - .findFirst().get(); - - if (output == null || !output.port().equals(PortNumber.CONTROLLER)) { - log.error("OLT can only filter packet to controller"); - fail(filter, ObjectiveError.UNSUPPORTED); - return; - } - } else { - fail(filter, ObjectiveError.BADPARAMS); - return; - } - - if (filter.key().type() != Criterion.Type.IN_PORT) { - fail(filter, ObjectiveError.BADPARAMS); - return; - } - - EthTypeCriterion ethType = (EthTypeCriterion) - filterForCriterion(filter.conditions(), Criterion.Type.ETH_TYPE); - - if (ethType == null) { - fail(filter, ObjectiveError.BADPARAMS); - return; - } - - if (ethType.ethType().equals(EthType.EtherType.EAPOL.ethType())) { - provisionEapol(filter, ethType, output); - } else if (ethType.ethType().equals(EthType.EtherType.IPV4.ethType())) { - IPProtocolCriterion ipProto = (IPProtocolCriterion) - filterForCriterion(filter.conditions(), Criterion.Type.IP_PROTO); - if (ipProto.protocol() == IPv4.PROTOCOL_IGMP) { - provisionIgmp(filter, ethType, ipProto, output); - } else { - log.error("OLT can only filter igmp"); - fail(filter, ObjectiveError.UNSUPPORTED); - } - } else { - log.error("OLT can only filter eapol and igmp"); - fail(filter, ObjectiveError.UNSUPPORTED); - } - - } - - private void installObjective(FlowRule.Builder ruleBuilder, Objective objective) { - FlowRuleOperations.Builder flowBuilder = FlowRuleOperations.builder(); - switch (objective.op()) { - - case ADD: - flowBuilder.add(ruleBuilder.build()); - break; - case REMOVE: - flowBuilder.remove(ruleBuilder.build()); - break; - default: - log.warn("Unknown operation {}", objective.op()); - } - - flowRuleService.apply(flowBuilder.build(new FlowRuleOperationsContext() { - @Override - public void onSuccess(FlowRuleOperations ops) { - objective.context().ifPresent(context -> context.onSuccess(objective)); - } - - @Override - public void onError(FlowRuleOperations ops) { - objective.context() - .ifPresent(context -> context.onError(objective, ObjectiveError.FLOWINSTALLATIONFAILED)); - } - })); - } - - @Override - public void forward(ForwardingObjective fwd) { - - if (checkForMulticast(fwd)) { - processMulticastRule(fwd); - return; - } - - if (checkForEAPOL(fwd)) { - log.warn("Discarding EAPOL flow which is not supported on this pipeline"); - return; - } - - TrafficTreatment treatment = fwd.treatment(); - - List instructions = treatment.allInstructions(); - - Optional vlanIntruction = instructions.stream() - .filter(i -> i.type() == Instruction.Type.L2MODIFICATION) - .filter(i -> ((L2ModificationInstruction) i).subtype() == - L2ModificationInstruction.L2SubType.VLAN_PUSH || - ((L2ModificationInstruction) i).subtype() == - L2ModificationInstruction.L2SubType.VLAN_POP) - .findAny(); - - if (vlanIntruction.isPresent()) { - L2ModificationInstruction vlanIns = - (L2ModificationInstruction) vlanIntruction.get(); - - if (vlanIns.subtype() == L2ModificationInstruction.L2SubType.VLAN_PUSH) { - installUpstreamRules(fwd); - } else if (vlanIns.subtype() == L2ModificationInstruction.L2SubType.VLAN_POP) { - installDownstreamRules(fwd); - } else { - log.error("Unknown OLT operation: {}", fwd); - fail(fwd, ObjectiveError.UNSUPPORTED); - return; - } - - pass(fwd); - } else { - TrafficSelector selector = fwd.selector(); - - if (fwd.treatment() != null) { - // Deal with SPECIFIC and VERSATILE in the same manner. - FlowRule.Builder ruleBuilder = DefaultFlowRule.builder() - .forDevice(deviceId) - .withSelector(selector) - .fromApp(fwd.appId()) - .withPriority(fwd.priority()) - .withTreatment(fwd.treatment()); - - if (fwd.permanent()) { - ruleBuilder.makePermanent(); - } else { - ruleBuilder.makeTemporary(fwd.timeout()); - } - installObjective(ruleBuilder, fwd); - - } else { - log.error("No treatment error: {}", fwd); - fail(fwd, ObjectiveError.UNSUPPORTED); - } - } - - } - - - @Override - public void next(NextObjective nextObjective) { - if (nextObjective.type() != NextObjective.Type.BROADCAST) { - log.error("OLT only supports broadcast groups."); - fail(nextObjective, ObjectiveError.BADPARAMS); - } - - if (nextObjective.next().size() != 1) { - log.error("OLT only supports singleton broadcast groups."); - fail(nextObjective, ObjectiveError.BADPARAMS); - } - - TrafficTreatment treatment = nextObjective.next().stream().findFirst().get(); - - - GroupBucket bucket = DefaultGroupBucket.createAllGroupBucket(treatment); - GroupKey key = new DefaultGroupKey(appKryo.serialize(nextObjective.id())); - - - pendingGroups.put(key, nextObjective); - - switch (nextObjective.op()) { - case ADD: - GroupDescription groupDesc = - new DefaultGroupDescription(deviceId, - GroupDescription.Type.ALL, - new GroupBuckets(Collections.singletonList(bucket)), - key, - null, - nextObjective.appId()); - groupService.addGroup(groupDesc); - break; - case REMOVE: - groupService.removeGroup(deviceId, key, nextObjective.appId()); - break; - case ADD_TO_EXISTING: - groupService.addBucketsToGroup(deviceId, key, - new GroupBuckets(Collections.singletonList(bucket)), - key, nextObjective.appId()); - break; - case REMOVE_FROM_EXISTING: - groupService.removeBucketsFromGroup(deviceId, key, - new GroupBuckets(Collections.singletonList(bucket)), - key, nextObjective.appId()); - break; - default: - log.warn("Unknown next objective operation: {}", nextObjective.op()); - } - - - } - - private void processMulticastRule(ForwardingObjective fwd) { - if (fwd.nextId() == null) { - log.error("Multicast objective does not have a next id"); - fail(fwd, ObjectiveError.BADPARAMS); - } - - GroupKey key = getGroupForNextObjective(fwd.nextId()); - - if (key == null) { - log.error("Group for forwarding objective missing: {}", fwd); - fail(fwd, ObjectiveError.GROUPMISSING); - } - - Group group = groupService.getGroup(deviceId, key); - TrafficTreatment treatment = - buildTreatment(Instructions.createGroup(group.id())); - - FlowRule rule = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .forTable(0) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(fwd.selector()) - .withTreatment(treatment) - .build(); - - FlowRuleOperations.Builder builder = FlowRuleOperations.builder(); - switch (fwd.op()) { - - case ADD: - builder.add(rule); - break; - case REMOVE: - builder.remove(rule); - break; - case ADD_TO_EXISTING: - case REMOVE_FROM_EXISTING: - break; - default: - log.warn("Unknown forwarding operation: {}", fwd.op()); - } - - applyFlowRules(builder, fwd); - - } - - private boolean checkForMulticast(ForwardingObjective fwd) { - - IPCriterion ip = (IPCriterion) filterForCriterion(fwd.selector().criteria(), - Criterion.Type.IPV4_DST); - - if (ip == null) { - return false; - } - - return ip.ip().isMulticast(); - - } - - private boolean checkForEAPOL(ForwardingObjective fwd) { - EthTypeCriterion ethType = (EthTypeCriterion) - filterForCriterion(fwd.selector().criteria(), Criterion.Type.ETH_TYPE); - - return ethType != null && ethType.ethType().equals(EthType.EtherType.EAPOL.ethType()); - } - private GroupKey getGroupForNextObjective(Integer nextId) { - NextGroup next = flowObjectiveStore.getNextGroup(nextId); - return appKryo.deserialize(next.data()); - - } - - private void installDownstreamRules(ForwardingObjective fwd) { - List> vlanOps = - vlanOps(fwd, - L2ModificationInstruction.L2SubType.VLAN_POP); - - if (vlanOps == null) { - return; - } - - Instructions.OutputInstruction output = (Instructions.OutputInstruction) fetchOutput(fwd, "downstream"); - - if (output == null) { - return; - } - - Pair popAndRewrite = vlanOps.remove(0); - - TrafficSelector selector = fwd.selector(); - - Criterion outerVlan = selector.getCriterion(Criterion.Type.VLAN_VID); - Criterion innerVlan = selector.getCriterion(Criterion.Type.INNER_VLAN_VID); - Criterion inport = selector.getCriterion(Criterion.Type.IN_PORT); - Criterion bullshit = Criteria.matchMetadata(output.port().toLong()); - - if (outerVlan == null || innerVlan == null || inport == null) { - log.error("Forwarding objective is underspecified: {}", fwd); - fail(fwd, ObjectiveError.BADPARAMS); - return; - } - - Criterion innerVid = Criteria.matchVlanId(((VlanIdCriterion) innerVlan).vlanId()); - - FlowRule.Builder outer = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(buildSelector(inport, outerVlan, bullshit)) - .withTreatment(buildTreatment(popAndRewrite.getLeft(), - Instructions.transition(QQ_TABLE))); - - FlowRule.Builder inner = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .forTable(QQ_TABLE) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(buildSelector(inport, innerVid)) - .withTreatment(buildTreatment(popAndRewrite.getLeft(), - output)); - - applyRules(fwd, inner, outer); - - } - - private boolean hasUntaggedVlanTag(TrafficSelector selector) { - Iterator iter = selector.criteria().iterator(); - - while (iter.hasNext()) { - Criterion criterion = iter.next(); - if (criterion.type() == Criterion.Type.VLAN_VID && - ((VlanIdCriterion) criterion).vlanId().toShort() == VlanId.UNTAGGED) { - return true; - } - } - - return false; - } - - private void installUpstreamRules(ForwardingObjective fwd) { - List> vlanOps = - vlanOps(fwd, - L2ModificationInstruction.L2SubType.VLAN_PUSH); - FlowRule.Builder inner; - - if (vlanOps == null) { - return; - } - - Instruction output = fetchOutput(fwd, "upstream"); - - if (output == null) { - return; - } - - Pair innerPair = vlanOps.remove(0); - - Pair outerPair = vlanOps.remove(0); - - - if (hasUntaggedVlanTag(fwd.selector())) { - inner = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(fwd.selector()) - .withTreatment(buildTreatment(innerPair.getLeft(), - innerPair.getRight(), - Instructions.transition(QQ_TABLE))); - } else { - inner = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(fwd.selector()) - .withTreatment(buildTreatment( - innerPair.getRight(), - Instructions.transition(QQ_TABLE))); - } - - - PortCriterion inPort = (PortCriterion) - fwd.selector().getCriterion(Criterion.Type.IN_PORT); - - VlanId cVlanId = ((L2ModificationInstruction.ModVlanIdInstruction) - innerPair.getRight()).vlanId(); - - FlowRule.Builder outer = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .forTable(QQ_TABLE) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(buildSelector(inPort, - Criteria.matchVlanId(cVlanId))) - .withTreatment(buildTreatment(outerPair.getLeft(), - outerPair.getRight(), - output)); - - applyRules(fwd, inner, outer); - - } - - private Instruction fetchOutput(ForwardingObjective fwd, String direction) { - Instruction output = fwd.treatment().allInstructions().stream() - .filter(i -> i.type() == Instruction.Type.OUTPUT) - .findFirst().orElse(null); - - if (output == null) { - log.error("OLT {} rule has no output", direction); - fail(fwd, ObjectiveError.BADPARAMS); - return null; - } - return output; - } - - private List> vlanOps(ForwardingObjective fwd, - L2ModificationInstruction.L2SubType type) { - - List> vlanOps = findVlanOps( - fwd.treatment().allInstructions(), type); - - if (vlanOps == null) { - String direction = type == L2ModificationInstruction.L2SubType.VLAN_POP - ? "downstream" : "upstream"; - log.error("Missing vlan operations in {} forwarding: {}", direction, fwd); - fail(fwd, ObjectiveError.BADPARAMS); - return null; - } - return vlanOps; - } - - - private List> findVlanOps(List instructions, - L2ModificationInstruction.L2SubType type) { - - List vlanPushs = findL2Instructions( - type, - instructions); - List vlanSets = findL2Instructions( - L2ModificationInstruction.L2SubType.VLAN_ID, - instructions); - - if (vlanPushs.size() != vlanSets.size()) { - return null; - } - - List> pairs = Lists.newArrayList(); - - for (int i = 0; i < vlanPushs.size(); i++) { - pairs.add(new ImmutablePair<>(vlanPushs.get(i), vlanSets.get(i))); - } - return pairs; - } - - private List findL2Instructions(L2ModificationInstruction.L2SubType subType, - List actions) { - return actions.stream() - .filter(i -> i.type() == Instruction.Type.L2MODIFICATION) - .filter(i -> ((L2ModificationInstruction) i).subtype() == subType) - .collect(Collectors.toList()); - } - - private void provisionEapol(FilteringObjective filter, - EthTypeCriterion ethType, - Instructions.OutputInstruction output) { - - TrafficSelector selector = buildSelector(filter.key(), ethType); - TrafficTreatment treatment = buildTreatment(output); - buildAndApplyRule(filter, selector, treatment, EAPOL_FLOW_PRIORITY); - - } - - private void provisionIgmp(FilteringObjective filter, EthTypeCriterion ethType, - IPProtocolCriterion ipProto, - Instructions.OutputInstruction output) { - TrafficSelector selector = buildSelector(filter.key(), ethType, ipProto); - TrafficTreatment treatment = buildTreatment(output); - buildAndApplyRule(filter, selector, treatment); - } - - private void buildAndApplyRule(FilteringObjective filter, TrafficSelector selector, - TrafficTreatment treatment) { - buildAndApplyRule(filter, selector, treatment, filter.priority()); - } - - private void buildAndApplyRule(FilteringObjective filter, TrafficSelector selector, - TrafficTreatment treatment, int priority) { - FlowRule rule = DefaultFlowRule.builder() - .fromApp(filter.appId()) - .forDevice(deviceId) - .forTable(0) - .makePermanent() - .withSelector(selector) - .withTreatment(treatment) - .withPriority(priority) - .build(); - - FlowRuleOperations.Builder opsBuilder = FlowRuleOperations.builder(); - - switch (filter.type()) { - case PERMIT: - opsBuilder.add(rule); - break; - case DENY: - opsBuilder.remove(rule); - break; - default: - log.warn("Unknown filter type : {}", filter.type()); - fail(filter, ObjectiveError.UNSUPPORTED); - } - - applyFlowRules(opsBuilder, filter); - } - - private void applyRules(ForwardingObjective fwd, - FlowRule.Builder inner, FlowRule.Builder outer) { - FlowRuleOperations.Builder builder = FlowRuleOperations.builder(); - switch (fwd.op()) { - case ADD: - builder.add(inner.build()).add(outer.build()); - break; - case REMOVE: - builder.remove(inner.build()).remove(outer.build()); - break; - case ADD_TO_EXISTING: - break; - case REMOVE_FROM_EXISTING: - break; - default: - log.warn("Unknown forwarding operation: {}", fwd.op()); - } - - applyFlowRules(builder, fwd); - } - - private void applyFlowRules(FlowRuleOperations.Builder builder, - Objective objective) { - flowRuleService.apply(builder.build(new FlowRuleOperationsContext() { - @Override - public void onSuccess(FlowRuleOperations ops) { - pass(objective); - } - - @Override - public void onError(FlowRuleOperations ops) { - fail(objective, ObjectiveError.FLOWINSTALLATIONFAILED); - } - })); - } - - private Criterion filterForCriterion(Collection criteria, Criterion.Type type) { - return criteria.stream() - .filter(c -> c.type().equals(type)) - .limit(1) - .findFirst().orElse(null); - } - - private TrafficSelector buildSelector(Criterion... criteria) { - - - TrafficSelector.Builder sBuilder = DefaultTrafficSelector.builder(); - - for (Criterion c : criteria) { - sBuilder.add(c); - } - - return sBuilder.build(); - } - - private TrafficTreatment buildTreatment(Instruction... instructions) { - - - TrafficTreatment.Builder tBuilder = DefaultTrafficTreatment.builder(); - - for (Instruction i : instructions) { - tBuilder.add(i); - } - - return tBuilder.build(); - } - - - private void fail(Objective obj, ObjectiveError error) { - obj.context().ifPresent(context -> context.onError(obj, error)); - } - - private void pass(Objective obj) { - obj.context().ifPresent(context -> context.onSuccess(obj)); - } - - - private class InnerGroupListener implements GroupListener { - @Override - public void event(GroupEvent event) { - if (event.type() == GroupEvent.Type.GROUP_ADDED || event.type() == GroupEvent.Type.GROUP_UPDATED) { - GroupKey key = event.subject().appCookie(); - - NextObjective obj = pendingGroups.getIfPresent(key); - if (obj != null) { - flowObjectiveStore.putNextGroup(obj.id(), new OLTPipelineGroup(key)); - pass(obj); - pendingGroups.invalidate(key); - } - } - } - } - - private static class OLTPipelineGroup implements NextGroup { - - private final GroupKey key; - - public OLTPipelineGroup(GroupKey key) { - this.key = key; - } - - public GroupKey key() { - return key; - } - - @Override - public byte[] data() { - return appKryo.serialize(key); - } - - } - - @Override - public List getNextMappings(NextGroup nextGroup) { - // TODO Implementation deferred to vendor - return null; - } -} diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/OltPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/OltPipeline.java deleted file mode 100644 index 38b7eda7fb8..00000000000 --- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/OltPipeline.java +++ /dev/null @@ -1,1147 +0,0 @@ -/* - * Copyright 2016-present Open Networking Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.driver.pipeline; - -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; -import com.google.common.cache.RemovalCause; -import com.google.common.cache.RemovalNotification; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Lists; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; -import org.onlab.osgi.ServiceDirectory; -import org.onlab.packet.EthType; -import org.onlab.packet.IPv4; -import org.onlab.packet.IPv6; -import org.onlab.packet.IpPrefix; -import org.onlab.packet.VlanId; -import org.onlab.util.KryoNamespace; -import org.onosproject.core.ApplicationId; -import org.onosproject.core.CoreService; -import org.onosproject.net.DeviceId; -import org.onosproject.net.PortNumber; -import org.onosproject.net.behaviour.NextGroup; -import org.onosproject.net.behaviour.Pipeliner; -import org.onosproject.net.behaviour.PipelinerContext; -import org.onosproject.net.driver.AbstractHandlerBehaviour; -import org.onosproject.net.flow.DefaultFlowRule; -import org.onosproject.net.flow.DefaultTrafficSelector; -import org.onosproject.net.flow.DefaultTrafficTreatment; -import org.onosproject.net.flow.FlowRule; -import org.onosproject.net.flow.FlowRuleOperations; -import org.onosproject.net.flow.FlowRuleOperationsContext; -import org.onosproject.net.flow.FlowRuleService; -import org.onosproject.net.flow.TrafficSelector; -import org.onosproject.net.flow.TrafficTreatment; -import org.onosproject.net.flow.criteria.Criteria; -import org.onosproject.net.flow.criteria.Criterion; -import org.onosproject.net.flow.criteria.EthTypeCriterion; -import org.onosproject.net.flow.criteria.IPCriterion; -import org.onosproject.net.flow.criteria.IPProtocolCriterion; -import org.onosproject.net.flow.criteria.PortCriterion; -import org.onosproject.net.flow.criteria.UdpPortCriterion; -import org.onosproject.net.flow.criteria.VlanIdCriterion; -import org.onosproject.net.flow.instructions.Instruction; -import org.onosproject.net.flow.instructions.Instructions; -import org.onosproject.net.flow.instructions.L2ModificationInstruction; -import org.onosproject.net.flowobjective.FilteringObjective; -import org.onosproject.net.flowobjective.FlowObjectiveStore; -import org.onosproject.net.flowobjective.ForwardingObjective; -import org.onosproject.net.flowobjective.NextObjective; -import org.onosproject.net.flowobjective.Objective; -import org.onosproject.net.flowobjective.ObjectiveError; -import org.onosproject.net.group.DefaultGroupBucket; -import org.onosproject.net.group.DefaultGroupDescription; -import org.onosproject.net.group.DefaultGroupKey; -import org.onosproject.net.group.Group; -import org.onosproject.net.group.GroupBucket; -import org.onosproject.net.group.GroupBuckets; -import org.onosproject.net.group.GroupDescription; -import org.onosproject.net.group.GroupEvent; -import org.onosproject.net.group.GroupKey; -import org.onosproject.net.group.GroupListener; -import org.onosproject.net.group.GroupService; -import org.onosproject.store.serializers.KryoNamespaces; -import org.onosproject.store.service.StorageService; -import org.slf4j.Logger; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; - -import static org.onosproject.core.CoreService.CORE_APP_NAME; -import static org.slf4j.LoggerFactory.getLogger; - -/** - * Pipeliner for OLT device. - */ - -public class OltPipeline extends AbstractHandlerBehaviour implements Pipeliner { - - private static final Integer QQ_TABLE = 1; - private static final int NO_ACTION_PRIORITY = 500; - private static final String DOWNSTREAM = "downstream"; - private static final String UPSTREAM = "upstream"; - private final Logger log = getLogger(getClass()); - - private ServiceDirectory serviceDirectory; - private FlowRuleService flowRuleService; - private GroupService groupService; - private CoreService coreService; - private StorageService storageService; - - private DeviceId deviceId; - private ApplicationId appId; - - - protected FlowObjectiveStore flowObjectiveStore; - - private Cache pendingGroups; - - protected static KryoNamespace appKryo = new KryoNamespace.Builder() - .register(KryoNamespaces.API) - .register(GroupKey.class) - .register(DefaultGroupKey.class) - .register(OLTPipelineGroup.class) - .build("OltPipeline"); - - @Override - public void init(DeviceId deviceId, PipelinerContext context) { - log.debug("Initiate OLT pipeline"); - this.serviceDirectory = context.directory(); - this.deviceId = deviceId; - - flowRuleService = serviceDirectory.get(FlowRuleService.class); - coreService = serviceDirectory.get(CoreService.class); - groupService = serviceDirectory.get(GroupService.class); - flowObjectiveStore = context.store(); - storageService = serviceDirectory.get(StorageService.class); - - appId = coreService.registerApplication( - "org.onosproject.driver.OLTPipeline"); - - - pendingGroups = CacheBuilder.newBuilder() - .expireAfterWrite(20, TimeUnit.SECONDS) - .removalListener((RemovalNotification notification) -> { - if (notification.getCause() == RemovalCause.EXPIRED) { - fail(notification.getValue(), ObjectiveError.GROUPINSTALLATIONFAILED); - } - }).build(); - - groupService.addListener(new InnerGroupListener()); - - } - - @Override - public void filter(FilteringObjective filter) { - Instructions.OutputInstruction output; - - if (filter.meta() != null && !filter.meta().immediate().isEmpty()) { - output = (Instructions.OutputInstruction) filter.meta().immediate().stream() - .filter(t -> t.type().equals(Instruction.Type.OUTPUT)) - .limit(1) - .findFirst().get(); - - if (output == null || !output.port().equals(PortNumber.CONTROLLER)) { - log.warn("OLT can only filter packet to controller"); - fail(filter, ObjectiveError.UNSUPPORTED); - return; - } - } else { - fail(filter, ObjectiveError.BADPARAMS); - return; - } - - if (filter.key().type() != Criterion.Type.IN_PORT) { - fail(filter, ObjectiveError.BADPARAMS); - return; - } - - EthTypeCriterion ethType = (EthTypeCriterion) - filterForCriterion(filter.conditions(), Criterion.Type.ETH_TYPE); - - if (ethType == null) { - fail(filter, ObjectiveError.BADPARAMS); - return; - } - Optional vlanId = filter.meta().immediate().stream() - .filter(t -> t.type().equals(Instruction.Type.L2MODIFICATION) - && ((L2ModificationInstruction) t).subtype() - .equals(L2ModificationInstruction.L2SubType.VLAN_ID)) - .limit(1) - .findFirst(); - - Optional vlanPcp = filter.meta().immediate().stream() - .filter(t -> t.type().equals(Instruction.Type.L2MODIFICATION) - && ((L2ModificationInstruction) t).subtype() - .equals(L2ModificationInstruction.L2SubType.VLAN_PCP)) - .limit(1) - .findFirst(); - - Optional vlanPush = filter.meta().immediate().stream() - .filter(t -> t.type().equals(Instruction.Type.L2MODIFICATION) - && ((L2ModificationInstruction) t).subtype() - .equals(L2ModificationInstruction.L2SubType.VLAN_PUSH)) - .limit(1) - .findFirst(); - - if (ethType.ethType().equals(EthType.EtherType.EAPOL.ethType())) { - - if (vlanId.isEmpty() || vlanPush.isEmpty()) { - log.warn("Missing EAPOL vlan or vlanPush"); - fail(filter, ObjectiveError.BADPARAMS); - return; - } - provisionEthTypeBasedFilter(filter, ethType, output, - (L2ModificationInstruction) vlanId.get(), - (L2ModificationInstruction) vlanPush.get()); - } else if (ethType.ethType().equals(EthType.EtherType.LLDP.ethType())) { - provisionEthTypeBasedFilter(filter, ethType, output, null, null); - - } else if (ethType.ethType().equals(EthType.EtherType.IPV4.ethType())) { - IPProtocolCriterion ipProto = (IPProtocolCriterion) - filterForCriterion(filter.conditions(), Criterion.Type.IP_PROTO); - if (ipProto == null) { - log.warn("OLT can only filter IGMP and DHCP"); - fail(filter, ObjectiveError.UNSUPPORTED); - return; - } - if (ipProto.protocol() == IPv4.PROTOCOL_IGMP) { - provisionIgmp(filter, ethType, ipProto, output, - vlanId.orElse(null), - vlanPcp.orElse(null)); - } else if (ipProto.protocol() == IPv4.PROTOCOL_UDP) { - UdpPortCriterion udpSrcPort = (UdpPortCriterion) - filterForCriterion(filter.conditions(), Criterion.Type.UDP_SRC); - - UdpPortCriterion udpDstPort = (UdpPortCriterion) - filterForCriterion(filter.conditions(), Criterion.Type.UDP_DST); - - if ((udpSrcPort.udpPort().toInt() == 67 && udpDstPort.udpPort().toInt() == 68) || - (udpSrcPort.udpPort().toInt() == 68 && udpDstPort.udpPort().toInt() == 67)) { - provisionDhcp(filter, ethType, ipProto, udpSrcPort, udpDstPort, vlanId.orElse(null), - vlanPcp.orElse(null), output); - } else { - log.warn("Filtering rule with unsupported UDP src {} or dst {} port", udpSrcPort, udpDstPort); - fail(filter, ObjectiveError.UNSUPPORTED); - } - } else { - log.warn("Currently supporting only IGMP and DHCP filters for IPv4 packets"); - fail(filter, ObjectiveError.UNSUPPORTED); - } - } else if (ethType.ethType().equals(EthType.EtherType.IPV6.ethType())) { - IPProtocolCriterion ipProto = (IPProtocolCriterion) - filterForCriterion(filter.conditions(), Criterion.Type.IP_PROTO); - if (ipProto == null) { - log.warn("OLT can only filter DHCP"); - fail(filter, ObjectiveError.UNSUPPORTED); - return; - } - if (ipProto.protocol() == IPv6.PROTOCOL_UDP) { - UdpPortCriterion udpSrcPort = (UdpPortCriterion) - filterForCriterion(filter.conditions(), Criterion.Type.UDP_SRC); - - UdpPortCriterion udpDstPort = (UdpPortCriterion) - filterForCriterion(filter.conditions(), Criterion.Type.UDP_DST); - - if ((udpSrcPort.udpPort().toInt() == 546 && udpDstPort.udpPort().toInt() == 547) || - (udpSrcPort.udpPort().toInt() == 547 && udpDstPort.udpPort().toInt() == 546)) { - provisionDhcp(filter, ethType, ipProto, udpSrcPort, udpDstPort, vlanId.orElse(null), - vlanPcp.orElse(null), output); - } else { - log.warn("Filtering rule with unsupported UDP src {} or dst {} port", udpSrcPort, udpDstPort); - fail(filter, ObjectiveError.UNSUPPORTED); - } - } else { - log.warn("Currently supporting only DHCP filters for IPv6 packets"); - fail(filter, ObjectiveError.UNSUPPORTED); - } - } else { - log.warn("\nOnly the following are Supported in OLT for filter ->\n" - + "ETH TYPE : EAPOL, LLDP and IPV4\n" - + "IPV4 TYPE: IGMP and UDP (for DHCP)" - + "IPV6 TYPE: UDP (for DHCP)"); - fail(filter, ObjectiveError.UNSUPPORTED); - } - - } - - - @Override - public void forward(ForwardingObjective fwd) { - log.debug("Installing forwarding objective {}", fwd); - if (checkForMulticast(fwd)) { - processMulticastRule(fwd); - return; - } - - TrafficTreatment treatment = fwd.treatment(); - - List instructions = treatment.allInstructions(); - - Optional vlanInstruction = instructions.stream() - .filter(i -> i.type() == Instruction.Type.L2MODIFICATION) - .filter(i -> ((L2ModificationInstruction) i).subtype() == - L2ModificationInstruction.L2SubType.VLAN_PUSH || - ((L2ModificationInstruction) i).subtype() == - L2ModificationInstruction.L2SubType.VLAN_POP) - .findAny(); - - - if (!vlanInstruction.isPresent()) { - installNoModificationRules(fwd); - } else { - L2ModificationInstruction vlanIns = - (L2ModificationInstruction) vlanInstruction.get(); - if (vlanIns.subtype() == L2ModificationInstruction.L2SubType.VLAN_PUSH) { - installUpstreamRules(fwd); - } else if (vlanIns.subtype() == L2ModificationInstruction.L2SubType.VLAN_POP) { - installDownstreamRules(fwd); - } else { - log.error("Unknown OLT operation: {}", fwd); - fail(fwd, ObjectiveError.UNSUPPORTED); - return; - } - } - - pass(fwd); - - } - - - @Override - public void next(NextObjective nextObjective) { - if (nextObjective.type() != NextObjective.Type.BROADCAST) { - log.error("OLT only supports broadcast groups."); - fail(nextObjective, ObjectiveError.BADPARAMS); - return; - } - - if (nextObjective.next().size() != 1 && !nextObjective.op().equals(Objective.Operation.REMOVE)) { - log.error("OLT only supports singleton broadcast groups."); - fail(nextObjective, ObjectiveError.BADPARAMS); - return; - } - - Optional treatmentOpt = nextObjective.next().stream().findFirst(); - if (treatmentOpt.isEmpty() && !nextObjective.op().equals(Objective.Operation.REMOVE)) { - log.error("Next objective {} does not have a treatment", nextObjective); - fail(nextObjective, ObjectiveError.BADPARAMS); - return; - } - - GroupKey key = new DefaultGroupKey(appKryo.serialize(nextObjective.id())); - - pendingGroups.put(key, nextObjective); - log.trace("NextObjective Operation {}", nextObjective.op()); - switch (nextObjective.op()) { - case ADD: - GroupDescription groupDesc = - new DefaultGroupDescription(deviceId, - GroupDescription.Type.ALL, - new GroupBuckets( - Collections.singletonList( - buildBucket(treatmentOpt.get()))), - key, - null, - nextObjective.appId()); - groupService.addGroup(groupDesc); - break; - case REMOVE: - groupService.removeGroup(deviceId, key, nextObjective.appId()); - break; - case ADD_TO_EXISTING: - groupService.addBucketsToGroup(deviceId, key, - new GroupBuckets( - Collections.singletonList( - buildBucket(treatmentOpt.get()))), - key, nextObjective.appId()); - break; - case REMOVE_FROM_EXISTING: - groupService.removeBucketsFromGroup(deviceId, key, - new GroupBuckets( - Collections.singletonList( - buildBucket(treatmentOpt.get()))), - key, nextObjective.appId()); - break; - default: - log.warn("Unknown next objective operation: {}", nextObjective.op()); - } - - - } - - private GroupBucket buildBucket(TrafficTreatment treatment) { - return DefaultGroupBucket.createAllGroupBucket(treatment); - } - - private void processMulticastRule(ForwardingObjective fwd) { - if (fwd.nextId() == null) { - log.error("Multicast objective does not have a next id"); - fail(fwd, ObjectiveError.BADPARAMS); - } - - GroupKey key = getGroupForNextObjective(fwd.nextId()); - - if (key == null) { - log.error("Group for forwarding objective missing: {}", fwd); - fail(fwd, ObjectiveError.GROUPMISSING); - } - - Group group = groupService.getGroup(deviceId, key); - TrafficTreatment treatment = - buildTreatment(Instructions.createGroup(group.id())); - - TrafficSelector.Builder selectorBuilder = buildIpv4SelectorForMulticast(fwd); - - FlowRule rule = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .forTable(0) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(selectorBuilder.build()) - .withTreatment(treatment) - .build(); - - FlowRuleOperations.Builder builder = FlowRuleOperations.builder(); - switch (fwd.op()) { - - case ADD: - builder.add(rule); - break; - case REMOVE: - builder.remove(rule); - break; - case ADD_TO_EXISTING: - case REMOVE_FROM_EXISTING: - break; - default: - log.warn("Unknown forwarding operation: {}", fwd.op()); - } - - applyFlowRules(builder, fwd); - - } - - private TrafficSelector.Builder buildIpv4SelectorForMulticast(ForwardingObjective fwd) { - TrafficSelector.Builder builderToUpdate = DefaultTrafficSelector.builder(); - - Optional vlanIdCriterion = readFromSelector(fwd.meta(), Criterion.Type.VLAN_VID); - if (vlanIdCriterion.isPresent()) { - VlanId assignedVlan = ((VlanIdCriterion) vlanIdCriterion.get()).vlanId(); - builderToUpdate.matchVlanId(assignedVlan); - } - - Optional innerVlanIdCriterion = readFromSelector(fwd.meta(), Criterion.Type.INNER_VLAN_VID); - if (innerVlanIdCriterion.isPresent()) { - VlanId assignedInnerVlan = ((VlanIdCriterion) innerVlanIdCriterion.get()).vlanId(); - builderToUpdate.matchMetadata(assignedInnerVlan.toShort()); - } - - Optional ethTypeCriterion = readFromSelector(fwd.selector(), Criterion.Type.ETH_TYPE); - if (ethTypeCriterion.isPresent()) { - EthType ethType = ((EthTypeCriterion) ethTypeCriterion.get()).ethType(); - builderToUpdate.matchEthType(ethType.toShort()); - } - - Optional ipv4DstCriterion = readFromSelector(fwd.selector(), Criterion.Type.IPV4_DST); - if (ipv4DstCriterion.isPresent()) { - IpPrefix ipv4Dst = ((IPCriterion) ipv4DstCriterion.get()).ip(); - builderToUpdate.matchIPDst(ipv4Dst); - } - - return builderToUpdate; - } - - static Optional readFromSelector(TrafficSelector selector, Criterion.Type type) { - if (selector == null) { - return Optional.empty(); - } - Criterion criterion = selector.getCriterion(type); - return (criterion == null) - ? Optional.empty() : Optional.of(criterion); - } - - private boolean checkForMulticast(ForwardingObjective fwd) { - - IPCriterion ip = (IPCriterion) filterForCriterion(fwd.selector().criteria(), - Criterion.Type.IPV4_DST); - - if (ip == null) { - return false; - } - - return ip.ip().isMulticast(); - - } - - private GroupKey getGroupForNextObjective(Integer nextId) { - NextGroup next = flowObjectiveStore.getNextGroup(nextId); - return appKryo.deserialize(next.data()); - - } - - private void installNoModificationRules(ForwardingObjective fwd) { - Instructions.OutputInstruction output = (Instructions.OutputInstruction) fetchOutput(fwd, DOWNSTREAM); - Instructions.MetadataInstruction writeMetadata = fetchWriteMetadata(fwd); - Instructions.MeterInstruction meter = (Instructions.MeterInstruction) fetchMeter(fwd); - - TrafficSelector selector = fwd.selector(); - - Criterion inport = selector.getCriterion(Criterion.Type.IN_PORT); - Criterion outerVlan = selector.getCriterion(Criterion.Type.VLAN_VID); - Criterion innerVlan = selector.getCriterion(Criterion.Type.INNER_VLAN_VID); - - if (inport == null || output == null || innerVlan == null || outerVlan == null) { - // Avoid logging a non-error from lldp, bbdp and eapol core flows. - if (!fwd.appId().name().equals(CORE_APP_NAME)) { - log.error("Forwarding objective is underspecified: {}", fwd); - } else { - log.debug("Not installing unsupported core generated flow {}", fwd); - } - fail(fwd, ObjectiveError.BADPARAMS); - return; - } - - - FlowRule.Builder outer = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(buildSelector(inport, outerVlan)) - .withTreatment(buildTreatment(output, writeMetadata, meter)); - - applyRules(fwd, outer); - } - - private void installDownstreamRules(ForwardingObjective fwd) { - Instructions.OutputInstruction output = (Instructions.OutputInstruction) fetchOutput(fwd, DOWNSTREAM); - - if (output == null) { - return; - } - - TrafficSelector selector = fwd.selector(); - - Criterion outerVlan = selector.getCriterion(Criterion.Type.VLAN_VID); - Criterion outerPbit = selector.getCriterion(Criterion.Type.VLAN_PCP); - Criterion innerVlanCriterion = selector.getCriterion(Criterion.Type.INNER_VLAN_VID); - Criterion inport = selector.getCriterion(Criterion.Type.IN_PORT); - Criterion dstMac = selector.getCriterion(Criterion.Type.ETH_DST); - - if (outerVlan == null || innerVlanCriterion == null || inport == null) { - // Avoid logging a non-error from lldp, bbdp and eapol core flows. - if (!fwd.appId().name().equals(CORE_APP_NAME)) { - log.error("Forwarding objective is underspecified: {}", fwd); - } else { - log.debug("Not installing unsupported core generated flow {}", fwd); - } - fail(fwd, ObjectiveError.BADPARAMS); - return; - } - - VlanId innerVlan = ((VlanIdCriterion) innerVlanCriterion).vlanId(); - Criterion innerVid = Criteria.matchVlanId(innerVlan); - - if (innerVlan.toShort() == VlanId.ANY_VALUE) { - TrafficSelector outerSelector = buildSelector(inport, outerVlan, outerPbit, dstMac); - installDownstreamRulesForAnyVlan(fwd, output, outerSelector, buildSelector(inport, - Criteria.matchVlanId(VlanId.ANY))); - } else { - // Required to differentiate the same match flows - // Please note that S tag and S p bit values will be same for the same service - so conflict flows! - // Metadata match criteria solves the conflict issue - but not used by the voltha - // Maybe - find a better way to solve the above problem - Criterion metadata = Criteria.matchMetadata(innerVlan.toShort()); - TrafficSelector outerSelector = buildSelector(inport, metadata, outerVlan, outerPbit, dstMac); - installDownstreamRulesForVlans(fwd, output, outerSelector, buildSelector(inport, innerVid)); - } - } - - private void installDownstreamRulesForVlans(ForwardingObjective fwd, Instruction output, - TrafficSelector outerSelector, TrafficSelector innerSelector) { - - List> vlanOps = - vlanOps(fwd, - L2ModificationInstruction.L2SubType.VLAN_POP); - - if (vlanOps == null || vlanOps.isEmpty()) { - return; - } - - Pair popAndRewrite = vlanOps.remove(0); - - TrafficTreatment innerTreatment; - VlanId setVlanId = ((L2ModificationInstruction.ModVlanIdInstruction) popAndRewrite.getRight()).vlanId(); - if (VlanId.NONE.equals(setVlanId)) { - innerTreatment = (buildTreatment(popAndRewrite.getLeft(), fetchMeter(fwd), - writeMetadataIncludingOnlyTp(fwd), output)); - } else { - innerTreatment = (buildTreatment(popAndRewrite.getRight(), - fetchMeter(fwd), writeMetadataIncludingOnlyTp(fwd), output)); - } - - List setVlanPcps = findL2Instructions(L2ModificationInstruction.L2SubType.VLAN_PCP, - fwd.treatment().allInstructions()); - - Instruction innerPbitSet = null; - - if (setVlanPcps != null && !setVlanPcps.isEmpty()) { - innerPbitSet = setVlanPcps.get(0); - } - - VlanId remarkInnerVlan = null; - Optional vlanIdCriterion = readFromSelector(innerSelector, Criterion.Type.VLAN_VID); - if (vlanIdCriterion.isPresent()) { - remarkInnerVlan = ((VlanIdCriterion) vlanIdCriterion.get()).vlanId(); - } - - Instruction modVlanId = null; - if (innerPbitSet != null) { - modVlanId = Instructions.modVlanId(remarkInnerVlan); - } - - //match: in port (nni), s-tag - //action: pop vlan (s-tag), write metadata, go to table 1, meter - FlowRule.Builder outer = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(outerSelector) - .withTreatment(buildTreatment(popAndRewrite.getLeft(), modVlanId, - innerPbitSet, fetchMeter(fwd), fetchWriteMetadata(fwd), Instructions.transition(QQ_TABLE))); - - //match: in port (nni), c-tag - //action: immediate: write metadata and pop, meter, output - FlowRule.Builder inner = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .forTable(QQ_TABLE) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(innerSelector) - .withTreatment(innerTreatment); - applyRules(fwd, inner, outer); - } - - private void installDownstreamRulesForAnyVlan(ForwardingObjective fwd, Instruction output, - TrafficSelector outerSelector, TrafficSelector innerSelector) { - - //match: in port (nni), s-tag - //action: immediate: write metadata, pop vlan, meter and go to table 1 - FlowRule.Builder outer = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(outerSelector) - .withTreatment(buildTreatment(Instructions.popVlan(), fetchMeter(fwd), - fetchWriteMetadata(fwd), Instructions.transition(QQ_TABLE))); - - //match: in port (nni) and s-tag - //action: immediate : write metadata, meter and output - FlowRule.Builder inner = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .forTable(QQ_TABLE) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(innerSelector) - .withTreatment(buildTreatment(fetchMeter(fwd), - writeMetadataIncludingOnlyTp(fwd), output)); - - applyRules(fwd, inner, outer); - } - - private void installUpstreamRules(ForwardingObjective fwd) { - List> vlanOps = - vlanOps(fwd, - L2ModificationInstruction.L2SubType.VLAN_PUSH); - - if (vlanOps == null || vlanOps.isEmpty()) { - return; - } - - Instruction output = fetchOutput(fwd, UPSTREAM); - - if (output == null) { - return; - } - - Pair outerPair = vlanOps.remove(0); - - boolean noneValueVlanStatus = checkNoneVlanCriteria(fwd); - boolean anyValueVlanStatus = checkAnyVlanMatchCriteria(fwd); - - if (anyValueVlanStatus) { - installUpstreamRulesForAnyVlan(fwd, output, outerPair); - } else { - Pair innerPair = outerPair; - outerPair = vlanOps.remove(0); - installUpstreamRulesForVlans(fwd, output, innerPair, outerPair, noneValueVlanStatus); - } - } - - private void installUpstreamRulesForVlans(ForwardingObjective fwd, Instruction output, - Pair innerPair, - Pair outerPair, Boolean noneValueVlanStatus) { - - List setVlanPcps = findL2Instructions(L2ModificationInstruction.L2SubType.VLAN_PCP, - fwd.treatment().allInstructions()); - - Instruction innerPbitSet = null; - Instruction outerPbitSet = null; - - if (setVlanPcps != null && !setVlanPcps.isEmpty()) { - innerPbitSet = setVlanPcps.get(0); - outerPbitSet = setVlanPcps.get(1); - } - - TrafficTreatment innerTreatment; - if (noneValueVlanStatus) { - innerTreatment = buildTreatment(innerPair.getLeft(), innerPair.getRight(), fetchMeter(fwd), - fetchWriteMetadata(fwd), innerPbitSet, - Instructions.transition(QQ_TABLE)); - } else { - innerTreatment = buildTreatment(innerPair.getRight(), fetchMeter(fwd), fetchWriteMetadata(fwd), - innerPbitSet, Instructions.transition(QQ_TABLE)); - } - - //match: in port, vlanId (0 or None) - //action: - //if vlanId None, push & set c-tag go to table 1 - //if vlanId 0 or any specific vlan, set c-tag, write metadata, meter and go to table 1 - FlowRule.Builder inner = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(fwd.selector()) - .withTreatment(innerTreatment); - - PortCriterion inPort = (PortCriterion) - fwd.selector().getCriterion(Criterion.Type.IN_PORT); - - VlanId cVlanId = ((L2ModificationInstruction.ModVlanIdInstruction) - innerPair.getRight()).vlanId(); - - //match: in port, c-tag - //action: immediate: push s-tag, write metadata, meter and output - FlowRule.Builder outer = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .forTable(QQ_TABLE) - .makePermanent() - .withPriority(fwd.priority()) - .withTreatment(buildTreatment(outerPair.getLeft(), outerPair.getRight(), - fetchMeter(fwd), writeMetadataIncludingOnlyTp(fwd), - outerPbitSet, output)); - - if (innerPbitSet != null) { - byte innerPbit = ((L2ModificationInstruction.ModVlanPcpInstruction) - innerPbitSet).vlanPcp(); - outer.withSelector(buildSelector(inPort, Criteria.matchVlanId(cVlanId), Criteria.matchVlanPcp(innerPbit))); - } else { - outer.withSelector(buildSelector(inPort, Criteria.matchVlanId(cVlanId))); - } - - applyRules(fwd, inner, outer); - } - - private void installUpstreamRulesForAnyVlan(ForwardingObjective fwd, Instruction output, - Pair outerPair) { - - log.debug("Installing upstream rules for any value vlan"); - - //match: in port and any-vlan (coming from OLT app.) - //action: write metadata, go to table 1 and meter - FlowRule.Builder inner = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(fwd.selector()) - .withTreatment(buildTreatment(Instructions.transition(QQ_TABLE), fetchMeter(fwd), - fetchWriteMetadata(fwd))); - - //match: in port and any-vlan (coming from OLT app.) - //action: immediate: push:QinQ, vlanId (s-tag), write metadata, meter and output - FlowRule.Builder outer = DefaultFlowRule.builder() - .fromApp(fwd.appId()) - .forDevice(deviceId) - .forTable(QQ_TABLE) - .makePermanent() - .withPriority(fwd.priority()) - .withSelector(fwd.selector()) - .withTreatment(buildTreatment(outerPair.getLeft(), outerPair.getRight(), - fetchMeter(fwd), writeMetadataIncludingOnlyTp(fwd), output)); - - applyRules(fwd, inner, outer); - } - - private boolean checkNoneVlanCriteria(ForwardingObjective fwd) { - // Add the VLAN_PUSH treatment if we're matching on VlanId.NONE - Criterion vlanMatchCriterion = filterForCriterion(fwd.selector().criteria(), Criterion.Type.VLAN_VID); - boolean noneValueVlanStatus = false; - if (vlanMatchCriterion != null) { - noneValueVlanStatus = ((VlanIdCriterion) vlanMatchCriterion).vlanId().equals(VlanId.NONE); - } - return noneValueVlanStatus; - } - - private boolean checkAnyVlanMatchCriteria(ForwardingObjective fwd) { - Criterion anyValueVlanCriterion = fwd.selector().criteria().stream() - .filter(c -> c.type().equals(Criterion.Type.VLAN_VID)) - .filter(vc -> ((VlanIdCriterion) vc).vlanId().toShort() == VlanId.ANY_VALUE) - .findAny().orElse(null); - - if (anyValueVlanCriterion == null) { - log.debug("Any value vlan match criteria is not found, criteria {}", - fwd.selector().criteria()); - return false; - } - - return true; - } - - private Instruction fetchOutput(ForwardingObjective fwd, String direction) { - Instruction output = fwd.treatment().allInstructions().stream() - .filter(i -> i.type() == Instruction.Type.OUTPUT) - .findFirst().orElse(null); - - if (output == null) { - log.error("OLT {} rule has no output", direction); - fail(fwd, ObjectiveError.BADPARAMS); - return null; - } - return output; - } - - private Instruction fetchMeter(ForwardingObjective fwd) { - Instruction meter = fwd.treatment().metered(); - - if (meter == null) { - log.debug("Meter instruction is not found for the forwarding objective {}", fwd); - return null; - } - - log.debug("Meter instruction is found."); - return meter; - } - - private Instructions.MetadataInstruction fetchWriteMetadata(ForwardingObjective fwd) { - Instructions.MetadataInstruction writeMetadata = fwd.treatment().writeMetadata(); - - if (writeMetadata == null) { - log.warn("Write metadata is not found for the forwarding obj"); - fail(fwd, ObjectiveError.BADPARAMS); - return null; - } - - log.debug("Write metadata is found {}", writeMetadata); - return writeMetadata; - } - - private List> vlanOps(ForwardingObjective fwd, - L2ModificationInstruction.L2SubType type) { - - List> vlanOps = findVlanOps( - fwd.treatment().allInstructions(), type); - - if (vlanOps == null || vlanOps.isEmpty()) { - String direction = type == L2ModificationInstruction.L2SubType.VLAN_POP - ? DOWNSTREAM : UPSTREAM; - log.error("Missing vlan operations in {} forwarding: {}", direction, fwd); - fail(fwd, ObjectiveError.BADPARAMS); - return ImmutableList.of(); - } - return vlanOps; - } - - - private List> findVlanOps(List instructions, - L2ModificationInstruction.L2SubType type) { - - List vlanOperations = findL2Instructions( - type, - instructions); - List vlanSets = findL2Instructions( - L2ModificationInstruction.L2SubType.VLAN_ID, - instructions); - - if (vlanOperations.size() != vlanSets.size()) { - return ImmutableList.of(); - } - - List> pairs = Lists.newArrayList(); - - for (int i = 0; i < vlanOperations.size(); i++) { - pairs.add(new ImmutablePair<>(vlanOperations.get(i), vlanSets.get(i))); - } - return pairs; - } - - private List findL2Instructions(L2ModificationInstruction.L2SubType subType, - List actions) { - return actions.stream() - .filter(i -> i.type() == Instruction.Type.L2MODIFICATION) - .filter(i -> ((L2ModificationInstruction) i).subtype() == subType) - .collect(Collectors.toList()); - } - - private void provisionEthTypeBasedFilter(FilteringObjective filter, - EthTypeCriterion ethType, - Instructions.OutputInstruction output, - L2ModificationInstruction vlanId, - L2ModificationInstruction vlanPush) { - - Instruction meter = filter.meta().metered(); - Instruction writeMetadata = filter.meta().writeMetadata(); - - TrafficSelector selector = buildSelector(filter.key(), ethType); - TrafficTreatment treatment; - - if (vlanPush == null || vlanId == null) { - treatment = buildTreatment(output, meter, writeMetadata); - } else { - // we need to push the vlan because it came untagged (ATT) - treatment = buildTreatment(output, meter, vlanPush, vlanId, writeMetadata); - } - - buildAndApplyRule(filter, selector, treatment); - - } - - private void provisionIgmp(FilteringObjective filter, EthTypeCriterion ethType, - IPProtocolCriterion ipProto, - Instructions.OutputInstruction output, - Instruction vlan, Instruction pcp) { - - Instruction meter = filter.meta().metered(); - Instruction writeMetadata = filter.meta().writeMetadata(); - - // uniTagMatch - VlanIdCriterion vlanId = (VlanIdCriterion) filterForCriterion(filter.conditions(), - Criterion.Type.VLAN_VID); - - TrafficSelector selector = buildSelector(filter.key(), ethType, ipProto, vlanId); - TrafficTreatment treatment = buildTreatment(output, vlan, pcp, meter, writeMetadata); - buildAndApplyRule(filter, selector, treatment); - } - - private void provisionDhcp(FilteringObjective filter, EthTypeCriterion ethType, - IPProtocolCriterion ipProto, - UdpPortCriterion udpSrcPort, - UdpPortCriterion udpDstPort, - Instruction vlanIdInstruction, - Instruction vlanPcpInstruction, - Instructions.OutputInstruction output) { - - Instruction meter = filter.meta().metered(); - Instruction writeMetadata = filter.meta().writeMetadata(); - - VlanIdCriterion matchVlanId = (VlanIdCriterion) - filterForCriterion(filter.conditions(), Criterion.Type.VLAN_VID); - - TrafficSelector selector; - TrafficTreatment treatment; - - if (matchVlanId != null) { - log.debug("Building selector with match VLAN, {}", matchVlanId); - // in case of TT upstream the packet comes tagged and the vlan is swapped. - selector = buildSelector(filter.key(), ethType, ipProto, udpSrcPort, - udpDstPort, matchVlanId); - treatment = buildTreatment(output, meter, writeMetadata, - vlanIdInstruction, vlanPcpInstruction); - } else { - log.debug("Building selector with no VLAN"); - // in case of ATT upstream the packet comes in untagged and we need to push the vlan - selector = buildSelector(filter.key(), ethType, ipProto, udpSrcPort, udpDstPort); - treatment = buildTreatment(output, meter, vlanIdInstruction, writeMetadata); - } - //In case of downstream there will be no match on the VLAN, which is null, - // so it will just be output, meter, writeMetadata - - buildAndApplyRule(filter, selector, treatment); - } - - private void buildAndApplyRule(FilteringObjective filter, TrafficSelector selector, - TrafficTreatment treatment) { - FlowRule rule = DefaultFlowRule.builder() - .fromApp(filter.appId()) - .forDevice(deviceId) - .forTable(0) - .makePermanent() - .withSelector(selector) - .withTreatment(treatment) - .withPriority(filter.priority()) - .build(); - - FlowRuleOperations.Builder opsBuilder = FlowRuleOperations.builder(); - - switch (filter.type()) { - case PERMIT: - opsBuilder.add(rule); - break; - case DENY: - opsBuilder.remove(rule); - break; - default: - log.warn("Unknown filter type : {}", filter.type()); - fail(filter, ObjectiveError.UNSUPPORTED); - } - - applyFlowRules(opsBuilder, filter); - } - - private void applyRules(ForwardingObjective fwd, FlowRule.Builder... fwdBuilders) { - FlowRuleOperations.Builder builder = FlowRuleOperations.builder(); - switch (fwd.op()) { - case ADD: - for (FlowRule.Builder fwdBuilder : fwdBuilders) { - builder.add(fwdBuilder.build()); - } - break; - case REMOVE: - for (FlowRule.Builder fwdBuilder : fwdBuilders) { - builder.remove(fwdBuilder.build()); - } - break; - case ADD_TO_EXISTING: - break; - case REMOVE_FROM_EXISTING: - break; - default: - log.warn("Unknown forwarding operation: {}", fwd.op()); - } - - applyFlowRules(builder, fwd); - } - - private void applyFlowRules(FlowRuleOperations.Builder builder, - Objective objective) { - flowRuleService.apply(builder.build(new FlowRuleOperationsContext() { - @Override - public void onSuccess(FlowRuleOperations ops) { - pass(objective); - } - - @Override - public void onError(FlowRuleOperations ops) { - fail(objective, ObjectiveError.FLOWINSTALLATIONFAILED); - } - })); - } - - private Criterion filterForCriterion(Collection criteria, Criterion.Type type) { - return criteria.stream() - .filter(c -> c.type().equals(type)) - .limit(1) - .findFirst().orElse(null); - } - - private TrafficSelector buildSelector(Criterion... criteria) { - - TrafficSelector.Builder sBuilder = DefaultTrafficSelector.builder(); - - Arrays.stream(criteria).filter(Objects::nonNull).forEach(sBuilder::add); - - return sBuilder.build(); - } - - private TrafficTreatment buildTreatment(Instruction... instructions) { - - TrafficTreatment.Builder tBuilder = DefaultTrafficTreatment.builder(); - - Arrays.stream(instructions).filter(Objects::nonNull).forEach(tBuilder::add); - - return tBuilder.build(); - } - - private Instruction writeMetadataIncludingOnlyTp(ForwardingObjective fwd) { - - return Instructions.writeMetadata( - fetchWriteMetadata(fwd).metadata() & 0xFFFF00000000L, 0L); - } - - private void fail(Objective obj, ObjectiveError error) { - obj.context().ifPresent(context -> context.onError(obj, error)); - } - - private void pass(Objective obj) { - obj.context().ifPresent(context -> context.onSuccess(obj)); - } - - - private class InnerGroupListener implements GroupListener { - @Override - public void event(GroupEvent event) { - GroupKey key = event.subject().appCookie(); - NextObjective obj = pendingGroups.getIfPresent(key); - if (obj == null) { - log.debug("No pending group for {}, moving on", key); - return; - } - log.trace("Event {} for group {}, handling pending" + - "NextGroup {}", event.type(), key, obj.id()); - if (event.type() == GroupEvent.Type.GROUP_ADDED || - event.type() == GroupEvent.Type.GROUP_UPDATED) { - flowObjectiveStore.putNextGroup(obj.id(), new OLTPipelineGroup(key)); - pass(obj); - pendingGroups.invalidate(key); - } else if (event.type() == GroupEvent.Type.GROUP_REMOVED) { - flowObjectiveStore.removeNextGroup(obj.id()); - pass(obj); - pendingGroups.invalidate(key); - } - } - } - - private static class OLTPipelineGroup implements NextGroup { - - private final GroupKey key; - - public OLTPipelineGroup(GroupKey key) { - this.key = key; - } - - public GroupKey key() { - return key; - } - - @Override - public byte[] data() { - return appKryo.serialize(key); - } - - } - - @Override - public List getNextMappings(NextGroup nextGroup) { - // TODO Implementation deferred to vendor - return null; - } -} diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/PicaPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/PicaPipeline.java index ef79ee3ae14..57ef6eadb33 100644 --- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/PicaPipeline.java +++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/PicaPipeline.java @@ -216,6 +216,11 @@ public void next(NextObjective nextObjective) { } + @Override + public void purgeAll(ApplicationId appId) { + flowRuleService.purgeFlowRules(deviceId, appId); + } + private Collection processForward(ForwardingObjective fwd) { switch (fwd.flag()) { case SPECIFIC: diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SoftRouterPipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SoftRouterPipeline.java index 9ca9420a656..1d0e0dd8eb5 100644 --- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SoftRouterPipeline.java +++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SoftRouterPipeline.java @@ -186,6 +186,11 @@ public void next(NextObjective nextObjective) { } } + @Override + public void purgeAll(ApplicationId appId) { + flowRuleService.purgeFlowRules(deviceId, appId); + } + private void pass(Objective obj) { obj.context().ifPresent(context -> context.onSuccess(obj)); } diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java index 43762950ed5..166ba729602 100644 --- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java +++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/SpringOpenTTP.java @@ -286,6 +286,12 @@ public void next(NextObjective nextObjective) { } } + @Override + public void purgeAll(ApplicationId appId) { + flowRuleService.purgeFlowRules(deviceId, appId); + groupService.purgeGroupEntries(deviceId, appId); + } + private void removeGroup(NextObjective nextObjective) { log.debug("removeGroup in {}: for next objective id {}", deviceId, nextObjective.id()); diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2Pipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2Pipeline.java index a020a647a2c..a22ecbefc5b 100644 --- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2Pipeline.java +++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2Pipeline.java @@ -477,6 +477,12 @@ public void next(NextObjective nextObjective) { } } + @Override + public void purgeAll(ApplicationId appId) { + flowRuleService.purgeFlowRules(deviceId, appId); + groupService.purgeGroupEntries(deviceId, appId); + } + ////////////////////////////////////// // Flow handling ////////////////////////////////////// diff --git a/drivers/default/src/main/java/org/onosproject/driver/traceable/OfdpaPipelineTraceable.java b/drivers/default/src/main/java/org/onosproject/driver/traceable/OfdpaPipelineTraceable.java index c26902224e5..fa6a2316fbb 100644 --- a/drivers/default/src/main/java/org/onosproject/driver/traceable/OfdpaPipelineTraceable.java +++ b/drivers/default/src/main/java/org/onosproject/driver/traceable/OfdpaPipelineTraceable.java @@ -30,6 +30,7 @@ import org.onosproject.net.DataPlaneEntity; import org.onosproject.net.PipelineTraceableInput; import org.onosproject.net.PipelineTraceableOutput; +import org.onosproject.net.PipelineTraceablePacket; import org.onosproject.net.PortNumber; import org.onosproject.net.behaviour.PipelineTraceable; import org.onosproject.net.behaviour.Pipeliner; @@ -106,13 +107,14 @@ public PipelineTraceableOutput apply(PipelineTraceableInput input) { List outputFlows = new ArrayList<>(); List deferredInstructions = new ArrayList<>(); PipelineTraceableHitChain currentHitChain = PipelineTraceableHitChain.emptyHitChain(); - TrafficSelector currentPacket = DefaultTrafficSelector.builder(input.ingressPacket()).build(); + TrafficSelector currentPacket = DefaultTrafficSelector.builder( + input.ingressPacket().packet()).build(); // Init step - find out the first table int initialTableId = -1; FlowEntry nextTableIdEntry = findNextTableIdEntry(initialTableId, input.flows()); if (nextTableIdEntry == null) { - currentHitChain.setEgressPacket(currentPacket); + currentHitChain.setEgressPacket(new PipelineTraceablePacket(currentPacket)); currentHitChain.dropped(); return outputBuilder.appendToLog("No flow rules for device " + deviceId + ". Aborting") .noFlows() @@ -137,7 +139,7 @@ public PipelineTraceableOutput apply(PipelineTraceableInput input) { if (((IndexTableId) tableId).id() == MPLS_L3_TYPE_TABLE) { // Apparently a miss but Table 27 on OFDPA is a fixed table - currentPacket = handleOfdpa27FixedTable(input.ingressPacket(), currentPacket); + currentPacket = handleOfdpa27FixedTable(input.ingressPacket().packet(), currentPacket); // The nextTable should be ACL tableId = IndexTableId.of(ACL_TABLE - 1); } @@ -147,8 +149,8 @@ public PipelineTraceableOutput apply(PipelineTraceableInput input) { log.debug("Next table id entry {}", nextTableIdEntry); // FIXME Find better solution that enable granularity greater than 0 or all rules // (another possibility is max tableId) - if (nextTableIdEntry == null && currentHitChain.getHitChain().size() == 0) { - currentHitChain.setEgressPacket(currentPacket); + if (nextTableIdEntry == null && currentHitChain.hitChain().size() == 0) { + currentHitChain.setEgressPacket(new PipelineTraceablePacket(currentPacket)); currentHitChain.dropped(); return outputBuilder.appendToLog("No flow rules for device " + deviceId + ". Aborting") .noFlows() @@ -173,7 +175,7 @@ public PipelineTraceableOutput apply(PipelineTraceableInput input) { } } else if (flowEntry == null) { - currentHitChain.setEgressPacket(currentPacket); + currentHitChain.setEgressPacket(new PipelineTraceablePacket(currentPacket)); currentHitChain.dropped(); return outputBuilder.appendToLog("Packet has no match on table " + tableId + " in device " + deviceId + ". Dropping") @@ -231,7 +233,7 @@ public PipelineTraceableOutput apply(PipelineTraceableInput input) { if (secondVlanFlow != null) { currentHitChain.addDataPlaneEntity(new DataPlaneEntity(secondVlanFlow)); } else { - currentHitChain.setEgressPacket(currentPacket); + currentHitChain.setEgressPacket(new PipelineTraceablePacket(currentPacket)); currentHitChain.dropped(); return outputBuilder.appendToLog("Missing forwarding rule for tagged" + " packet on " + deviceId) @@ -253,16 +255,16 @@ public PipelineTraceableOutput apply(PipelineTraceableInput input) { // need to reflect the updates performed on the packets and on the chain. List outputPorts = new ArrayList<>(); handleOutputFlows(currentPacket, outputFlows, egressPacket, outputPorts, currentHitChain, - outputBuilder, input.ingressPacket()); + outputBuilder, input.ingressPacket().packet()); // Immediate instructions log.debug("Current packet {} - applying immediate instructions", currentPacket); // Handling immediate instructions which basically means handling output to controller. // OVS has immediate -> group -> OUTPUT:CONTROLLER. - List entries = ImmutableList.copyOf(currentHitChain.getHitChain()); + List entries = ImmutableList.copyOf(currentHitChain.hitChain()); // Go to the next step - using a copy of the egress packet and of the hit chain PipelineTraceableHitChain newHitChain = PipelineTraceableHitChain.emptyHitChain(); - currentHitChain.getHitChain().forEach(newHitChain::addDataPlaneEntity); + currentHitChain.hitChain().forEach(newHitChain::addDataPlaneEntity); TrafficSelector.Builder newEgressPacket = DefaultTrafficSelector.builder(egressPacket.build()); for (DataPlaneEntity entry : entries) { flowEntry = entry.getFlowEntry(); @@ -286,7 +288,7 @@ public PipelineTraceableOutput apply(PipelineTraceableInput input) { // If there are no outputs - packet is dropped // Let's store the partial hit chain and set a message if (outputPorts.isEmpty()) { - currentHitChain.setEgressPacket(egressPacket.build()); + currentHitChain.setEgressPacket(new PipelineTraceablePacket(egressPacket.build())); currentHitChain.dropped(); outputBuilder.appendToLog("Packet has no output in device " + deviceId + ". Dropping") .dropped() @@ -563,8 +565,8 @@ private void buildOutputFromDevice(TrafficSelector.Builder egressPacket, // Create the final hit chain from the current one (deep copy) ConnectPoint outputPort = new ConnectPoint(deviceId, outputInstruction.port()); PipelineTraceableHitChain finalHitChain = new PipelineTraceableHitChain(outputPort, - Lists.newArrayList(currentHitChain.getHitChain()), - egressPacket.build()); + Lists.newArrayList(currentHitChain.hitChain()), + new PipelineTraceablePacket(egressPacket.build())); // Dropped early if (dropped) { log.debug("Packet {} has been dropped", egressPacket.build()); @@ -585,11 +587,12 @@ private void handleVlanToController(PipelineTraceableHitChain currentHitChain, T VlanIdCriterion initialVid = (VlanIdCriterion) initialPacket .getCriterion(Criterion.Type.VLAN_VID); - VlanIdCriterion finalVid = (VlanIdCriterion) currentHitChain.getEgressPacket() + VlanIdCriterion finalVid = (VlanIdCriterion) currentHitChain.egressPacket().packet() .getCriterion(Criterion.Type.VLAN_VID); if (initialVid != null && !initialVid.equals(finalVid) && initialVid.vlanId().equals(VlanId.NONE)) { - Set finalCriteria = new HashSet<>(currentHitChain.getEgressPacket().criteria()); + Set finalCriteria = new HashSet<>(currentHitChain.egressPacket() + .packet().criteria()); //removing the final vlanId finalCriteria.remove(finalVid); TrafficSelector.Builder packetUpdated = DefaultTrafficSelector.builder(); @@ -597,7 +600,7 @@ private void handleVlanToController(PipelineTraceableHitChain currentHitChain, T //Initial was none so we set it to that packetUpdated.add(Criteria.matchVlanId(VlanId.NONE)); //Update final packet - currentHitChain.setEgressPacket(packetUpdated.build()); + currentHitChain.setEgressPacket(new PipelineTraceablePacket(packetUpdated.build())); } } @@ -628,7 +631,7 @@ private void getGroupsFromInstructions(Map groups, List groups, List groups, List groups, List - - - - - - - - - - - - - - - - - - - - - - - - + impl="org.onosproject.drivers.p4runtime.P4RuntimeMeterProgrammable"/> true diff --git a/drivers/server/src/main/java/org/onosproject/drivers/server/ServerControllerConfig.java b/drivers/server/src/main/java/org/onosproject/drivers/server/ServerControllerConfig.java index 184b8b7d828..b3d3aa2f2e1 100644 --- a/drivers/server/src/main/java/org/onosproject/drivers/server/ServerControllerConfig.java +++ b/drivers/server/src/main/java/org/onosproject/drivers/server/ServerControllerConfig.java @@ -77,7 +77,7 @@ public List getControllers() { checkNotNull(deviceId, MSG_DEVICE_ID_NULL); MastershipService mastershipService = getHandler().get(MastershipService.class); - checkNotNull(deviceId, MSG_MASTERSHIP_NULL); + checkNotNull(mastershipService, MSG_MASTERSHIP_NULL); if (!mastershipService.isLocalMaster(deviceId)) { log.warn( @@ -158,7 +158,7 @@ public void setControllers(List controllers) { checkNotNull(deviceId, MSG_DEVICE_ID_NULL); MastershipService mastershipService = getHandler().get(MastershipService.class); - checkNotNull(deviceId, MSG_MASTERSHIP_NULL); + checkNotNull(mastershipService, MSG_MASTERSHIP_NULL); if (!mastershipService.isLocalMaster(deviceId)) { log.warn( @@ -203,7 +203,7 @@ public void removeControllers(List controllers) { checkNotNull(deviceId, MSG_DEVICE_ID_NULL); MastershipService mastershipService = getHandler().get(MastershipService.class); - checkNotNull(deviceId, MSG_MASTERSHIP_NULL); + checkNotNull(mastershipService, MSG_MASTERSHIP_NULL); if (!mastershipService.isLocalMaster(deviceId)) { log.warn( diff --git a/drivers/stratum/src/main/java/org/onosproject/drivers/stratum/StratumHandshaker.java b/drivers/stratum/src/main/java/org/onosproject/drivers/stratum/StratumHandshaker.java index ac9a534599a..7b41f85fe2d 100644 --- a/drivers/stratum/src/main/java/org/onosproject/drivers/stratum/StratumHandshaker.java +++ b/drivers/stratum/src/main/java/org/onosproject/drivers/stratum/StratumHandshaker.java @@ -64,7 +64,12 @@ public boolean isReachable() { @Override public CompletableFuture probeReachability() { - return p4runtime.probeReachability(); + // p4runtime probe reachability is based on GetPipelineConfig gRPC that + // can timeout if we are setting in parallel the pipeline: the two requests + // can concur for the same lock. For our purposes it is enough to check if + // the device is still there; for this reason stratum handshaker now relies + // on gNOI reachability which is based on getTime RPC. + return gnoi.probeReachability(); } @Override diff --git a/pipelines/basic/src/main/java/org/onosproject/pipelines/basic/BasicPipelinerImpl.java b/pipelines/basic/src/main/java/org/onosproject/pipelines/basic/BasicPipelinerImpl.java index 9fc532bd8e1..3b66f95bd9b 100644 --- a/pipelines/basic/src/main/java/org/onosproject/pipelines/basic/BasicPipelinerImpl.java +++ b/pipelines/basic/src/main/java/org/onosproject/pipelines/basic/BasicPipelinerImpl.java @@ -16,6 +16,7 @@ package org.onosproject.pipelines.basic; +import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; import org.onosproject.net.behaviour.NextGroup; import org.onosproject.net.behaviour.Pipeliner; @@ -100,6 +101,11 @@ public void next(NextObjective obj) { obj.context().ifPresent(c -> c.onError(obj, ObjectiveError.UNSUPPORTED)); } + @Override + public void purgeAll(ApplicationId appId) { + flowRuleService.purgeFlowRules(deviceId, appId); + } + @Override public List getNextMappings(NextGroup nextGroup) { // We do not use nextObjectives or groups. diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricConstants.java b/pipelines/fabric/api/src/main/java/org/onosproject/pipelines/fabric/FabricConstants.java similarity index 78% rename from pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricConstants.java rename to pipelines/fabric/api/src/main/java/org/onosproject/pipelines/fabric/FabricConstants.java index b8a3143e97c..7e12b556a49 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricConstants.java +++ b/pipelines/fabric/api/src/main/java/org/onosproject/pipelines/fabric/FabricConstants.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.onosproject.pipelines.fabric.impl.behaviour; +package org.onosproject.pipelines.fabric; import org.onosproject.net.pi.model.PiActionId; import org.onosproject.net.pi.model.PiActionParamId; @@ -40,6 +40,7 @@ private FabricConstants() { PiMatchFieldId.of("vlan_is_valid"); public static final PiMatchFieldId HDR_IPV6_SRC_NET_ID = PiMatchFieldId.of("ipv6_src_net_id"); + public static final PiMatchFieldId HDR_COLOR = PiMatchFieldId.of("color"); public static final PiMatchFieldId HDR_C_TAG = PiMatchFieldId.of("c_tag"); public static final PiMatchFieldId HDR_IPV4_SRC = PiMatchFieldId.of("ipv4_src"); @@ -47,6 +48,8 @@ private FabricConstants() { PiMatchFieldId.of("ipv6_dst"); public static final PiMatchFieldId HDR_L4_DPORT = PiMatchFieldId.of("l4_dport"); + public static final PiMatchFieldId HDR_PORT_TYPE = + PiMatchFieldId.of("port_type"); public static final PiMatchFieldId HDR_PPPOE_CODE = PiMatchFieldId.of("pppoe_code"); public static final PiMatchFieldId HDR_IPV6_SRC = @@ -56,6 +59,8 @@ private FabricConstants() { public static final PiMatchFieldId HDR_S_TAG = PiMatchFieldId.of("s_tag"); public static final PiMatchFieldId HDR_VLAN_ID = PiMatchFieldId.of("vlan_id"); + public static final PiMatchFieldId HDR_HAS_QFI = + PiMatchFieldId.of("has_qfi"); public static final PiMatchFieldId HDR_ETH_DST = PiMatchFieldId.of("eth_dst"); public static final PiMatchFieldId HDR_ICMP_TYPE = @@ -98,37 +103,37 @@ private FabricConstants() { public static final PiMatchFieldId HDR_UE_ADDR = PiMatchFieldId.of("ue_addr"); public static final PiMatchFieldId HDR_TEID = PiMatchFieldId.of("teid"); + public static final PiMatchFieldId HDR_SLICE_ID = + PiMatchFieldId.of("slice_id"); public static final PiMatchFieldId HDR_INT_IS_VALID = PiMatchFieldId.of("int_is_valid"); + public static final PiMatchFieldId HDR_TC = PiMatchFieldId.of("tc"); public static final PiMatchFieldId HDR_MPLS_LABEL = PiMatchFieldId.of("mpls_label"); public static final PiMatchFieldId HDR_IP_PROTO = PiMatchFieldId.of("ip_proto"); public static final PiMatchFieldId HDR_PPPOE_PROTOCOL = PiMatchFieldId.of("pppoe_protocol"); + public static final PiMatchFieldId HDR_QFI = PiMatchFieldId.of("qfi"); // Table IDs public static final PiTableId FABRIC_INGRESS_NEXT_HASHED = PiTableId.of("FabricIngress.next.hashed"); public static final PiTableId FABRIC_INGRESS_BNG_INGRESS_T_LINE_MAP = PiTableId.of("FabricIngress.bng_ingress.t_line_map"); - public static final PiTableId FABRIC_INGRESS_SPGW_INGRESS_FAR_LOOKUP = - PiTableId.of("FabricIngress.spgw_ingress.far_lookup"); public static final PiTableId FABRIC_EGRESS_PROCESS_INT_MAIN_PROCESS_INT_TRANSIT_TB_INT_INSERT = PiTableId.of("FabricEgress.process_int_main.process_int_transit.tb_int_insert"); + public static final PiTableId FABRIC_INGRESS_SPGW_UPLINK_PDRS = + PiTableId.of("FabricIngress.spgw.uplink_pdrs"); + public static final PiTableId FABRIC_INGRESS_SPGW_INTERFACES = + PiTableId.of("FabricIngress.spgw.interfaces"); public static final PiTableId FABRIC_INGRESS_FILTERING_FWD_CLASSIFIER = PiTableId.of("FabricIngress.filtering.fwd_classifier"); public static final PiTableId FABRIC_INGRESS_NEXT_XCONNECT = PiTableId.of("FabricIngress.next.xconnect"); - public static final PiTableId FABRIC_INGRESS_NEXT_NEXT_VLAN = - PiTableId.of("FabricIngress.next.next_vlan"); - public static final PiTableId FABRIC_INGRESS_SPGW_INGRESS_DOWNLINK_PDR_LOOKUP = - PiTableId.of("FabricIngress.spgw_ingress.downlink_pdr_lookup"); public static final PiTableId FABRIC_INGRESS_NEXT_SIMPLE = PiTableId.of("FabricIngress.next.simple"); public static final PiTableId FABRIC_INGRESS_NEXT_MULTICAST = PiTableId.of("FabricIngress.next.multicast"); - public static final PiTableId FABRIC_INGRESS_SPGW_INGRESS_UPLINK_PDR_LOOKUP = - PiTableId.of("FabricIngress.spgw_ingress.uplink_pdr_lookup"); public static final PiTableId FABRIC_EGRESS_PROCESS_INT_MAIN_PROCESS_INT_SOURCE_TB_INT_SOURCE = PiTableId.of("FabricEgress.process_int_main.process_int_source.tb_int_source"); public static final PiTableId FABRIC_INGRESS_FORWARDING_ROUTING_V6 = @@ -137,26 +142,36 @@ private FabricConstants() { PiTableId.of("FabricIngress.forwarding.mpls"); public static final PiTableId FABRIC_INGRESS_FORWARDING_ROUTING_V4 = PiTableId.of("FabricIngress.forwarding.routing_v4"); + public static final PiTableId FABRIC_INGRESS_SLICE_TC_CLASSIFIER_CLASSIFIER = + PiTableId.of("FabricIngress.slice_tc_classifier.classifier"); public static final PiTableId FABRIC_INGRESS_ACL_ACL = PiTableId.of("FabricIngress.acl.acl"); + public static final PiTableId FABRIC_EGRESS_DSCP_REWRITER_REWRITER = + PiTableId.of("FabricEgress.dscp_rewriter.rewriter"); + public static final PiTableId FABRIC_INGRESS_PRE_NEXT_NEXT_MPLS = + PiTableId.of("FabricIngress.pre_next.next_mpls"); public static final PiTableId FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN = PiTableId.of("FabricIngress.filtering.ingress_port_vlan"); - public static final PiTableId FABRIC_INGRESS_BNG_INGRESS_UPSTREAM_T_PPPOE_CP = - PiTableId.of("FabricIngress.bng_ingress.upstream.t_pppoe_cp"); + public static final PiTableId FABRIC_INGRESS_PRE_NEXT_NEXT_VLAN = + PiTableId.of("FabricIngress.pre_next.next_vlan"); public static final PiTableId FABRIC_INGRESS_BNG_INGRESS_UPSTREAM_T_PPPOE_TERM_V4 = PiTableId.of("FabricIngress.bng_ingress.upstream.t_pppoe_term_v4"); public static final PiTableId FABRIC_INGRESS_BNG_INGRESS_UPSTREAM_T_PPPOE_TERM_V6 = PiTableId.of("FabricIngress.bng_ingress.upstream.t_pppoe_term_v6"); + public static final PiTableId FABRIC_INGRESS_QOS_QUEUES = + PiTableId.of("FabricIngress.qos.queues"); public static final PiTableId FABRIC_INGRESS_FORWARDING_BRIDGING = PiTableId.of("FabricIngress.forwarding.bridging"); public static final PiTableId FABRIC_INGRESS_BNG_INGRESS_DOWNSTREAM_T_LINE_SESSION_MAP = PiTableId.of("FabricIngress.bng_ingress.downstream.t_line_session_map"); - public static final PiTableId FABRIC_INGRESS_SPGW_INGRESS_INTERFACE_LOOKUP = - PiTableId.of("FabricIngress.spgw_ingress.interface_lookup"); + public static final PiTableId FABRIC_INGRESS_SPGW_FARS = + PiTableId.of("FabricIngress.spgw.fars"); public static final PiTableId FABRIC_EGRESS_EGRESS_NEXT_EGRESS_VLAN = PiTableId.of("FabricEgress.egress_next.egress_vlan"); public static final PiTableId FABRIC_INGRESS_PROCESS_SET_SOURCE_SINK_TB_SET_SINK = PiTableId.of("FabricIngress.process_set_source_sink.tb_set_sink"); + public static final PiTableId FABRIC_INGRESS_BNG_INGRESS_UPSTREAM_T_PPPOE_CP = + PiTableId.of("FabricIngress.bng_ingress.upstream.t_pppoe_cp"); public static final PiTableId FABRIC_EGRESS_PROCESS_INT_MAIN_PROCESS_INT_REPORT_TB_GENERATE_REPORT = PiTableId.of("FabricEgress.process_int_main.process_int_report.tb_generate_report"); public static final PiTableId FABRIC_INGRESS_PROCESS_SET_SOURCE_SINK_TB_SET_SOURCE = @@ -165,13 +180,15 @@ private FabricConstants() { PiTableId.of("FabricIngress.bng_ingress.downstream.t_qos_v6"); public static final PiTableId FABRIC_INGRESS_BNG_INGRESS_DOWNSTREAM_T_QOS_V4 = PiTableId.of("FabricIngress.bng_ingress.downstream.t_qos_v4"); + public static final PiTableId FABRIC_INGRESS_SPGW_DOWNLINK_PDRS = + PiTableId.of("FabricIngress.spgw.downlink_pdrs"); // Indirect Counter IDs - public static final PiCounterId FABRIC_EGRESS_SPGW_EGRESS_PDR_COUNTER = - PiCounterId.of("FabricEgress.spgw_egress.pdr_counter"); - public static final PiCounterId FABRIC_INGRESS_SPGW_INGRESS_PDR_COUNTER = - PiCounterId.of("FabricIngress.spgw_ingress.pdr_counter"); + public static final PiCounterId FABRIC_EGRESS_SPGW_PDR_COUNTER = + PiCounterId.of("FabricEgress.spgw.pdr_counter"); public static final PiCounterId FABRIC_EGRESS_BNG_EGRESS_DOWNSTREAM_C_LINE_TX = PiCounterId.of("FabricEgress.bng_egress.downstream.c_line_tx"); + public static final PiCounterId FABRIC_INGRESS_SPGW_PDR_COUNTER = + PiCounterId.of("FabricIngress.spgw.pdr_counter"); public static final PiCounterId FABRIC_INGRESS_PORT_COUNTERS_CONTROL_EGRESS_PORT_COUNTER = PiCounterId.of("FabricIngress.port_counters_control.egress_port_counter"); public static final PiCounterId FABRIC_INGRESS_BNG_INGRESS_UPSTREAM_C_DROPPED = @@ -187,6 +204,8 @@ private FabricConstants() { // Direct Counter IDs public static final PiCounterId FABRIC_INGRESS_NEXT_MULTICAST_COUNTER = PiCounterId.of("FabricIngress.next.multicast_counter"); + public static final PiCounterId FABRIC_INGRESS_PRE_NEXT_NEXT_MPLS_COUNTER = + PiCounterId.of("FabricIngress.pre_next.next_mpls_counter"); public static final PiCounterId FABRIC_INGRESS_NEXT_SIMPLE_COUNTER = PiCounterId.of("FabricIngress.next.simple_counter"); public static final PiCounterId FABRIC_INGRESS_FILTERING_FWD_CLASSIFIER_COUNTER = @@ -199,27 +218,35 @@ private FabricConstants() { PiCounterId.of("FabricIngress.process_set_source_sink.counter_set_source"); public static final PiCounterId FABRIC_EGRESS_PROCESS_INT_MAIN_PROCESS_INT_SOURCE_COUNTER_INT_SOURCE = PiCounterId.of("FabricEgress.process_int_main.process_int_source.counter_int_source"); - public static final PiCounterId FABRIC_INGRESS_PROCESS_SET_SOURCE_SINK_COUNTER_SET_SINK = - PiCounterId.of("FabricIngress.process_set_source_sink.counter_set_sink"); public static final PiCounterId FABRIC_EGRESS_EGRESS_NEXT_EGRESS_VLAN_COUNTER = PiCounterId.of("FabricEgress.egress_next.egress_vlan_counter"); + public static final PiCounterId FABRIC_INGRESS_PROCESS_SET_SOURCE_SINK_COUNTER_SET_SINK = + PiCounterId.of("FabricIngress.process_set_source_sink.counter_set_sink"); + public static final PiCounterId FABRIC_INGRESS_QOS_QUEUES_STATS = + PiCounterId.of("FabricIngress.qos.queues_stats"); public static final PiCounterId FABRIC_INGRESS_ACL_ACL_COUNTER = PiCounterId.of("FabricIngress.acl.acl_counter"); public static final PiCounterId FABRIC_INGRESS_NEXT_XCONNECT_COUNTER = PiCounterId.of("FabricIngress.next.xconnect_counter"); - public static final PiCounterId FABRIC_INGRESS_NEXT_NEXT_VLAN_COUNTER = - PiCounterId.of("FabricIngress.next.next_vlan_counter"); + public static final PiCounterId FABRIC_INGRESS_SLICE_TC_CLASSIFIER_CLASSIFIER_STATS = + PiCounterId.of("FabricIngress.slice_tc_classifier.classifier_stats"); public static final PiCounterId FABRIC_INGRESS_FORWARDING_ROUTING_V6_COUNTER = PiCounterId.of("FabricIngress.forwarding.routing_v6_counter"); public static final PiCounterId FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN_COUNTER = PiCounterId.of("FabricIngress.filtering.ingress_port_vlan_counter"); public static final PiCounterId FABRIC_INGRESS_FORWARDING_MPLS_COUNTER = PiCounterId.of("FabricIngress.forwarding.mpls_counter"); + public static final PiCounterId FABRIC_INGRESS_PRE_NEXT_NEXT_VLAN_COUNTER = + PiCounterId.of("FabricIngress.pre_next.next_vlan_counter"); // Action IDs public static final PiActionId FABRIC_EGRESS_BNG_EGRESS_DOWNSTREAM_ENCAP_V4 = PiActionId.of("FabricEgress.bng_egress.downstream.encap_v4"); public static final PiActionId FABRIC_INGRESS_NEXT_SET_NEXT_ID_XCONNECT = PiActionId.of("FabricIngress.next.set_next_id_xconnect"); + public static final PiActionId FABRIC_INGRESS_PRE_NEXT_SET_VLAN = + PiActionId.of("FabricIngress.pre_next.set_vlan"); + public static final PiActionId FABRIC_INGRESS_SPGW_LOAD_TUNNEL_FAR = + PiActionId.of("FabricIngress.spgw.load_tunnel_far"); public static final PiActionId FABRIC_INGRESS_FORWARDING_NOP_ROUTING_V4 = PiActionId.of("FabricIngress.forwarding.nop_routing_v4"); public static final PiActionId FABRIC_INGRESS_BNG_INGRESS_DOWNSTREAM_QOS_BESTEFF = @@ -232,10 +259,10 @@ private FabricConstants() { PiActionId.of("FabricIngress.forwarding.set_next_id_bridging"); public static final PiActionId FABRIC_EGRESS_PROCESS_INT_MAIN_PROCESS_INT_SOURCE_INT_SOURCE_DSCP = PiActionId.of("FabricEgress.process_int_main.process_int_source.int_source_dscp"); - public static final PiActionId FABRIC_INGRESS_NEXT_SET_DOUBLE_VLAN = - PiActionId.of("FabricIngress.next.set_double_vlan"); public static final PiActionId FABRIC_EGRESS_PROCESS_INT_MAIN_PROCESS_INT_TRANSIT_INIT_METADATA = PiActionId.of("FabricEgress.process_int_main.process_int_transit.init_metadata"); + public static final PiActionId FABRIC_INGRESS_SPGW_LOAD_DBUF_FAR = + PiActionId.of("FabricIngress.spgw.load_dbuf_far"); public static final PiActionId FABRIC_INGRESS_ACL_DROP = PiActionId.of("FabricIngress.acl.drop"); public static final PiActionId FABRIC_INGRESS_ACL_SET_CLONE_SESSION_ID = @@ -244,14 +271,12 @@ private FabricConstants() { PiActionId.of("FabricIngress.bng_ingress.upstream.punt_to_cpu"); public static final PiActionId FABRIC_INGRESS_BNG_INGRESS_DOWNSTREAM_DROP = PiActionId.of("FabricIngress.bng_ingress.downstream.drop"); - public static final PiActionId FABRIC_INGRESS_SPGW_INGRESS_SET_PDR_ATTRIBUTES = - PiActionId.of("FabricIngress.spgw_ingress.set_pdr_attributes"); - public static final PiActionId FABRIC_INGRESS_NEXT_SET_VLAN = - PiActionId.of("FabricIngress.next.set_vlan"); - public static final PiActionId FABRIC_INGRESS_ACL_NOP_ACL = - PiActionId.of("FabricIngress.acl.nop_acl"); - public static final PiActionId FABRIC_INGRESS_SPGW_INGRESS_LOAD_NORMAL_FAR_ATTRIBUTES = - PiActionId.of("FabricIngress.spgw_ingress.load_normal_far_attributes"); + public static final PiActionId FABRIC_INGRESS_SLICE_TC_CLASSIFIER_TRUST_DSCP = + PiActionId.of("FabricIngress.slice_tc_classifier.trust_dscp"); + public static final PiActionId FABRIC_INGRESS_PRE_NEXT_SET_DOUBLE_VLAN = + PiActionId.of("FabricIngress.pre_next.set_double_vlan"); + public static final PiActionId FABRIC_EGRESS_DSCP_REWRITER_REWRITE = + PiActionId.of("FabricEgress.dscp_rewriter.rewrite"); public static final PiActionId FABRIC_INGRESS_BNG_INGRESS_SET_LINE = PiActionId.of("FabricIngress.bng_ingress.set_line"); public static final PiActionId FABRIC_INGRESS_BNG_INGRESS_UPSTREAM_TERM_DISABLED = @@ -260,68 +285,79 @@ private FabricConstants() { PiActionId.of("FabricIngress.acl.set_next_id_acl"); public static final PiActionId FABRIC_INGRESS_FILTERING_PERMIT = PiActionId.of("FabricIngress.filtering.permit"); + public static final PiActionId FABRIC_INGRESS_SPGW_LOAD_NORMAL_FAR = + PiActionId.of("FabricIngress.spgw.load_normal_far"); + public static final PiActionId FABRIC_INGRESS_SPGW_IFACE_MISS = + PiActionId.of("FabricIngress.spgw.iface_miss"); public static final PiActionId FABRIC_INGRESS_FORWARDING_SET_NEXT_ID_ROUTING_V4 = PiActionId.of("FabricIngress.forwarding.set_next_id_routing_v4"); public static final PiActionId FABRIC_INGRESS_FORWARDING_SET_NEXT_ID_ROUTING_V6 = PiActionId.of("FabricIngress.forwarding.set_next_id_routing_v6"); public static final PiActionId FABRIC_INGRESS_NEXT_ROUTING_SIMPLE = PiActionId.of("FabricIngress.next.routing_simple"); - public static final PiActionId FABRIC_INGRESS_SPGW_INGRESS_DECAP_INNER_TCP = - PiActionId.of("FabricIngress.spgw_ingress.decap_inner_tcp"); - public static final PiActionId FABRIC_INGRESS_SPGW_INGRESS_DECAP_INNER_ICMP = - PiActionId.of("FabricIngress.spgw_ingress.decap_inner_icmp"); + public static final PiActionId FABRIC_INGRESS_SPGW_LOAD_PDR_QOS = + PiActionId.of("FabricIngress.spgw.load_pdr_qos"); + public static final PiActionId FABRIC_INGRESS_QOS_SET_QUEUE = + PiActionId.of("FabricIngress.qos.set_queue"); + public static final PiActionId FABRIC_EGRESS_DSCP_REWRITER_CLEAR = + PiActionId.of("FabricEgress.dscp_rewriter.clear"); + public static final PiActionId FABRIC_EGRESS_EGRESS_NEXT_PUSH_VLAN = + PiActionId.of("FabricEgress.egress_next.push_vlan"); + public static final PiActionId FABRIC_INGRESS_QOS_METER_DROP = + PiActionId.of("FabricIngress.qos.meter_drop"); public static final PiActionId FABRIC_INGRESS_NEXT_OUTPUT_HASHED = PiActionId.of("FabricIngress.next.output_hashed"); - public static final PiActionId FABRIC_INGRESS_SPGW_INGRESS_DECAP_INNER_UDP = - PiActionId.of("FabricIngress.spgw_ingress.decap_inner_udp"); + public static final PiActionId FABRIC_INGRESS_SPGW_LOAD_IFACE = + PiActionId.of("FabricIngress.spgw.load_iface"); public static final PiActionId FABRIC_INGRESS_FORWARDING_POP_MPLS_AND_NEXT = PiActionId.of("FabricIngress.forwarding.pop_mpls_and_next"); public static final PiActionId FABRIC_EGRESS_BNG_EGRESS_DOWNSTREAM_ENCAP_V6 = PiActionId.of("FabricEgress.bng_egress.downstream.encap_v6"); - public static final PiActionId FABRIC_INGRESS_NEXT_MPLS_ROUTING_SIMPLE = - PiActionId.of("FabricIngress.next.mpls_routing_simple"); public static final PiActionId FABRIC_INGRESS_ACL_PUNT_TO_CPU = PiActionId.of("FabricIngress.acl.punt_to_cpu"); public static final PiActionId FABRIC_INGRESS_BNG_INGRESS_DOWNSTREAM_QOS_PRIO = PiActionId.of("FabricIngress.bng_ingress.downstream.qos_prio"); + public static final PiActionId FABRIC_EGRESS_EGRESS_NEXT_DROP = + PiActionId.of("FabricEgress.egress_next.drop"); + public static final PiActionId FABRIC_INGRESS_SPGW_LOAD_PDR = + PiActionId.of("FabricIngress.spgw.load_pdr"); public static final PiActionId FABRIC_EGRESS_EGRESS_NEXT_POP_VLAN = PiActionId.of("FabricEgress.egress_next.pop_vlan"); public static final PiActionId FABRIC_INGRESS_PROCESS_SET_SOURCE_SINK_INT_SET_SINK = PiActionId.of("FabricIngress.process_set_source_sink.int_set_sink"); - public static final PiActionId FABRIC_INGRESS_NEXT_MPLS_ROUTING_HASHED = - PiActionId.of("FabricIngress.next.mpls_routing_hashed"); + public static final PiActionId FABRIC_INGRESS_ACL_NOP_ACL = + PiActionId.of("FabricIngress.acl.nop_acl"); public static final PiActionId FABRIC_INGRESS_BNG_INGRESS_UPSTREAM_TERM_ENABLED_V6 = PiActionId.of("FabricIngress.bng_ingress.upstream.term_enabled_v6"); public static final PiActionId FABRIC_INGRESS_BNG_INGRESS_UPSTREAM_TERM_ENABLED_V4 = PiActionId.of("FabricIngress.bng_ingress.upstream.term_enabled_v4"); - public static final PiActionId FABRIC_INGRESS_SPGW_INGRESS_DECAP_INNER_UNKNOWN = - PiActionId.of("FabricIngress.spgw_ingress.decap_inner_unknown"); public static final PiActionId FABRIC_INGRESS_PROCESS_SET_SOURCE_SINK_INT_SET_SOURCE = PiActionId.of("FabricIngress.process_set_source_sink.int_set_source"); public static final PiActionId NOP = PiActionId.of("nop"); public static final PiActionId FABRIC_INGRESS_NEXT_OUTPUT_SIMPLE = PiActionId.of("FabricIngress.next.output_simple"); - public static final PiActionId FABRIC_INGRESS_SPGW_INGRESS_SET_SOURCE_IFACE = - PiActionId.of("FabricIngress.spgw_ingress.set_source_iface"); public static final PiActionId FABRIC_INGRESS_FILTERING_DENY = PiActionId.of("FabricIngress.filtering.deny"); + public static final PiActionId FABRIC_INGRESS_PRE_NEXT_SET_MPLS_LABEL = + PiActionId.of("FabricIngress.pre_next.set_mpls_label"); public static final PiActionId FABRIC_INGRESS_BNG_INGRESS_DOWNSTREAM_SET_SESSION = PiActionId.of("FabricIngress.bng_ingress.downstream.set_session"); public static final PiActionId FABRIC_INGRESS_NEXT_SET_MCAST_GROUP_ID = PiActionId.of("FabricIngress.next.set_mcast_group_id"); public static final PiActionId FABRIC_INGRESS_FILTERING_SET_FORWARDING_TYPE = PiActionId.of("FabricIngress.filtering.set_forwarding_type"); + public static final PiActionId FABRIC_INGRESS_SLICE_TC_CLASSIFIER_SET_SLICE_ID_TC = + PiActionId.of("FabricIngress.slice_tc_classifier.set_slice_id_tc"); public static final PiActionId FABRIC_EGRESS_PROCESS_INT_MAIN_PROCESS_INT_REPORT_DO_REPORT_ENCAPSULATION = PiActionId.of("FabricEgress.process_int_main.process_int_report.do_report_encapsulation"); public static final PiActionId NO_ACTION = PiActionId.of("NoAction"); public static final PiActionId FABRIC_INGRESS_NEXT_OUTPUT_XCONNECT = PiActionId.of("FabricIngress.next.output_xconnect"); - public static final PiActionId FABRIC_INGRESS_SPGW_INGRESS_LOAD_TUNNEL_FAR_ATTRIBUTES = - PiActionId.of("FabricIngress.spgw_ingress.load_tunnel_far_attributes"); // Action Param IDs public static final PiActionParamId DMAC = PiActionParamId.of("dmac"); public static final PiActionParamId MON_PORT = PiActionParamId.of("mon_port"); + public static final PiActionParamId QID = PiActionParamId.of("qid"); public static final PiActionParamId NOTIFY_CP = PiActionParamId.of("notify_cp"); public static final PiActionParamId SRC_IFACE = @@ -331,6 +367,8 @@ private FabricConstants() { public static final PiActionParamId SMAC = PiActionParamId.of("smac"); public static final PiActionParamId CLONE_ID = PiActionParamId.of("clone_id"); + public static final PiActionParamId PORT_TYPE = + PiActionParamId.of("port_type"); public static final PiActionParamId FAR_ID = PiActionParamId.of("far_id"); public static final PiActionParamId VLAN_ID = PiActionParamId.of("vlan_id"); public static final PiActionParamId TUNNEL_SRC_ADDR = @@ -339,23 +377,20 @@ private FabricConstants() { PiActionParamId.of("tunnel_src_port"); public static final PiActionParamId LABEL = PiActionParamId.of("label"); public static final PiActionParamId SRC_IP = PiActionParamId.of("src_ip"); - public static final PiActionParamId SKIP_SPGW = - PiActionParamId.of("skip_spgw"); public static final PiActionParamId MON_MAC = PiActionParamId.of("mon_mac"); public static final PiActionParamId NEXT_ID = PiActionParamId.of("next_id"); public static final PiActionParamId INS_CNT = PiActionParamId.of("ins_cnt"); - public static final PiActionParamId SRC_MAC = PiActionParamId.of("src_mac"); + public static final PiActionParamId TC = PiActionParamId.of("tc"); public static final PiActionParamId INNER_VLAN_ID = PiActionParamId.of("inner_vlan_id"); - public static final PiActionParamId DIRECTION = - PiActionParamId.of("direction"); public static final PiActionParamId PPPOE_SESSION_ID = PiActionParamId.of("pppoe_session_id"); public static final PiActionParamId CTR_ID = PiActionParamId.of("ctr_id"); public static final PiActionParamId MON_IP = PiActionParamId.of("mon_ip"); public static final PiActionParamId INS_MASK0003 = PiActionParamId.of("ins_mask0003"); - public static final PiActionParamId LINE_ID = PiActionParamId.of("line_id"); + public static final PiActionParamId NEEDS_QFI_PUSH = + PiActionParamId.of("needs_qfi_push"); public static final PiActionParamId FWD_TYPE = PiActionParamId.of("fwd_type"); public static final PiActionParamId OUTER_VLAN_ID = @@ -365,11 +400,16 @@ private FabricConstants() { public static final PiActionParamId INS_MASK0407 = PiActionParamId.of("ins_mask0407"); public static final PiActionParamId TEID = PiActionParamId.of("teid"); + public static final PiActionParamId SLICE_ID = + PiActionParamId.of("slice_id"); + public static final PiActionParamId LINE_ID = PiActionParamId.of("line_id"); public static final PiActionParamId DROP = PiActionParamId.of("drop"); public static final PiActionParamId PORT_NUM = PiActionParamId.of("port_num"); + public static final PiActionParamId SRC_MAC = PiActionParamId.of("src_mac"); public static final PiActionParamId TUNNEL_DST_ADDR = PiActionParamId.of("tunnel_dst_addr"); + public static final PiActionParamId QFI = PiActionParamId.of("qfi"); public static final PiActionParamId GROUP_ID = PiActionParamId.of("group_id"); public static final PiActionParamId MAX_HOP = PiActionParamId.of("max_hop"); @@ -379,9 +419,13 @@ private FabricConstants() { // Packet Metadata IDs public static final PiPacketMetadataId INGRESS_PORT = PiPacketMetadataId.of("ingress_port"); + public static final PiPacketMetadataId DO_FORWARDING = + PiPacketMetadataId.of("do_forwarding"); public static final PiPacketMetadataId EGRESS_PORT = PiPacketMetadataId.of("egress_port"); // Meter IDs + public static final PiMeterId FABRIC_INGRESS_QOS_SLICE_TC_METER = + PiMeterId.of("FabricIngress.qos.slice_tc_meter"); public static final PiMeterId FABRIC_INGRESS_BNG_INGRESS_DOWNSTREAM_M_BESTEFF = PiMeterId.of("FabricIngress.bng_ingress.downstream.m_besteff"); public static final PiMeterId FABRIC_INGRESS_BNG_INGRESS_DOWNSTREAM_M_PRIO = diff --git a/pipelines/fabric/impl/BUILD b/pipelines/fabric/impl/BUILD index e5c214bb8b4..eb68a20e958 100644 --- a/pipelines/fabric/impl/BUILD +++ b/pipelines/fabric/impl/BUILD @@ -1,4 +1,4 @@ -COMPILE_DEPS = CORE_DEPS + KRYO + [ +COMPILE_DEPS = CORE_DEPS + KRYO + CLI + [ "//pipelines/fabric/api:onos-pipelines-fabric-api", "//protocols/p4runtime/model:onos-protocols-p4runtime-model", "//protocols/p4runtime/api:onos-protocols-p4runtime-api", @@ -8,7 +8,13 @@ COMPILE_DEPS = CORE_DEPS + KRYO + [ "//drivers/p4runtime:onos-drivers-p4runtime", ] +TEST_DEPS = TEST_ADAPTERS + JACKSON + [ + "//protocols/p4runtime/api:onos-protocols-p4runtime-api", + "@io_grpc_grpc_java//api", +] + osgi_jar_with_tests( - test_deps = TEST_ADAPTERS, + karaf_command_packages = ["org.onosproject.pipelines.fabric.impl.behaviour.cli"], + test_deps = TEST_DEPS, deps = COMPILE_DEPS, ) diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/FabricPipeconfLoader.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/FabricPipeconfLoader.java index 1b6c2ce6b9b..97dace9199a 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/FabricPipeconfLoader.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/FabricPipeconfLoader.java @@ -56,6 +56,7 @@ public final class FabricPipeconfLoader { public static final String PIPELINE_APP_NAME = "org.onosproject.pipelines.fabric"; + public static final String PIPELINE_APP_NAME_UPF = "org.onosproject.pipelines.fabric.upf"; private static Logger log = getLogger(FabricPipeconfLoader.class); @@ -85,6 +86,7 @@ public final class FabricPipeconfLoader { @Activate public void activate() { coreService.registerApplication(PIPELINE_APP_NAME); + coreService.registerApplication(PIPELINE_APP_NAME_UPF); // Registers all pipeconf at component activation. pipeconfs = buildAllPipeconfs(); pipeconfs.forEach(piPipeconfService::register); diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/FabricPipeconfManager.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/FabricPipeconfManager.java index d8af39584d4..e17b48e5099 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/FabricPipeconfManager.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/FabricPipeconfManager.java @@ -51,6 +51,7 @@ public final class FabricPipeconfManager implements FabricPipeconfService { private static final String INT_PROFILE_SUFFIX = "-int"; private static final String FULL_PROFILE_SUFFIX = "-full"; private static final String BNG_PROFILE_SUFFIX = "-bng"; + private static final String UPF_PROFILE_SUFFIX = "-spgw"; private static Logger log = getLogger(FabricPipeconfLoader.class); diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/Constants.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/Constants.java new file mode 100644 index 00000000000..52675726807 --- /dev/null +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/Constants.java @@ -0,0 +1,116 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.pipelines.fabric.impl.behaviour; + +import com.google.common.collect.ImmutableMap; + +import java.util.Map; + +/** + * Constant values. + */ +public final class Constants { + + // Used with is_infra_port metadata + public static final byte[] ONE = new byte[]{1}; + public static final byte[] ZERO = new byte[]{0}; + + public static final byte FALSE = (byte) 0x00; + public static final byte TRUE = (byte) 0x01; + + public static final long PORT_TYPE_MASK = 0x3; + public static final byte PORT_TYPE_EDGE = 0x1; + public static final byte PORT_TYPE_INFRA = 0x2; + public static final byte PORT_TYPE_INTERNAL = 0x3; + + // Forwarding types from P4 program (not exposed in P4Info). + public static final byte FWD_MPLS = 1; + public static final byte FWD_IPV4_ROUTING = 2; + public static final byte FWD_IPV6_ROUTING = 4; + + public static final short ETH_TYPE_EXACT_MASK = (short) 0xFFFF; + + public static final int DEFAULT_VLAN = 4094; + public static final int DEFAULT_PW_TRANSPORT_VLAN = 4090; + + // Default Slice and Traffic Class IDs + public static final int DEFAULT_SLICE_ID = 0; + public static final int DEFAULT_TC = 0; + public static final byte DEFAULT_QFI = (byte) 0x00; + + ////////////////////////////////////////////////////////////////////////////// + // 64 .... 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 // + // X X X X X X X X X X X X X X X X X X X X X 1 1 1 1 1 // + ////////////////////////////////////////////////////////////////////////////// + // Metadata instruction is used as 8 byte sequence to carry up to 64 metadata + + // FIXME We are assuming SR as the only app programming this meta. + // SDFAB-530 to get rid of this limitation + + /** + * SR is setting this metadata when a double tagged filtering objective is removed + * and no other hosts is sharing the same input port. Thus, termination mac entries + * can be removed together with the vlan table entries. + * + * See org.onosproject.segmentrouting.RoutingRulePopulator#buildDoubleTaggedFilteringObj() + * See org.onosproject.segmentrouting.RoutingRulePopulator#processDoubleTaggedFilter() + */ + public static final long CLEANUP_DOUBLE_TAGGED_HOST_ENTRIES = 1; + + /** + * SR is setting this metadata when an interface config update has been performed + * and thus termination mac entries should not be removed. + * + * See org.onosproject.segmentrouting.RoutingRulePopulator#processSinglePortFiltersInternal + */ + public static final long INTERFACE_CONFIG_UPDATE = 1L << 1; + + /** + * SR is setting this metadata to signal the driver when the config is for the pair port, + * i.e. ports connecting two leaves. + * + * See org.onosproject.segmentrouting.RoutingRulePopulator#portType + */ + public static final long PAIR_PORT = 1L << 2; + + /** + * SR is setting this metadata to signal the driver when the config is for an edge port, + * i.e. ports facing an host. + * + * See org.onosproject.segmentrouting.policy.impl.PolicyManager#trafficMatchFwdObjective + * See org.onosproject.segmentrouting.RoutingRulePopulator#portType + */ + public static final long EDGE_PORT = 1L << 3; + + /** + * SR is setting this metadata to signal the driver when the config is for an infra port, + * i.e. ports connecting a leaf with a spine. + */ + public static final long INFRA_PORT = 1L << 4; + + public static final long METADATA_MASK = 0x1FL; + + public static final Map METADATA_TO_PORT_TYPE = ImmutableMap.builder() + .put(PAIR_PORT, PORT_TYPE_INFRA) + .put(EDGE_PORT, PORT_TYPE_EDGE) + .put(INFRA_PORT, PORT_TYPE_INFRA) + .build(); + + // hide default constructor + private Constants() { + } +} \ No newline at end of file diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricCapabilities.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricCapabilities.java index 19b32068640..fc9fe21a9c7 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricCapabilities.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricCapabilities.java @@ -17,6 +17,7 @@ package org.onosproject.pipelines.fabric.impl.behaviour; import org.onosproject.net.pi.model.PiPipeconf; +import org.onosproject.pipelines.fabric.FabricConstants; import org.slf4j.Logger; import java.io.BufferedReader; @@ -27,6 +28,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import static org.onosproject.net.pi.model.PiPipeconf.ExtensionType.CPU_PORT_TXT; +import static org.onosproject.pipelines.fabric.FabricConstants.FABRIC_INGRESS_SPGW_DOWNLINK_PDRS; import static org.slf4j.LoggerFactory.getLogger; /** @@ -47,7 +49,7 @@ public boolean hasHashedTable() { .table(FabricConstants.FABRIC_INGRESS_NEXT_HASHED).isPresent(); } - public Optional cpuPort() { + public Optional cpuPort() { // This is probably brittle, but needed to dynamically get the CPU port // for different platforms. if (!pipeconf.extension(CPU_PORT_TXT).isPresent()) { @@ -65,7 +67,7 @@ public Optional cpuPort() { return Optional.empty(); } try { - return Optional.of(Integer.parseInt(str)); + return Optional.of(Long.parseLong(str)); } catch (NumberFormatException e) { log.error("Invalid CPU port for {}: {}", pipeconf.id(), str); return Optional.empty(); @@ -79,14 +81,25 @@ public Optional cpuPort() { public boolean supportDoubleVlanTerm() { if (pipeconf.pipelineModel() - .table(FabricConstants.FABRIC_INGRESS_NEXT_NEXT_VLAN).isPresent()) { - return pipeconf.pipelineModel().table(FabricConstants.FABRIC_INGRESS_NEXT_NEXT_VLAN) - .get().action(FabricConstants.FABRIC_INGRESS_NEXT_SET_DOUBLE_VLAN) + .table(FabricConstants.FABRIC_INGRESS_PRE_NEXT_NEXT_VLAN).isPresent()) { + return pipeconf.pipelineModel().table(FabricConstants.FABRIC_INGRESS_PRE_NEXT_NEXT_VLAN) + .get().action(FabricConstants.FABRIC_INGRESS_PRE_NEXT_SET_DOUBLE_VLAN) .isPresent(); } return false; } + /** + * Returns true if the pipeconf supports UPF capabilities, false otherwise. + * + * @return boolean + */ + public boolean supportUpf() { + return pipeconf.pipelineModel() + .table(FABRIC_INGRESS_SPGW_DOWNLINK_PDRS) + .isPresent(); + } + /** * Returns true if the pipeconf supports BNG user plane capabilities, false * otherwise. diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricIntProgrammable.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricIntProgrammable.java index c5fa272908c..7f9e35efe06 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricIntProgrammable.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricIntProgrammable.java @@ -42,6 +42,7 @@ import org.onosproject.net.pi.model.PiTableId; import org.onosproject.net.pi.runtime.PiAction; import org.onosproject.net.pi.runtime.PiActionParam; +import org.onosproject.pipelines.fabric.FabricConstants; import org.onosproject.pipelines.fabric.impl.FabricPipeconfLoader; import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality; diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreter.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreter.java index 816c0dd9265..46b584d7974 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreter.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreter.java @@ -40,6 +40,7 @@ import org.onosproject.net.pi.runtime.PiAction; import org.onosproject.net.pi.runtime.PiPacketMetadata; import org.onosproject.net.pi.runtime.PiPacketOperation; +import org.onosproject.pipelines.fabric.FabricConstants; import java.nio.ByteBuffer; import java.util.Collection; @@ -52,6 +53,7 @@ import static org.onlab.util.ImmutableByteSequence.copyFrom; import static org.onosproject.net.PortNumber.CONTROLLER; import static org.onosproject.net.PortNumber.FLOOD; +import static org.onosproject.net.PortNumber.TABLE; import static org.onosproject.net.flow.instructions.Instruction.Type.OUTPUT; import static org.onosproject.net.pi.model.PiPacketOperationType.PACKET_OUT; @@ -62,20 +64,21 @@ public class FabricInterpreter extends AbstractFabricHandlerBehavior implements PiPipelineInterpreter { private static final int PORT_BITWIDTH = 9; + public static final byte[] ONE = new byte[]{1}; + public static final byte[] ZERO = new byte[]{0}; // Group tables by control block. - private static final Set FILTERING_CTRL_TBLS = ImmutableSet.of( - FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN, - FabricConstants.FABRIC_INGRESS_FILTERING_FWD_CLASSIFIER); private static final Set FORWARDING_CTRL_TBLS = ImmutableSet.of( FabricConstants.FABRIC_INGRESS_FORWARDING_MPLS, FabricConstants.FABRIC_INGRESS_FORWARDING_ROUTING_V4, FabricConstants.FABRIC_INGRESS_FORWARDING_ROUTING_V6, FabricConstants.FABRIC_INGRESS_FORWARDING_BRIDGING); + private static final Set PRE_NEXT_CTRL_TBLS = ImmutableSet.of( + FabricConstants.FABRIC_INGRESS_PRE_NEXT_NEXT_MPLS, + FabricConstants.FABRIC_INGRESS_PRE_NEXT_NEXT_VLAN); private static final Set ACL_CTRL_TBLS = ImmutableSet.of( FabricConstants.FABRIC_INGRESS_ACL_ACL); private static final Set NEXT_CTRL_TBLS = ImmutableSet.of( - FabricConstants.FABRIC_INGRESS_NEXT_NEXT_VLAN, FabricConstants.FABRIC_INGRESS_NEXT_SIMPLE, FabricConstants.FABRIC_INGRESS_NEXT_HASHED, FabricConstants.FABRIC_INGRESS_NEXT_XCONNECT); @@ -162,10 +165,10 @@ public Optional mapFlowRuleTableId(int flowRuleTableId) { @Override public PiAction mapTreatment(TrafficTreatment treatment, PiTableId piTableId) throws PiInterpreterException { - if (FILTERING_CTRL_TBLS.contains(piTableId)) { - return treatmentInterpreter.mapFilteringTreatment(treatment, piTableId); - } else if (FORWARDING_CTRL_TBLS.contains(piTableId)) { + if (FORWARDING_CTRL_TBLS.contains(piTableId)) { return treatmentInterpreter.mapForwardingTreatment(treatment, piTableId); + } else if (PRE_NEXT_CTRL_TBLS.contains(piTableId)) { + return treatmentInterpreter.mapPreNextTreatment(treatment, piTableId); } else if (ACL_CTRL_TBLS.contains(piTableId)) { return treatmentInterpreter.mapAclTreatment(treatment, piTableId); } else if (NEXT_CTRL_TBLS.contains(piTableId)) { @@ -179,23 +182,46 @@ public PiAction mapTreatment(TrafficTreatment treatment, PiTableId piTableId) } private PiPacketOperation createPiPacketOperation( - DeviceId deviceId, ByteBuffer data, long portNumber) + ByteBuffer data, long portNumber, boolean doForwarding) throws PiInterpreterException { - PiPacketMetadata metadata = createPacketMetadata(portNumber); return PiPacketOperation.builder() .withType(PACKET_OUT) .withData(copyFrom(data)) - .withMetadatas(ImmutableList.of(metadata)) + .withMetadatas(createPacketMetadata(portNumber, doForwarding)) .build(); } - private PiPacketMetadata createPacketMetadata(long portNumber) + private Collection createPacketMetadata( + long portNumber, boolean doForwarding) throws PiInterpreterException { try { - return PiPacketMetadata.builder() - .withId(FabricConstants.EGRESS_PORT) - .withValue(copyFrom(portNumber).fit(PORT_BITWIDTH)) - .build(); + ImmutableList.Builder builder = ImmutableList.builder(); + // We have observed an issue with p4lang/PI and BMv2 where in + // presence of multiple metadata fields, the PI implementation for + // BMv2 provides an erroneous serialization of the packet-out + // header, an hence affects the parsing/forwarding behavior. As a + // workaround, since we cannot control the order of fields in the + // p4runtime.PacketOut message, we modify the interpreter to only + // add one field, egress_port or do_forwarding. Both fields + // are treated as mutually exclusive by the P4 pipeline, so the + // operation is safe. This is against the P4Runtime spec (all fields + // should be provided), but supported by bmv2 (unset fields are + // initialized to zero). + if (portNumber >= 0) { + // 0 is a valid port number. + builder.add(PiPacketMetadata.builder() + .withId(FabricConstants.EGRESS_PORT) + .withValue(copyFrom(portNumber) + .fit(PORT_BITWIDTH)) + .build()); + } + if (doForwarding) { + builder.add(PiPacketMetadata.builder() + .withId(FabricConstants.DO_FORWARDING) + .withValue(copyFrom(ONE)) + .build()); + } + return builder.build(); } catch (ImmutableByteSequence.ByteSequenceTrimException e) { throw new PiInterpreterException(format( "Port number '%d' too big, %s", portNumber, e.getMessage())); @@ -223,18 +249,21 @@ public Collection mapOutboundPacket(OutboundPacket packet) ImmutableList.Builder builder = ImmutableList.builder(); for (Instructions.OutputInstruction outInst : outInstructions) { - if (outInst.port().isLogical() && !outInst.port().equals(FLOOD)) { - throw new PiInterpreterException(format( - "Output on logical port '%s' not supported", outInst.port())); + if (outInst.port().equals(TABLE)) { + // Logical port. Forward using the switch tables like a regular packet. + builder.add(createPiPacketOperation(packet.data(), -1, true)); } else if (outInst.port().equals(FLOOD)) { - // Since fabric.p4 does not support flooding, we create a packet - // operation for each switch port. + // Logical port. Create a packet operation for each switch port. final DeviceService deviceService = handler().get(DeviceService.class); for (Port port : deviceService.getPorts(packet.sendThrough())) { - builder.add(createPiPacketOperation(deviceId, packet.data(), port.number().toLong())); + builder.add(createPiPacketOperation(packet.data(), port.number().toLong(), false)); } + } else if (outInst.port().isLogical()) { + throw new PiInterpreterException(format( + "Output on logical port '%s' not supported", outInst.port())); } else { - builder.add(createPiPacketOperation(deviceId, packet.data(), outInst.port().toLong())); + // Send as-is to given port bypassing all switch tables. + builder.add(createPiPacketOperation(packet.data(), outInst.port().toLong(), false)); } } return builder.build(); @@ -261,6 +290,9 @@ public InboundPacket mapInboundPacket(PiPacketOperation packetIn, DeviceId devic ImmutableByteSequence portByteSequence = packetMetadata.get().value(); short s = portByteSequence.asReadOnlyBuffer().getShort(); ConnectPoint receivedFrom = new ConnectPoint(deviceId, PortNumber.portNumber(s)); + if (!receivedFrom.port().hasName()) { + receivedFrom = translateSwitchPort(receivedFrom); + } ByteBuffer rawData = ByteBuffer.wrap(packetIn.data().asArray()); return new DefaultInboundPacket(receivedFrom, ethPkt, rawData); } else { @@ -276,10 +308,25 @@ public Optional getOriginalDefaultAction(PiTableId tableId) { } @Override - public Optional mapLogicalPortNumber(PortNumber port) { + public Optional mapLogicalPort(PortNumber port) { if (!port.equals(CONTROLLER)) { return Optional.empty(); } return capabilities.cpuPort(); } + + /* Connect point generated using sb metadata does not have port name + we use the device service as translation service */ + private ConnectPoint translateSwitchPort(ConnectPoint connectPoint) { + final DeviceService deviceService = handler().get(DeviceService.class); + if (deviceService == null) { + log.warn("Unable to translate switch port due to DeviceService not available"); + return connectPoint; + } + Port devicePort = deviceService.getPort(connectPoint); + if (devicePort != null) { + return new ConnectPoint(connectPoint.deviceId(), devicePort.number()); + } + return connectPoint; + } } diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricPortStatisticsDiscovery.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricPortStatisticsDiscovery.java index b461ad39338..219e3707827 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricPortStatisticsDiscovery.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricPortStatisticsDiscovery.java @@ -19,6 +19,7 @@ import org.onosproject.net.pi.model.PiCounterId; import org.onosproject.pipelines.basic.PortStatisticsDiscoveryImpl; +import org.onosproject.pipelines.fabric.FabricConstants; /** * Implementation of the PortStatisticsBehaviour for fabric.p4. diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricTreatmentInterpreter.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricTreatmentInterpreter.java index 78ef9a740de..bdf3eafa769 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricTreatmentInterpreter.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricTreatmentInterpreter.java @@ -31,6 +31,7 @@ import org.onosproject.net.pi.model.PiTableId; import org.onosproject.net.pi.runtime.PiAction; import org.onosproject.net.pi.runtime.PiActionParam; +import org.onosproject.pipelines.fabric.FabricConstants; import java.util.List; import java.util.stream.Collectors; @@ -40,12 +41,14 @@ import static org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType.ETH_DST; import static org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType.ETH_SRC; import static org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType.MPLS_LABEL; -import static org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType.MPLS_PUSH; import static org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType.VLAN_ID; import static org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType.VLAN_POP; +import static org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType.VLAN_PUSH; import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.instruction; import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.l2Instruction; +import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.l2InstructionOrFail; import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.l2Instructions; +import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.treatmentException; /** * Treatment translation logic. @@ -55,8 +58,6 @@ final class FabricTreatmentInterpreter { private final FabricCapabilities capabilities; private static final ImmutableMap NOP_ACTIONS = ImmutableMap.builder() - .put(FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN, - FabricConstants.FABRIC_INGRESS_FILTERING_PERMIT) .put(FabricConstants.FABRIC_INGRESS_FORWARDING_ROUTING_V4, FabricConstants.FABRIC_INGRESS_FORWARDING_NOP_ROUTING_V4) .put(FabricConstants.FABRIC_INGRESS_ACL_ACL, @@ -70,30 +71,6 @@ final class FabricTreatmentInterpreter { this.capabilities = capabilities; } - static PiAction mapFilteringTreatment(TrafficTreatment treatment, PiTableId tableId) - throws PiInterpreterException { - - if (!tableId.equals(FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN)) { - // Mapping for other tables of the filtering block must be handled - // in the pipeliner. - tableException(tableId); - } - - // VLAN_POP action is equivalent to the permit action (VLANs pop is done anyway) - if (isNoAction(treatment) || isFilteringPopAction(treatment)) { - // Permit action if table is ingress_port_vlan; - return nop(tableId); - } - - final ModVlanIdInstruction setVlanInst = (ModVlanIdInstruction) l2InstructionOrFail( - treatment, VLAN_ID, tableId); - return PiAction.builder() - .withId(FabricConstants.FABRIC_INGRESS_FILTERING_PERMIT_WITH_INTERNAL_VLAN) - .withParameter(new PiActionParam( - FabricConstants.VLAN_ID, setVlanInst.vlanId().toShort())) - .build(); - } - static PiAction mapForwardingTreatment(TrafficTreatment treatment, PiTableId tableId) throws PiInterpreterException { @@ -106,35 +83,58 @@ static PiAction mapForwardingTreatment(TrafficTreatment treatment, PiTableId tab return null; } - PiAction mapNextTreatment(TrafficTreatment treatment, PiTableId tableId) + PiAction mapPreNextTreatment(TrafficTreatment treatment, PiTableId tableId) throws PiInterpreterException { - if (tableId == FabricConstants.FABRIC_INGRESS_NEXT_NEXT_VLAN) { + if (tableId == FabricConstants.FABRIC_INGRESS_PRE_NEXT_NEXT_MPLS) { + return mapNextMplsTreatment(treatment, tableId); + } else if (tableId == FabricConstants.FABRIC_INGRESS_PRE_NEXT_NEXT_VLAN) { return mapNextVlanTreatment(treatment, tableId); - } else if (tableId == FabricConstants.FABRIC_INGRESS_NEXT_HASHED) { + } + throw new PiInterpreterException(format( + "Treatment mapping not supported for table '%s'", tableId)); + } + + PiAction mapNextTreatment(TrafficTreatment treatment, PiTableId tableId) + throws PiInterpreterException { + if (tableId == FabricConstants.FABRIC_INGRESS_NEXT_HASHED) { return mapNextHashedOrSimpleTreatment(treatment, tableId, false); } else if (tableId == FabricConstants.FABRIC_INGRESS_NEXT_SIMPLE) { - return mapNextHashedOrSimpleTreatment(treatment, tableId, true); + return mapNextHashedOrSimpleTreatment(treatment, tableId, true); } else if (tableId == FabricConstants.FABRIC_INGRESS_NEXT_XCONNECT) { - return mapNextXconnect(treatment, tableId); + return mapNextXconnect(treatment, tableId); } throw new PiInterpreterException(format( "Treatment mapping not supported for table '%s'", tableId)); } + private static PiAction mapNextMplsTreatment(TrafficTreatment treatment, PiTableId tableId) + throws PiInterpreterException { + final ModMplsLabelInstruction mplsLabel = (ModMplsLabelInstruction) l2Instruction( + treatment, MPLS_LABEL); + if (mplsLabel != null) { + return PiAction.builder() + .withParameter(new PiActionParam(FabricConstants.LABEL, mplsLabel.label().toInt())) + .withId(FabricConstants.FABRIC_INGRESS_PRE_NEXT_SET_MPLS_LABEL) + .build(); + } + throw new PiInterpreterException("There is no MPLS instruction"); + } + private PiAction mapNextVlanTreatment(TrafficTreatment treatment, PiTableId tableId) throws PiInterpreterException { final List modVlanIdInst = l2InstructionsOrFail(treatment, VLAN_ID, tableId) .stream().map(i -> (ModVlanIdInstruction) i).collect(Collectors.toList()); if (modVlanIdInst.size() == 1) { - return PiAction.builder().withId(FabricConstants.FABRIC_INGRESS_NEXT_SET_VLAN) + return PiAction.builder().withId(FabricConstants.FABRIC_INGRESS_PRE_NEXT_SET_VLAN) .withParameter(new PiActionParam( FabricConstants.VLAN_ID, modVlanIdInst.get(0).vlanId().toShort())) .build(); } + // next_vlan has been moved to pre_next if (modVlanIdInst.size() == 2 && capabilities.supportDoubleVlanTerm()) { return PiAction.builder() - .withId(FabricConstants.FABRIC_INGRESS_NEXT_SET_DOUBLE_VLAN) + .withId(FabricConstants.FABRIC_INGRESS_PRE_NEXT_SET_DOUBLE_VLAN) .withParameter(new PiActionParam( FabricConstants.INNER_VLAN_ID, modVlanIdInst.get(0).vlanId().toShort())) @@ -149,20 +149,15 @@ private PiAction mapNextVlanTreatment(TrafficTreatment treatment, PiTableId tabl private static PiAction mapNextHashedOrSimpleTreatment( TrafficTreatment treatment, PiTableId tableId, boolean simple) throws PiInterpreterException { - // Provide mapping for output_hashed, routing_hashed, and - // mpls_routing_hashed. multicast_hashed can only be invoked with - // PiAction, hence no mapping. outPort required for all actions. Presence - // of other instructions will determine which action to map to. + // Provide mapping for output_hashed and routing_hashed; multicast_hashed + // can only be invoked with PiAction, hence no mapping. outPort required for + // all actions. Presence of other instructions will determine which action to map to. final PortNumber outPort = ((OutputInstruction) instructionOrFail( treatment, OUTPUT, tableId)).port(); final ModEtherInstruction ethDst = (ModEtherInstruction) l2Instruction( treatment, ETH_DST); final ModEtherInstruction ethSrc = (ModEtherInstruction) l2Instruction( treatment, ETH_SRC); - final Instruction mplsPush = l2Instruction( - treatment, MPLS_PUSH); - final ModMplsLabelInstruction mplsLabel = (ModMplsLabelInstruction) l2Instruction( - treatment, MPLS_LABEL); final PiAction.Builder actionBuilder = PiAction.builder() .withParameter(new PiActionParam(FabricConstants.PORT_NUM, outPort.toLong())); @@ -172,20 +167,11 @@ private static PiAction mapNextHashedOrSimpleTreatment( FabricConstants.SMAC, ethSrc.mac().toBytes())); actionBuilder.withParameter(new PiActionParam( FabricConstants.DMAC, ethDst.mac().toBytes())); - if (mplsLabel != null) { - // mpls_routing_hashed - return actionBuilder - .withParameter(new PiActionParam(FabricConstants.LABEL, mplsLabel.label().toInt())) - .withId(simple ? FabricConstants.FABRIC_INGRESS_NEXT_MPLS_ROUTING_SIMPLE - : FabricConstants.FABRIC_INGRESS_NEXT_MPLS_ROUTING_HASHED) - .build(); - } else { - // routing_hashed - return actionBuilder - .withId(simple ? FabricConstants.FABRIC_INGRESS_NEXT_ROUTING_SIMPLE - : FabricConstants.FABRIC_INGRESS_NEXT_ROUTING_HASHED) - .build(); - } + // routing_hashed + return actionBuilder + .withId(simple ? FabricConstants.FABRIC_INGRESS_NEXT_ROUTING_SIMPLE + : FabricConstants.FABRIC_INGRESS_NEXT_ROUTING_HASHED) + .build(); } else { // output_hashed return actionBuilder @@ -209,8 +195,11 @@ private static PiAction mapNextXconnect( static PiAction mapAclTreatment(TrafficTreatment treatment, PiTableId tableId) throws PiInterpreterException { + if (isDrop(treatment)) { + return drop(tableId); + } if (isNoAction(treatment)) { - return nop(tableId); + return nop(tableId); } treatmentException( tableId, treatment, @@ -224,6 +213,12 @@ static PiAction mapAclTreatment(TrafficTreatment treatment, PiTableId tableId) static PiAction mapEgressNextTreatment( TrafficTreatment treatment, PiTableId tableId) throws PiInterpreterException { + L2ModificationInstruction pushVlan = l2Instruction(treatment, VLAN_PUSH); + if (pushVlan != null) { + return PiAction.builder() + .withId(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_PUSH_VLAN) + .build(); + } l2InstructionOrFail(treatment, VLAN_POP, tableId); return PiAction.builder() .withId(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_POP_VLAN) @@ -238,24 +233,22 @@ private static PiAction nop(PiTableId tableId) throws PiInterpreterException { return PiAction.builder().withId(NOP_ACTIONS.get(tableId)).build(); } - private static boolean isNoAction(TrafficTreatment treatment) { - return treatment.equals(DefaultTrafficTreatment.emptyTreatment()) || - treatment.allInstructions().isEmpty(); + private static PiAction drop(PiTableId tableId) throws PiInterpreterException { + if (!tableId.equals(FabricConstants.FABRIC_INGRESS_ACL_ACL)) { + throw new PiInterpreterException(format("table '%s' doe not specify a nop action", tableId)); + } + return PiAction.builder().withId(FabricConstants.FABRIC_INGRESS_ACL_DROP).build(); } - private static boolean isFilteringPopAction(TrafficTreatment treatment) { - return l2Instruction(treatment, VLAN_POP) != null; + // NOTE: clearDeferred is used by the routing application to implement ACL drop and route black-holing + private static boolean isNoAction(TrafficTreatment treatment) { + return treatment.equals(DefaultTrafficTreatment.emptyTreatment()) || + (treatment.allInstructions().isEmpty() && !treatment.clearedDeferred()) || + (treatment.allInstructions().size() == 1 && treatment.writeMetadata() != null); } - private static Instruction l2InstructionOrFail( - TrafficTreatment treatment, - L2ModificationInstruction.L2SubType subType, PiTableId tableId) - throws PiInterpreterException { - final Instruction inst = l2Instruction(treatment, subType); - if (inst == null) { - treatmentException(tableId, treatment, format("missing %s instruction", subType)); - } - return inst; + private static boolean isDrop(TrafficTreatment treatment) { + return treatment.allInstructions().isEmpty() && treatment.clearedDeferred(); } private static List l2InstructionsOrFail( @@ -278,16 +271,4 @@ private static Instruction instructionOrFail( } return inst; } - - private static void tableException(PiTableId tableId) - throws PiInterpreterException { - throw new PiInterpreterException(format("Table '%s' not supported", tableId)); - } - - private static void treatmentException( - PiTableId tableId, TrafficTreatment treatment, String explanation) - throws PiInterpreterException { - throw new PiInterpreterException(format( - "Invalid treatment for table '%s', %s: %s", tableId, explanation, treatment)); - } } diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricUtils.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricUtils.java index 655f88d3d4f..5d89f99bf29 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricUtils.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricUtils.java @@ -20,11 +20,17 @@ import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.flow.TrafficTreatment; import org.onosproject.net.flow.criteria.Criterion; +import org.onosproject.net.flow.criteria.MetadataCriterion; import org.onosproject.net.flow.instructions.Instruction; import org.onosproject.net.flow.instructions.Instructions; import org.onosproject.net.flow.instructions.L2ModificationInstruction; import org.onosproject.net.flowobjective.DefaultNextTreatment; +import org.onosproject.net.flowobjective.FilteringObjective; +import org.onosproject.net.flowobjective.ForwardingObjective; import org.onosproject.net.flowobjective.NextTreatment; +import org.onosproject.net.flowobjective.Objective; +import org.onosproject.net.pi.model.PiPipelineInterpreter; +import org.onosproject.net.pi.model.PiTableId; import java.util.Collection; import java.util.List; @@ -32,6 +38,11 @@ import static com.google.common.base.Preconditions.checkNotNull; import static java.lang.String.format; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.EDGE_PORT; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.INFRA_PORT; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.METADATA_MASK; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.METADATA_TO_PORT_TYPE; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.PAIR_PORT; /** * Utility class with methods common to fabric pipeconf operations. @@ -62,11 +73,10 @@ public static Criterion criterionNotNull(Collection criteria, Criteri format("%s criterion cannot be null", type)); } - public static Instructions.OutputInstruction instruction(TrafficTreatment treatment, Instruction.Type type) { + public static Instruction instruction(TrafficTreatment treatment, Instruction.Type type) { return treatment.allInstructions() .stream() .filter(inst -> inst.type() == type) - .map(inst -> (Instructions.OutputInstruction) inst) .findFirst().orElse(null); } @@ -79,6 +89,17 @@ public static L2ModificationInstruction l2Instruction( .findFirst().orElse(null); } + public static Instruction l2InstructionOrFail( + TrafficTreatment treatment, + L2ModificationInstruction.L2SubType subType, PiTableId tableId) + throws PiPipelineInterpreter.PiInterpreterException { + final Instruction inst = l2Instruction(treatment, subType); + if (inst == null) { + treatmentException(tableId, treatment, format("missing %s instruction", subType)); + } + return inst; + } + public static List l2Instructions( TrafficTreatment treatment, L2ModificationInstruction.L2SubType subType) { return treatment.allInstructions().stream() @@ -89,7 +110,7 @@ public static List l2Instructions( } public static Instructions.OutputInstruction outputInstruction(TrafficTreatment treatment) { - return instruction(treatment, Instruction.Type.OUTPUT); + return (Instructions.OutputInstruction) instruction(treatment, Instruction.Type.OUTPUT); } public static PortNumber outputPort(TrafficTreatment treatment) { @@ -104,4 +125,94 @@ public static PortNumber outputPort(NextTreatment treatment) { } return null; } + + public static void treatmentException( + PiTableId tableId, TrafficTreatment treatment, String explanation) + throws PiPipelineInterpreter.PiInterpreterException { + throw new PiPipelineInterpreter.PiInterpreterException(format( + "Invalid treatment for table '%s', %s: %s", tableId, explanation, treatment)); + } + + /** + * Port type metadata conversion. + * + * @param obj the objective + * @return the port type associated to the metadata, null otherwise + */ + public static Byte portType(Objective obj) { + Byte portType = null; + if (isSrMetadataSet(obj, PAIR_PORT) && METADATA_TO_PORT_TYPE.containsKey(PAIR_PORT)) { + portType = METADATA_TO_PORT_TYPE.get(PAIR_PORT); + } else if (isSrMetadataSet(obj, EDGE_PORT) && METADATA_TO_PORT_TYPE.containsKey(EDGE_PORT)) { + portType = METADATA_TO_PORT_TYPE.get(EDGE_PORT); + } else if (isSrMetadataSet(obj, INFRA_PORT) && METADATA_TO_PORT_TYPE.containsKey(INFRA_PORT)) { + portType = METADATA_TO_PORT_TYPE.get(INFRA_PORT); + } + return portType; + } + + /** + * Check metadata passed from SegmentRouting app. + * + * @param obj the objective containing the metadata + * @return true if the objective contains valid metadata, false otherwise + */ + public static boolean isValidSrMetadata(Objective obj) { + long meta = 0; + if (obj instanceof FilteringObjective) { + FilteringObjective filtObj = (FilteringObjective) obj; + if (filtObj.meta() == null) { + return true; + } + Instructions.MetadataInstruction metaIns = filtObj.meta().writeMetadata(); + if (metaIns == null) { + return true; + } + meta = metaIns.metadata() & metaIns.metadataMask(); + } else if (obj instanceof ForwardingObjective) { + ForwardingObjective fwdObj = (ForwardingObjective) obj; + if (fwdObj.meta() == null) { + return true; + } + MetadataCriterion metaCrit = (MetadataCriterion) fwdObj.meta().getCriterion(Criterion.Type.METADATA); + if (metaCrit == null) { + return true; + } + meta = metaCrit.metadata(); + } + return meta != 0 && ((meta ^ METADATA_MASK) <= METADATA_MASK); + } + + /** + * Verify if a given flag has been set into the metadata. + * + * @param obj the objective containing the metadata + * @param flag the flag to verify + * @return true if the flag is set, false otherwise + */ + public static boolean isSrMetadataSet(Objective obj, long flag) { + long meta = 0; + if (obj instanceof FilteringObjective) { + FilteringObjective filtObj = (FilteringObjective) obj; + if (filtObj.meta() == null) { + return false; + } + Instructions.MetadataInstruction metaIns = filtObj.meta().writeMetadata(); + if (metaIns == null) { + return false; + } + meta = metaIns.metadata() & metaIns.metadataMask(); + } else if (obj instanceof ForwardingObjective) { + ForwardingObjective fwdObj = (ForwardingObjective) obj; + if (fwdObj.meta() == null) { + return false; + } + MetadataCriterion metaCrit = (MetadataCriterion) fwdObj.meta().getCriterion(Criterion.Type.METADATA); + if (metaCrit == null) { + return false; + } + meta = metaCrit.metadata(); + } + return (meta & flag) == flag; + } } diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/bng/FabricBngProgrammable.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/bng/FabricBngProgrammable.java index 1a08e735060..219107154dd 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/bng/FabricBngProgrammable.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/bng/FabricBngProgrammable.java @@ -46,7 +46,7 @@ import org.onosproject.net.pi.runtime.PiExactFieldMatch; import org.onosproject.p4runtime.api.P4RuntimeWriteClient; import org.onosproject.pipelines.fabric.impl.behaviour.FabricCapabilities; -import org.onosproject.pipelines.fabric.impl.behaviour.FabricConstants; +import org.onosproject.pipelines.fabric.FabricConstants; import java.util.Collection; import java.util.List; diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/bng/PuntCpuCriterionFactory.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/bng/PuntCpuCriterionFactory.java index ff405632413..8f63fe4db3e 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/bng/PuntCpuCriterionFactory.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/bng/PuntCpuCriterionFactory.java @@ -19,7 +19,7 @@ import com.google.common.collect.ImmutableList; import org.onosproject.net.flow.criteria.Criterion; import org.onosproject.net.flow.criteria.PiCriterion; -import org.onosproject.pipelines.fabric.impl.behaviour.FabricConstants; +import org.onosproject.pipelines.fabric.FabricConstants; import java.util.Set; import java.util.stream.Collectors; diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricPipeliner.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricPipeliner.java index 79045f104a6..cea5c47ab6b 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricPipeliner.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricPipeliner.java @@ -17,16 +17,30 @@ package org.onosproject.pipelines.fabric.impl.behaviour.pipeliner; import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; +import org.onlab.packet.Ethernet; import org.onlab.util.KryoNamespace; import org.onlab.util.SharedExecutors; +import org.onosproject.core.ApplicationId; +import org.onosproject.core.CoreService; import org.onosproject.net.DeviceId; import org.onosproject.net.PortNumber; import org.onosproject.net.behaviour.NextGroup; import org.onosproject.net.behaviour.Pipeliner; import org.onosproject.net.behaviour.PipelinerContext; +import org.onosproject.net.flow.DefaultFlowRule; +import org.onosproject.net.flow.DefaultTrafficSelector; +import org.onosproject.net.flow.DefaultTrafficTreatment; import org.onosproject.net.flow.FlowRule; import org.onosproject.net.flow.FlowRuleOperations; import org.onosproject.net.flow.FlowRuleService; +import org.onosproject.net.flow.TrafficSelector; +import org.onosproject.net.flow.TrafficTreatment; +import org.onosproject.net.flow.criteria.Criteria; +import org.onosproject.net.flow.criteria.PiCriterion; +import org.onosproject.net.flowobjective.DefaultNextObjective; import org.onosproject.net.flowobjective.FilteringObjective; import org.onosproject.net.flowobjective.FlowObjectiveStore; import org.onosproject.net.flowobjective.ForwardingObjective; @@ -35,23 +49,39 @@ import org.onosproject.net.flowobjective.NextTreatment; import org.onosproject.net.flowobjective.Objective; import org.onosproject.net.flowobjective.ObjectiveError; +import org.onosproject.net.group.DefaultGroup; +import org.onosproject.net.group.Group; +import org.onosproject.net.group.GroupBucket; +import org.onosproject.net.group.GroupBuckets; import org.onosproject.net.group.GroupDescription; +import org.onosproject.net.group.GroupKey; import org.onosproject.net.group.GroupService; +import org.onosproject.net.pi.runtime.PiAction; +import org.onosproject.net.pi.runtime.PiActionParam; +import org.onosproject.pipelines.fabric.FabricConstants; +import org.onosproject.pipelines.fabric.impl.FabricPipeconfLoader; import org.onosproject.pipelines.fabric.impl.behaviour.AbstractFabricHandlerBehavior; import org.onosproject.pipelines.fabric.impl.behaviour.FabricCapabilities; import org.onosproject.store.serializers.KryoNamespaces; import org.slf4j.Logger; import java.util.Collection; +import java.util.Collections; import java.util.List; +import java.util.Map; import java.util.Objects; +import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutorService; import java.util.stream.Collectors; import static java.lang.String.format; import static org.onosproject.net.flowobjective.NextObjective.Type.SIMPLE; +import static org.onosproject.pipelines.fabric.impl.behaviour.FabricInterpreter.ONE; +import static org.onosproject.pipelines.fabric.impl.behaviour.FabricInterpreter.ZERO; import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.outputPort; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.FWD_IPV4_ROUTING; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.PORT_TYPE_INTERNAL; import static org.slf4j.LoggerFactory.getLogger; /** @@ -63,6 +93,8 @@ public class FabricPipeliner extends AbstractFabricHandlerBehavior implements Pipeliner { private static final Logger log = getLogger(FabricPipeliner.class); + private static final int DEFAULT_FLOW_PRIORITY = 100; + public static final int DEFAULT_VLAN = 4094; protected static final KryoNamespace KRYO = new KryoNamespace.Builder() .register(KryoNamespaces.API) @@ -70,9 +102,11 @@ public class FabricPipeliner extends AbstractFabricHandlerBehavior .build("FabricPipeliner"); protected DeviceId deviceId; + protected ApplicationId appId; protected FlowRuleService flowRuleService; protected GroupService groupService; protected FlowObjectiveStore flowObjectiveStore; + protected CoreService coreService; private FilteringObjectiveTranslator filteringTranslator; private ForwardingObjectiveTranslator forwardingTranslator; @@ -106,6 +140,19 @@ public void init(DeviceId deviceId, PipelinerContext context) { this.filteringTranslator = new FilteringObjectiveTranslator(deviceId, capabilities); this.forwardingTranslator = new ForwardingObjectiveTranslator(deviceId, capabilities); this.nextTranslator = new NextObjectiveTranslator(deviceId, capabilities); + this.coreService = context.directory().get(CoreService.class); + this.appId = coreService.getAppId(FabricPipeconfLoader.PIPELINE_APP_NAME); + + initializePipeline(); + } + + protected void initializePipeline() { + // Set up rules for packet-out forwarding. We support only IPv4 routing. + final long cpuPort = capabilities.cpuPort().get(); + flowRuleService.applyFlowRules( + ingressVlanRule(cpuPort, false, DEFAULT_VLAN), + fwdClassifierRule(cpuPort, null, Ethernet.TYPE_IPV4, FWD_IPV4_ROUTING, + DEFAULT_FLOW_PRIORITY)); } @Override @@ -123,9 +170,22 @@ public void forward(ForwardingObjective obj) { @Override public void next(NextObjective obj) { if (obj.op() == Objective.Operation.VERIFY) { - // TODO: support VERIFY operation - log.debug("VERIFY operation not yet supported for NextObjective, will return success"); - success(obj); + if (obj.type() != NextObjective.Type.HASHED) { + log.warn("VERIFY operation not yet supported for NextObjective {}, will return failure :(", + obj.type()); + fail(obj, ObjectiveError.UNSUPPORTED); + return; + } + + if (log.isTraceEnabled()) { + log.trace("Verify NextObjective {} in dev {}", obj, deviceId); + } + ObjectiveError error = handleVerify(obj); + if (error == null) { + success(obj); + } else { + fail(obj, error); + } return; } @@ -143,6 +203,13 @@ public void next(NextObjective obj) { handleResult(obj, result); } + @Override + public void purgeAll(ApplicationId appId) { + flowRuleService.purgeFlowRules(deviceId, appId); + groupService.purgeGroupEntries(deviceId, appId); + // TODO: should we purge also the FlowObjectiveStore? + } + @Override public List getNextMappings(NextGroup nextGroup) { final FabricNextGroup fabricNextGroup = KRYO.deserialize(nextGroup.data()); @@ -165,6 +232,7 @@ private void handleResult(Objective obj, ObjectiveTranslation result) { } private void handleNextGroup(NextObjective obj) { + // FIXME SDFAB-250 ADD_TO and REMOVE_FROM should update the content switch (obj.op()) { case REMOVE: removeNextGroup(obj); @@ -268,7 +336,7 @@ private void success(Objective objective) { private void removeNextGroup(NextObjective obj) { final NextGroup removed = flowObjectiveStore.removeNextGroup(obj.id()); if (removed == null) { - log.debug("NextGroup {} was not found in FlowObjectiveStore"); + log.debug("NextGroup {} was not found in FlowObjectiveStore", obj); } } @@ -296,11 +364,197 @@ private String nextTreatmentToMappingString(NextTreatment n) { } } + public FlowRule ingressVlanRule(long port, boolean vlanValid, int vlanId) { + final TrafficSelector selector = DefaultTrafficSelector.builder() + .add(Criteria.matchInPort(PortNumber.portNumber(port))) + .add(PiCriterion.builder() + .matchExact(FabricConstants.HDR_VLAN_IS_VALID, vlanValid ? ONE : ZERO) + .build()) + .build(); + final TrafficTreatment treatment = DefaultTrafficTreatment.builder() + .piTableAction(PiAction.builder() + .withId(vlanValid ? FabricConstants.FABRIC_INGRESS_FILTERING_PERMIT + : FabricConstants.FABRIC_INGRESS_FILTERING_PERMIT_WITH_INTERNAL_VLAN) + .withParameter(new PiActionParam(FabricConstants.VLAN_ID, vlanId)) + .withParameter(new PiActionParam(FabricConstants.PORT_TYPE, PORT_TYPE_INTERNAL)) + .build()) + .build(); + return DefaultFlowRule.builder() + .withSelector(selector) + .withTreatment(treatment) + .forTable(FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN) + .makePermanent() + .withPriority(DEFAULT_FLOW_PRIORITY) + .forDevice(deviceId) + .fromApp(appId) + .build(); + } + + public FlowRule fwdClassifierRule(long port, Short ethType, short ipEthType, byte fwdType, int priority) { + final TrafficSelector.Builder selectorBuilder = DefaultTrafficSelector.builder() + .matchInPort(PortNumber.portNumber(port)) + .matchPi(PiCriterion.builder() + .matchExact(FabricConstants.HDR_IP_ETH_TYPE, ipEthType) + .build()); + if (ethType != null) { + selectorBuilder.matchEthType(ethType); + } + final TrafficTreatment treatment = DefaultTrafficTreatment.builder() + .piTableAction(PiAction.builder() + .withId(FabricConstants.FABRIC_INGRESS_FILTERING_SET_FORWARDING_TYPE) + .withParameter(new PiActionParam(FabricConstants.FWD_TYPE, fwdType)) + .build()) + .build(); + return DefaultFlowRule.builder() + .withSelector(selectorBuilder.build()) + .withTreatment(treatment) + .forTable(FabricConstants.FABRIC_INGRESS_FILTERING_FWD_CLASSIFIER) + .makePermanent() + .withPriority(priority) + .forDevice(deviceId) + .fromApp(appId) + .build(); + } + + private ObjectiveError handleVerify(NextObjective nextObjective) { + Map bucketsToFlows = getBucketToFlowMapping(nextObjective); + if (bucketsToFlows.isEmpty() && !nextObjective.nextTreatments().isEmpty()) { + log.warn("VERIFY failed due to translation error, bucketsToFlows is empty"); + return ObjectiveError.BADPARAMS; + } + + if (log.isTraceEnabled()) { + log.trace("Mapping bucketsToFlows {} has been generated ", bucketsToFlows); + } + + GroupKey groupKey = nextTranslator.getGroupKey(nextObjective); + if (groupKey == null) { + log.warn("VERIFY failed due to translation error, unable to determine group key"); + return ObjectiveError.BADPARAMS; + } + Group groupFromStore = groupService.getGroup(deviceId, groupKey); + if (groupFromStore == null) { + log.warn("VERIFY failed due to missing group in the store"); + return ObjectiveError.GROUPMISSING; + } + + // Looking for duplicate buckets - remove them by using a set and comparing size after/before + Set bucketsFromStore = Sets.newHashSet(groupFromStore.buckets().buckets()); + if (groupFromStore.buckets().buckets().size() > bucketsFromStore.size()) { + log.warn("Duplicated buckets detected in device:{}, nextId:{}, before-size" + + ":{} after-size:{} .. correcting", deviceId, + nextObjective.id(), groupFromStore.buckets().buckets().size(), bucketsFromStore.size()); + final GroupBuckets bucketToSet = new GroupBuckets(Lists.newArrayList(bucketsFromStore)); + groupService.setBucketsForGroup(deviceId, groupKey, bucketToSet, groupKey, nextObjective.appId()); + // Forge temporary the group to avoid race condition with the store + groupFromStore = new DefaultGroup(groupFromStore.id(), deviceId, groupFromStore.type(), bucketToSet); + } + + // Looking for buckets missing in the group but defined in the next + Map toAdd = Maps.newHashMap(); + for (Map.Entry entry : bucketsToFlows.entrySet()) { + if (!groupFromStore.buckets().buckets().contains(entry.getKey())) { + toAdd.put(entry.getKey(), entry.getValue()); + } + } + + // Looking for buckets missing in the next but defined in the group + // FIXME SDFAB-250 we cannot remove associated egress flows + List toRemove = Lists.newArrayList(); + groupFromStore.buckets().buckets().forEach(bucket -> { + if (!bucketsToFlows.containsKey(bucket)) { + toRemove.add(bucket); + } + }); + + if (!toAdd.isEmpty() || !toRemove.isEmpty()) { + log.warn("Mismatch detected in device:{}, nextId:{}, groupFromTranslation-size:{} " + + "groupFromStore-size:{} toAdd-size:{} toRemove-size: {} .. correcting", + deviceId, nextObjective.id(), bucketsToFlows.size(), groupFromStore.buckets().buckets().size(), + toAdd.size(), toRemove.size()); + } + + if (!toAdd.isEmpty()) { + if (log.isTraceEnabled()) { + log.trace("Adding missing buckets {} and flows {}", toAdd.keySet(), toAdd.values()); + } + final FlowRuleOperations.Builder ops = FlowRuleOperations.builder(); + final FlowRule dummyFlow = getDummyFlow(nextObjective); + toAdd.values().stream() + .filter(flowRule -> !flowRule.equals(dummyFlow)) + .forEach(ops::add); + final GroupBuckets bucketsToAdd = new GroupBuckets(Lists.newArrayList(toAdd.keySet())); + groupService.addBucketsToGroup(deviceId, groupKey, bucketsToAdd, groupKey, nextObjective.appId()); + flowRuleService.apply(ops.build()); + } + + if (!toRemove.isEmpty()) { + if (log.isTraceEnabled()) { + log.trace("Removing stale buckets {}", toRemove); + } + final GroupBuckets bucketsToRemove = new GroupBuckets(toRemove); + groupService.removeBucketsFromGroup(deviceId, groupKey, bucketsToRemove, groupKey, + nextObjective.appId()); + } + + return null; + } + + private Map getBucketToFlowMapping(NextObjective nextObjective) { + Map mapping = Maps.newHashMap(); + NextObjective newNextObjective; + ObjectiveTranslation result; + FlowRule dummyFlow = getDummyFlow(nextObjective); + FlowRule egFlow; + GroupBucket groupBucket; + GroupDescription group; + for (NextTreatment nextTreatment : nextObjective.nextTreatments()) { + newNextObjective = DefaultNextObjective.builder() + .withId(nextObjective.id()) + .withType(nextObjective.type()) + .fromApp(nextObjective.appId()) + .withMeta(nextObjective.meta()) + .addTreatment(nextTreatment) + .verify(); + result = nextTranslator.translate(newNextObjective); + if ((result.groups().isEmpty() && result.flowRules().isEmpty()) || + result.groups().size() > 1) { + return Collections.emptyMap(); + } + group = result.groups().iterator().next(); + egFlow = result.flowRules().stream() + .filter(flowRule -> flowRule.table().equals(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_EGRESS_VLAN)) + .findFirst() + .orElse(null); + if (group.buckets().buckets().isEmpty() || group.buckets().buckets().size() > 1) { + return Collections.emptyMap(); + } + groupBucket = group.buckets().buckets().iterator().next(); + if (egFlow == null) { + mapping.put(groupBucket, dummyFlow); + } else { + mapping.put(groupBucket, egFlow); + } + } + return mapping; + } + + private FlowRule getDummyFlow(NextObjective nextObjective) { + return DefaultFlowRule.builder() + .forDevice(deviceId) + .forTable(0) + .fromApp(nextObjective.appId()) + .withPriority(1) + .withSelector(DefaultTrafficSelector.emptySelector()) + .makePermanent() + .build(); + } + /** * NextGroup implementation. */ private static class FabricNextGroup implements NextGroup { - + // FIXME SDFAB-250 they are not very useful nor technically correct private final NextObjective.Type type; private final List nextMappings; diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FilteringObjectiveTranslator.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FilteringObjectiveTranslator.java index ae97a549810..387230b5f21 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FilteringObjectiveTranslator.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FilteringObjectiveTranslator.java @@ -32,15 +32,16 @@ import org.onosproject.net.flow.criteria.PiCriterion; import org.onosproject.net.flow.criteria.PortCriterion; import org.onosproject.net.flow.criteria.VlanIdCriterion; -import org.onosproject.net.flow.instructions.Instructions; -import org.onosproject.net.flow.instructions.L2ModificationInstruction; +import org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType; +import org.onosproject.net.flow.instructions.L2ModificationInstruction.ModVlanIdInstruction; import org.onosproject.net.flowobjective.FilteringObjective; import org.onosproject.net.flowobjective.Objective; import org.onosproject.net.flowobjective.ObjectiveError; +import org.onosproject.net.pi.model.PiTableId; import org.onosproject.net.pi.runtime.PiAction; import org.onosproject.net.pi.runtime.PiActionParam; import org.onosproject.pipelines.fabric.impl.behaviour.FabricCapabilities; -import org.onosproject.pipelines.fabric.impl.behaviour.FabricConstants; +import org.onosproject.pipelines.fabric.FabricConstants; import org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils; import java.util.Collection; @@ -49,7 +50,23 @@ import static java.lang.String.format; import static org.onosproject.net.flow.criteria.Criterion.Type.INNER_VLAN_VID; import static org.onosproject.net.flow.criteria.Criterion.Type.VLAN_VID; +import static org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType.VLAN_ID; +import static org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType.VLAN_POP; +import static org.onosproject.net.pi.model.PiPipelineInterpreter.PiInterpreterException; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.CLEANUP_DOUBLE_TAGGED_HOST_ENTRIES; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.ETH_TYPE_EXACT_MASK; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.FWD_MPLS; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.FWD_IPV4_ROUTING; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.FWD_IPV6_ROUTING; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.INTERFACE_CONFIG_UPDATE; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.ONE; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.ZERO; +import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.isSrMetadataSet; +import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.isValidSrMetadata; +import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.portType; +import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.l2InstructionOrFail; import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.criterion; +import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.l2Instruction; /** * ObjectiveTranslator implementation for FilteringObjective. @@ -57,21 +74,10 @@ class FilteringObjectiveTranslator extends AbstractObjectiveTranslator { - // Forwarding types from fabric.p4. - static final byte FWD_MPLS = 1; - static final byte FWD_IPV4_ROUTING = 2; - static final byte FWD_IPV6_ROUTING = 3; - - private static final byte[] ONE = new byte[]{1}; - private static final byte[] ZERO = new byte[]{0}; - - private static final short ETH_TYPE_EXACT_MASK = (short) 0xFFFF; - private static final PiAction DENY = PiAction.builder() .withId(FabricConstants.FABRIC_INGRESS_FILTERING_DENY) .build(); - FilteringObjectiveTranslator(DeviceId deviceId, FabricCapabilities capabilities) { super(deviceId, capabilities); } @@ -89,6 +95,12 @@ public ObjectiveTranslation doTranslate(FilteringObjective obj) ObjectiveError.BADPARAMS); } + if (!isValidSrMetadata(obj)) { + throw new FabricPipelinerException( + format("Unsupported metadata configuration: metadata=%s", obj.meta()), + ObjectiveError.BADPARAMS); + } + final PortCriterion inPort = (PortCriterion) obj.key(); final VlanIdCriterion outerVlan = (VlanIdCriterion) criterion( @@ -101,7 +113,7 @@ public ObjectiveTranslation doTranslate(FilteringObjective obj) obj.conditions(), Criterion.Type.ETH_DST_MASKED); ingressPortVlanRule(obj, inPort, outerVlan, innerVlan, resultBuilder); - if (shouldAddFwdClassifierRule(obj)) { + if (shouldModifyFwdClassifierTable(obj)) { fwdClassifierRules(obj, inPort, ethDst, ethDstMasked, resultBuilder); } else { log.debug("Skipping fwd classifier rules for device {}.", deviceId); @@ -109,41 +121,30 @@ public ObjectiveTranslation doTranslate(FilteringObjective obj) return resultBuilder.build(); } - private boolean shouldAddFwdClassifierRule(FilteringObjective obj) { + private boolean shouldModifyFwdClassifierTable(FilteringObjective obj) { // NOTE: in fabric pipeline the forwarding classifier acts similarly // to the TMAC table of OFDPA that matches on input port. - - // Forwarding classifier rules should be added to translation when: - // - the operation is ADD OR - // - it doesn't refer to double tagged traffic OR + // NOTE: that SR signals when it is a port update event by not setting + // the INTERFACE_CONFIG_UPDATE metadata. During the INTERFACE_CONFIG_UPDATE + // there is no need to add/remove rules in the fwd_classifier table. + // NOTE: that in scenarios like (T, N) -> T where we remove only the native + // VLAN there is not an ADD following the remove. + + // Forwarding classifier rules should be added/removed to translation when: + // - the operation is ADD + // AND it is a port update event (ADD or UPDATE) OR + // - it doesn't refer to double tagged traffic + // AND it is a port REMOVE event OR // - it refers to double tagged traffic // and SR is triggering the removal of forwarding classifier rules. - return obj.op() == Objective.Operation.ADD || - !isDoubleTagged(obj) || - (isDoubleTagged(obj) && isLastDoubleTaggedForPort(obj)); - } - - /** - * Check if the given filtering objective is the last filtering objective - * for a double-tagged host for a specific port. - *

- * {@see org.onosproject.segmentrouting.RoutingRulePopulator#buildDoubleTaggedFilteringObj()} - * {@see org.onosproject.segmentrouting.RoutingRulePopulator#processDoubleTaggedFilter()} - * - * @param obj Filtering objective to check. - * @return True if SR is signaling to remove the forwarding classifier rule, - * false otherwise. - */ - private boolean isLastDoubleTaggedForPort(FilteringObjective obj) { - Instructions.MetadataInstruction meta = obj.meta().writeMetadata(); - // SR is setting this metadata when a double tagged filtering objective - // is removed and no other hosts is sharing the same input port. - return (meta != null && (meta.metadata() & meta.metadataMask()) == 1); + return (obj.op() == Objective.Operation.ADD && !isSrMetadataSet(obj, INTERFACE_CONFIG_UPDATE)) || + (!isDoubleTagged(obj) && !isSrMetadataSet(obj, INTERFACE_CONFIG_UPDATE)) || + (isDoubleTagged(obj) && isSrMetadataSet(obj, CLEANUP_DOUBLE_TAGGED_HOST_ENTRIES)); } private boolean isDoubleTagged(FilteringObjective obj) { return obj.meta() != null && - FabricUtils.l2Instruction(obj.meta(), L2ModificationInstruction.L2SubType.VLAN_POP) != null && + FabricUtils.l2Instruction(obj.meta(), L2SubType.VLAN_POP) != null && FabricUtils.criterion(obj.conditions(), VLAN_VID) != null && FabricUtils.criterion(obj.conditions(), INNER_VLAN_VID) != null; } @@ -181,18 +182,63 @@ private void ingressPortVlanRule( selector.add(innerVlanCriterion); } - final TrafficTreatment treatment; + final TrafficTreatment.Builder treatmentBuilder = DefaultTrafficTreatment.builder(); if (obj.type().equals(FilteringObjective.Type.DENY)) { - treatment = DefaultTrafficTreatment.builder() - .piTableAction(DENY) - .build(); + treatmentBuilder.piTableAction(DENY); } else { - treatment = obj.meta() == null - ? DefaultTrafficTreatment.emptyTreatment() : obj.meta(); + // FIXME SDFAB-52 to complete the work on metadata + Byte portType = portType(obj); + if (portType == null) { + throw new FabricPipelinerException( + format("Unsupported port_type configuration: metadata=%s", obj.meta()), + ObjectiveError.BADPARAMS); + } + try { + treatmentBuilder.piTableAction(mapFilteringTreatment(obj.meta(), + FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN, portType)); + } catch (PiInterpreterException ex) { + throw new FabricPipelinerException(format("Unable to map treatment for table '%s': %s", + FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN, + ex.getMessage()), ObjectiveError.UNSUPPORTED); + } } resultBuilder.addFlowRule(flowRule( obj, FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN, - selector.build(), treatment)); + selector.build(), treatmentBuilder.build())); + } + + private PiAction mapFilteringTreatment(TrafficTreatment treatment, PiTableId tableId, byte portType) + throws PiInterpreterException { + if (treatment == null) { + treatment = DefaultTrafficTreatment.emptyTreatment(); + } + // VLAN_POP action is equivalent to the permit action (VLANs pop is done anyway) + if (isFilteringNoAction(treatment) || isFilteringPopAction(treatment)) { + // Permit action if table is ingress_port_vlan; + return PiAction.builder() + .withId(FabricConstants.FABRIC_INGRESS_FILTERING_PERMIT) + .withParameter(new PiActionParam(FabricConstants.PORT_TYPE, portType)) + .build(); + } + + final ModVlanIdInstruction setVlanInst = (ModVlanIdInstruction) l2InstructionOrFail( + treatment, VLAN_ID, tableId); + return PiAction.builder() + .withId(FabricConstants.FABRIC_INGRESS_FILTERING_PERMIT_WITH_INTERNAL_VLAN) + .withParameter(new PiActionParam(FabricConstants.VLAN_ID, setVlanInst.vlanId().toShort())) + .withParameter(new PiActionParam(FabricConstants.PORT_TYPE, portType)) + .build(); + } + + // NOTE: we use clearDeferred to signal when there are no more ports associated to a given vlan + private static boolean isFilteringNoAction(TrafficTreatment treatment) { + return treatment.equals(DefaultTrafficTreatment.emptyTreatment()) || + (treatment.allInstructions().isEmpty()) || + (treatment.allInstructions().size() == 1 && treatment.writeMetadata() != null); + } + + private boolean isFilteringPopAction(TrafficTreatment treatment) { + return l2Instruction(treatment, VLAN_POP) != null; } private void fwdClassifierRules( diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/ForwardingObjectiveTranslator.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/ForwardingObjectiveTranslator.java index 2cb7ba57fbf..e0c7ec10374 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/ForwardingObjectiveTranslator.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/ForwardingObjectiveTranslator.java @@ -33,6 +33,7 @@ import org.onosproject.net.flow.criteria.EthCriterion; import org.onosproject.net.flow.criteria.IPCriterion; import org.onosproject.net.flow.criteria.MplsCriterion; +import org.onosproject.net.flow.criteria.PiCriterion; import org.onosproject.net.flow.criteria.VlanIdCriterion; import org.onosproject.net.flowobjective.ForwardingObjective; import org.onosproject.net.flowobjective.Objective; @@ -48,7 +49,7 @@ import org.onosproject.net.pi.runtime.PiAction; import org.onosproject.net.pi.runtime.PiActionParam; import org.onosproject.pipelines.fabric.impl.behaviour.FabricCapabilities; -import org.onosproject.pipelines.fabric.impl.behaviour.FabricConstants; +import org.onosproject.pipelines.fabric.FabricConstants; import java.util.List; import java.util.Map; @@ -57,8 +58,15 @@ import static java.lang.String.format; import static org.onosproject.net.group.DefaultGroupBucket.createCloneGroupBucket; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.PAIR_PORT; +import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.isSrMetadataSet; +import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.isValidSrMetadata; +import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.portType; import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.criterionNotNull; import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.outputPort; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.PORT_TYPE_MASK; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.PORT_TYPE_EDGE; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.PORT_TYPE_INFRA; /** @@ -103,6 +111,8 @@ class ForwardingObjectiveTranslator FabricConstants.FABRIC_INGRESS_FORWARDING_SET_NEXT_ID_ROUTING_V6) .put(FabricConstants.FABRIC_INGRESS_FORWARDING_MPLS, FabricConstants.FABRIC_INGRESS_FORWARDING_POP_MPLS_AND_NEXT) + .put(FabricConstants.FABRIC_INGRESS_ACL_ACL, + FabricConstants.FABRIC_INGRESS_ACL_SET_NEXT_ID_ACL) .build(); ForwardingObjectiveTranslator(DeviceId deviceId, FabricCapabilities capabilities) { @@ -112,6 +122,13 @@ class ForwardingObjectiveTranslator @Override public ObjectiveTranslation doTranslate(ForwardingObjective obj) throws FabricPipelinerException { + + if (!isValidSrMetadata(obj)) { + throw new FabricPipelinerException( + format("Unsupported metadata configuration: metadata=%s", obj.meta()), + ObjectiveError.BADPARAMS); + } + final ObjectiveTranslation.Builder resultBuilder = ObjectiveTranslation.builder(); switch (obj.flag()) { @@ -290,8 +307,22 @@ private void aclRule(ForwardingObjective obj, return; } } + TrafficSelector.Builder selectorBuilder = DefaultTrafficSelector.builder(obj.selector()); + // Meta are used to signal the port type which can be edge or infra + Byte portType = portType(obj); + if (portType != null && !isSrMetadataSet(obj, PAIR_PORT)) { + if (portType == PORT_TYPE_EDGE || portType == PORT_TYPE_INFRA) { + selectorBuilder.matchPi(PiCriterion.builder() + .matchTernary(FabricConstants.HDR_PORT_TYPE, (long) portType, PORT_TYPE_MASK) + .build()); + } else { + throw new FabricPipelinerException(format("Port type '%s' is not allowed for table '%s'", + portType, FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN), + ObjectiveError.UNSUPPORTED); + } + } resultBuilder.addFlowRule(flowRule( - obj, FabricConstants.FABRIC_INGRESS_ACL_ACL, obj.selector())); + obj, FabricConstants.FABRIC_INGRESS_ACL_ACL, selectorBuilder.build())); } private DefaultGroupDescription createCloneGroup( diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/NextObjectiveTranslator.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/NextObjectiveTranslator.java index fb08d07481d..037e5dd587a 100644 --- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/NextObjectiveTranslator.java +++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/NextObjectiveTranslator.java @@ -17,6 +17,7 @@ package org.onosproject.pipelines.fabric.impl.behaviour.pipeliner; import com.google.common.collect.Lists; +import org.onlab.packet.MplsLabel; import org.onlab.packet.VlanId; import org.onosproject.net.DeviceId; import org.onosproject.net.PortNumber; @@ -28,6 +29,7 @@ import org.onosproject.net.flow.criteria.PiCriterion; import org.onosproject.net.flow.criteria.VlanIdCriterion; import org.onosproject.net.flow.instructions.Instruction; +import org.onosproject.net.flow.instructions.L2ModificationInstruction.ModMplsLabelInstruction; import org.onosproject.net.flow.instructions.L2ModificationInstruction.ModVlanIdInstruction; import org.onosproject.net.flowobjective.DefaultNextTreatment; import org.onosproject.net.flowobjective.NextObjective; @@ -47,16 +49,18 @@ import org.onosproject.net.pi.runtime.PiActionProfileGroupId; import org.onosproject.net.pi.runtime.PiGroupKey; import org.onosproject.pipelines.fabric.impl.behaviour.FabricCapabilities; -import org.onosproject.pipelines.fabric.impl.behaviour.FabricConstants; +import org.onosproject.pipelines.fabric.FabricConstants; import org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils; import java.util.Collection; +import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; import static java.lang.String.format; +import static org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType.MPLS_LABEL; import static org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType.VLAN_ID; import static org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType.VLAN_POP; import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.criterion; @@ -103,13 +107,55 @@ public ObjectiveTranslation doTranslate(NextObjective obj) } if (!isGroupModifyOp(obj)) { - // Generate next VLAN rules. + // Generate next MPLS and VLAN rules. + nextMpls(obj, resultBuilder); nextVlan(obj, resultBuilder); } return resultBuilder.build(); } + private void nextMpls(NextObjective obj, + ObjectiveTranslation.Builder resultBuilder) + throws FabricPipelinerException { + // Next objective can contain only one mpls push and one mpls label + // instruction. Pipeliner does not support other configurations. + + final List> mplsInstructions = defaultNextTreatments( + obj.nextTreatments(), false).stream() + .map(defaultNextTreatment -> l2Instructions(defaultNextTreatment.treatment(), MPLS_LABEL) + .stream().map(v -> (ModMplsLabelInstruction) v) + .collect(Collectors.toList())) + .filter(l -> !l.isEmpty()) + .collect(Collectors.toList()); + + if (mplsInstructions.isEmpty()) { + // No need to apply next mpls table + return; + } + + // We expect one mpls label for each treatment and the label has to be the same + final Set mplsLabels = mplsInstructions.stream() + .flatMap(Collection::stream) + .map(ModMplsLabelInstruction::label) + .collect(Collectors.toSet()); + if (obj.nextTreatments().size() != mplsInstructions.size() || + mplsLabels.size() != 1) { + throw new FabricPipelinerException( + "Inconsistent MPLS_LABEL instructions, cannot process " + + "next_mpls rule. It is required that all " + + "treatments have the same MPLS_LABEL instructions."); + } + final TrafficSelector selector = nextIdSelector(obj.id()); + final TrafficTreatment treatment = DefaultTrafficTreatment.builder() + .setMpls(mplsLabels.iterator().next()) + .build(); + + resultBuilder.addFlowRule(flowRule( + obj, FabricConstants.FABRIC_INGRESS_PRE_NEXT_NEXT_MPLS, + selector, treatment)); + } + private void nextVlan(NextObjective obj, ObjectiveTranslation.Builder resultBuilder) throws FabricPipelinerException { @@ -169,7 +215,7 @@ private void nextVlan(NextObjective obj, final TrafficTreatment treatment = treatmentBuilder.build(); resultBuilder.addFlowRule(flowRule( - obj, FabricConstants.FABRIC_INGRESS_NEXT_NEXT_VLAN, + obj, FabricConstants.FABRIC_INGRESS_PRE_NEXT_NEXT_VLAN, selector, treatment)); } @@ -223,10 +269,20 @@ private void hashedNext(NextObjective obj, return; } - // Updated result builder with hashed group. - final int groupId = selectGroup(obj, resultBuilder); + // Updated result builder with hashed group or indirect group + // use indirect group allow us to optimize the resource in those + // devices that preallocate memory based on the maxGroupSize + final int groupId; + if (obj.type() == NextObjective.Type.HASHED) { + groupId = selectGroup(obj, resultBuilder); + } else if (obj.type() == NextObjective.Type.SIMPLE) { + groupId = indirectGroup(obj, resultBuilder); + } else { + throw new FabricPipelinerException("Cannot translate BROADCAST next objective" + + "into hashedNext actions"); + } - if (isGroupModifyOp(obj)) { + if (isGroupModifyOp(obj) || obj.op() == Objective.Operation.VERIFY) { // No changes to flow rules. return; } @@ -247,35 +303,30 @@ private void handleEgress(NextObjective obj, TrafficTreatment treatment, throws FabricPipelinerException { final PortNumber outPort = outputPort(treatment); final Instruction popVlanInst = l2Instruction(treatment, VLAN_POP); - if (popVlanInst != null && outPort != null) { + if (outPort != null) { if (strict && treatment.allInstructions().size() > 2) { throw new FabricPipelinerException( "Treatment contains instructions other " + "than OUTPUT and VLAN_POP, cannot generate " + "egress rules"); } - egressVlanPop(outPort, obj, resultBuilder); + // We cannot program if there are no proper metadata in the objective + if (obj.meta() != null && obj.meta().getCriterion(Criterion.Type.VLAN_VID) != null) { + egressVlan(outPort, obj, popVlanInst, resultBuilder); + } else { + log.debug("NextObjective {} is trying to program {} without {} information", + obj, FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_EGRESS_VLAN, + obj.meta() == null ? "metadata" : "vlanId"); + } } } - private void egressVlanPop(PortNumber outPort, NextObjective obj, - ObjectiveTranslation.Builder resultBuilder) + private void egressVlan(PortNumber outPort, NextObjective obj, Instruction popVlanInst, + ObjectiveTranslation.Builder resultBuilder) throws FabricPipelinerException { - if (obj.meta() == null) { - throw new FabricPipelinerException( - "Cannot process egress pop VLAN rule, NextObjective has null meta", - ObjectiveError.BADPARAMS); - } - final VlanIdCriterion vlanIdCriterion = (VlanIdCriterion) criterion( obj.meta(), Criterion.Type.VLAN_VID); - if (vlanIdCriterion == null) { - throw new FabricPipelinerException( - "Cannot process egress pop VLAN rule, missing VLAN_VID criterion " + - "in NextObjective meta", - ObjectiveError.BADPARAMS); - } final PiCriterion egressVlanTableMatch = PiCriterion.builder() .matchExact(FabricConstants.HDR_EG_PORT, outPort.toLong()) @@ -284,13 +335,16 @@ private void egressVlanPop(PortNumber outPort, NextObjective obj, .matchPi(egressVlanTableMatch) .matchVlanId(vlanIdCriterion.vlanId()) .build(); - final TrafficTreatment treatment = DefaultTrafficTreatment.builder() - .popVlan() - .build(); + final TrafficTreatment.Builder treatmentBuilder = DefaultTrafficTreatment.builder(); + if (popVlanInst == null) { + treatmentBuilder.pushVlan(); + } else { + treatmentBuilder.popVlan(); + } resultBuilder.addFlowRule(flowRule( obj, FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_EGRESS_VLAN, - selector, treatment)); + selector, treatmentBuilder.build())); } private TrafficSelector nextIdSelector(int nextId) { @@ -396,10 +450,7 @@ private int selectGroup(NextObjective obj, .collect(Collectors.toList()); final int groupId = obj.id(); - final PiGroupKey groupKey = new PiGroupKey( - hashedTableId, - FabricConstants.FABRIC_INGRESS_NEXT_HASHED_SELECTOR, - groupId); + final PiGroupKey groupKey = (PiGroupKey) getGroupKey(obj); resultBuilder.addGroup(new DefaultGroupDescription( deviceId, @@ -451,8 +502,7 @@ private int allGroup(NextObjective obj, final int groupId = obj.id(); // Use DefaultGroupKey instead of PiGroupKey as we don't have any // action profile to apply to the groups of ALL type. - final GroupKey groupKey = new DefaultGroupKey( - FabricPipeliner.KRYO.serialize(groupId)); + final GroupKey groupKey = getGroupKey(obj); resultBuilder.addGroup( new DefaultGroupDescription( @@ -466,6 +516,44 @@ private int allGroup(NextObjective obj, return groupId; } + private int indirectGroup(NextObjective obj, + ObjectiveTranslation.Builder resultBuilder) + throws FabricPipelinerException { + + if (isGroupModifyOp(obj)) { + throw new FabricPipelinerException("Simple next objective does not support" + + "*_TO_EXISTING operations"); + } + + final PiTableId hashedTableId = FabricConstants.FABRIC_INGRESS_NEXT_HASHED; + final List defaultNextTreatments = + defaultNextTreatments(obj.nextTreatments(), true); + + if (defaultNextTreatments.size() != 1) { + throw new FabricPipelinerException("Simple next objective must have a single" + + " treatment"); + } + + final TrafficTreatment piTreatment; + final DefaultNextTreatment defaultNextTreatment = defaultNextTreatments.get(0); + piTreatment = mapTreatmentToPiIfNeeded(defaultNextTreatment.treatment(), hashedTableId); + handleEgress(obj, defaultNextTreatment.treatment(), resultBuilder, false); + final GroupBucket groupBucket = DefaultGroupBucket.createIndirectGroupBucket(piTreatment); + + final int groupId = obj.id(); + final PiGroupKey groupKey = (PiGroupKey) getGroupKey(obj); + + resultBuilder.addGroup(new DefaultGroupDescription( + deviceId, + GroupDescription.Type.INDIRECT, + new GroupBuckets(Collections.singletonList(groupBucket)), + groupKey, + groupId, + obj.appId())); + + return groupId; + } + private List defaultNextTreatments( Collection nextTreatments, boolean strict) throws FabricPipelinerException { @@ -494,15 +582,26 @@ private TrafficTreatment getFirstDefaultNextTreatmentIfAny( } private boolean isGroupModifyOp(NextObjective obj) { - // If operation is ADD_TO_EXIST, REMOVE_FROM_EXIST or MODIFY, it means we modify + // If operation is ADD_TO_EXIST, REMOVE_FROM_EXIST it means we modify // group buckets only, no changes for flow rules. - // FIXME Please note that for MODIFY op this could not apply in future if we extend the scope of MODIFY return obj.op() == Objective.Operation.ADD_TO_EXISTING || - obj.op() == Objective.Operation.REMOVE_FROM_EXISTING || - obj.op() == Objective.Operation.MODIFY; + obj.op() == Objective.Operation.REMOVE_FROM_EXISTING; } private boolean isXconnect(NextObjective obj) { return obj.appId().name().contains(XCONNECT); } + + // Builds up the group key based on the next objective type + public GroupKey getGroupKey(NextObjective objective) { + if (objective.type() == NextObjective.Type.HASHED || objective.type() == NextObjective.Type.SIMPLE) { + return new PiGroupKey(FabricConstants.FABRIC_INGRESS_NEXT_HASHED, + FabricConstants.FABRIC_INGRESS_NEXT_HASHED_SELECTOR, + objective.id()); + } else if (objective.type() == NextObjective.Type.BROADCAST) { + return new DefaultGroupKey( + FabricPipeliner.KRYO.serialize(objective.id())); + } + return null; + } } diff --git a/pipelines/fabric/impl/src/main/resources/Makefile b/pipelines/fabric/impl/src/main/resources/Makefile index 5353342eda4..11cdba97fef 100644 --- a/pipelines/fabric/impl/src/main/resources/Makefile +++ b/pipelines/fabric/impl/src/main/resources/Makefile @@ -26,7 +26,7 @@ ifndef ONOS_ROOT endif docker run -v $(ONOS_ROOT):/onos -w /onos/tools/dev/bin \ --entrypoint ./onos-gen-p4-constants opennetworking/p4mn:stable \ - -o /onos/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricConstants.java \ + -o /onos/pipelines/fabric/api/src/main/java/org/onosproject/pipelines/fabric/FabricConstants.java \ fabric /onos/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/p4info.txt clean: diff --git a/pipelines/fabric/impl/src/main/resources/bmv2-compile.sh b/pipelines/fabric/impl/src/main/resources/bmv2-compile.sh index 2cc8a3f1efc..87bfd959fdd 100755 --- a/pipelines/fabric/impl/src/main/resources/bmv2-compile.sh +++ b/pipelines/fabric/impl/src/main/resources/bmv2-compile.sh @@ -17,7 +17,7 @@ mkdir -p ${OUT_DIR}/graphs echo echo "## Compiling profile ${PROFILE} in ${OUT_DIR}..." -dockerImage=opennetworking/p4c:stable +dockerImage=opennetworking/p4c:stable-20210108 dockerRun="docker run --rm -w ${SRC_DIR} -v ${SRC_DIR}:${SRC_DIR} -v ${OUT_DIR}:${OUT_DIR} ${dockerImage}" # Generate preprocessed P4 source (for debugging). diff --git a/pipelines/fabric/impl/src/main/resources/fabric.p4 b/pipelines/fabric/impl/src/main/resources/fabric.p4 index 9f6b27d489d..bb6ff7c21fd 100644 --- a/pipelines/fabric/impl/src/main/resources/fabric.p4 +++ b/pipelines/fabric/impl/src/main/resources/fabric.p4 @@ -20,9 +20,12 @@ #include "include/size.p4" #include "include/control/filtering.p4" #include "include/control/forwarding.p4" +#include "include/control/pre_next.p4" #include "include/control/acl.p4" #include "include/control/next.p4" #include "include/control/packetio.p4" +#include "include/control/lookup_md_init.p4" +#include "include/control/slicing.p4" #include "include/header.p4" #include "include/checksum.p4" #include "include/parser.p4" @@ -47,28 +50,39 @@ control FabricIngress (inout parsed_headers_t hdr, inout fabric_metadata_t fabric_metadata, inout standard_metadata_t standard_metadata) { + LookupMdInit() lkp_md_init; PacketIoIngress() pkt_io_ingress; Filtering() filtering; Forwarding() forwarding; + PreNext() pre_next; Acl() acl; Next() next; + IngressSliceTcClassifier() slice_tc_classifier; + IngressQos() qos; #ifdef WITH_PORT_COUNTER PortCountersControl() port_counters_control; #endif // WITH_PORT_COUNTER #ifdef WITH_SPGW - SpgwIngress() spgw_ingress; + SpgwIngress() spgw; #endif // WITH_SPGW apply { _PRE_INGRESS + lkp_md_init.apply(hdr, fabric_metadata.lkp); pkt_io_ingress.apply(hdr, fabric_metadata, standard_metadata); + slice_tc_classifier.apply(hdr, fabric_metadata, standard_metadata); + filtering.apply(hdr, fabric_metadata, standard_metadata); #ifdef WITH_SPGW - spgw_ingress.apply(hdr, fabric_metadata, standard_metadata); + if (fabric_metadata.skip_forwarding == _FALSE) { + spgw.apply(hdr, fabric_metadata, standard_metadata); + } #endif // WITH_SPGW - filtering.apply(hdr, fabric_metadata, standard_metadata); if (fabric_metadata.skip_forwarding == _FALSE) { forwarding.apply(hdr, fabric_metadata, standard_metadata); } + if (fabric_metadata.skip_next == _FALSE) { + pre_next.apply(hdr, fabric_metadata); + } acl.apply(hdr, fabric_metadata, standard_metadata); if (fabric_metadata.skip_next == _FALSE) { next.apply(hdr, fabric_metadata, standard_metadata); @@ -84,7 +98,7 @@ control FabricIngress (inout parsed_headers_t hdr, #ifdef WITH_BNG bng_ingress.apply(hdr, fabric_metadata, standard_metadata); #endif // WITH_BNG - + qos.apply(fabric_metadata, standard_metadata); } } @@ -94,8 +108,9 @@ control FabricEgress (inout parsed_headers_t hdr, PacketIoEgress() pkt_io_egress; EgressNextControl() egress_next; + EgressDscpRewriter() dscp_rewriter; #ifdef WITH_SPGW - SpgwEgress() spgw_egress; + SpgwEgress() spgw; #endif // WITH_SPGW apply { @@ -103,7 +118,7 @@ control FabricEgress (inout parsed_headers_t hdr, pkt_io_egress.apply(hdr, fabric_metadata, standard_metadata); egress_next.apply(hdr, fabric_metadata, standard_metadata); #ifdef WITH_SPGW - spgw_egress.apply(hdr, fabric_metadata); + spgw.apply(hdr, fabric_metadata); #endif // WITH_SPGW #ifdef WITH_BNG bng_egress.apply(hdr, fabric_metadata, standard_metadata); @@ -111,6 +126,7 @@ control FabricEgress (inout parsed_headers_t hdr, #ifdef WITH_INT process_int_main.apply(hdr, fabric_metadata, standard_metadata); #endif + dscp_rewriter.apply(hdr, fabric_metadata, standard_metadata); } } diff --git a/pipelines/fabric/impl/src/main/resources/include/control/acl.p4 b/pipelines/fabric/impl/src/main/resources/include/control/acl.p4 index 80efa8f470f..9d7c7bafae5 100644 --- a/pipelines/fabric/impl/src/main/resources/include/control/acl.p4 +++ b/pipelines/fabric/impl/src/main/resources/include/control/acl.p4 @@ -21,23 +21,22 @@ #include "../header.p4" control Acl (inout parsed_headers_t hdr, - inout fabric_metadata_t fabric_metadata, + inout fabric_metadata_t fabric_md, inout standard_metadata_t standard_metadata) { - /* * ACL Table. */ direct_counter(CounterType.packets_and_bytes) acl_counter; action set_next_id_acl(next_id_t next_id) { - fabric_metadata.next_id = next_id; + fabric_md.next_id = next_id; acl_counter.count(); } // Send immendiatelly to CPU - skip the rest of ingress. action punt_to_cpu() { standard_metadata.egress_spec = CPU_PORT; - fabric_metadata.skip_next = _TRUE; + fabric_md.skip_next = _TRUE; acl_counter.count(); } @@ -49,7 +48,7 @@ control Acl (inout parsed_headers_t hdr, action drop() { mark_to_drop(standard_metadata); - fabric_metadata.skip_next = _TRUE; + fabric_md.skip_next = _TRUE; acl_counter.count(); } @@ -59,18 +58,19 @@ control Acl (inout parsed_headers_t hdr, table acl { key = { - standard_metadata.ingress_port: ternary @name("ig_port"); // 9 - fabric_metadata.ip_proto: ternary @name("ip_proto"); // 8 - fabric_metadata.l4_sport: ternary @name("l4_sport"); // 16 - fabric_metadata.l4_dport: ternary @name("l4_dport"); // 16 - hdr.ethernet.dst_addr: ternary @name("eth_dst"); // 48 - hdr.ethernet.src_addr: ternary @name("eth_src"); // 48 - hdr.vlan_tag.vlan_id: ternary @name("vlan_id"); // 12 - hdr.eth_type.value: ternary @name("eth_type"); //16 - hdr.ipv4.src_addr: ternary @name("ipv4_src"); // 32 - hdr.ipv4.dst_addr: ternary @name("ipv4_dst"); // 32 - hdr.icmp.icmp_type: ternary @name("icmp_type"); // 8 - hdr.icmp.icmp_code: ternary @name("icmp_code"); // 8 + standard_metadata.ingress_port : ternary @name("ig_port"); // 9 + hdr.ethernet.dst_addr : ternary @name("eth_dst"); // 48 + hdr.ethernet.src_addr : ternary @name("eth_src"); // 48 + hdr.vlan_tag.vlan_id : ternary @name("vlan_id"); // 12 + hdr.eth_type.value : ternary @name("eth_type"); // 16 + fabric_md.lkp.ipv4_src : ternary @name("ipv4_src"); // 32 + fabric_md.lkp.ipv4_dst : ternary @name("ipv4_dst"); // 32 + fabric_md.lkp.ip_proto : ternary @name("ip_proto"); // 8 + hdr.icmp.icmp_type : ternary @name("icmp_type"); // 8 + hdr.icmp.icmp_code : ternary @name("icmp_code"); // 8 + fabric_md.lkp.l4_sport : ternary @name("l4_sport"); // 16 + fabric_md.lkp.l4_dport : ternary @name("l4_dport"); // 16 + fabric_md.port_type : ternary @name("port_type"); // 2 } actions = { diff --git a/pipelines/fabric/impl/src/main/resources/include/control/filtering.p4 b/pipelines/fabric/impl/src/main/resources/include/control/filtering.p4 index a8fae49907b..a96b522de05 100644 --- a/pipelines/fabric/impl/src/main/resources/include/control/filtering.p4 +++ b/pipelines/fabric/impl/src/main/resources/include/control/filtering.p4 @@ -35,17 +35,19 @@ control Filtering (inout parsed_headers_t hdr, // Do ACL table in case we want to punt to cpu. fabric_metadata.skip_forwarding = _TRUE; fabric_metadata.skip_next = _TRUE; + fabric_metadata.port_type = PORT_TYPE_UNKNOWN; ingress_port_vlan_counter.count(); } - action permit() { + action permit(port_type_t port_type) { // Allow packet as is. + fabric_metadata.port_type = port_type; ingress_port_vlan_counter.count(); } - action permit_with_internal_vlan(vlan_id_t vlan_id) { + action permit_with_internal_vlan(vlan_id_t vlan_id, port_type_t port_type) { fabric_metadata.vlan_id = vlan_id; - permit(); + permit(port_type); } // FIXME: remove the use of ternary match on inner VLAN. diff --git a/pipelines/fabric/impl/src/main/resources/include/control/lookup_md_init.p4 b/pipelines/fabric/impl/src/main/resources/include/control/lookup_md_init.p4 new file mode 100644 index 00000000000..c672bc97f30 --- /dev/null +++ b/pipelines/fabric/impl/src/main/resources/include/control/lookup_md_init.p4 @@ -0,0 +1,66 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __LOOKUP__ +#define __LOOKUP__ + +control LookupMdInit (in parsed_headers_t hdr, + out lookup_metadata_t lkp_md) { + apply { + lkp_md.is_ipv4 = _FALSE; + lkp_md.ipv4_src = 0; + lkp_md.ipv4_dst = 0; + lkp_md.ip_proto = 0; + lkp_md.l4_sport = 0; + lkp_md.l4_dport = 0; + lkp_md.icmp_type = 0; + lkp_md.icmp_code = 0; + if (hdr.inner_ipv4.isValid()) { + lkp_md.is_ipv4 = true; + lkp_md.ipv4_src = hdr.inner_ipv4.src_addr; + lkp_md.ipv4_dst = hdr.inner_ipv4.dst_addr; + lkp_md.ip_proto = hdr.inner_ipv4.protocol; + if (hdr.inner_tcp.isValid()) { + lkp_md.l4_sport = hdr.inner_tcp.sport; + lkp_md.l4_dport = hdr.inner_tcp.dport; + } else if (hdr.inner_udp.isValid()) { + lkp_md.l4_sport = hdr.inner_udp.sport; + lkp_md.l4_dport = hdr.inner_udp.dport; + } else if (hdr.inner_icmp.isValid()) { + lkp_md.icmp_type = hdr.inner_icmp.icmp_type; + lkp_md.icmp_code = hdr.inner_icmp.icmp_code; + } + } else if (hdr.ipv4.isValid()) { + lkp_md.is_ipv4 = true; + lkp_md.ipv4_src = hdr.ipv4.src_addr; + lkp_md.ipv4_dst = hdr.ipv4.dst_addr; + lkp_md.ip_proto = hdr.ipv4.protocol; + if (hdr.tcp.isValid()) { + lkp_md.l4_sport = hdr.tcp.sport; + lkp_md.l4_dport = hdr.tcp.dport; + } else if (hdr.udp.isValid()) { + lkp_md.l4_sport = hdr.udp.sport; + lkp_md.l4_dport = hdr.udp.dport; + } else if (hdr.icmp.isValid()) { + lkp_md.icmp_type = hdr.icmp.icmp_type; + lkp_md.icmp_code = hdr.icmp.icmp_code; + } + } + } +} + +#endif + diff --git a/pipelines/fabric/impl/src/main/resources/include/control/next.p4 b/pipelines/fabric/impl/src/main/resources/include/control/next.p4 index 0a624b25f5c..fca2e61b844 100644 --- a/pipelines/fabric/impl/src/main/resources/include/control/next.p4 +++ b/pipelines/fabric/impl/src/main/resources/include/control/next.p4 @@ -41,11 +41,6 @@ control Next (inout parsed_headers_t hdr, hdr.ethernet.dst_addr = dmac; } - @hidden - action set_mpls_label(mpls_label_t label) { - fabric_metadata.mpls_label = label; - } - @hidden action routing(port_num_t port_num, mac_addr_t smac, mac_addr_t dmac) { rewrite_smac(smac); @@ -53,52 +48,6 @@ control Next (inout parsed_headers_t hdr, output(port_num); } - @hidden - action mpls_routing(port_num_t port_num, mac_addr_t smac, mac_addr_t dmac, - mpls_label_t label) { - set_mpls_label(label); - routing(port_num, smac, dmac); - } - - /* - * Next VLAN table. - * Modify VLAN ID based on next ID. - */ - direct_counter(CounterType.packets_and_bytes) next_vlan_counter; - - action set_vlan(vlan_id_t vlan_id) { - fabric_metadata.vlan_id = vlan_id; - next_vlan_counter.count(); - } - -#ifdef WITH_DOUBLE_VLAN_TERMINATION - action set_double_vlan(vlan_id_t outer_vlan_id, vlan_id_t inner_vlan_id) { - set_vlan(outer_vlan_id); - fabric_metadata.push_double_vlan = _TRUE; - fabric_metadata.inner_vlan_id = inner_vlan_id; -#ifdef WITH_BNG - fabric_metadata.bng.s_tag = outer_vlan_id; - fabric_metadata.bng.c_tag = inner_vlan_id; -#endif // WITH_BNG - } -#endif // WITH_DOUBLE_VLAN_TERMINATION - - table next_vlan { - key = { - fabric_metadata.next_id: exact @name("next_id"); - } - actions = { - set_vlan; -#ifdef WITH_DOUBLE_VLAN_TERMINATION - set_double_vlan; -#endif // WITH_DOUBLE_VLAN_TERMINATION - @defaultonly nop; - } - const default_action = nop(); - counters = next_vlan_counter; - size = NEXT_VLAN_TABLE_SIZE; - } - #ifdef WITH_XCONNECT /* * Cross-connect table. @@ -149,12 +98,6 @@ control Next (inout parsed_headers_t hdr, simple_counter.count(); } - action mpls_routing_simple(port_num_t port_num, mac_addr_t smac, mac_addr_t dmac, - mpls_label_t label) { - mpls_routing(port_num, smac, dmac, label); - simple_counter.count(); - } - table simple { key = { fabric_metadata.next_id: exact @name("next_id"); @@ -162,7 +105,6 @@ control Next (inout parsed_headers_t hdr, actions = { output_simple; routing_simple; - mpls_routing_simple; @defaultonly nop; } const default_action = nop(); @@ -193,12 +135,6 @@ control Next (inout parsed_headers_t hdr, hashed_counter.count(); } - action mpls_routing_hashed(port_num_t port_num, mac_addr_t smac, mac_addr_t dmac, - mpls_label_t label) { - mpls_routing(port_num, smac, dmac, label); - hashed_counter.count(); - } - table hashed { key = { fabric_metadata.next_id: exact @name("next_id"); @@ -211,7 +147,6 @@ control Next (inout parsed_headers_t hdr, actions = { output_hashed; routing_hashed; - mpls_routing_hashed; @defaultonly nop; } implementation = hashed_selector; @@ -258,7 +193,6 @@ control Next (inout parsed_headers_t hdr, hashed.apply(); #endif // WITH_HASHED_NEXT multicast.apply(); - next_vlan.apply(); } } @@ -283,7 +217,7 @@ control EgressNextControl (inout parsed_headers_t hdr, } @hidden - action push_vlan() { + action push_outer_vlan() { // If VLAN is already valid, we overwrite it with a potentially new VLAN // ID, and same CFI, PRI, and eth_type values found in ingress. hdr.vlan_tag.setValid(); @@ -308,25 +242,37 @@ control EgressNextControl (inout parsed_headers_t hdr, /* * Egress VLAN Table. - * Pops the VLAN tag if the pair egress port and VLAN ID is matched. + * Pushes or Pops the VLAN tag if the pair egress port and VLAN ID is matched. + * Instead, it drops the packets on miss. */ direct_counter(CounterType.packets_and_bytes) egress_vlan_counter; + action push_vlan() { + push_outer_vlan(); + egress_vlan_counter.count(); + } + action pop_vlan() { hdr.vlan_tag.setInvalid(); egress_vlan_counter.count(); } + action drop() { + mark_to_drop(standard_metadata); + egress_vlan_counter.count(); + } + table egress_vlan { key = { fabric_metadata.vlan_id: exact @name("vlan_id"); standard_metadata.egress_port: exact @name("eg_port"); } actions = { + push_vlan; pop_vlan; - @defaultonly nop; + @defaultonly drop; } - const default_action = nop(); + const default_action = drop(); counters = egress_vlan_counter; size = EGRESS_VLAN_TABLE_SIZE; } @@ -346,20 +292,14 @@ control EgressNextControl (inout parsed_headers_t hdr, #ifdef WITH_DOUBLE_VLAN_TERMINATION if (fabric_metadata.push_double_vlan == _TRUE) { // Double VLAN termination. - push_vlan(); + push_outer_vlan(); push_inner_vlan(); } else { // If no push double vlan, inner_vlan_tag must be popped hdr.inner_vlan_tag.setInvalid(); #endif // WITH_DOUBLE_VLAN_TERMINATION - // Port-based VLAN tagging (by default all - // ports are assumed tagged) - if (!egress_vlan.apply().hit) { - // Push VLAN tag if not the default one. - if (fabric_metadata.vlan_id != DEFAULT_VLAN_ID) { - push_vlan(); - } - } + // Port-based VLAN tagging; if there is no match drop the packet! + egress_vlan.apply(); #ifdef WITH_DOUBLE_VLAN_TERMINATION } #endif // WITH_DOUBLE_VLAN_TERMINATION diff --git a/pipelines/fabric/impl/src/main/resources/include/control/pre_next.p4 b/pipelines/fabric/impl/src/main/resources/include/control/pre_next.p4 new file mode 100644 index 00000000000..9d4c5b6e4e2 --- /dev/null +++ b/pipelines/fabric/impl/src/main/resources/include/control/pre_next.p4 @@ -0,0 +1,93 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include "../header.p4" + +control PreNext(inout parsed_headers_t hdr, + inout fabric_metadata_t fabric_metadata) { + /* + * Next MPLS table. + * Set the MPLS label based on the next ID. + */ + + direct_counter(CounterType.packets_and_bytes) next_mpls_counter; + + action set_mpls_label(mpls_label_t label) { + fabric_metadata.mpls_label = label; + next_mpls_counter.count(); + } + + table next_mpls { + key = { + fabric_metadata.next_id: exact @name("next_id"); + } + actions = { + set_mpls_label; + @defaultonly nop; + } + const default_action = nop(); + counters = next_mpls_counter; + size = NEXT_MPLS_TABLE_SIZE; + } + + /* + * Next VLAN table. + * Modify VLAN ID based on next ID. + */ + + direct_counter(CounterType.packets_and_bytes) next_vlan_counter; + + action set_vlan(vlan_id_t vlan_id) { + fabric_metadata.vlan_id = vlan_id; + next_vlan_counter.count(); + } + +#ifdef WITH_DOUBLE_VLAN_TERMINATION + action set_double_vlan(vlan_id_t outer_vlan_id, vlan_id_t inner_vlan_id) { + set_vlan(outer_vlan_id); + fabric_metadata.push_double_vlan = _TRUE; + fabric_metadata.inner_vlan_id = inner_vlan_id; +#ifdef WITH_BNG + fabric_metadata.bng.s_tag = outer_vlan_id; + fabric_metadata.bng.c_tag = inner_vlan_id; +#endif // WITH_BNG + } +#endif // WITH_DOUBLE_VLAN_TERMINATION + + table next_vlan { + key = { + fabric_metadata.next_id: exact @name("next_id"); + } + actions = { + set_vlan; +#ifdef WITH_DOUBLE_VLAN_TERMINATION + set_double_vlan; +#endif // WITH_DOUBLE_VLAN_TERMINATION + @defaultonly nop; + } + const default_action = nop(); + counters = next_vlan_counter; + size = NEXT_VLAN_TABLE_SIZE; + } + + apply { + next_mpls.apply(); + next_vlan.apply(); + } +} diff --git a/pipelines/fabric/impl/src/main/resources/include/control/slicing.p4 b/pipelines/fabric/impl/src/main/resources/include/control/slicing.p4 new file mode 100644 index 00000000000..87d887a548e --- /dev/null +++ b/pipelines/fabric/impl/src/main/resources/include/control/slicing.p4 @@ -0,0 +1,165 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __SLICING__ +#define __SLICING__ + +// ACL-like classification, maps lookup metadata to slice_id and tc. For UE +// traffic, values can be overriden later by the SPGW PDR tables. +// To apply the same slicing and QoS treatment end-to-end, we use the IPv4 DSCP +// field to piggyback slice_id and tc (see EgressDscpRewriter). This is +// especially important for UE traffic, where classification based on PDRs can +// only happen at the ingress leaf switch (implementing the UPF function). +// As such, for traffic coming from selected ports, we allow trusting the +// slice_id and tc values carried in the dscp. +control IngressSliceTcClassifier (in parsed_headers_t hdr, + inout fabric_metadata_t fabric_md, + in standard_metadata_t standard_metadata) { + + direct_counter(CounterType.packets) classifier_stats; + + action set_slice_id_tc(slice_id_t slice_id, tc_t tc) { + fabric_md.slice_id = slice_id; + fabric_md.tc = tc; + classifier_stats.count(); + } + + // Should be used only for infrastructure ports (leaf-leaf, or leaf-spine), + // or ports facing servers that implement early classification based on the + // SDFAB DSCP encoding (slice_id++tc). + action trust_dscp() { + fabric_md.slice_id = hdr.ipv4.dscp[SLICE_ID_WIDTH+TC_WIDTH-1:TC_WIDTH]; + fabric_md.tc = hdr.ipv4.dscp[TC_WIDTH-1:0]; + classifier_stats.count(); + } + + table classifier { + key = { + standard_metadata.ingress_port : ternary @name("ig_port"); + fabric_md.lkp.ipv4_src : ternary @name("ipv4_src"); + fabric_md.lkp.ipv4_dst : ternary @name("ipv4_dst"); + fabric_md.lkp.ip_proto : ternary @name("ip_proto"); + fabric_md.lkp.l4_sport : ternary @name("l4_sport"); + fabric_md.lkp.l4_dport : ternary @name("l4_dport"); + } + actions = { + set_slice_id_tc; + trust_dscp; + } + const default_action = set_slice_id_tc(DEFAULT_SLICE_ID, DEFAULT_TC); + counters = classifier_stats; + size = QOS_CLASSIFIER_TABLE_SIZE; + } + + apply { + classifier.apply(); + } +} + +// Provides metering and mapping to queues based on slice_id and tc. Should be +// applied after any other block writing slice_id and tc. +control IngressQos (inout fabric_metadata_t fabric_md, + inout standard_metadata_t standard_metadata) { + + // One meter per tc per slice. The index should be slice_id++tc. + meter(1 << SLICE_TC_WIDTH, MeterType.bytes) slice_tc_meter; + + direct_counter(CounterType.packets) queues_stats; + + action set_queue(qid_t qid) { + // We can't set the queue id in bmv2. + queues_stats.count(); + } + + // For policing. + action meter_drop() { + mark_to_drop(standard_metadata); + queues_stats.count(); + } + + table queues { + key = { + fabric_md.slice_id: exact @name("slice_id"); + fabric_md.tc: exact @name("tc"); + fabric_md.packet_color: ternary @name("color"); // 0=GREEN, 1=YELLOW, 2=RED + } + actions = { + set_queue; + meter_drop; + } + const default_action = set_queue(0); // 0 = Best Effort + counters = queues_stats; + // Two times the number of tcs for all slices, because we might need to + // match on different colors for the same slice and tc. + size = 1 << (SLICE_TC_WIDTH + 1); + } + + slice_tc_t slice_tc = fabric_md.slice_id++fabric_md.tc; + + apply { + // Meter index should be 0 for all packets with default slice_id and tc. + slice_tc_meter.execute_meter((bit<32>) slice_tc, fabric_md.packet_color); + fabric_md.dscp = slice_tc; + queues.apply(); + } +} + +// Allows per-egress port rewriting of the outermost IPv4 DSCP field to +// piggyback slice_id and tc across the fabric. +control EgressDscpRewriter (inout parsed_headers_t hdr, + in fabric_metadata_t fabric_md, + in standard_metadata_t standard_metadata) { + + bit<6> tmp_dscp = fabric_md.dscp; + + action rewrite() { + // Do nothing, tmp_dscp is already initialized. + } + + // Sets the DSCP field to zero. Should be used for edge ports facing devices + // that do not support the SDFAB DSCP encoding. + action clear() { + tmp_dscp = 0; + } + + table rewriter { + key = { + standard_metadata.egress_port : exact @name("eg_port"); + } + actions = { + rewrite; + clear; + @defaultonly nop; + } + const default_action = nop; + size = DSCP_REWRITER_TABLE_SIZE; + } + + apply { + if (rewriter.apply().hit) { +#ifdef WITH_SPGW + if (hdr.gtpu_ipv4.isValid()) { + hdr.ipv4.dscp = tmp_dscp; + } else +#endif // WITH_SPGW + if (hdr.ipv4.isValid()) { + hdr.inner_ipv4.dscp = tmp_dscp; + } + } + } +} + +#endif diff --git a/pipelines/fabric/impl/src/main/resources/include/control/spgw.p4 b/pipelines/fabric/impl/src/main/resources/include/control/spgw.p4 index 34a88b8bec4..6750dbd81b7 100644 --- a/pipelines/fabric/impl/src/main/resources/include/control/spgw.p4 +++ b/pipelines/fabric/impl/src/main/resources/include/control/spgw.p4 @@ -30,37 +30,115 @@ #define MAX_PDR_COUNTERS 2 * MAX_UES #define MAX_FARS 2 * MAX_UES +control DecapGtpu(inout parsed_headers_t hdr, + inout fabric_metadata_t fabric_md) { + @hidden + action decap_inner_common() { + // Correct parser-set metadata to use the inner header values + fabric_md.ip_eth_type = ETHERTYPE_IPV4; + fabric_md.ip_proto = hdr.inner_ipv4.protocol; + fabric_md.ipv4_src_addr = hdr.inner_ipv4.src_addr; + fabric_md.ipv4_dst_addr = hdr.inner_ipv4.dst_addr; + fabric_md.l4_sport = fabric_md.inner_l4_sport; + fabric_md.l4_dport = fabric_md.inner_l4_dport; + // Move GTPU and inner L3 headers out + hdr.ipv4 = hdr.inner_ipv4; + hdr.inner_ipv4.setInvalid(); + hdr.gtpu.setInvalid(); + hdr.gtpu_options.setInvalid(); + hdr.gtpu_ext_psc.setInvalid(); + } + @hidden + action decap_inner_tcp() { + decap_inner_common(); + hdr.udp.setInvalid(); + hdr.tcp = hdr.inner_tcp; + hdr.inner_tcp.setInvalid(); + } + @hidden + action decap_inner_udp() { + decap_inner_common(); + hdr.udp = hdr.inner_udp; + hdr.inner_udp.setInvalid(); + } + @hidden + action decap_inner_icmp() { + decap_inner_common(); + hdr.udp.setInvalid(); + hdr.icmp = hdr.inner_icmp; + hdr.inner_icmp.setInvalid(); + } + @hidden + action decap_inner_unknown() { + decap_inner_common(); + hdr.udp.setInvalid(); + } + @hidden + table decap_gtpu { + key = { + hdr.inner_tcp.isValid() : exact; + hdr.inner_udp.isValid() : exact; + hdr.inner_icmp.isValid() : exact; + } + actions = { + decap_inner_tcp; + decap_inner_udp; + decap_inner_icmp; + decap_inner_unknown; + } + const default_action = decap_inner_unknown; + const entries = { + (true, false, false) : decap_inner_tcp(); + (false, true, false) : decap_inner_udp(); + (false, false, true) : decap_inner_icmp(); + } + } + apply { + decap_gtpu.apply(); + } +} control SpgwIngress(inout parsed_headers_t hdr, inout fabric_metadata_t fabric_md, inout standard_metadata_t standard_metadata) { + //=============================// + //===== Misc Things ======// + //=============================// + + counter(MAX_PDR_COUNTERS, CounterType.packets_and_bytes) pdr_counter; + DecapGtpu() decap_gtpu_from_dbuf; + DecapGtpu() decap_gtpu; //=============================// //===== Interface Tables ======// //=============================// - action set_source_iface(spgw_interface_t src_iface, direction_t direction, - bit<1> skip_spgw) { - // Interface type can be access, core, n6_lan, etc (see InterfaceType enum) - // If interface is from the control plane, direction can be either up or down + action load_iface(spgw_interface_t src_iface, slice_id_t slice_id) { + // Interface type can be access, core, from_dbuf (see InterfaceType enum) fabric_md.spgw.src_iface = src_iface; - fabric_md.spgw.direction = direction; - fabric_md.spgw.skip_spgw = (_BOOL)skip_spgw; + fabric_md.spgw.skip_spgw = _FALSE; + fabric_md.slice_id = slice_id; + } + action iface_miss() { + fabric_md.spgw.src_iface = SPGW_IFACE_UNKNOWN; + fabric_md.spgw.skip_spgw = _TRUE; } + // TODO: check also that gtpu.msgtype == GTP_GPDU... somewhere - table interface_lookup { + table interfaces { key = { hdr.ipv4.dst_addr : lpm @name("ipv4_dst_addr"); // outermost header hdr.gtpu.isValid() : exact @name("gtpu_is_valid"); } actions = { - set_source_iface; + load_iface; + @defaultonly iface_miss; } - const default_action = set_source_iface(SPGW_IFACE_UNKNOWN, SPGW_DIR_UNKNOWN, 1); + const default_action = iface_miss(); size = MAX_INTERFACES; } @@ -68,84 +146,77 @@ control SpgwIngress(inout parsed_headers_t hdr, //=============================// //===== PDR Tables ======// //=============================// - - action set_pdr_attributes(pdr_ctr_id_t ctr_id, - far_id_t far_id, - bit<1> needs_gtpu_decap) { - fabric_md.spgw.pdr_hit = _TRUE; + action load_pdr(pdr_ctr_id_t ctr_id, + far_id_t far_id, + bit<1> needs_gtpu_decap, + tc_t tc) { fabric_md.spgw.ctr_id = ctr_id; fabric_md.spgw.far_id = far_id; fabric_md.spgw.needs_gtpu_decap = (_BOOL)needs_gtpu_decap; + fabric_md.tc = tc; + } + + action load_pdr_qos(pdr_ctr_id_t ctr_id, + far_id_t far_id, + bit<1> needs_gtpu_decap, + // Used to push QFI, valid for 5G traffic only + bit<1> needs_qfi_push, + qfi_t qfi, + tc_t tc) { + load_pdr(ctr_id, far_id, needs_gtpu_decap, tc); + fabric_md.spgw.qfi = qfi; + fabric_md.spgw.needs_qfi_push = (_BOOL)needs_qfi_push; } // These two tables scale well and cover the average case PDR - table downlink_pdr_lookup { + table downlink_pdrs { key = { // only available ipv4 header hdr.ipv4.dst_addr : exact @name("ue_addr"); } actions = { - set_pdr_attributes; + load_pdr; + load_pdr_qos; } - const default_action = set_pdr_attributes(DEFAULT_PDR_CTR_ID, DEFAULT_FAR_ID, 0); size = MAX_DOWNLINK_PDRS; } - table uplink_pdr_lookup { + + table uplink_pdrs { key = { hdr.ipv4.dst_addr : exact @name("tunnel_ipv4_dst"); hdr.gtpu.teid : exact @name("teid"); + // Match valid only for 5G traffic + hdr.gtpu_ext_psc.isValid() : exact @name("has_qfi"); + // QFI metadata is 0 when gptu_ext_psc is invalid. + fabric_md.spgw.qfi : exact @name("qfi"); } actions = { - set_pdr_attributes; + load_pdr; + load_pdr_qos; } - const default_action = set_pdr_attributes(DEFAULT_PDR_CTR_ID, DEFAULT_FAR_ID, 0); size = MAX_UPLINK_PDRS; } - // This table scales poorly and covers uncommon PDRs - table flexible_pdr_lookup { - key = { - fabric_md.spgw.src_iface : ternary @name("src_iface"); - // GTPU - hdr.gtpu.isValid() : ternary @name("gtpu_is_valid"); - hdr.gtpu.teid : ternary @name("teid"); - // SDF - // outer 5-tuple - hdr.ipv4.src_addr : ternary @name("ipv4_src"); - hdr.ipv4.dst_addr : ternary @name("ipv4_dst"); - hdr.ipv4.protocol : ternary @name("ip_proto"); - fabric_md.l4_sport : ternary @name("l4_sport"); - fabric_md.l4_dport : ternary @name("l4_dport"); - // inner 5-tuple - hdr.inner_ipv4.src_addr : ternary @name("inner_ipv4_src"); - hdr.inner_ipv4.dst_addr : ternary @name("inner_ipv4_dst"); - hdr.inner_ipv4.protocol : ternary @name("inner_ip_proto"); - fabric_md.inner_l4_sport : ternary @name("inner_l4_sport"); - fabric_md.inner_l4_dport : ternary @name("inner_l4_dport"); - } - actions = { - set_pdr_attributes; - } - const default_action = set_pdr_attributes(DEFAULT_PDR_CTR_ID, DEFAULT_FAR_ID, 0); - } //=============================// //===== FAR Tables ======// //=============================// - action load_normal_far_attributes(bit<1> drop, - bit<1> notify_cp) { + action load_normal_far(bit<1> drop, + bit<1> notify_cp) { // general far attributes - fabric_md.spgw.far_dropped = (_BOOL)drop; + fabric_md.skip_forwarding = (_BOOL)drop; + fabric_md.skip_next = (_BOOL)drop; fabric_md.spgw.notify_spgwc = (_BOOL)notify_cp; } - action load_tunnel_far_attributes(bit<1> drop, - bit<1> notify_cp, - bit<16> tunnel_src_port, - bit<32> tunnel_src_addr, - bit<32> tunnel_dst_addr, - teid_t teid) { + action load_tunnel_far(bit<1> drop, + bit<1> notify_cp, + bit<16> tunnel_src_port, + bit<32> tunnel_src_addr, + bit<32> tunnel_dst_addr, + teid_t teid) { // general far attributes - fabric_md.spgw.far_dropped = (_BOOL)drop; + fabric_md.skip_forwarding = (_BOOL)drop; + fabric_md.skip_next = (_BOOL)drop; fabric_md.spgw.notify_spgwc = (_BOOL)notify_cp; // GTP tunnel attributes fabric_md.spgw.needs_gtpu_encap = _TRUE; @@ -160,82 +231,31 @@ control SpgwIngress(inout parsed_headers_t hdr, fabric_md.l4_dport = UDP_PORT_GTPU; } - table far_lookup { + action load_dbuf_far(bit<1> drop, + bit<1> notify_cp, + bit<16> tunnel_src_port, + bit<32> tunnel_src_addr, + bit<32> tunnel_dst_addr, + teid_t teid) { + load_tunnel_far(drop, notify_cp, tunnel_src_port, + tunnel_src_addr, tunnel_dst_addr, teid); + fabric_md.spgw.skip_egress_pdr_ctr = _TRUE; + } + + table fars { key = { fabric_md.spgw.far_id : exact @name("far_id"); } actions = { - load_normal_far_attributes; - load_tunnel_far_attributes; + load_normal_far; + load_tunnel_far; + load_dbuf_far; } // default is drop and don't notify CP - const default_action = load_normal_far_attributes(1, 1); + const default_action = load_normal_far(1, 0); size = MAX_FARS; } - //=============================// - //===== Misc Things ======// - //=============================// - - counter(MAX_PDR_COUNTERS, CounterType.packets_and_bytes) pdr_counter; - - - @hidden - action decap_inner_common() { - // Correct parser-set metadata to use the inner header values - fabric_md.ip_eth_type = ETHERTYPE_IPV4; - fabric_md.ip_proto = hdr.inner_ipv4.protocol; - fabric_md.ipv4_src_addr = hdr.inner_ipv4.src_addr; - fabric_md.ipv4_dst_addr = hdr.inner_ipv4.dst_addr; - fabric_md.l4_sport = fabric_md.inner_l4_sport; - fabric_md.l4_dport = fabric_md.inner_l4_dport; - // Move GTPU and inner L3 headers out - hdr.ipv4 = hdr.inner_ipv4; - hdr.inner_ipv4.setInvalid(); - hdr.gtpu.setInvalid(); - } - action decap_inner_tcp() { - decap_inner_common(); - hdr.udp.setInvalid(); - hdr.tcp = hdr.inner_tcp; - hdr.inner_tcp.setInvalid(); - } - action decap_inner_udp() { - decap_inner_common(); - hdr.udp = hdr.inner_udp; - hdr.inner_udp.setInvalid(); - } - action decap_inner_icmp() { - decap_inner_common(); - hdr.udp.setInvalid(); - hdr.icmp = hdr.inner_icmp; - hdr.inner_icmp.setInvalid(); - } - action decap_inner_unknown() { - decap_inner_common(); - hdr.udp.setInvalid(); - } - @hidden - table decap_gtpu { - key = { - hdr.inner_tcp.isValid() : exact; - hdr.inner_udp.isValid() : exact; - hdr.inner_icmp.isValid() : exact; - } - actions = { - decap_inner_tcp; - decap_inner_udp; - decap_inner_icmp; - decap_inner_unknown; - } - const default_action = decap_inner_unknown; - const entries = { - (true, false, false) : decap_inner_tcp(); - (false, true, false) : decap_inner_udp(); - (false, false, true) : decap_inner_icmp(); - } - } - //=============================// //===== Apply Block ======// @@ -243,50 +263,36 @@ control SpgwIngress(inout parsed_headers_t hdr, apply { // Interfaces - interface_lookup.apply(); - - // If interface table missed, or the interface skips PDRs/FARs (TODO: is that a thing?) - if (fabric_md.spgw.skip_spgw == _TRUE) return; - - // PDRs - // Currently only best-case PDR tables to make v1model-to-tofino compiler happy - if (hdr.gtpu.isValid()) { - uplink_pdr_lookup.apply(); - } else { - downlink_pdr_lookup.apply(); - } - // Inefficient PDR table if efficient tables missed - // Removed to make v1model-to-tofino compiler happy. Not removed in TNA port - //if (fabric_md.spgw.pdr_hit == _FALSE) { - // flexible_pdr_lookup.apply(); - //} - pdr_counter.count(fabric_md.spgw.ctr_id); - - // GTPU Decapsulate - if (fabric_md.spgw.needs_gtpu_decap == _TRUE) { - decap_gtpu.apply(); + if (interfaces.apply().hit) { + if (fabric_md.spgw.src_iface == SPGW_IFACE_FROM_DBUF) { + decap_gtpu_from_dbuf.apply(hdr, fabric_md); + } + // PDRs + if (hdr.gtpu.isValid()) { + uplink_pdrs.apply(); + } else { + downlink_pdrs.apply(); + } + if (fabric_md.spgw.src_iface != SPGW_IFACE_FROM_DBUF) { + pdr_counter.count(fabric_md.spgw.ctr_id); + } + + // GTPU Decapsulate + if (fabric_md.spgw.needs_gtpu_decap == _TRUE) { + decap_gtpu.apply(hdr, fabric_md); + } + + // FARs + // Load FAR info + fars.apply(); + + // Nothing to be done immediately for forwarding or encapsulation. + // Forwarding is done by other parts of fabric.p4, and + // encapsulation is done in the egress + + // Needed for correct GTPU encapsulation in egress + fabric_md.spgw.ipv4_len = hdr.ipv4.total_len; } - - // FARs - // Load FAR info - far_lookup.apply(); - - if (fabric_md.spgw.notify_spgwc == _TRUE) { - // TODO: cpu clone action here - } - if (fabric_md.spgw.far_dropped == _TRUE) { - // Do dropping in the same way as fabric's filtering.p4, so we can traverse - // the ACL table, which is good for cases like DHCP. - fabric_md.skip_forwarding = _TRUE; - fabric_md.skip_next = _TRUE; - } - - // Nothing to be done immediately for forwarding or encapsulation. - // Forwarding is done by other parts of fabric.p4, and - // encapsulation is done in the egress - - // Needed for correct GTPU encapsulation in egress - fabric_md.spgw.ipv4_len = hdr.ipv4.total_len; } } @@ -300,7 +306,6 @@ control SpgwEgress( counter(MAX_PDR_COUNTERS, CounterType.packets_and_bytes) pdr_counter; - @hidden action gtpu_encap() { hdr.gtpu_ipv4.setValid(); @@ -320,15 +325,14 @@ control SpgwEgress( hdr.gtpu_ipv4.hdr_checksum = 0; // Updated later hdr.gtpu_udp.setValid(); - hdr.gtpu_udp.sport = fabric_md.spgw.tunnel_src_port; + hdr.gtpu_udp.sport = fabric_md.spgw.tunnel_src_port; hdr.gtpu_udp.dport = UDP_PORT_GTPU; hdr.gtpu_udp.len = fabric_md.spgw.ipv4_len + (UDP_HDR_SIZE + GTP_HDR_SIZE); hdr.gtpu_udp.checksum = 0; // Updated later, if WITH_SPGW_UDP_CSUM_UPDATE - hdr.outer_gtpu.setValid(); - hdr.outer_gtpu.version = GTPU_VERSION; + hdr.outer_gtpu.version = GTP_V1; hdr.outer_gtpu.pt = GTP_PROTOCOL_TYPE_GTP; hdr.outer_gtpu.spare = 0; hdr.outer_gtpu.ex_flag = 0; @@ -339,12 +343,39 @@ control SpgwEgress( hdr.outer_gtpu.teid = fabric_md.spgw.teid; } - apply { - if (fabric_md.spgw.skip_spgw == _TRUE) return; - pdr_counter.count(fabric_md.spgw.ctr_id); + @hidden + action gtpu_encap_qfi() { + gtpu_encap(); + hdr.gtpu_ipv4.total_len = hdr.ipv4.total_len + + IPV4_HDR_SIZE + UDP_HDR_SIZE + GTP_HDR_SIZE + + GTPU_OPTIONS_HDR_BYTES + GTPU_EXT_PSC_HDR_BYTES; + hdr.gtpu_udp.len = fabric_md.spgw.ipv4_len + + UDP_HDR_SIZE + GTP_HDR_SIZE + + GTPU_OPTIONS_HDR_BYTES + GTPU_EXT_PSC_HDR_BYTES; + hdr.outer_gtpu.msglen = fabric_md.spgw.ipv4_len + + GTPU_OPTIONS_HDR_BYTES + GTPU_EXT_PSC_HDR_BYTES; + hdr.outer_gtpu.ex_flag = 1; + hdr.outer_gtpu_options.setValid(); + hdr.outer_gtpu_options.next_ext = GTPU_NEXT_EXT_PSC; + hdr.outer_gtpu_ext_psc.setValid(); + hdr.outer_gtpu_ext_psc.type = GTPU_EXT_PSC_TYPE_DL; + hdr.outer_gtpu_ext_psc.len = GTPU_EXT_PSC_LEN; + hdr.outer_gtpu_ext_psc.qfi = fabric_md.spgw.qfi; + hdr.outer_gtpu_ext_psc.next_ext = GTPU_NEXT_EXT_NONE; + } - if (fabric_md.spgw.needs_gtpu_encap == _TRUE) { - gtpu_encap(); + apply { + if (fabric_md.spgw.skip_spgw == _FALSE) { + if (fabric_md.spgw.needs_gtpu_encap == _TRUE) { + if (fabric_md.spgw.needs_qfi_push == _TRUE) { + gtpu_encap_qfi(); + } else { + gtpu_encap(); + } + } + if (fabric_md.spgw.skip_egress_pdr_ctr == _FALSE) { + pdr_counter.count(fabric_md.spgw.ctr_id); + } } } } diff --git a/pipelines/fabric/impl/src/main/resources/include/define.p4 b/pipelines/fabric/impl/src/main/resources/include/define.p4 index bfb7b449f5c..519d4541469 100644 --- a/pipelines/fabric/impl/src/main/resources/include/define.p4 +++ b/pipelines/fabric/impl/src/main/resources/include/define.p4 @@ -67,15 +67,26 @@ #define IP_VERSION_6 6 #endif +#define PACKET_OUT_HDR_SIZE 2 #define ETH_HDR_SIZE 14 #define IPV4_HDR_SIZE 20 #define UDP_HDR_SIZE 8 #define GTP_HDR_SIZE 8 +#define GTPU_OPTIONS_HDR_BYTES 4 +#define GTPU_EXT_PSC_HDR_BYTES 4 + #define UDP_PORT_GTPU 2152 #define GTP_GPDU 0xff -#define GTPU_VERSION 0x01 +#define GTP_V1 0x01 #define GTP_PROTOCOL_TYPE_GTP 0x01 +#define GTPU_NEXT_EXT_NONE 0x0 +#define GTPU_NEXT_EXT_PSC 0x85 +// 1*4-octets +#define GTPU_EXT_PSC_LEN 8w1 + +const bit<4> GTPU_EXT_PSC_TYPE_DL = 4w0; // Downlink +const bit<4> GTPU_EXT_PSC_TYPE_UL = 4w1; // Uplink #define PKT_INSTANCE_TYPE_NORMAL 0 #define PKT_INSTANCE_TYPE_INGRESS_CLONE 1 @@ -94,6 +105,12 @@ typedef bit<16> mcast_group_id_t; typedef bit<12> vlan_id_t; typedef bit<32> ipv4_addr_t; typedef bit<16> l4_port_t; +typedef bit slice_id_t; +typedef bit tc_t; // Traffic Class (for QoS) within a slice +typedef bit slice_tc_t; // Slice and TC identifier + +const slice_id_t DEFAULT_SLICE_ID = 0; +const tc_t DEFAULT_TC = 0; // SPGW types typedef bit<2> direction_t; @@ -104,21 +121,25 @@ typedef bit<32> pcc_rule_id_t; typedef bit<32> far_id_t; typedef bit<32> pdr_ctr_id_t; typedef bit<32> teid_t; +typedef bit<6> qfi_t; +typedef bit<5> qid_t; const spgw_interface_t SPGW_IFACE_UNKNOWN = 8w0; const spgw_interface_t SPGW_IFACE_ACCESS = 8w1; const spgw_interface_t SPGW_IFACE_CORE = 8w2; -const direction_t SPGW_DIR_UNKNOWN = 2w0; -const direction_t SPGW_DIR_UPLINK = 2w1; -const direction_t SPGW_DIR_DOWNLINK = 2w2; - -#ifndef S1U_SGW_PREFIX -// By default spgw.p4 expects uplink packets with IP dst matching 140.0.0.0/8 -// FIXME: refactor pipeline to remove dependency on this value or allow setting it at runtime -// (e.g. via parser value sets) -#define S1U_SGW_PREFIX (8w140++8w0++8w0++8w0) -#define S1U_SGW_PREFIX_LEN 8 -#endif +const spgw_interface_t SPGW_IFACE_FROM_DBUF = 8w3; + +// PORT types. Set by the control plane using the actions +// of the filtering.ingress_port_vlan table. +typedef bit<2> port_type_t; +// Default value. Set by deny action. +const port_type_t PORT_TYPE_UNKNOWN = 0x0; +// Host-facing port on a leaf switch. +const port_type_t PORT_TYPE_EDGE = 0x1; +// Switch-facing port on a leaf or spine switch. +const port_type_t PORT_TYPE_INFRA = 0x2; +// ASIC-internal port such as the recirculation one (used for INT or UE-to-UE). +const port_type_t PORT_TYPE_INTERNAL = 0x3; const bit<16> ETHERTYPE_QINQ = 0x88A8; const bit<16> ETHERTYPE_QINQ_NON_STD = 0x9100; diff --git a/pipelines/fabric/impl/src/main/resources/include/header.p4 b/pipelines/fabric/impl/src/main/resources/include/header.p4 index 17b36fec512..8e3537eed8f 100644 --- a/pipelines/fabric/impl/src/main/resources/include/header.p4 +++ b/pipelines/fabric/impl/src/main/resources/include/header.p4 @@ -30,7 +30,8 @@ _PKT_OUT_HDR_ANNOT @controller_header("packet_out") header packet_out_header_t { port_num_t egress_port; - bit<7> _pad; + bit<1> do_forwarding; + bit<6> _pad; } header ethernet_t { @@ -124,7 +125,7 @@ header icmp_t { bit<64> timestamp; } -#ifdef WITH_SPGW + // GTPU v1 header gtpu_t { bit<3> version; /* version */ @@ -138,8 +139,27 @@ header gtpu_t { teid_t teid; /* tunnel endpoint id */ } +// Follows gtpu_t if any of ex_flag, seq_flag, or npdu_flag is 1. +header gtpu_options_t { + bit<16> seq_num; /* Sequence number */ + bit<8> n_pdu_num; /* N-PDU number */ + bit<8> next_ext; /* Next extension header */ +} + +// GTPU extension: PDU Session Container (PSC) -- 3GPP TS 38.415 version 15.2.0 +// https://www.etsi.org/deliver/etsi_ts/138400_138499/138415/15.02.00_60/ts_138415v150200p.pdf +header gtpu_ext_psc_t { + bit<8> len; /* Length in 4-octet units (common to all extensions) */ + bit<4> type; /* Uplink or downlink */ + bit<4> spare0; /* Reserved */ + bit<1> ppp; /* Paging Policy Presence (UL only, not supported) */ + bit<1> rqi; /* Reflective QoS Indicator (UL only) */ + qfi_t qfi; /* QoS Flow Identifier */ + bit<8> next_ext; +} + +#ifdef WITH_SPGW struct spgw_meta_t { - direction_t direction; bit<16> ipv4_len; teid_t teid; bit<16> tunnel_src_port; @@ -148,12 +168,13 @@ struct spgw_meta_t { pdr_ctr_id_t ctr_id; far_id_t far_id; spgw_interface_t src_iface; + qfi_t qfi; _BOOL skip_spgw; - _BOOL pdr_hit; - _BOOL far_dropped; _BOOL notify_spgwc; _BOOL needs_gtpu_encap; _BOOL needs_gtpu_decap; + _BOOL skip_egress_pdr_ctr; + _BOOL needs_qfi_push; } #endif // WITH_SPGW @@ -174,8 +195,25 @@ struct bng_meta_t { } #endif // WITH_BNG +// Used for table lookup. Initialized with the parsed headers, or 0 if invalid. +// Never updated by the pipe. When both outer and inner IPv4 headers are valid, +// this should always carry the inner ones. The assumption is that we terminate +// GTP tunnels in the fabric, so we are more interested in observing/blocking +// the inner flows. We might revisit this decision in the future. +struct lookup_metadata_t { + _BOOL is_ipv4; + bit<32> ipv4_src; + bit<32> ipv4_dst; + bit<8> ip_proto; + l4_port_t l4_sport; + l4_port_t l4_dport; + bit<8> icmp_type; + bit<8> icmp_code; +} + //Custom metadata definition struct fabric_metadata_t { + lookup_metadata_t lkp; bit<16> ip_eth_type; vlan_id_t vlan_id; bit<3> vlan_pri; @@ -199,6 +237,10 @@ struct fabric_metadata_t { bit<16> l4_dport; bit<32> ipv4_src_addr; bit<32> ipv4_dst_addr; + slice_id_t slice_id; + bit<2> packet_color; + tc_t tc; + bit<6> dscp; #ifdef WITH_SPGW bit<16> inner_l4_sport; bit<16> inner_l4_dport; @@ -210,6 +252,7 @@ struct fabric_metadata_t { #ifdef WITH_INT int_metadata_t int_meta; #endif // WITH_INT + port_type_t port_type; } struct parsed_headers_t { @@ -227,12 +270,16 @@ struct parsed_headers_t { ipv4_t gtpu_ipv4; udp_t gtpu_udp; gtpu_t outer_gtpu; + gtpu_options_t outer_gtpu_options; + gtpu_ext_psc_t outer_gtpu_ext_psc; +#endif // WITH_SPGW gtpu_t gtpu; + gtpu_options_t gtpu_options; + gtpu_ext_psc_t gtpu_ext_psc; ipv4_t inner_ipv4; udp_t inner_udp; tcp_t inner_tcp; icmp_t inner_icmp; -#endif // WITH_SPGW ipv4_t ipv4; #ifdef WITH_IPV6 ipv6_t ipv6; diff --git a/pipelines/fabric/impl/src/main/resources/include/parser.p4 b/pipelines/fabric/impl/src/main/resources/include/parser.p4 index de0a76baa7f..0a77d4ce8c6 100644 --- a/pipelines/fabric/impl/src/main/resources/include/parser.p4 +++ b/pipelines/fabric/impl/src/main/resources/include/parser.p4 @@ -28,13 +28,28 @@ parser FabricParser (packet_in packet, state start { transition select(standard_metadata.ingress_port) { - CPU_PORT: parse_packet_out; + CPU_PORT: check_packet_out; default: parse_ethernet; } } - state parse_packet_out { + state check_packet_out { + packet_out_header_t tmp = packet.lookahead(); + transition select(tmp.do_forwarding) { + 0: parse_packet_out_and_accept; + default: strip_packet_out; + } + } + + state parse_packet_out_and_accept { + // Will transmit over requested egress port as-is. No need to parse further. packet.extract(hdr.packet_out); + transition accept; + } + + state strip_packet_out { + // Remove packet-out header and process as a regular packet. + packet.advance(PACKET_OUT_HDR_SIZE * 8); transition parse_ethernet; } @@ -166,10 +181,10 @@ parser FabricParser (packet_in packet, packet.extract(hdr.udp); fabric_metadata.l4_sport = hdr.udp.sport; fabric_metadata.l4_dport = hdr.udp.dport; - transition select(hdr.udp.dport) { -#ifdef WITH_SPGW - UDP_PORT_GTPU: parse_gtpu; -#endif // WITH_SPGW + gtpu_t gtpu = packet.lookahead(); + transition select(hdr.udp.dport, gtpu.version, gtpu.msgtype) { + // Treat GTP control traffic as payload. + (UDP_PORT_GTPU, GTP_V1, GTP_GPDU): parse_gtpu; #ifdef WITH_INT default: parse_int; #else @@ -183,27 +198,51 @@ parser FabricParser (packet_in packet, transition accept; } -#ifdef WITH_SPGW state parse_gtpu { packet.extract(hdr.gtpu); - transition parse_inner_ipv4; + transition select(hdr.gtpu.ex_flag, hdr.gtpu.seq_flag, hdr.gtpu.npdu_flag) { + (0, 0, 0): parse_inner_ipv4; + default: parse_gtpu_options; + } + } + + state parse_gtpu_options { + packet.extract(hdr.gtpu_options); + bit<8> gtpu_ext_len = packet.lookahead>(); + transition select(hdr.gtpu_options.next_ext, gtpu_ext_len) { + (GTPU_NEXT_EXT_PSC, GTPU_EXT_PSC_LEN): parse_gtpu_ext_psc; + default: accept; + } + } + + state parse_gtpu_ext_psc { + packet.extract(hdr.gtpu_ext_psc); +#ifdef WITH_SPGW + fabric_metadata.spgw.qfi = hdr.gtpu_ext_psc.qfi; +#endif // WITH_SPGW + transition select(hdr.gtpu_ext_psc.next_ext) { + GTPU_NEXT_EXT_NONE: parse_inner_ipv4; + default: accept; + } } state parse_inner_ipv4 { packet.extract(hdr.inner_ipv4); last_ipv4_dscp = hdr.inner_ipv4.dscp; transition select(hdr.inner_ipv4.protocol) { - PROTO_TCP: parse_tcp; + PROTO_TCP: parse_inner_tcp; PROTO_UDP: parse_inner_udp; - PROTO_ICMP: parse_icmp; + PROTO_ICMP: parse_inner_icmp; default: accept; } } state parse_inner_udp { packet.extract(hdr.inner_udp); +#ifdef WITH_SPGW fabric_metadata.inner_l4_sport = hdr.inner_udp.sport; fabric_metadata.inner_l4_dport = hdr.inner_udp.dport; +#endif // WITH_SPGW #ifdef WITH_INT transition parse_int; #else @@ -211,18 +250,19 @@ parser FabricParser (packet_in packet, #endif // WITH_INT } - state parse_inner_tcp { + state parse_inner_tcp { packet.extract(hdr.inner_tcp); +#ifdef WITH_SPGW fabric_metadata.inner_l4_sport = hdr.inner_tcp.sport; fabric_metadata.inner_l4_dport = hdr.inner_tcp.dport; +#endif // WITH_SPGW transition accept; } - state parse_inner_icmp { + state parse_inner_icmp { packet.extract(hdr.inner_icmp); transition accept; } -#endif // WITH_SPGW #ifdef WITH_INT state parse_int { @@ -290,6 +330,8 @@ control FabricDeparser(packet_out packet,in parsed_headers_t hdr) { packet.emit(hdr.gtpu_ipv4); packet.emit(hdr.gtpu_udp); packet.emit(hdr.outer_gtpu); + packet.emit(hdr.outer_gtpu_options); + packet.emit(hdr.outer_gtpu_ext_psc); #endif // WITH_SPGW packet.emit(hdr.ipv4); #ifdef WITH_IPV6 @@ -298,14 +340,14 @@ control FabricDeparser(packet_out packet,in parsed_headers_t hdr) { packet.emit(hdr.tcp); packet.emit(hdr.udp); packet.emit(hdr.icmp); -#ifdef WITH_SPGW // if we parsed a GTPU packet but did not decap it packet.emit(hdr.gtpu); + packet.emit(hdr.gtpu_options); + packet.emit(hdr.gtpu_ext_psc); packet.emit(hdr.inner_ipv4); packet.emit(hdr.inner_tcp); packet.emit(hdr.inner_udp); packet.emit(hdr.inner_icmp); -#endif // WITH_SPGW #ifdef WITH_INT packet.emit(hdr.intl4_shim); packet.emit(hdr.int_header); diff --git a/pipelines/fabric/impl/src/main/resources/include/size.p4 b/pipelines/fabric/impl/src/main/resources/include/size.p4 index 28830946d8a..3a782f10183 100644 --- a/pipelines/fabric/impl/src/main/resources/include/size.p4 +++ b/pipelines/fabric/impl/src/main/resources/include/size.p4 @@ -17,6 +17,7 @@ #define ROUTING_V6_TABLE_SIZE 1024 #define ACL_TABLE_SIZE 1024 #define XCONNECT_NEXT_TABLE_SIZE 1024 +#define NEXT_MPLS_TABLE_SIZE 1024 #define NEXT_VLAN_TABLE_SIZE 1024 #define SIMPLE_NEXT_TABLE_SIZE 1024 #define HASHED_NEXT_TABLE_SIZE 1024 @@ -24,5 +25,11 @@ #define HASHED_ACT_PROFILE_SIZE 32w1024 #define MULTICAST_NEXT_TABLE_SIZE 1024 #define EGRESS_VLAN_TABLE_SIZE 1024 +#define QOS_CLASSIFIER_TABLE_SIZE 512 +#define DSCP_REWRITER_TABLE_SIZE 512 + +#define SLICE_ID_WIDTH 4 +#define TC_WIDTH 2 +#define SLICE_TC_WIDTH (SLICE_ID_WIDTH + TC_WIDTH) #endif diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/bmv2.json index 5e458c208d5..2d265cb9c2e 100644 --- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/bmv2.json +++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/bmv2.json @@ -4,56 +4,95 @@ "name" : "scalars_0", "id" : 0, "fields" : [ - ["tmp_0", 16, false], + ["tmp_0", 1, false], + ["tmp_2", 3, false], + ["tmp_4", 8, false], + ["gtpu_ext_len_0", 8, false], ["tmp_1", 16, false], - ["tmp_2", 4, false], - ["tmp", 32, false], - ["tmp_3", 32, false], - ["bng_ingress_upstream_tmp", 1, false], - ["bng_ingress_downstream_tmp", 1, false], + ["tmp_3", 16, false], + ["tmp_5", 4, false], + ["tmp_6", 16, false], + ["tmp_7", 64, false], + ["tmp_8", 32, false], + ["tmp_9", 32, false], + ["tmp_10", 32, false], ["bng_ingress_upstream_hasReturned", 1, false], - ["egress_next_tmp", 1, false], - ["fabric_metadata_t._ip_eth_type0", 16, false], - ["fabric_metadata_t._vlan_id1", 12, false], - ["fabric_metadata_t._vlan_pri2", 3, false], - ["fabric_metadata_t._vlan_cfi3", 1, false], - ["fabric_metadata_t._push_double_vlan4", 1, false], - ["fabric_metadata_t._inner_vlan_id5", 12, false], - ["fabric_metadata_t._inner_vlan_pri6", 3, false], - ["fabric_metadata_t._inner_vlan_cfi7", 1, false], - ["fabric_metadata_t._mpls_label8", 20, false], - ["fabric_metadata_t._mpls_ttl9", 8, false], - ["fabric_metadata_t._skip_forwarding10", 1, false], - ["fabric_metadata_t._skip_next11", 1, false], - ["fabric_metadata_t._fwd_type12", 3, false], - ["fabric_metadata_t._next_id13", 32, false], - ["fabric_metadata_t._is_multicast14", 1, false], - ["fabric_metadata_t._is_controller_packet_out15", 1, false], - ["fabric_metadata_t._ip_proto16", 8, false], - ["fabric_metadata_t._l4_sport17", 16, false], - ["fabric_metadata_t._l4_dport18", 16, false], - ["fabric_metadata_t._ipv4_src_addr19", 32, false], - ["fabric_metadata_t._ipv4_dst_addr20", 32, false], - ["fabric_metadata_t._bng_type21", 2, false], - ["fabric_metadata_t._bng_line_id22", 32, false], - ["fabric_metadata_t._bng_pppoe_session_id23", 16, false], - ["fabric_metadata_t._bng_ds_meter_result24", 32, false], - ["fabric_metadata_t._bng_s_tag25", 12, false], - ["fabric_metadata_t._bng_c_tag26", 12, false], + ["dscp_rewriter_tmp_dscp", 6, false], + ["userMetadata._lkp_is_ipv40", 1, false], + ["userMetadata._lkp_ipv4_src1", 32, false], + ["userMetadata._lkp_ipv4_dst2", 32, false], + ["userMetadata._lkp_ip_proto3", 8, false], + ["userMetadata._lkp_l4_sport4", 16, false], + ["userMetadata._lkp_l4_dport5", 16, false], + ["userMetadata._lkp_icmp_type6", 8, false], + ["userMetadata._lkp_icmp_code7", 8, false], + ["userMetadata._ip_eth_type8", 16, false], + ["userMetadata._vlan_id9", 12, false], + ["userMetadata._vlan_pri10", 3, false], + ["userMetadata._vlan_cfi11", 1, false], + ["userMetadata._push_double_vlan12", 1, false], + ["userMetadata._inner_vlan_id13", 12, false], + ["userMetadata._inner_vlan_pri14", 3, false], + ["userMetadata._inner_vlan_cfi15", 1, false], + ["userMetadata._mpls_label16", 20, false], + ["userMetadata._mpls_ttl17", 8, false], + ["userMetadata._skip_forwarding18", 1, false], + ["userMetadata._skip_next19", 1, false], + ["userMetadata._fwd_type20", 3, false], + ["userMetadata._next_id21", 32, false], + ["userMetadata._is_multicast22", 1, false], + ["userMetadata._is_controller_packet_out23", 1, false], + ["userMetadata._ip_proto24", 8, false], + ["userMetadata._l4_sport25", 16, false], + ["userMetadata._l4_dport26", 16, false], + ["userMetadata._ipv4_src_addr27", 32, false], + ["userMetadata._ipv4_dst_addr28", 32, false], + ["userMetadata._slice_id29", 4, false], + ["userMetadata._packet_color30", 2, false], + ["userMetadata._tc31", 2, false], + ["userMetadata._dscp32", 6, false], + ["userMetadata._bng_type33", 2, false], + ["userMetadata._bng_line_id34", 32, false], + ["userMetadata._bng_pppoe_session_id35", 16, false], + ["userMetadata._bng_ds_meter_result36", 32, false], + ["userMetadata._bng_s_tag37", 12, false], + ["userMetadata._bng_c_tag38", 12, false], + ["userMetadata._port_type39", 2, false], ["_padding_0", 2, false] ] }, { - "name" : "standard_metadata", + "name" : "packet_out_header_t", "id" : 1, + "fields" : [ + ["egress_port", 9, false], + ["do_forwarding", 1, false], + ["_pad", 6, false] + ] + }, + { + "name" : "gtpu_t", + "id" : 2, + "fields" : [ + ["version", 3, false], + ["pt", 1, false], + ["spare", 1, false], + ["ex_flag", 1, false], + ["seq_flag", 1, false], + ["npdu_flag", 1, false], + ["msgtype", 8, false], + ["msglen", 16, false], + ["teid", 32, false] + ] + }, + { + "name" : "standard_metadata", + "id" : 3, "fields" : [ ["ingress_port", 9, false], ["egress_spec", 9, false], ["egress_port", 9, false], - ["clone_spec", 32, false], ["instance_type", 32, false], - ["drop", 1, false], - ["recirculate_port", 16, false], ["packet_length", 32, false], ["enq_timestamp", 32, false], ["enq_qdepth", 19, false], @@ -61,20 +100,17 @@ ["deq_qdepth", 19, false], ["ingress_global_timestamp", 48, false], ["egress_global_timestamp", 48, false], - ["lf_field_list", 32, false], ["mcast_grp", 16, false], - ["resubmit_flag", 32, false], ["egress_rid", 16, false], - ["recirculate_flag", 32, false], ["checksum_error", 1, false], ["parser_error", 32, false], ["priority", 3, false], - ["_padding", 2, false] + ["_padding", 3, false] ] }, { "name" : "ethernet_t", - "id" : 2, + "id" : 4, "fields" : [ ["dst_addr", 48, false], ["src_addr", 48, false] @@ -82,7 +118,7 @@ }, { "name" : "vlan_tag_t", - "id" : 3, + "id" : 5, "fields" : [ ["eth_type", 16, false], ["pri", 3, false], @@ -92,14 +128,14 @@ }, { "name" : "eth_type_t", - "id" : 4, + "id" : 6, "fields" : [ ["value", 16, false] ] }, { "name" : "pppoe_t", - "id" : 5, + "id" : 7, "fields" : [ ["version", 4, false], ["type_id", 4, false], @@ -111,7 +147,7 @@ }, { "name" : "mpls_t", - "id" : 6, + "id" : 8, "fields" : [ ["label", 20, false], ["tc", 3, false], @@ -119,9 +155,31 @@ ["ttl", 8, false] ] }, + { + "name" : "gtpu_options_t", + "id" : 9, + "fields" : [ + ["seq_num", 16, false], + ["n_pdu_num", 8, false], + ["next_ext", 8, false] + ] + }, + { + "name" : "gtpu_ext_psc_t", + "id" : 10, + "fields" : [ + ["len", 8, false], + ["type", 4, false], + ["spare0", 4, false], + ["ppp", 1, false], + ["rqi", 1, false], + ["qfi", 6, false], + ["next_ext", 8, false] + ] + }, { "name" : "ipv4_t", - "id" : 7, + "id" : 11, "fields" : [ ["version", 4, false], ["ihl", 4, false], @@ -138,9 +196,19 @@ ["dst_addr", 32, false] ] }, + { + "name" : "udp_t", + "id" : 12, + "fields" : [ + ["sport", 16, false], + ["dport", 16, false], + ["len", 16, false], + ["checksum", 16, false] + ] + }, { "name" : "tcp_t", - "id" : 8, + "id" : 13, "fields" : [ ["sport", 16, false], ["dport", 16, false], @@ -155,19 +223,9 @@ ["urgent_ptr", 16, false] ] }, - { - "name" : "udp_t", - "id" : 9, - "fields" : [ - ["sport", 16, false], - ["dport", 16, false], - ["len", 16, false], - ["checksum", 16, false] - ] - }, { "name" : "icmp_t", - "id" : 10, + "id" : 14, "fields" : [ ["icmp_type", 8, false], ["icmp_code", 8, false], @@ -177,17 +235,9 @@ ["timestamp", 64, false] ] }, - { - "name" : "packet_out_header_t", - "id" : 11, - "fields" : [ - ["egress_port", 9, false], - ["_pad", 7, false] - ] - }, { "name" : "packet_in_header_t", - "id" : 12, + "id" : 15, "fields" : [ ["ingress_port", 9, false], ["_pad", 7, false] @@ -196,99 +246,162 @@ ], "headers" : [ { - "name" : "scalars", + "name" : "tmp", "id" : 0, + "header_type" : "packet_out_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_0", + "id" : 1, + "header_type" : "gtpu_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "scalars", + "id" : 2, "header_type" : "scalars_0", "metadata" : true, "pi_omit" : true }, { "name" : "standard_metadata", - "id" : 1, + "id" : 3, "header_type" : "standard_metadata", "metadata" : true, "pi_omit" : true }, { "name" : "ethernet", - "id" : 2, + "id" : 4, "header_type" : "ethernet_t", "metadata" : false, "pi_omit" : true }, { "name" : "vlan_tag", - "id" : 3, + "id" : 5, "header_type" : "vlan_tag_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_vlan_tag", - "id" : 4, + "id" : 6, "header_type" : "vlan_tag_t", "metadata" : false, "pi_omit" : true }, { "name" : "eth_type", - "id" : 5, + "id" : 7, "header_type" : "eth_type_t", "metadata" : false, "pi_omit" : true }, { "name" : "pppoe", - "id" : 6, + "id" : 8, "header_type" : "pppoe_t", "metadata" : false, "pi_omit" : true }, { "name" : "mpls", - "id" : 7, + "id" : 9, "header_type" : "mpls_t", "metadata" : false, "pi_omit" : true }, + { + "name" : "gtpu", + "id" : 10, + "header_type" : "gtpu_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_options", + "id" : 11, + "header_type" : "gtpu_options_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_ext_psc", + "id" : 12, + "header_type" : "gtpu_ext_psc_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "inner_ipv4", + "id" : 13, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "inner_udp", + "id" : 14, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "inner_tcp", + "id" : 15, + "header_type" : "tcp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "inner_icmp", + "id" : 16, + "header_type" : "icmp_t", + "metadata" : false, + "pi_omit" : true + }, { "name" : "ipv4", - "id" : 8, + "id" : 17, "header_type" : "ipv4_t", "metadata" : false, "pi_omit" : true }, { "name" : "tcp", - "id" : 9, + "id" : 18, "header_type" : "tcp_t", "metadata" : false, "pi_omit" : true }, { "name" : "udp", - "id" : 10, + "id" : 19, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "icmp", - "id" : 11, + "id" : 20, "header_type" : "icmp_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_out", - "id" : 12, + "id" : 21, "header_type" : "packet_out_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_in", - "id" : 13, + "id" : 22, "header_type" : "packet_in_header_t", "metadata" : false, "pi_omit" : true @@ -304,7 +417,7 @@ "name" : "fl", "source_info" : { "filename" : "include/control/acl.p4", - "line" : 46, + "line" : 45, "column" : 40, "source_fragment" : "{standard_metadata.ingress_port}" }, @@ -341,10 +454,11 @@ "type" : "hexstr", "value" : "0x00ff", "mask" : null, - "next_state" : "parse_packet_out" + "next_state" : "check_packet_out" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_ethernet" } @@ -357,50 +471,150 @@ ] }, { - "name" : "parse_packet_out", + "name" : "check_packet_out", "id" : 1, "parser_ops" : [ { "parameters" : [ { - "type" : "regular", - "value" : "packet_out" + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + { + "type" : "lookahead", + "value" : [0, 16] } ], - "op" : "extract" - } - ], - "transitions" : [ + "op" : "set" + }, { - "value" : "default", - "mask" : null, - "next_state" : "parse_ethernet" - } - ], - "transition_key" : [] - }, - { - "name" : "parse_ethernet", - "id" : 2, - "parser_ops" : [ + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "tmp" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, { "parameters" : [ { - "type" : "regular", - "value" : "ethernet" + "type" : "field", + "value" : ["tmp", "egress_port"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x7" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } } ], - "op" : "extract" + "op" : "set" }, { "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["tmp", "do_forwarding"] }, { - "type" : "hexstr", - "value" : "0x0ffe" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x6" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp", "_pad"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + } } ], "op" : "set" @@ -412,8 +626,41 @@ "value" : ["scalars", "tmp_0"] }, { - "type" : "lookahead", - "value" : [0, 16] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x6" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } } ], "op" : "set" @@ -422,26 +669,15 @@ "transitions" : [ { "type" : "hexstr", - "value" : "0x88a8", - "mask" : null, - "next_state" : "parse_vlan_tag" - }, - { - "type" : "hexstr", - "value" : "0x9100", - "mask" : null, - "next_state" : "parse_vlan_tag" - }, - { - "type" : "hexstr", - "value" : "0x8100", + "value" : "0x00", "mask" : null, - "next_state" : "parse_vlan_tag" + "next_state" : "parse_packet_out_and_accept" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, - "next_state" : "parse_eth_type" + "next_state" : "strip_packet_out" } ], "transition_key" : [ @@ -452,23 +688,144 @@ ] }, { - "name" : "parse_vlan_tag", - "id" : 3, + "name" : "parse_packet_out_and_accept", + "id" : 2, "parser_ops" : [ { "parameters" : [ { "type" : "regular", - "value" : "vlan_tag" + "value" : "packet_out" } ], "op" : "extract" - }, + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "strip_packet_out", + "id" : 3, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x00000010" + } + ], + "op" : "advance" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ethernet" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_ethernet", + "id" : 4, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "ethernet" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_1"] + }, + { + "type" : "lookahead", + "value" : [0, 16] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x88a8", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "hexstr", + "value" : "0x9100", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "hexstr", + "value" : "0x8100", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_eth_type" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_1"] + } + ] + }, + { + "name" : "parse_vlan_tag", + "id" : 5, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "vlan_tag" + } + ], + "op" : "extract" + }, { "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_s_tag25"] + "value" : ["scalars", "userMetadata._bng_s_tag37"] }, { "type" : "field", @@ -481,7 +838,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_1"] + "value" : ["scalars", "tmp_3"] }, { "type" : "lookahead", @@ -499,7 +856,8 @@ "next_state" : "parse_inner_vlan_tag" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -507,13 +865,13 @@ "transition_key" : [ { "type" : "field", - "value" : ["scalars", "tmp_1"] + "value" : ["scalars", "tmp_3"] } ] }, { "name" : "parse_inner_vlan_tag", - "id" : 4, + "id" : 6, "parser_ops" : [ { "parameters" : [ @@ -528,7 +886,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_c_tag26"] + "value" : ["scalars", "userMetadata._bng_c_tag38"] }, { "type" : "field", @@ -540,7 +898,8 @@ ], "transitions" : [ { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -549,7 +908,7 @@ }, { "name" : "parse_eth_type", - "id" : 5, + "id" : 7, "parser_ops" : [ { "parameters" : [ @@ -587,7 +946,8 @@ "next_state" : "parse_pppoe" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -601,7 +961,7 @@ }, { "name" : "parse_pppoe", - "id" : 6, + "id" : 8, "parser_ops" : [ { "parameters" : [ @@ -627,7 +987,8 @@ "next_state" : "parse_ipv4" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -641,7 +1002,7 @@ }, { "name" : "parse_mpls", - "id" : 7, + "id" : 9, "parser_ops" : [ { "parameters" : [ @@ -656,7 +1017,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label8"] + "value" : ["scalars", "userMetadata._mpls_label16"] }, { "type" : "field", @@ -669,7 +1030,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl9"] + "value" : ["scalars", "userMetadata._mpls_ttl17"] }, { "type" : "field", @@ -682,7 +1043,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_2"] + "value" : ["scalars", "tmp_5"] }, { "type" : "lookahead", @@ -700,7 +1061,8 @@ "next_state" : "parse_ipv4" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_ethernet" } @@ -708,13 +1070,13 @@ "transition_key" : [ { "type" : "field", - "value" : ["scalars", "tmp_2"] + "value" : ["scalars", "tmp_5"] } ] }, { "name" : "parse_ipv4", - "id" : 8, + "id" : 10, "parser_ops" : [ { "parameters" : [ @@ -729,7 +1091,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto16"] + "value" : ["scalars", "userMetadata._ip_proto24"] }, { "type" : "field", @@ -742,7 +1104,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] }, { "type" : "hexstr", @@ -755,7 +1117,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr19"] + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] }, { "type" : "field", @@ -768,7 +1130,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr20"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] }, { "type" : "field", @@ -798,7 +1160,8 @@ "next_state" : "parse_icmp" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -812,7 +1175,7 @@ }, { "name" : "parse_tcp", - "id" : 9, + "id" : 11, "parser_ops" : [ { "parameters" : [ @@ -827,7 +1190,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport17"] + "value" : ["scalars", "userMetadata._l4_sport25"] }, { "type" : "field", @@ -840,7 +1203,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport18"] + "value" : ["scalars", "userMetadata._l4_dport26"] }, { "type" : "field", @@ -852,7 +1215,8 @@ ], "transitions" : [ { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -861,7 +1225,7 @@ }, { "name" : "parse_udp", - "id" : 10, + "id" : 12, "parser_ops" : [ { "parameters" : [ @@ -876,7 +1240,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport17"] + "value" : ["scalars", "userMetadata._l4_sport25"] }, { "type" : "field", @@ -889,7 +1253,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport18"] + "value" : ["scalars", "userMetadata._l4_dport26"] }, { "type" : "field", @@ -897,464 +1261,2168 @@ } ], "op" : "set" - } - ], - "transitions" : [ + }, { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [ + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + { + "type" : "lookahead", + "value" : [0, 64] + } + ], + "op" : "set" + }, { - "type" : "field", - "value" : ["udp", "dport"] - } - ] - }, - { - "name" : "parse_icmp", - "id" : 11, - "parser_ops" : [ + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_0" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, { "parameters" : [ { - "type" : "regular", - "value" : "icmp" + "type" : "field", + "value" : ["gtpu_0", "version"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } } ], - "op" : "extract" - } - ], - "transitions" : [ + "op" : "set" + }, { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [] - } - ] - } - ], - "parse_vsets" : [], - "deparsers" : [ - { - "name" : "deparser", - "id" : 0, - "source_info" : { - "filename" : "include/parser.p4", - "line" : 268, - "column" : 8, - "source_fragment" : "FabricDeparser" - }, - "order" : ["packet_in", "ethernet", "vlan_tag", "inner_vlan_tag", "eth_type", "pppoe", "mpls", "ipv4", "tcp", "udp", "icmp"] - } - ], - "meter_arrays" : [ - { - "name" : "FabricIngress.bng_ingress.downstream.m_besteff", - "id" : 0, - "source_info" : { - "filename" : "include/bng.p4", - "line" : 154, - "column" : 33, - "source_fragment" : "m_besteff" - }, - "is_direct" : false, - "size" : 8192, - "rate_count" : 2, - "type" : "bytes" - }, - { - "name" : "FabricIngress.bng_ingress.downstream.m_prio", - "id" : 1, - "source_info" : { - "filename" : "include/bng.p4", - "line" : 155, - "column" : 33, - "source_fragment" : "m_prio" - }, - "is_direct" : false, - "size" : 8192, - "rate_count" : 2, - "type" : "bytes" - } - ], - "counter_arrays" : [ - { - "name" : "FabricIngress.bng_ingress.upstream.c_terminated", - "id" : 0, - "source_info" : { - "filename" : "include/bng.p4", - "line" : 36, - "column" : 37, - "source_fragment" : "c_terminated" - }, - "size" : 8192, - "is_direct" : false - }, - { - "name" : "FabricIngress.bng_ingress.upstream.c_dropped", - "id" : 1, - "source_info" : { - "filename" : "include/bng.p4", - "line" : 37, - "column" : 37, + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "pt"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3c" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "spare"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3b" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "ex_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3a" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "seq_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x39" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "npdu_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x38" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msgtype"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msglen"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x20" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "teid"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x086801ff", + "mask" : null, + "next_state" : "parse_gtpu" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["udp", "dport"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + } + ] + }, + { + "name" : "parse_icmp", + "id" : 13, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "icmp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_gtpu", + "id" : 14, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x000000", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_gtpu_options" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu", "ex_flag"] + }, + { + "type" : "field", + "value" : ["gtpu", "seq_flag"] + }, + { + "type" : "field", + "value" : ["gtpu", "npdu_flag"] + } + ] + }, + { + "name" : "parse_gtpu_options", + "id" : 15, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu_options" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + }, + { + "type" : "lookahead", + "value" : [0, 8] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x8501", + "mask" : null, + "next_state" : "parse_gtpu_ext_psc" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu_options", "next_ext"] + }, + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + } + ] + }, + { + "name" : "parse_gtpu_ext_psc", + "id" : 16, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu_ext_psc" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x00", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu_ext_psc", "next_ext"] + } + ] + }, + { + "name" : "parse_inner_ipv4", + "id" : 17, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_ipv4" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_inner_tcp" + }, + { + "type" : "hexstr", + "value" : "0x11", + "mask" : null, + "next_state" : "parse_inner_udp" + }, + { + "type" : "hexstr", + "value" : "0x01", + "mask" : null, + "next_state" : "parse_inner_icmp" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ] + }, + { + "name" : "parse_inner_udp", + "id" : 18, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_udp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_tcp", + "id" : 19, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_tcp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_icmp", + "id" : 20, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_icmp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + } + ] + } + ], + "parse_vsets" : [], + "deparsers" : [ + { + "name" : "deparser", + "id" : 0, + "source_info" : { + "filename" : "include/parser.p4", + "line" : 308, + "column" : 8, + "source_fragment" : "FabricDeparser" + }, + "order" : ["packet_in", "ethernet", "vlan_tag", "inner_vlan_tag", "eth_type", "pppoe", "mpls", "ipv4", "tcp", "udp", "icmp", "gtpu", "gtpu_options", "gtpu_ext_psc", "inner_ipv4", "inner_tcp", "inner_udp", "inner_icmp"], + "primitives" : [] + } + ], + "meter_arrays" : [ + { + "name" : "FabricIngress.bng_ingress.downstream.m_besteff", + "id" : 0, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 154, + "column" : 33, + "source_fragment" : "m_besteff" + }, + "is_direct" : false, + "size" : 8192, + "rate_count" : 2, + "type" : "bytes" + }, + { + "name" : "FabricIngress.bng_ingress.downstream.m_prio", + "id" : 1, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 155, + "column" : 33, + "source_fragment" : "m_prio" + }, + "is_direct" : false, + "size" : 8192, + "rate_count" : 2, + "type" : "bytes" + }, + { + "name" : "FabricIngress.qos.slice_tc_meter", + "id" : 2, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 78, + "column" : 41, + "source_fragment" : "slice_tc_meter" + }, + "is_direct" : false, + "size" : 64, + "rate_count" : 2, + "type" : "bytes" + } + ], + "counter_arrays" : [ + { + "name" : "FabricIngress.bng_ingress.upstream.c_terminated", + "id" : 0, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 36, + "column" : 37, + "source_fragment" : "c_terminated" + }, + "size" : 8192, + "is_direct" : false + }, + { + "name" : "FabricIngress.bng_ingress.upstream.c_dropped", + "id" : 1, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 37, + "column" : 37, "source_fragment" : "c_dropped" }, "size" : 8192, "is_direct" : false }, { - "name" : "FabricIngress.bng_ingress.upstream.c_control", - "id" : 2, + "name" : "FabricIngress.bng_ingress.upstream.c_control", + "id" : 2, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 38, + "column" : 39, + "source_fragment" : "c_control" + }, + "size" : 8192, + "is_direct" : false + }, + { + "name" : "FabricIngress.bng_ingress.downstream.c_line_rx", + "id" : 3, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 152, + "column" : 37, + "source_fragment" : "c_line_rx" + }, + "size" : 8192, + "is_direct" : false + }, + { + "name" : "FabricIngress.filtering.ingress_port_vlan_counter", + "id" : 4, + "is_direct" : true, + "binding" : "FabricIngress.filtering.ingress_port_vlan", + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 31, + "column" : 50, + "source_fragment" : "ingress_port_vlan_counter" + } + }, + { + "name" : "FabricIngress.filtering.fwd_classifier_counter", + "id" : 5, + "is_direct" : true, + "binding" : "FabricIngress.filtering.fwd_classifier", + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 87, + "column" : 50, + "source_fragment" : "fwd_classifier_counter" + } + }, + { + "name" : "FabricIngress.forwarding.bridging_counter", + "id" : 6, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.bridging", + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 36, + "column" : 50, + "source_fragment" : "bridging_counter" + } + }, + { + "name" : "FabricIngress.forwarding.mpls_counter", + "id" : 7, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.mpls", + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 63, + "column" : 50, + "source_fragment" : "mpls_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_mpls_counter", + "id" : 8, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_mpls", + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 29, + "column" : 50, + "source_fragment" : "next_mpls_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_vlan_counter", + "id" : 9, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_vlan", + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 54, + "column" : 50, + "source_fragment" : "next_vlan_counter" + } + }, + { + "name" : "FabricIngress.acl.acl_counter", + "id" : 10, + "is_direct" : true, + "binding" : "FabricIngress.acl.acl", + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 29, + "column" : 50, + "source_fragment" : "acl_counter" + } + }, + { + "name" : "FabricIngress.next.hashed_counter", + "id" : 11, + "is_direct" : true, + "binding" : "FabricIngress.next.hashed", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 126, + "column" : 50, + "source_fragment" : "hashed_counter" + } + }, + { + "name" : "FabricIngress.next.multicast_counter", + "id" : 12, + "is_direct" : true, + "binding" : "FabricIngress.next.multicast", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 163, + "column" : 50, + "source_fragment" : "multicast_counter" + } + }, + { + "name" : "FabricIngress.slice_tc_classifier.classifier_stats", + "id" : 13, + "is_direct" : true, + "binding" : "FabricIngress.slice_tc_classifier.classifier", + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 32, + "column" : 40, + "source_fragment" : "classifier_stats" + } + }, + { + "name" : "FabricIngress.qos.queues_stats", + "id" : 14, + "is_direct" : true, + "binding" : "FabricIngress.qos.queues", + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 80, + "column" : 40, + "source_fragment" : "queues_stats" + } + }, + { + "name" : "FabricIngress.port_counters_control.egress_port_counter", + "id" : 15, + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 26, + "column" : 48, + "source_fragment" : "egress_port_counter" + }, + "size" : 511, + "is_direct" : false + }, + { + "name" : "FabricIngress.port_counters_control.ingress_port_counter", + "id" : 16, + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 27, + "column" : 48, + "source_fragment" : "ingress_port_counter" + }, + "size" : 511, + "is_direct" : false + }, + { + "name" : "FabricEgress.bng_egress.downstream.c_line_tx", + "id" : 17, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 267, + "column" : 37, + "source_fragment" : "c_line_tx" + }, + "size" : 8192, + "is_direct" : false + }, + { + "name" : "FabricEgress.egress_next.egress_vlan_counter", + "id" : 18, + "is_direct" : true, + "binding" : "FabricEgress.egress_next.egress_vlan", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 248, + "column" : 50, + "source_fragment" : "egress_vlan_counter" + } + } + ], + "register_arrays" : [], + "calculations" : [ + { + "name" : "calc", + "id" : 0, + "source_info" : { + "filename" : "include/checksum.p4", + "line" : 28, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["ipv4", "version"] + }, + { + "type" : "field", + "value" : ["ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["ipv4", "dst_addr"] + } + ] + }, + { + "name" : "calc_0", + "id" : 1, "source_info" : { - "filename" : "include/bng.p4", - "line" : 38, - "column" : 39, - "source_fragment" : "c_control" + "filename" : "include/checksum.p4", + "line" : 57, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." }, - "size" : 8192, - "is_direct" : false + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["ipv4", "version"] + }, + { + "type" : "field", + "value" : ["ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["ipv4", "dst_addr"] + } + ] + } + ], + "learn_lists" : [], + "actions" : [ + { + "name" : "nop", + "id" : 0, + "runtime_data" : [], + "primitives" : [] }, { - "name" : "FabricIngress.bng_ingress.downstream.c_line_rx", + "name" : "nop", + "id" : 1, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 2, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", "id" : 3, - "source_info" : { - "filename" : "include/bng.p4", - "line" : 152, - "column" : 37, - "source_fragment" : "c_line_rx" - }, - "size" : 8192, - "is_direct" : false + "runtime_data" : [], + "primitives" : [] }, { - "name" : "FabricIngress.filtering.ingress_port_vlan_counter", + "name" : "nop", "id" : 4, - "is_direct" : true, - "binding" : "FabricIngress.filtering.ingress_port_vlan", - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 31, - "column" : 50, - "source_fragment" : "ingress_port_vlan_counter" - } + "runtime_data" : [], + "primitives" : [] }, { - "name" : "FabricIngress.filtering.fwd_classifier_counter", + "name" : "nop", "id" : 5, - "is_direct" : true, - "binding" : "FabricIngress.filtering.fwd_classifier", - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 85, - "column" : 50, - "source_fragment" : "fwd_classifier_counter" - } + "runtime_data" : [], + "primitives" : [] }, { - "name" : "FabricIngress.forwarding.bridging_counter", + "name" : "nop", "id" : 6, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.bridging", - "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 36, - "column" : 50, - "source_fragment" : "bridging_counter" - } + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 7, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 8, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.bng_ingress.upstream.punt_to_cpu", + "id" : 9, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "hexstr", + "value" : "0x00ff" + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 44, + "column" : 8, + "source_fragment" : "smeta.egress_spec = 255" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "mcast_grp"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "smeta.mcast_grp = 0" + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.bng_ingress.upstream.c_control" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_line_id34"] + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "c_control.count(fmeta.bng.line_id)" + } + } + ] + }, + { + "name" : "FabricIngress.bng_ingress.upstream.term_disabled", + "id" : 10, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_type33"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/../header.p4", + "line" : 184, + "column" : 36, + "source_fragment" : "2w0x0; ..." + } + }, + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 77, + "column" : 8, + "source_fragment" : "mark_to_drop(smeta)" + } + } + ] }, { - "name" : "FabricIngress.forwarding.mpls_counter", - "id" : 7, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.mpls", - "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 63, - "column" : 50, - "source_fragment" : "mpls_counter" - } + "name" : "FabricIngress.bng_ingress.upstream.term_enabled_v4", + "id" : 11, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "pppoe" + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 71, + "column" : 8, + "source_fragment" : "hdr.pppoe.setInvalid()" + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.bng_ingress.upstream.c_terminated" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_line_id34"] + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 72, + "column" : 8, + "source_fragment" : "c_terminated.count(fmeta.bng.line_id)" + } + } + ] }, { - "name" : "FabricIngress.acl.acl_counter", - "id" : 8, - "is_direct" : true, - "binding" : "FabricIngress.acl.acl", - "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 30, - "column" : 50, - "source_fragment" : "acl_counter" - } + "name" : "FabricIngress.bng_ingress.downstream.set_session", + "id" : 12, + "runtime_data" : [ + { + "name" : "pppoe_session_id", + "bitwidth" : 16 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_type33"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "include/control/../header.p4", + "line" : 186, + "column" : 39, + "source_fragment" : "2w0x2;; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_pppoe_session_id35"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 159, + "column" : 35, + "source_fragment" : "= pppoe_session_id; ..." + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.bng_ingress.downstream.c_line_rx" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_line_id34"] + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 160, + "column" : 8, + "source_fragment" : "c_line_rx.count(fmeta.bng.line_id)" + } + } + ] }, { - "name" : "FabricIngress.next.next_vlan_counter", - "id" : 9, - "is_direct" : true, - "binding" : "FabricIngress.next.next_vlan", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 67, - "column" : 50, - "source_fragment" : "next_vlan_counter" - } + "name" : "FabricIngress.bng_ingress.downstream.drop", + "id" : 13, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_type33"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "include/control/../header.p4", + "line" : 186, + "column" : 39, + "source_fragment" : "2w0x2;; ..." + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.bng_ingress.downstream.c_line_rx" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_line_id34"] + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 165, + "column" : 8, + "source_fragment" : "c_line_rx.count(fmeta.bng.line_id)" + } + }, + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 166, + "column" : 8, + "source_fragment" : "mark_to_drop(smeta)" + } + } + ] }, { - "name" : "FabricIngress.next.hashed_counter", - "id" : 10, - "is_direct" : true, - "binding" : "FabricIngress.next.hashed", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 184, - "column" : 50, - "source_fragment" : "hashed_counter" - } + "name" : "FabricIngress.bng_ingress.downstream.qos_prio", + "id" : 14, + "runtime_data" : [], + "primitives" : [] }, { - "name" : "FabricIngress.next.multicast_counter", - "id" : 11, - "is_direct" : true, - "binding" : "FabricIngress.next.multicast", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 228, - "column" : 50, - "source_fragment" : "multicast_counter" - } + "name" : "FabricIngress.bng_ingress.downstream.qos_besteff", + "id" : 15, + "runtime_data" : [], + "primitives" : [] }, { - "name" : "FabricIngress.port_counters_control.egress_port_counter", - "id" : 12, - "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 26, - "column" : 48, - "source_fragment" : "egress_port_counter" - }, - "size" : 511, - "is_direct" : false + "name" : "FabricIngress.bng_ingress.set_line", + "id" : 16, + "runtime_data" : [ + { + "name" : "line_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_line_id34"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 320, + "column" : 30, + "source_fragment" : "= line_id; ..." + } + } + ] }, { - "name" : "FabricIngress.port_counters_control.ingress_port_counter", - "id" : 13, - "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 27, - "column" : 48, - "source_fragment" : "ingress_port_counter" - }, - "size" : 511, - "is_direct" : false + "name" : "FabricIngress.filtering.deny", + "id" : 17, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_forwarding18"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 36, + "column" : 40, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next19"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 37, + "column" : 34, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type39"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 136, + "column" : 38, + "source_fragment" : "0x0; ..." + } + } + ] }, { - "name" : "FabricEgress.bng_egress.downstream.c_line_tx", - "id" : 14, - "source_info" : { - "filename" : "include/bng.p4", - "line" : 267, - "column" : 37, - "source_fragment" : "c_line_tx" - }, - "size" : 8192, - "is_direct" : false + "name" : "FabricIngress.filtering.permit", + "id" : 18, + "runtime_data" : [ + { + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type39"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 44, + "column" : 34, + "source_fragment" : "= port_type; ..." + } + } + ] }, { - "name" : "FabricEgress.egress_next.egress_vlan_counter", - "id" : 15, - "is_direct" : true, - "binding" : "FabricEgress.egress_next.egress_vlan", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 313, - "column" : 50, - "source_fragment" : "egress_vlan_counter" - } - } - ], - "register_arrays" : [], - "calculations" : [ - { - "name" : "calc", - "id" : 0, - "source_info" : { - "filename" : "include/checksum.p4", - "line" : 28, - "column" : 8, - "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ + "name" : "FabricIngress.filtering.permit_with_internal_vlan", + "id" : 19, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "version"] + "name" : "vlan_id", + "bitwidth" : 12 }, { - "type" : "field", - "value" : ["ipv4", "ihl"] - }, + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "dscp"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 49, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "ecn"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type39"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 44, + "column" : 34, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.set_forwarding_type", + "id" : 20, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "total_len"] - }, + "name" : "fwd_type", + "bitwidth" : 3 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "identification"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._fwd_type20"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 90, + "column" : 33, + "source_fragment" : "= fwd_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_bridging", + "id" : 21, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "flags"] - }, + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.pop_mpls_and_next", + "id" : 22, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "frag_offset"] - }, + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "ttl"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label16"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 66, + "column" : 35, + "source_fragment" : "= 0; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "protocol"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_routing_v4", + "id" : 23, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "src_addr"] - }, + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "dst_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } } ] }, { - "name" : "calc_0", - "id" : 1, - "source_info" : { - "filename" : "include/checksum.p4", - "line" : 57, - "column" : 8, - "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ - { - "type" : "field", - "value" : ["ipv4", "version"] - }, + "name" : "FabricIngress.forwarding.nop_routing_v4", + "id" : 24, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.pre_next.set_mpls_label", + "id" : 25, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "ihl"] - }, + "name" : "label", + "bitwidth" : 20 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "dscp"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label16"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 32, + "column" : 35, + "source_fragment" : "= label; ..." + } + } + ] + }, + { + "name" : "FabricIngress.pre_next.set_vlan", + "id" : 26, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "ecn"] - }, + "name" : "vlan_id", + "bitwidth" : 12 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "total_len"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 57, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.pre_next.set_double_vlan", + "id" : 27, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "identification"] + "name" : "outer_vlan_id", + "bitwidth" : 12 }, { - "type" : "field", - "value" : ["ipv4", "flags"] - }, + "name" : "inner_vlan_id", + "bitwidth" : 12 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "frag_offset"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 57, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "ttl"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._push_double_vlan12"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 64, + "column" : 41, + "source_fragment" : "= true; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "protocol"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_vlan_id13"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 65, + "column" : 38, + "source_fragment" : "= inner_vlan_id; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "src_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_s_tag37"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 67, + "column" : 34, + "source_fragment" : "= outer_vlan_id; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "dst_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_c_tag38"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 68, + "column" : 34, + "source_fragment" : "= inner_vlan_id; ..." + } } ] - } - ], - "learn_lists" : [], - "actions" : [ - { - "name" : "nop", - "id" : 0, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 1, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 2, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 3, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 4, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 5, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 6, - "runtime_data" : [], - "primitives" : [] }, { - "name" : "nop", - "id" : 7, - "runtime_data" : [], - "primitives" : [] + "name" : "FabricIngress.acl.set_next_id_acl", + "id" : 28, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 32, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] }, { - "name" : "FabricIngress.bng_ingress.upstream.punt_to_cpu", - "id" : 8, + "name" : "FabricIngress.acl.punt_to_cpu", + "id" : 29, "runtime_data" : [], "primitives" : [ { @@ -1370,10 +3438,10 @@ } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 44, + "filename" : "include/control/acl.p4", + "line" : 38, "column" : 8, - "source_fragment" : "smeta.egress_spec = 255" + "source_fragment" : "standard_metadata.egress_spec = 255" } }, { @@ -1381,148 +3449,234 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "mcast_grp"] + "value" : ["scalars", "userMetadata._skip_next19"] }, { - "type" : "hexstr", - "value" : "0x0000" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 47, - "column" : 8, - "source_fragment" : "smeta.mcast_grp = 0" + "filename" : "include/control/acl.p4", + "line" : 39, + "column" : 28, + "source_fragment" : "= true; ..." } - }, + } + ] + }, + { + "name" : "FabricIngress.acl.set_clone_session_id", + "id" : 30, + "runtime_data" : [ { - "op" : "count", + "name" : "clone_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "clone_ingress_pkt_to_egress", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.bng_ingress.upstream.c_control" + "type" : "runtime_data", + "value" : 0 }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id22"] + "type" : "hexstr", + "value" : "0x1" } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 48, + "filename" : "include/control/acl.p4", + "line" : 45, "column" : 8, - "source_fragment" : "c_control.count(fmeta.bng.line_id)" + "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})" } } ] }, { - "name" : "FabricIngress.bng_ingress.upstream.term_disabled", - "id" : 9, + "name" : "FabricIngress.acl.drop", + "id" : 31, "runtime_data" : [], "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 50, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_type21"] + "value" : ["scalars", "userMetadata._skip_next19"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/control/../header.p4", - "line" : 163, - "column" : 36, - "source_fragment" : "2w0x0; ..." + "filename" : "include/control/acl.p4", + "line" : 51, + "column" : 28, + "source_fragment" : "= true; ..." } - }, + } + ] + }, + { + "name" : "FabricIngress.acl.nop_acl", + "id" : 32, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.next.output_hashed", + "id" : 33, + "runtime_data" : [ { - "op" : "mark_to_drop", + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "standard_metadata" + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 77, - "column" : 8, - "source_fragment" : "mark_to_drop(smeta)" + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." } } ] }, { - "name" : "FabricIngress.bng_ingress.upstream.term_enabled_v4", - "id" : 10, - "runtime_data" : [], + "name" : "FabricIngress.next.routing_hashed", + "id" : 34, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + }, + { + "name" : "smac", + "bitwidth" : 48 + }, + { + "name" : "dmac", + "bitwidth" : 48 + } + ], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["eth_type", "value"] + "value" : ["ethernet", "src_addr"] }, { - "type" : "hexstr", - "value" : "0x0800" + "type" : "runtime_data", + "value" : 1 } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/control/next.p4", + "line" : 36, + "column" : 8, + "source_fragment" : "hdr.ethernet.src_addr = smac; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "pppoe" + "type" : "field", + "value" : ["ethernet", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 2 } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 71, + "filename" : "include/control/next.p4", + "line" : 41, "column" : 8, - "source_fragment" : "hdr.pppoe.setInvalid()" + "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." } }, { - "op" : "count", + "op" : "assign", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.bng_ingress.upstream.c_terminated" + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id22"] + "type" : "runtime_data", + "value" : 0 } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 72, - "column" : 8, - "source_fragment" : "c_terminated.count(fmeta.bng.line_id)" + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." } } ] }, { - "name" : "FabricIngress.bng_ingress.downstream.set_session", - "id" : 11, + "name" : "FabricIngress.next.set_mcast_group_id", + "id" : 35, "runtime_data" : [ { - "name" : "pppoe_session_id", + "name" : "group_id", "bitwidth" : 16 } ], @@ -1532,26 +3686,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_type21"] - }, - { - "type" : "hexstr", - "value" : "0x02" - } - ], - "source_info" : { - "filename" : "include/control/../header.p4", - "line" : 165, - "column" : 39, - "source_fragment" : "2w0x2;; ..." - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_pppoe_session_id23"] + "value" : ["standard_metadata", "mcast_grp"] }, { "type" : "runtime_data", @@ -1559,327 +3694,333 @@ } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 159, - "column" : 35, - "source_fragment" : "= pppoe_session_id; ..." + "filename" : "include/control/next.p4", + "line" : 166, + "column" : 8, + "source_fragment" : "standard_metadata.mcast_grp = group_id" } }, { - "op" : "count", + "op" : "assign", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.bng_ingress.downstream.c_line_rx" + "type" : "field", + "value" : ["scalars", "userMetadata._is_multicast22"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id22"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 160, - "column" : 8, - "source_fragment" : "c_line_rx.count(fmeta.bng.line_id)" + "filename" : "include/control/next.p4", + "line" : 167, + "column" : 37, + "source_fragment" : "= true; ..." } } ] }, { - "name" : "FabricIngress.bng_ingress.downstream.drop", - "id" : 12, - "runtime_data" : [], + "name" : "FabricIngress.slice_tc_classifier.set_slice_id_tc", + "id" : 36, + "runtime_data" : [ + { + "name" : "slice_id", + "bitwidth" : 4 + }, + { + "name" : "tc", + "bitwidth" : 2 + } + ], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_type21"] + "value" : ["scalars", "userMetadata._slice_id29"] }, { - "type" : "hexstr", - "value" : "0x02" + "type" : "runtime_data", + "value" : 0 } ], "source_info" : { - "filename" : "include/control/../header.p4", - "line" : 165, - "column" : 39, - "source_fragment" : "2w0x2;; ..." + "filename" : "include/control/slicing.p4", + "line" : 35, + "column" : 27, + "source_fragment" : "= slice_id; ..." } }, { - "op" : "count", + "op" : "assign", "parameters" : [ - { - "type" : "counter_array", - "value" : "FabricIngress.bng_ingress.downstream.c_line_rx" - }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id22"] - } - ], - "source_info" : { - "filename" : "include/bng.p4", - "line" : 165, - "column" : 8, - "source_fragment" : "c_line_rx.count(fmeta.bng.line_id)" - } - }, - { - "op" : "mark_to_drop", - "parameters" : [ + "value" : ["scalars", "userMetadata._tc31"] + }, { - "type" : "header", - "value" : "standard_metadata" + "type" : "runtime_data", + "value" : 1 } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 166, - "column" : 8, - "source_fragment" : "mark_to_drop(smeta)" + "filename" : "include/control/slicing.p4", + "line" : 36, + "column" : 21, + "source_fragment" : "= tc; ..." } } ] }, { - "name" : "FabricIngress.bng_ingress.downstream.qos_prio", - "id" : 13, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.bng_ingress.downstream.qos_besteff", - "id" : 14, + "name" : "FabricIngress.slice_tc_classifier.trust_dscp", + "id" : 37, "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.bng_ingress.set_line", - "id" : 15, - "runtime_data" : [ - { - "name" : "line_id", - "bitwidth" : 32 - } - ], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id22"] + "value" : ["scalars", "userMetadata._slice_id29"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x0f" + } + } + } } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 320, - "column" : 30, - "source_fragment" : "= line_id; ..." + "filename" : "include/control/slicing.p4", + "line" : 44, + "column" : 27, + "source_fragment" : "= hdr.ipv4.dscp[4 +2 -1:2]; ..." } - } - ] - }, - { - "name" : "FabricIngress.filtering.deny", - "id" : 16, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_forwarding10"] + "value" : ["scalars", "userMetadata._tc31"] }, { "type" : "expression", "value" : { "type" : "expression", "value" : { - "op" : "b2d", - "left" : null, + "op" : "&", + "left" : { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0x03" } } } } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 36, - "column" : 40, - "source_fragment" : "= true; ..." + "filename" : "include/control/slicing.p4", + "line" : 45, + "column" : 21, + "source_fragment" : "= hdr.ipv4.dscp[2 -1:0]; ..." } - }, + } + ] + }, + { + "name" : "FabricIngress.qos.set_queue", + "id" : 38, + "runtime_data" : [ + { + "name" : "qid", + "bitwidth" : 5 + } + ], + "primitives" : [] + }, + { + "name" : "FabricIngress.qos.meter_drop", + "id" : 39, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 89, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + } + ] + }, + { + "name" : "lookup_md_init37", + "id" : 40, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next11"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["inner_tcp", "sport"] } ], "source_info" : { - "filename" : "include/control/filtering.p4", + "filename" : "include/control/lookup_md_init.p4", "line" : 37, - "column" : 34, - "source_fragment" : "= true; ..." + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." } - } - ] - }, - { - "name" : "FabricIngress.filtering.permit", - "id" : 17, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.filtering.permit_with_internal_vlan", - "id" : 18, - "runtime_data" : [ - { - "name" : "vlan_id", - "bitwidth" : 12 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_tcp", "dport"] } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 47, + "filename" : "include/control/lookup_md_init.p4", + "line" : 38, "column" : 32, - "source_fragment" : "= vlan_id; ..." + "source_fragment" : "= hdr.inner_tcp.dport; ..." } } ] }, { - "name" : "FabricIngress.filtering.set_forwarding_type", - "id" : 19, - "runtime_data" : [ - { - "name" : "fwd_type", - "bitwidth" : 3 - } - ], + "name" : "lookup_md_init40", + "id" : 41, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type12"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_udp", "sport"] } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 88, - "column" : 33, - "source_fragment" : "= fwd_type; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id_bridging", - "id" : 20, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id13"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_udp", "dport"] } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, + "filename" : "include/control/lookup_md_init.p4", + "line" : 41, "column" : 32, - "source_fragment" : "= next_id; ..." + "source_fragment" : "= hdr.inner_udp.dport; ..." } } ] }, { - "name" : "FabricIngress.forwarding.pop_mpls_and_next", - "id" : 21, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], + "name" : "lookup_md_init43", + "id" : 42, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label8"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "hexstr", - "value" : "0x000000" + "type" : "field", + "value" : ["inner_icmp", "icmp_type"] } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 66, - "column" : 35, - "source_fragment" : "= 0; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 43, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." } }, { @@ -1887,112 +4028,92 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id13"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_icmp", "icmp_code"] } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 44, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_code; ..." } } ] }, { - "name" : "FabricIngress.forwarding.set_next_id_routing_v4", - "id" : 22, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], + "name" : "lookup_md_init32", + "id" : 43, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id13"] + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 32, + "column" : 27, + "source_fragment" : "= true; ..." } - } - ] - }, - { - "name" : "FabricIngress.forwarding.nop_routing_v4", - "id" : 23, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.acl.set_next_id_acl", - "id" : 24, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id13"] + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/control/acl.p4", + "filename" : "include/control/lookup_md_init.p4", "line" : 33, - "column" : 32, - "source_fragment" : "= next_id; ..." + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." } - } - ] - }, - { - "name" : "FabricIngress.acl.punt_to_cpu", - "id" : 25, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "hexstr", - "value" : "0x00ff" + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 39, - "column" : 8, - "source_fragment" : "standard_metadata.egress_spec = 255" + "filename" : "include/control/lookup_md_init.p4", + "line" : 34, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." } }, { @@ -2000,81 +4121,89 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next11"] + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["inner_ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 40, - "column" : 34, - "source_fragment" : "= true; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 35, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." } } ] }, { - "name" : "FabricIngress.acl.set_clone_session_id", - "id" : 26, - "runtime_data" : [ - { - "name" : "clone_id", - "bitwidth" : 32 - } - ], + "name" : "lookup_md_init52", + "id" : 44, + "runtime_data" : [], "primitives" : [ { - "op" : "clone_ingress_pkt_to_egress", + "op" : "assign", "parameters" : [ { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "hexstr", - "value" : "0x1" + "type" : "field", + "value" : ["tcp", "sport"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 46, - "column" : 8, - "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})" + "filename" : "include/control/lookup_md_init.p4", + "line" : 52, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] + }, + { + "type" : "field", + "value" : ["tcp", "dport"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 53, + "column" : 32, + "source_fragment" : "= hdr.tcp.dport; ..." } } ] }, { - "name" : "FabricIngress.acl.drop", - "id" : 27, + "name" : "lookup_md_init55", + "id" : 45, "runtime_data" : [], "primitives" : [ { - "op" : "mark_to_drop", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "standard_metadata" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] + }, + { + "type" : "field", + "value" : ["udp", "sport"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 51, - "column" : 8, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/control/lookup_md_init.p4", + "line" : 55, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." } }, { @@ -2082,108 +4211,78 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next11"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["udp", "dport"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 52, - "column" : 34, - "source_fragment" : "= true; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 56, + "column" : 32, + "source_fragment" : "= hdr.udp.dport; ..." } } ] }, { - "name" : "FabricIngress.acl.nop_acl", - "id" : 28, + "name" : "lookup_md_init58", + "id" : 46, "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.next.set_vlan", - "id" : 29, - "runtime_data" : [ - { - "name" : "vlan_id", - "bitwidth" : 12 - } - ], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["icmp", "icmp_type"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 70, - "column" : 32, - "source_fragment" : "= vlan_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 58, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.set_double_vlan", - "id" : 30, - "runtime_data" : [ - { - "name" : "outer_vlan_id", - "bitwidth" : 12 }, - { - "name" : "inner_vlan_id", - "bitwidth" : 12 - } - ], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["icmp", "icmp_code"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 70, - "column" : 32, - "source_fragment" : "= vlan_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 59, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_code; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init47", + "id" : 47, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._push_double_vlan4"] + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] }, { "type" : "expression", @@ -2201,9 +4300,9 @@ } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 77, - "column" : 41, + "filename" : "include/control/lookup_md_init.p4", + "line" : 47, + "column" : 27, "source_fragment" : "= true; ..." } }, @@ -2212,18 +4311,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_id5"] + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "field", + "value" : ["ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 78, - "column" : 38, - "source_fragment" : "= inner_vlan_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 48, + "column" : 28, + "source_fragment" : "= hdr.ipv4.src_addr; ..." } }, { @@ -2231,18 +4330,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_s_tag25"] + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 80, - "column" : 34, - "source_fragment" : "= outer_vlan_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 49, + "column" : 28, + "source_fragment" : "= hdr.ipv4.dst_addr; ..." } }, { @@ -2250,107 +4349,54 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_c_tag26"] + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] }, - { - "type" : "runtime_data", - "value" : 1 - } - ], - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 81, - "column" : 34, - "source_fragment" : "= inner_vlan_id; ..." - } - } - ] - }, - { - "name" : "FabricIngress.next.output_hashed", - "id" : 31, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - } - ], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] - }, - { - "type" : "runtime_data", - "value" : 0 + "value" : ["ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 50, + "column" : 28, + "source_fragment" : "= hdr.ipv4.protocol; ..." } } ] }, { - "name" : "FabricIngress.next.routing_hashed", - "id" : 32, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - }, - { - "name" : "smac", - "bitwidth" : 48 - }, - { - "name" : "dmac", - "bitwidth" : 48 - } - ], + "name" : "lookup_md_init23", + "id" : 48, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["ethernet", "src_addr"] - }, - { - "type" : "runtime_data", - "value" : 1 - } - ], - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["ethernet", "dst_addr"] + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] }, { - "type" : "runtime_data", - "value" : 2 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 23, + "column" : 23, + "source_fragment" : "= false; ..." } }, { @@ -2358,61 +4404,37 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 24, + "column" : 24, + "source_fragment" : "= 0; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.mpls_routing_hashed", - "id" : 33, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - }, - { - "name" : "smac", - "bitwidth" : 48 - }, - { - "name" : "dmac", - "bitwidth" : 48 }, - { - "name" : "label", - "bitwidth" : 20 - } - ], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label8"] + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "runtime_data", - "value" : 3 + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 46, - "column" : 35, - "source_fragment" : "= label; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 25, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -2420,18 +4442,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "src_addr"] + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 26, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -2439,18 +4461,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "dst_addr"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "runtime_data", - "value" : 2 + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 27, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -2458,49 +4480,37 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 28, + "column" : 24, + "source_fragment" : "= 0; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.set_mcast_group_id", - "id" : 34, - "runtime_data" : [ - { - "name" : "group_id", - "bitwidth" : 16 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "mcast_grp"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 231, - "column" : 8, - "source_fragment" : "standard_metadata.mcast_grp = group_id" + "filename" : "include/control/lookup_md_init.p4", + "line" : 29, + "column" : 25, + "source_fragment" : "= 0; ..." } }, { @@ -2508,35 +4518,25 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_multicast14"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 232, - "column" : 37, - "source_fragment" : "= true; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 30, + "column" : 25, + "source_fragment" : "= 0; ..." } } ] }, { - "name" : "act", - "id" : 35, + "name" : "packetio25", + "id" : 49, "runtime_data" : [], "primitives" : [ { @@ -2578,7 +4578,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_controller_packet_out15"] + "value" : ["scalars", "userMetadata._is_controller_packet_out23"] }, { "type" : "expression", @@ -2615,8 +4615,8 @@ ] }, { - "name" : "act_0", - "id" : 36, + "name" : "filtering113", + "id" : 50, "runtime_data" : [], "primitives" : [ { @@ -2624,7 +4624,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._vlan_id9"] }, { "type" : "field", @@ -2633,7 +4633,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 111, + "line" : 113, "column" : 36, "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." } @@ -2643,7 +4643,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_pri2"] + "value" : ["scalars", "userMetadata._vlan_pri10"] }, { "type" : "field", @@ -2652,7 +4652,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 112, + "line" : 114, "column" : 37, "source_fragment" : "= hdr.vlan_tag.pri; ..." } @@ -2662,7 +4662,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_cfi3"] + "value" : ["scalars", "userMetadata._vlan_cfi11"] }, { "type" : "field", @@ -2671,7 +4671,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 113, + "line" : 115, "column" : 37, "source_fragment" : "= hdr.vlan_tag.cfi; ..." } @@ -2679,8 +4679,8 @@ ] }, { - "name" : "act_1", - "id" : 37, + "name" : "filtering119", + "id" : 51, "runtime_data" : [], "primitives" : [ { @@ -2688,7 +4688,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_id5"] + "value" : ["scalars", "userMetadata._inner_vlan_id13"] }, { "type" : "field", @@ -2697,7 +4697,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 117, + "line" : 119, "column" : 42, "source_fragment" : "= hdr.inner_vlan_tag.vlan_id; ..." } @@ -2707,7 +4707,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_pri6"] + "value" : ["scalars", "userMetadata._inner_vlan_pri14"] }, { "type" : "field", @@ -2716,7 +4716,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 118, + "line" : 120, "column" : 43, "source_fragment" : "= hdr.inner_vlan_tag.pri; ..." } @@ -2726,7 +4726,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_cfi7"] + "value" : ["scalars", "userMetadata._inner_vlan_cfi15"] }, { "type" : "field", @@ -2735,7 +4735,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 119, + "line" : 121, "column" : 43, "source_fragment" : "= hdr.inner_vlan_tag.cfi; ..." } @@ -2743,8 +4743,8 @@ ] }, { - "name" : "act_2", - "id" : 38, + "name" : "filtering129", + "id" : 52, "runtime_data" : [], "primitives" : [ { @@ -2752,7 +4752,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl9"] + "value" : ["scalars", "userMetadata._mpls_ttl17"] }, { "type" : "hexstr", @@ -2761,7 +4761,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 127, + "line" : 129, "column" : 37, "source_fragment" : "= DEFAULT_MPLS_TTL + 1; ..." } @@ -2769,8 +4769,8 @@ ] }, { - "name" : "act_3", - "id" : 39, + "name" : "port_counter31", + "id" : 53, "runtime_data" : [], "primitives" : [ { @@ -2778,7 +4778,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp"] + "value" : ["scalars", "tmp_8"] }, { "type" : "expression", @@ -2814,7 +4814,7 @@ }, { "type" : "field", - "value" : ["scalars", "tmp"] + "value" : ["scalars", "tmp_8"] } ], "source_info" : { @@ -2827,8 +4827,8 @@ ] }, { - "name" : "act_4", - "id" : 40, + "name" : "port_counter34", + "id" : 54, "runtime_data" : [], "primitives" : [ { @@ -2836,7 +4836,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_3"] + "value" : ["scalars", "tmp_9"] }, { "type" : "expression", @@ -2872,7 +4872,7 @@ }, { "type" : "field", - "value" : ["scalars", "tmp_3"] + "value" : ["scalars", "tmp_9"] } ], "source_info" : { @@ -2885,8 +4885,8 @@ ] }, { - "name" : "act_5", - "id" : 41, + "name" : "bng126", + "id" : 55, "runtime_data" : [], "primitives" : [ { @@ -2894,7 +4894,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "bng_ingress_upstream_tmp"] + "value" : ["scalars", "bng_ingress_upstream_hasReturned"] }, { "type" : "expression", @@ -2910,43 +4910,19 @@ } } } - ] - } - ] - }, - { - "name" : "act_6", - "id" : 42, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "bng_ingress_upstream_tmp"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } - } - ] + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 126, + "column" : 12, + "source_fragment" : "return" + } } ] }, { - "name" : "act_7", - "id" : 43, + "name" : "bng342", + "id" : 56, "runtime_data" : [], "primitives" : [ { @@ -2954,7 +4930,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_type21"] + "value" : ["scalars", "userMetadata._bng_type33"] }, { "type" : "hexstr", @@ -2963,7 +4939,7 @@ ], "source_info" : { "filename" : "include/control/../header.p4", - "line" : 164, + "line" : 185, "column" : 37, "source_fragment" : "2w0x1; ..." } @@ -2994,100 +4970,94 @@ ] }, { - "name" : "act_8", - "id" : 44, + "name" : "bng131", + "id" : 57, "runtime_data" : [], "primitives" : [ { - "op" : "assign", + "op" : "count", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "bng_ingress_upstream_hasReturned"] + "type" : "counter_array", + "value" : "FabricIngress.bng_ingress.upstream.c_dropped" }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._bng_line_id34"] } ], "source_info" : { "filename" : "include/bng.p4", - "line" : 126, - "column" : 12, - "source_fragment" : "return" + "line" : 131, + "column" : 20, + "source_fragment" : "c_dropped.count(fmeta.bng.line_id)" } } ] }, { - "name" : "act_9", - "id" : 45, + "name" : "bng238", + "id" : 58, "runtime_data" : [], "primitives" : [ { - "op" : "count", + "op" : "execute_meter", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.bng_ingress.upstream.c_dropped" + "type" : "meter_array", + "value" : "FabricIngress.bng_ingress.downstream.m_prio" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_line_id34"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id22"] + "value" : ["scalars", "userMetadata._bng_ds_meter_result36"] } ], "source_info" : { "filename" : "include/bng.p4", - "line" : 131, - "column" : 20, - "source_fragment" : "c_dropped.count(fmeta.bng.line_id)" + "line" : 238, + "column" : 24, + "source_fragment" : "m_prio.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)" } } ] }, { - "name" : "act_10", - "id" : 46, + "name" : "bng241", + "id" : 59, "runtime_data" : [], "primitives" : [ { - "op" : "assign", + "op" : "execute_meter", "parameters" : [ + { + "type" : "meter_array", + "value" : "FabricIngress.bng_ingress.downstream.m_besteff" + }, { "type" : "field", - "value" : ["scalars", "bng_ingress_downstream_tmp"] + "value" : ["scalars", "userMetadata._bng_line_id34"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._bng_ds_meter_result36"] } - ] + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 241, + "column" : 24, + "source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)" + } } ] }, { - "name" : "act_11", - "id" : 47, + "name" : "slicing114", + "id" : 60, "runtime_data" : [], "primitives" : [ { @@ -3095,95 +5065,209 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "bng_ingress_downstream_tmp"] + "value" : ["scalars", "tmp_10"] }, { "type" : "expression", "value" : { "type" : "expression", "value" : { - "op" : "b2d", - "left" : null, + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id29"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._tc31"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + }, "right" : { - "type" : "bool", - "value" : false + "type" : "hexstr", + "value" : "0xffffffff" } } } } - ] - } - ] - }, - { - "name" : "act_12", - "id" : 48, - "runtime_data" : [], - "primitives" : [ + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 37, + "source_fragment" : "(bit<32>) slice_tc" + } + }, { "op" : "execute_meter", "parameters" : [ { "type" : "meter_array", - "value" : "FabricIngress.bng_ingress.downstream.m_prio" + "value" : "FabricIngress.qos.slice_tc_meter" }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id22"] + "value" : ["scalars", "tmp_10"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_ds_meter_result24"] + "value" : ["scalars", "userMetadata._packet_color30"] } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 238, - "column" : 24, - "source_fragment" : "m_prio.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)" + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 8, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) slice_tc, fabric_md.packet_color)" } - } - ] - }, - { - "name" : "act_13", - "id" : 49, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "execute_meter", + "op" : "assign", "parameters" : [ - { - "type" : "meter_array", - "value" : "FabricIngress.bng_ingress.downstream.m_besteff" - }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id22"] + "value" : ["scalars", "userMetadata._dscp32"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_ds_meter_result24"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id29"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._tc31"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 241, - "column" : 24, - "source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)" + "filename" : "include/control/slicing.p4", + "line" : 110, + "column" : 26, + "source_fragment" : "fabric_md.slice_id++fabric_md.tc; ..." } } ] }, { "name" : "nop", - "id" : 50, + "id" : 61, "runtime_data" : [], "primitives" : [] }, { "name" : "FabricEgress.bng_egress.downstream.encap_v4", - "id" : 51, + "id" : 62, "runtime_data" : [], "primitives" : [ { @@ -3200,7 +5284,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 132, + "line" : 153, "column" : 33, "source_fragment" : "0x8864; ..." } @@ -3286,7 +5370,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_pppoe_session_id23"] + "value" : ["scalars", "userMetadata._bng_pppoe_session_id35"] } ], "source_info" : { @@ -3305,7 +5389,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id22"] + "value" : ["scalars", "userMetadata._bng_line_id34"] } ], "source_info" : { @@ -3371,7 +5455,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 134, + "line" : 155, "column" : 35, "source_fragment" : "0x0021; ..." } @@ -3380,7 +5464,7 @@ }, { "name" : "FabricEgress.egress_next.pop_mpls_if_present", - "id" : 52, + "id" : 63, "runtime_data" : [], "primitives" : [ { @@ -3393,7 +5477,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 270, + "line" : 204, "column" : 8, "source_fragment" : "hdr.mpls.setInvalid()" } @@ -3407,12 +5491,12 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 272, + "line" : 206, "column" : 8, "source_fragment" : "hdr.eth_type.value = fabric_metadata.ip_eth_type; ..." } @@ -3421,7 +5505,7 @@ }, { "name" : "FabricEgress.egress_next.set_mpls", - "id" : 53, + "id" : 64, "runtime_data" : [], "primitives" : [ { @@ -3434,7 +5518,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 277, + "line" : 211, "column" : 8, "source_fragment" : "hdr.mpls.setValid()" } @@ -3448,12 +5532,12 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label8"] + "value" : ["scalars", "userMetadata._mpls_label16"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 278, + "line" : 212, "column" : 8, "source_fragment" : "hdr.mpls.label = fabric_metadata.mpls_label; ..." } @@ -3472,7 +5556,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 279, + "line" : 213, "column" : 8, "source_fragment" : "hdr.mpls.tc = 3w0" } @@ -3491,7 +5575,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 280, + "line" : 214, "column" : 8, "source_fragment" : "hdr.mpls.bos = 1w1" } @@ -3505,12 +5589,12 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl9"] + "value" : ["scalars", "userMetadata._mpls_ttl17"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 281, + "line" : 215, "column" : 8, "source_fragment" : "hdr.mpls.ttl = fabric_metadata.mpls_ttl; // Decrement after push. ..." } @@ -3529,7 +5613,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 126, + "line" : 147, "column" : 31, "source_fragment" : "0x8847; ..." } @@ -3537,8 +5621,8 @@ ] }, { - "name" : "FabricEgress.egress_next.push_vlan", - "id" : 54, + "name" : "FabricEgress.egress_next.push_outer_vlan", + "id" : 65, "runtime_data" : [], "primitives" : [ { @@ -3551,7 +5635,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 289, + "line" : 223, "column" : 8, "source_fragment" : "hdr.vlan_tag.setValid()" } @@ -3565,12 +5649,12 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_cfi3"] + "value" : ["scalars", "userMetadata._vlan_cfi11"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 290, + "line" : 224, "column" : 8, "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi; ..." } @@ -3584,12 +5668,12 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_pri2"] + "value" : ["scalars", "userMetadata._vlan_pri10"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 291, + "line" : 225, "column" : 8, "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri; ..." } @@ -3608,7 +5692,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 125, + "line" : 146, "column" : 31, "source_fragment" : "0x8100; ..." } @@ -3622,12 +5706,12 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._vlan_id9"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 293, + "line" : 227, "column" : 8, "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id; ..." } @@ -3635,8 +5719,8 @@ ] }, { - "name" : "FabricEgress.egress_next.push_vlan", - "id" : 55, + "name" : "FabricEgress.egress_next.push_inner_vlan", + "id" : 66, "runtime_data" : [], "primitives" : [ { @@ -3644,14 +5728,14 @@ "parameters" : [ { "type" : "header", - "value" : "vlan_tag" + "value" : "inner_vlan_tag" } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 289, + "line" : 234, "column" : 8, - "source_fragment" : "hdr.vlan_tag.setValid()" + "source_fragment" : "hdr.inner_vlan_tag.setValid()" } }, { @@ -3659,18 +5743,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "cfi"] + "value" : ["inner_vlan_tag", "cfi"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_cfi3"] + "value" : ["scalars", "userMetadata._inner_vlan_cfi15"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 290, + "line" : 235, "column" : 8, - "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi; ..." + "source_fragment" : "hdr.inner_vlan_tag.cfi = fabric_metadata.inner_vlan_cfi; ..." } }, { @@ -3678,18 +5762,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "pri"] + "value" : ["inner_vlan_tag", "pri"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_pri2"] + "value" : ["scalars", "userMetadata._inner_vlan_pri14"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 291, + "line" : 236, "column" : 8, - "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri; ..." + "source_fragment" : "hdr.inner_vlan_tag.pri = fabric_metadata.inner_vlan_pri; ..." } }, { @@ -3697,7 +5781,26 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "eth_type"] + "value" : ["inner_vlan_tag", "vlan_id"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_vlan_id13"] + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 237, + "column" : 8, + "source_fragment" : "hdr.inner_vlan_tag.vlan_id = fabric_metadata.inner_vlan_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["inner_vlan_tag", "eth_type"] }, { "type" : "hexstr", @@ -3706,7 +5809,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 125, + "line" : 146, "column" : 31, "source_fragment" : "0x8100; ..." } @@ -3716,25 +5819,25 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "vlan_id"] + "value" : ["vlan_tag", "eth_type"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "type" : "hexstr", + "value" : "0x8100" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 293, - "column" : 8, - "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id; ..." + "filename" : "include/control/../define.p4", + "line" : 146, + "column" : 31, + "source_fragment" : "0x8100; ..." } } ] }, { - "name" : "FabricEgress.egress_next.push_inner_vlan", - "id" : 56, + "name" : "FabricEgress.egress_next.push_vlan", + "id" : 67, "runtime_data" : [], "primitives" : [ { @@ -3742,33 +5845,14 @@ "parameters" : [ { "type" : "header", - "value" : "inner_vlan_tag" - } - ], - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 300, - "column" : 8, - "source_fragment" : "hdr.inner_vlan_tag.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["inner_vlan_tag", "cfi"] - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_cfi7"] + "value" : "vlan_tag" } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 301, + "line" : 223, "column" : 8, - "source_fragment" : "hdr.inner_vlan_tag.cfi = fabric_metadata.inner_vlan_cfi; ..." + "source_fragment" : "hdr.vlan_tag.setValid()" } }, { @@ -3776,18 +5860,18 @@ "parameters" : [ { "type" : "field", - "value" : ["inner_vlan_tag", "pri"] + "value" : ["vlan_tag", "cfi"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_pri6"] + "value" : ["scalars", "userMetadata._vlan_cfi11"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 302, + "line" : 224, "column" : 8, - "source_fragment" : "hdr.inner_vlan_tag.pri = fabric_metadata.inner_vlan_pri; ..." + "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi; ..." } }, { @@ -3795,18 +5879,18 @@ "parameters" : [ { "type" : "field", - "value" : ["inner_vlan_tag", "vlan_id"] + "value" : ["vlan_tag", "pri"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_id5"] + "value" : ["scalars", "userMetadata._vlan_pri10"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 303, + "line" : 225, "column" : 8, - "source_fragment" : "hdr.inner_vlan_tag.vlan_id = fabric_metadata.inner_vlan_id; ..." + "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri; ..." } }, { @@ -3814,7 +5898,7 @@ "parameters" : [ { "type" : "field", - "value" : ["inner_vlan_tag", "eth_type"] + "value" : ["vlan_tag", "eth_type"] }, { "type" : "hexstr", @@ -3823,7 +5907,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 125, + "line" : 146, "column" : 31, "source_fragment" : "0x8100; ..." } @@ -3833,25 +5917,25 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "eth_type"] + "value" : ["vlan_tag", "vlan_id"] }, { - "type" : "hexstr", - "value" : "0x8100" + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 125, - "column" : 31, - "source_fragment" : "0x8100; ..." + "filename" : "include/control/next.p4", + "line" : 227, + "column" : 8, + "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id; ..." } } ] }, { "name" : "FabricEgress.egress_next.pop_vlan", - "id" : 57, + "id" : 68, "runtime_data" : [], "primitives" : [ { @@ -3864,7 +5948,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 316, + "line" : 256, "column" : 8, "source_fragment" : "hdr.vlan_tag.setInvalid()" } @@ -3872,8 +5956,62 @@ ] }, { - "name" : "act_14", - "id" : 58, + "name" : "FabricEgress.egress_next.drop", + "id" : 69, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 261, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + } + ] + }, + { + "name" : "FabricEgress.dscp_rewriter.rewrite", + "id" : 70, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.dscp_rewriter.clear", + "id" : 71, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 135, + "column" : 8, + "source_fragment" : "tmp_dscp = 0" + } + } + ] + }, + { + "name" : "packetio41", + "id" : 72, "runtime_data" : [], "primitives" : [ { @@ -3889,8 +6027,8 @@ ] }, { - "name" : "act_15", - "id" : 59, + "name" : "packetio44", + "id" : 73, "runtime_data" : [], "primitives" : [ { @@ -3940,8 +6078,8 @@ ] }, { - "name" : "act_16", - "id" : 60, + "name" : "next283", + "id" : 74, "runtime_data" : [], "primitives" : [ { @@ -3954,7 +6092,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 337, + "line" : 283, "column" : 12, "source_fragment" : "mark_to_drop(standard_metadata)" } @@ -3962,68 +6100,8 @@ ] }, { - "name" : "act_17", - "id" : 61, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } - } - ] - } - ] - }, - { - "name" : "act_18", - "id" : 62, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } - } - ] - } - ] - }, - { - "name" : "act_19", - "id" : 63, + "name" : "next299", + "id" : 75, "runtime_data" : [], "primitives" : [ { @@ -4036,7 +6114,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 353, + "line" : 299, "column" : 12, "source_fragment" : "hdr.inner_vlan_tag.setInvalid()" } @@ -4044,8 +6122,8 @@ ] }, { - "name" : "act_20", - "id" : 64, + "name" : "next310", + "id" : 76, "runtime_data" : [], "primitives" : [ { @@ -4058,7 +6136,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 370, + "line" : 310, "column" : 35, "source_fragment" : "mark_to_drop(standard_metadata)" } @@ -4066,8 +6144,8 @@ ] }, { - "name" : "act_21", - "id" : 65, + "name" : "next309", + "id" : 77, "runtime_data" : [], "primitives" : [ { @@ -4107,7 +6185,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 369, + "line" : 309, "column" : 12, "source_fragment" : "hdr.mpls.ttl = hdr.mpls.ttl - 1" } @@ -4115,8 +6193,8 @@ ] }, { - "name" : "act_22", - "id" : 66, + "name" : "next314", + "id" : 78, "runtime_data" : [], "primitives" : [ { @@ -4129,7 +6207,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 374, + "line" : 314, "column" : 39, "source_fragment" : "mark_to_drop(standard_metadata)" } @@ -4137,8 +6215,8 @@ ] }, { - "name" : "act_23", - "id" : 67, + "name" : "next313", + "id" : 79, "runtime_data" : [], "primitives" : [ { @@ -4177,10 +6255,62 @@ } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 373, - "column" : 16, - "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" + "filename" : "include/control/next.p4", + "line" : 313, + "column" : 16, + "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" + } + } + ] + }, + { + "name" : "slicing159", + "id" : 80, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["inner_ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 159, + "column" : 16, + "source_fragment" : "hdr.inner_ipv4.dscp = tmp_dscp" + } + } + ] + }, + { + "name" : "slicing126", + "id" : 81, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._dscp32"] + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 126, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.dscp; ..." } } ] @@ -4192,15 +6322,276 @@ "id" : 0, "source_info" : { "filename" : "fabric.p4", - "line" : 46, + "line" : 49, "column" : 8, "source_fragment" : "FabricIngress" }, - "init_table" : "node_2", + "init_table" : "tbl_lookup_md_init23", "tables" : [ { - "name" : "tbl_act", + "name" : "tbl_lookup_md_init23", "id" : 0, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 23, + "column" : 23, + "source_fragment" : "= false; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [48], + "actions" : ["lookup_md_init23"], + "base_default_next" : "node_3", + "next_tables" : { + "lookup_md_init23" : "node_3" + }, + "default_entry" : { + "action_id" : 48, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init32", + "id" : 1, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 32, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [43], + "actions" : ["lookup_md_init32"], + "base_default_next" : "node_5", + "next_tables" : { + "lookup_md_init32" : "node_5" + }, + "default_entry" : { + "action_id" : 43, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init37", + "id" : 2, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 37, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [40], + "actions" : ["lookup_md_init37"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init37" : "node_19" + }, + "default_entry" : { + "action_id" : 40, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init40", + "id" : 3, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [41], + "actions" : ["lookup_md_init40"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init40" : "node_19" + }, + "default_entry" : { + "action_id" : 41, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init43", + "id" : 4, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 43, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [42], + "actions" : ["lookup_md_init43"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init43" : "node_19" + }, + "default_entry" : { + "action_id" : 42, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init47", + "id" : 5, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 47, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [47], + "actions" : ["lookup_md_init47"], + "base_default_next" : "node_13", + "next_tables" : { + "lookup_md_init47" : "node_13" + }, + "default_entry" : { + "action_id" : 47, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init52", + "id" : 6, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 52, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [44], + "actions" : ["lookup_md_init52"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init52" : "node_19" + }, + "default_entry" : { + "action_id" : 44, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init55", + "id" : 7, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 55, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [45], + "actions" : ["lookup_md_init55"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init55" : "node_19" + }, + "default_entry" : { + "action_id" : 45, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init58", + "id" : 8, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 58, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [46], + "actions" : ["lookup_md_init58"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init58" : "node_19" + }, + "default_entry" : { + "action_id" : 46, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_packetio25", + "id" : 9, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 25, @@ -4210,29 +6601,96 @@ "key" : [], "match_type" : "exact", "type" : "simple", - "max_size" : 1024, - "with_counters" : false, + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [49], + "actions" : ["packetio25"], + "base_default_next" : "FabricIngress.slice_tc_classifier.classifier", + "next_tables" : { + "packetio25" : "FabricIngress.slice_tc_classifier.classifier" + }, + "default_entry" : { + "action_id" : 49, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.slice_tc_classifier.classifier", + "id" : 10, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 49, + "column" : 10, + "source_fragment" : "classifier" + }, + "key" : [ + { + "match_type" : "ternary", + "name" : "ig_port", + "target" : ["standard_metadata", "ingress_port"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._lkp_ipv4_src1"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._lkp_ipv4_dst2"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._lkp_ip_proto3"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._lkp_l4_sport4"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._lkp_l4_dport5"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 512, + "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [35], - "actions" : ["act"], - "base_default_next" : "node_4", + "action_ids" : [36, 37], + "actions" : ["FabricIngress.slice_tc_classifier.set_slice_id_tc", "FabricIngress.slice_tc_classifier.trust_dscp"], + "base_default_next" : "node_22", "next_tables" : { - "act" : "node_4" + "FabricIngress.slice_tc_classifier.set_slice_id_tc" : "node_22", + "FabricIngress.slice_tc_classifier.trust_dscp" : "node_22" }, "default_entry" : { - "action_id" : 35, + "action_id" : 36, "action_const" : true, - "action_data" : [], + "action_data" : ["0x0", "0x0"], "action_entry_const" : true } }, { - "name" : "tbl_act_0", - "id" : 1, + "name" : "tbl_filtering113", + "id" : 11, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 111, + "line" : 113, "column" : 36, "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." }, @@ -4243,25 +6701,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [36], - "actions" : ["act_0"], - "base_default_next" : "node_6", + "action_ids" : [50], + "actions" : ["filtering113"], + "base_default_next" : "node_24", "next_tables" : { - "act_0" : "node_6" + "filtering113" : "node_24" }, "default_entry" : { - "action_id" : 36, + "action_id" : 50, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_1", - "id" : 2, + "name" : "tbl_filtering119", + "id" : 12, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 117, + "line" : 119, "column" : 42, "source_fragment" : "= hdr.inner_vlan_tag.vlan_id; ..." }, @@ -4272,25 +6730,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [37], - "actions" : ["act_1"], - "base_default_next" : "node_8", + "action_ids" : [51], + "actions" : ["filtering119"], + "base_default_next" : "node_26", "next_tables" : { - "act_1" : "node_8" + "filtering119" : "node_26" }, "default_entry" : { - "action_id" : 37, + "action_id" : 51, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_2", - "id" : 3, + "name" : "tbl_filtering129", + "id" : 13, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 127, + "line" : 129, "column" : 37, "source_fragment" : "=" }, @@ -4301,14 +6759,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [38], - "actions" : ["act_2"], + "action_ids" : [52], + "actions" : ["filtering129"], "base_default_next" : "FabricIngress.filtering.ingress_port_vlan", "next_tables" : { - "act_2" : "FabricIngress.filtering.ingress_port_vlan" + "filtering129" : "FabricIngress.filtering.ingress_port_vlan" }, "default_entry" : { - "action_id" : 38, + "action_id" : 52, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4316,10 +6774,10 @@ }, { "name" : "FabricIngress.filtering.ingress_port_vlan", - "id" : 4, + "id" : 14, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 53, + "line" : 55, "column" : 10, "source_fragment" : "ingress_port_vlan" }, @@ -4355,7 +6813,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [16, 17, 18], + "action_ids" : [17, 18, 19], "actions" : ["FabricIngress.filtering.deny", "FabricIngress.filtering.permit", "FabricIngress.filtering.permit_with_internal_vlan"], "base_default_next" : "FabricIngress.filtering.fwd_classifier", "next_tables" : { @@ -4364,7 +6822,7 @@ "FabricIngress.filtering.permit_with_internal_vlan" : "FabricIngress.filtering.fwd_classifier" }, "default_entry" : { - "action_id" : 16, + "action_id" : 17, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4372,10 +6830,10 @@ }, { "name" : "FabricIngress.filtering.fwd_classifier", - "id" : 5, + "id" : 15, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 92, + "line" : 94, "column" : 10, "source_fragment" : "fwd_classifier" }, @@ -4401,7 +6859,7 @@ { "match_type" : "exact", "name" : "ip_eth_type", - "target" : ["scalars", "fabric_metadata_t._ip_eth_type0"], + "target" : ["scalars", "userMetadata._ip_eth_type8"], "mask" : null } ], @@ -4411,14 +6869,14 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [19], + "action_ids" : [20], "actions" : ["FabricIngress.filtering.set_forwarding_type"], - "base_default_next" : "node_12", + "base_default_next" : "node_30", "next_tables" : { - "FabricIngress.filtering.set_forwarding_type" : "node_12" + "FabricIngress.filtering.set_forwarding_type" : "node_30" }, "default_entry" : { - "action_id" : 19, + "action_id" : 20, "action_const" : true, "action_data" : ["0x0"], "action_entry_const" : true @@ -4426,7 +6884,7 @@ }, { "name" : "FabricIngress.forwarding.bridging", - "id" : 6, + "id" : 16, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 46, @@ -4437,7 +6895,7 @@ { "match_type" : "exact", "name" : "vlan_id", - "target" : ["scalars", "fabric_metadata_t._vlan_id1"], + "target" : ["scalars", "userMetadata._vlan_id9"], "mask" : null }, { @@ -4453,12 +6911,12 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [20, 2], + "action_ids" : [21, 2], "actions" : ["FabricIngress.forwarding.set_next_id_bridging", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "base_default_next" : "node_37", "next_tables" : { - "FabricIngress.forwarding.set_next_id_bridging" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.set_next_id_bridging" : "node_37", + "nop" : "node_37" }, "default_entry" : { "action_id" : 2, @@ -4469,7 +6927,7 @@ }, { "name" : "FabricIngress.forwarding.mpls", - "id" : 7, + "id" : 17, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 71, @@ -4480,7 +6938,7 @@ { "match_type" : "exact", "name" : "mpls_label", - "target" : ["scalars", "fabric_metadata_t._mpls_label8"], + "target" : ["scalars", "userMetadata._mpls_label16"], "mask" : null } ], @@ -4490,12 +6948,12 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [21, 3], + "action_ids" : [22, 3], "actions" : ["FabricIngress.forwarding.pop_mpls_and_next", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "base_default_next" : "node_37", "next_tables" : { - "FabricIngress.forwarding.pop_mpls_and_next" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.pop_mpls_and_next" : "node_37", + "nop" : "node_37" }, "default_entry" : { "action_id" : 3, @@ -4506,7 +6964,7 @@ }, { "name" : "FabricIngress.forwarding.routing_v4", - "id" : 8, + "id" : 18, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 108, @@ -4517,7 +6975,7 @@ { "match_type" : "lpm", "name" : "ipv4_dst", - "target" : ["scalars", "fabric_metadata_t._ipv4_dst_addr20"], + "target" : ["scalars", "userMetadata._ipv4_dst_addr28"], "mask" : null } ], @@ -4527,13 +6985,13 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [22, 23, 4], + "action_ids" : [23, 24, 4], "actions" : ["FabricIngress.forwarding.set_next_id_routing_v4", "FabricIngress.forwarding.nop_routing_v4", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "base_default_next" : "node_37", "next_tables" : { - "FabricIngress.forwarding.set_next_id_routing_v4" : "FabricIngress.acl.acl", - "FabricIngress.forwarding.nop_routing_v4" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.set_next_id_routing_v4" : "node_37", + "FabricIngress.forwarding.nop_routing_v4" : "node_37", + "nop" : "node_37" }, "default_entry" : { "action_id" : 4, @@ -4542,12 +7000,87 @@ "action_entry_const" : false } }, + { + "name" : "FabricIngress.pre_next.next_mpls", + "id" : 19, + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 36, + "column" : 10, + "source_fragment" : "next_mpls" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [25, 5], + "actions" : ["FabricIngress.pre_next.set_mpls_label", "nop"], + "base_default_next" : "FabricIngress.pre_next.next_vlan", + "next_tables" : { + "FabricIngress.pre_next.set_mpls_label" : "FabricIngress.pre_next.next_vlan", + "nop" : "FabricIngress.pre_next.next_vlan" + }, + "default_entry" : { + "action_id" : 5, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.pre_next.next_vlan", + "id" : 20, + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 73, + "column" : 10, + "source_fragment" : "next_vlan" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [26, 27, 6], + "actions" : ["FabricIngress.pre_next.set_vlan", "FabricIngress.pre_next.set_double_vlan", "nop"], + "base_default_next" : "FabricIngress.acl.acl", + "next_tables" : { + "FabricIngress.pre_next.set_vlan" : "FabricIngress.acl.acl", + "FabricIngress.pre_next.set_double_vlan" : "FabricIngress.acl.acl", + "nop" : "FabricIngress.acl.acl" + }, + "default_entry" : { + "action_id" : 6, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, { "name" : "FabricIngress.acl.acl", - "id" : 9, + "id" : 21, "source_info" : { "filename" : "include/control/acl.p4", - "line" : 60, + "line" : 59, "column" : 10, "source_fragment" : "acl" }, @@ -4558,24 +7091,6 @@ "target" : ["standard_metadata", "ingress_port"], "mask" : null }, - { - "match_type" : "ternary", - "name" : "ip_proto", - "target" : ["scalars", "fabric_metadata_t._ip_proto16"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "l4_sport", - "target" : ["scalars", "fabric_metadata_t._l4_sport17"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "l4_dport", - "target" : ["scalars", "fabric_metadata_t._l4_dport18"], - "mask" : null - }, { "match_type" : "ternary", "name" : "eth_dst", @@ -4603,13 +7118,19 @@ { "match_type" : "ternary", "name" : "ipv4_src", - "target" : ["ipv4", "src_addr"], + "target" : ["scalars", "userMetadata._lkp_ipv4_src1"], "mask" : null }, { "match_type" : "ternary", "name" : "ipv4_dst", - "target" : ["ipv4", "dst_addr"], + "target" : ["scalars", "userMetadata._lkp_ipv4_dst2"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._lkp_ip_proto3"], "mask" : null }, { @@ -4623,6 +7144,24 @@ "name" : "icmp_code", "target" : ["icmp", "icmp_code"], "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._lkp_l4_sport4"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._lkp_l4_dport5"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "port_type", + "target" : ["scalars", "userMetadata._port_type39"], + "mask" : null } ], "match_type" : "ternary", @@ -4631,18 +7170,18 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [24, 25, 26, 27, 28], + "action_ids" : [28, 29, 30, 31, 32], "actions" : ["FabricIngress.acl.set_next_id_acl", "FabricIngress.acl.punt_to_cpu", "FabricIngress.acl.set_clone_session_id", "FabricIngress.acl.drop", "FabricIngress.acl.nop_acl"], - "base_default_next" : "node_20", + "base_default_next" : "node_41", "next_tables" : { - "FabricIngress.acl.set_next_id_acl" : "node_20", - "FabricIngress.acl.punt_to_cpu" : "node_20", - "FabricIngress.acl.set_clone_session_id" : "node_20", - "FabricIngress.acl.drop" : "node_20", - "FabricIngress.acl.nop_acl" : "node_20" + "FabricIngress.acl.set_next_id_acl" : "node_41", + "FabricIngress.acl.punt_to_cpu" : "node_41", + "FabricIngress.acl.set_clone_session_id" : "node_41", + "FabricIngress.acl.drop" : "node_41", + "FabricIngress.acl.nop_acl" : "node_41" }, "default_entry" : { - "action_id" : 28, + "action_id" : 32, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4650,10 +7189,10 @@ }, { "name" : "FabricIngress.next.hashed", - "id" : 10, + "id" : 22, "source_info" : { "filename" : "include/control/next.p4", - "line" : 202, + "line" : 138, "column" : 10, "source_fragment" : "hashed" }, @@ -4661,7 +7200,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id13"], + "target" : ["scalars", "userMetadata._next_id21"], "mask" : null } ], @@ -4672,22 +7211,21 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [31, 32, 33, 6], - "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "FabricIngress.next.mpls_routing_hashed", "nop"], + "action_ids" : [33, 34, 7], + "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "nop"], "base_default_next" : "FabricIngress.next.multicast", "next_tables" : { "FabricIngress.next.output_hashed" : "FabricIngress.next.multicast", "FabricIngress.next.routing_hashed" : "FabricIngress.next.multicast", - "FabricIngress.next.mpls_routing_hashed" : "FabricIngress.next.multicast", "nop" : "FabricIngress.next.multicast" } }, { "name" : "FabricIngress.next.multicast", - "id" : 11, + "id" : 23, "source_info" : { "filename" : "include/control/next.p4", - "line" : 236, + "line" : 171, "column" : 10, "source_fragment" : "multicast" }, @@ -4695,7 +7233,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id13"], + "target" : ["scalars", "userMetadata._next_id21"], "mask" : null } ], @@ -4705,61 +7243,23 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [34, 7], + "action_ids" : [35, 8], "actions" : ["FabricIngress.next.set_mcast_group_id", "nop"], - "base_default_next" : "FabricIngress.next.next_vlan", + "base_default_next" : "node_44", "next_tables" : { - "FabricIngress.next.set_mcast_group_id" : "FabricIngress.next.next_vlan", - "nop" : "FabricIngress.next.next_vlan" + "FabricIngress.next.set_mcast_group_id" : "node_44", + "nop" : "node_44" }, "default_entry" : { - "action_id" : 7, + "action_id" : 8, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.next.next_vlan", - "id" : 12, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 86, - "column" : 10, - "source_fragment" : "next_vlan" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id13"], - "mask" : null - } - ], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [29, 30, 5], - "actions" : ["FabricIngress.next.set_vlan", "FabricIngress.next.set_double_vlan", "nop"], - "base_default_next" : "node_24", - "next_tables" : { - "FabricIngress.next.set_vlan" : "node_24", - "FabricIngress.next.set_double_vlan" : "node_24", - "nop" : "node_24" - }, - "default_entry" : { - "action_id" : 5, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_3", - "id" : 13, + "name" : "tbl_port_counter31", + "id" : 24, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 31, @@ -4773,22 +7273,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [39], - "actions" : ["act_3"], - "base_default_next" : "node_26", + "action_ids" : [53], + "actions" : ["port_counter31"], + "base_default_next" : "node_46", "next_tables" : { - "act_3" : "node_26" + "port_counter31" : "node_46" }, "default_entry" : { - "action_id" : 39, + "action_id" : 53, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_4", - "id" : 14, + "name" : "tbl_port_counter34", + "id" : 25, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 34, @@ -4802,14 +7302,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [40], - "actions" : ["act_4"], + "action_ids" : [54], + "actions" : ["port_counter34"], "base_default_next" : "FabricIngress.bng_ingress.t_line_map", "next_tables" : { - "act_4" : "FabricIngress.bng_ingress.t_line_map" + "port_counter34" : "FabricIngress.bng_ingress.t_line_map" }, "default_entry" : { - "action_id" : 40, + "action_id" : 54, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4817,7 +7317,7 @@ }, { "name" : "FabricIngress.bng_ingress.t_line_map", - "id" : 15, + "id" : 26, "source_info" : { "filename" : "include/bng.p4", "line" : 323, @@ -4828,13 +7328,13 @@ { "match_type" : "exact", "name" : "s_tag", - "target" : ["scalars", "fabric_metadata_t._bng_s_tag25"], + "target" : ["scalars", "userMetadata._bng_s_tag37"], "mask" : null }, { "match_type" : "exact", "name" : "c_tag", - "target" : ["scalars", "fabric_metadata_t._bng_c_tag26"], + "target" : ["scalars", "userMetadata._bng_c_tag38"], "mask" : null } ], @@ -4844,22 +7344,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [15], + "action_ids" : [16], "actions" : ["FabricIngress.bng_ingress.set_line"], - "base_default_next" : "node_29", + "base_default_next" : "node_49", "next_tables" : { - "FabricIngress.bng_ingress.set_line" : "node_29" + "FabricIngress.bng_ingress.set_line" : "node_49" }, "default_entry" : { - "action_id" : 15, + "action_id" : 16, "action_const" : true, "action_data" : ["0x0"], "action_entry_const" : true } }, { - "name" : "tbl_act_5", - "id" : 16, + "name" : "tbl_bng342", + "id" : 27, "source_info" : { "filename" : "include/bng.p4", "line" : 342, @@ -4873,14 +7373,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [43], - "actions" : ["act_7"], + "action_ids" : [56], + "actions" : ["bng342"], "base_default_next" : "FabricIngress.bng_ingress.upstream.t_pppoe_cp", "next_tables" : { - "act_7" : "FabricIngress.bng_ingress.upstream.t_pppoe_cp" + "bng342" : "FabricIngress.bng_ingress.upstream.t_pppoe_cp" }, "default_entry" : { - "action_id" : 43, + "action_id" : 56, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4888,7 +7388,7 @@ }, { "name" : "FabricIngress.bng_ingress.upstream.t_pppoe_cp", - "id" : 17, + "id" : 28, "source_info" : { "filename" : "include/bng.p4", "line" : 51, @@ -4915,12 +7415,12 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [8, 0], + "action_ids" : [9, 0], "actions" : ["FabricIngress.bng_ingress.upstream.punt_to_cpu", "nop"], "base_default_next" : null, "next_tables" : { - "__HIT__" : "tbl_act_6", - "__MISS__" : "tbl_act_7" + "__HIT__" : "tbl_bng126", + "__MISS__" : "node_53" }, "default_entry" : { "action_id" : 0, @@ -4930,54 +7430,8 @@ } }, { - "name" : "tbl_act_6", - "id" : 18, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [41], - "actions" : ["act_5"], - "base_default_next" : "node_34", - "next_tables" : { - "act_5" : "node_34" - }, - "default_entry" : { - "action_id" : 41, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_7", - "id" : 19, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [42], - "actions" : ["act_6"], - "base_default_next" : "node_34", - "next_tables" : { - "act_6" : "node_34" - }, - "default_entry" : { - "action_id" : 42, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_8", - "id" : 20, + "name" : "tbl_bng126", + "id" : 29, "source_info" : { "filename" : "include/bng.p4", "line" : 126, @@ -4991,14 +7445,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [44], - "actions" : ["act_8"], - "base_default_next" : "node_36", + "action_ids" : [55], + "actions" : ["bng126"], + "base_default_next" : "node_53", "next_tables" : { - "act_8" : "node_36" + "bng126" : "node_53" }, "default_entry" : { - "action_id" : 44, + "action_id" : 55, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5006,7 +7460,7 @@ }, { "name" : "FabricIngress.bng_ingress.upstream.t_pppoe_term_v4", - "id" : 21, + "id" : 30, "source_info" : { "filename" : "include/bng.p4", "line" : 87, @@ -5017,7 +7471,7 @@ { "match_type" : "exact", "name" : "line_id", - "target" : ["scalars", "fabric_metadata_t._bng_line_id22"], + "target" : ["scalars", "userMetadata._bng_line_id34"], "mask" : null }, { @@ -5039,23 +7493,23 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [10, 9], + "action_ids" : [11, 10], "actions" : ["FabricIngress.bng_ingress.upstream.term_enabled_v4", "FabricIngress.bng_ingress.upstream.term_disabled"], - "base_default_next" : null, + "base_default_next" : "tbl_slicing114", "next_tables" : { - "FabricIngress.bng_ingress.upstream.term_disabled" : "tbl_act_9", - "FabricIngress.bng_ingress.upstream.term_enabled_v4" : null + "FabricIngress.bng_ingress.upstream.term_disabled" : "tbl_bng131", + "FabricIngress.bng_ingress.upstream.term_enabled_v4" : "tbl_slicing114" }, "default_entry" : { - "action_id" : 9, + "action_id" : 10, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_9", - "id" : 22, + "name" : "tbl_bng131", + "id" : 31, "source_info" : { "filename" : "include/bng.p4", "line" : 131, @@ -5069,14 +7523,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [45], - "actions" : ["act_9"], - "base_default_next" : null, + "action_ids" : [57], + "actions" : ["bng131"], + "base_default_next" : "tbl_slicing114", "next_tables" : { - "act_9" : null + "bng131" : "tbl_slicing114" }, "default_entry" : { - "action_id" : 45, + "action_id" : 57, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5084,7 +7538,7 @@ }, { "name" : "FabricIngress.bng_ingress.downstream.t_line_session_map", - "id" : 23, + "id" : 32, "source_info" : { "filename" : "include/bng.p4", "line" : 169, @@ -5095,7 +7549,7 @@ { "match_type" : "exact", "name" : "line_id", - "target" : ["scalars", "fabric_metadata_t._bng_line_id22"], + "target" : ["scalars", "userMetadata._bng_line_id34"], "mask" : null } ], @@ -5105,12 +7559,12 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [1, 11, 12], + "action_ids" : [1, 12, 13], "actions" : ["nop", "FabricIngress.bng_ingress.downstream.set_session", "FabricIngress.bng_ingress.downstream.drop"], "base_default_next" : null, "next_tables" : { - "__HIT__" : "tbl_act_10", - "__MISS__" : "tbl_act_11" + "__HIT__" : "node_58", + "__MISS__" : "tbl_slicing114" }, "default_entry" : { "action_id" : 1, @@ -5119,55 +7573,9 @@ "action_entry_const" : true } }, - { - "name" : "tbl_act_10", - "id" : 24, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [46], - "actions" : ["act_10"], - "base_default_next" : "node_43", - "next_tables" : { - "act_10" : "node_43" - }, - "default_entry" : { - "action_id" : 46, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_11", - "id" : 25, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [47], - "actions" : ["act_11"], - "base_default_next" : "node_43", - "next_tables" : { - "act_11" : "node_43" - }, - "default_entry" : { - "action_id" : 47, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, { "name" : "FabricIngress.bng_ingress.downstream.t_qos_v4", - "id" : 26, + "id" : 33, "source_info" : { "filename" : "include/bng.p4", "line" : 194, @@ -5178,7 +7586,7 @@ { "match_type" : "ternary", "name" : "line_id", - "target" : ["scalars", "fabric_metadata_t._bng_line_id22"], + "target" : ["scalars", "userMetadata._bng_line_id34"], "mask" : null }, { @@ -5206,23 +7614,23 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [13, 14], + "action_ids" : [14, 15], "actions" : ["FabricIngress.bng_ingress.downstream.qos_prio", "FabricIngress.bng_ingress.downstream.qos_besteff"], - "base_default_next" : null, + "base_default_next" : "tbl_slicing114", "next_tables" : { - "FabricIngress.bng_ingress.downstream.qos_prio" : "tbl_act_12", - "FabricIngress.bng_ingress.downstream.qos_besteff" : "tbl_act_13" + "FabricIngress.bng_ingress.downstream.qos_prio" : "tbl_bng238", + "FabricIngress.bng_ingress.downstream.qos_besteff" : "tbl_bng241" }, "default_entry" : { - "action_id" : 14, + "action_id" : 15, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_12", - "id" : 27, + "name" : "tbl_bng238", + "id" : 34, "source_info" : { "filename" : "include/bng.p4", "line" : 238, @@ -5236,91 +7644,353 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [48], - "actions" : ["act_12"], + "action_ids" : [58], + "actions" : ["bng238"], + "base_default_next" : "tbl_slicing114", + "next_tables" : { + "bng238" : "tbl_slicing114" + }, + "default_entry" : { + "action_id" : 58, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_bng241", + "id" : 35, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 241, + "column" : 24, + "source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [59], + "actions" : ["bng241"], + "base_default_next" : "tbl_slicing114", + "next_tables" : { + "bng241" : "tbl_slicing114" + }, + "default_entry" : { + "action_id" : 59, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing114", + "id" : 36, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 8, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) slice_tc, fabric_md.packet_color); ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [60], + "actions" : ["slicing114"], + "base_default_next" : "FabricIngress.qos.queues", + "next_tables" : { + "slicing114" : "FabricIngress.qos.queues" + }, + "default_entry" : { + "action_id" : 60, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.qos.queues", + "id" : 37, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 93, + "column" : 10, + "source_fragment" : "queues" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "slice_id", + "target" : ["scalars", "userMetadata._slice_id29"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "tc", + "target" : ["scalars", "userMetadata._tc31"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "color", + "target" : ["scalars", "userMetadata._packet_color30"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 128, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [38, 39], + "actions" : ["FabricIngress.qos.set_queue", "FabricIngress.qos.meter_drop"], "base_default_next" : null, "next_tables" : { - "act_12" : null + "FabricIngress.qos.set_queue" : null, + "FabricIngress.qos.meter_drop" : null + }, + "default_entry" : { + "action_id" : 38, + "action_const" : true, + "action_data" : ["0x0"], + "action_entry_const" : true + } + } + ], + "action_profiles" : [ + { + "name" : "FabricIngress.next.hashed_selector", + "id" : 0, + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 125, + "column" : 57, + "source_fragment" : "hashed_selector" + }, + "max_size" : 1024, + "selector" : { + "algo" : "crc16", + "input" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto24"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport25"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport26"] + } + ] + } + } + ], + "conditionals" : [ + { + "name" : "node_3", + "id" : 0, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 31, + "column" : 12, + "source_fragment" : "hdr.inner_ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init32", + "false_next" : "node_11" + }, + { + "name" : "node_5", + "id" : 1, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 36, + "column" : 16, + "source_fragment" : "hdr.inner_tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_tcp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init37", + "false_next" : "node_7" + }, + { + "name" : "node_7", + "id" : 2, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 39, + "column" : 23, + "source_fragment" : "hdr.inner_udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_udp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init40", + "false_next" : "node_9" + }, + { + "name" : "node_9", + "id" : 3, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 42, + "column" : 23, + "source_fragment" : "hdr.inner_icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_icmp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init43", + "false_next" : "node_19" + }, + { + "name" : "node_11", + "id" : 4, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 46, + "column" : 19, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["ipv4", "$valid$"] + } + } }, - "default_entry" : { - "action_id" : 48, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } + "true_next" : "tbl_lookup_md_init47", + "false_next" : "node_19" }, { - "name" : "tbl_act_13", - "id" : 28, + "name" : "node_13", + "id" : 5, "source_info" : { - "filename" : "include/bng.p4", - "line" : 241, - "column" : 24, - "source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)" + "filename" : "include/control/lookup_md_init.p4", + "line" : 51, + "column" : 16, + "source_fragment" : "hdr.tcp.isValid()" }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [49], - "actions" : ["act_13"], - "base_default_next" : null, - "next_tables" : { - "act_13" : null + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["tcp", "$valid$"] + } + } }, - "default_entry" : { - "action_id" : 49, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - } - ], - "action_profiles" : [ + "true_next" : "tbl_lookup_md_init52", + "false_next" : "node_15" + }, { - "name" : "FabricIngress.next.hashed_selector", - "id" : 0, + "name" : "node_15", + "id" : 6, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 183, - "column" : 57, - "source_fragment" : "hashed_selector" + "filename" : "include/control/lookup_md_init.p4", + "line" : 54, + "column" : 23, + "source_fragment" : "hdr.udp.isValid()" }, - "max_size" : 1024, - "selector" : { - "algo" : "crc16", - "input" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr19"] - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr20"] - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto16"] - }, - { + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport17"] - }, - { + "value" : ["udp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init55", + "false_next" : "node_17" + }, + { + "name" : "node_17", + "id" : 7, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 57, + "column" : 23, + "source_fragment" : "hdr.icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport18"] + "value" : ["icmp", "$valid$"] } - ] - } - } - ], - "conditionals" : [ + } + }, + "true_next" : "tbl_lookup_md_init58", + "false_next" : "node_19" + }, { - "name" : "node_2", - "id" : 0, + "name" : "node_19", + "id" : 8, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 24, @@ -5338,15 +8008,15 @@ } } }, - "true_next" : "tbl_act", - "false_next" : "node_4" + "true_next" : "tbl_packetio25", + "false_next" : "FabricIngress.slice_tc_classifier.classifier" }, { - "name" : "node_4", - "id" : 1, + "name" : "node_22", + "id" : 9, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 110, + "line" : 112, "column" : 12, "source_fragment" : "hdr.vlan_tag.isValid()" }, @@ -5361,15 +8031,15 @@ } } }, - "true_next" : "tbl_act_0", - "false_next" : "node_6" + "true_next" : "tbl_filtering113", + "false_next" : "node_24" }, { - "name" : "node_6", - "id" : 2, + "name" : "node_24", + "id" : 10, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 116, + "line" : 118, "column" : 12, "source_fragment" : "hdr.inner_vlan_tag.isValid()" }, @@ -5384,15 +8054,15 @@ } } }, - "true_next" : "tbl_act_1", - "false_next" : "node_8" + "true_next" : "tbl_filtering119", + "false_next" : "node_26" }, { - "name" : "node_8", - "id" : 3, + "name" : "node_26", + "id" : 11, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 122, + "line" : 124, "column" : 12, "source_fragment" : "!hdr.mpls.isValid()" }, @@ -5414,45 +8084,42 @@ } } }, - "true_next" : "tbl_act_2", + "true_next" : "tbl_filtering129", "false_next" : "FabricIngress.filtering.ingress_port_vlan" }, { - "name" : "node_12", - "id" : 4, + "name" : "node_30", + "id" : 12, "source_info" : { "filename" : "fabric.p4", - "line" : 69, + "line" : 80, "column" : 12, - "source_fragment" : "fabric_metadata.skip_forwarding == false" + "source_fragment" : "fabric_metadata.skip_forwarding" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_forwarding10"] + "value" : ["scalars", "userMetadata._skip_forwarding18"] } } - }, - "right" : { - "type" : "bool", - "value" : false } } }, - "true_next" : "node_13", - "false_next" : "FabricIngress.acl.acl" + "true_next" : "node_31", + "false_next" : "node_37" }, { - "name" : "node_13", - "id" : 5, + "name" : "node_31", + "id" : 13, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 150, @@ -5465,7 +8132,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type12"] + "value" : ["scalars", "userMetadata._fwd_type20"] }, "right" : { "type" : "hexstr", @@ -5474,11 +8141,11 @@ } }, "true_next" : "FabricIngress.forwarding.bridging", - "false_next" : "node_15" + "false_next" : "node_33" }, { - "name" : "node_15", - "id" : 6, + "name" : "node_33", + "id" : 14, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 151, @@ -5491,7 +8158,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type12"] + "value" : ["scalars", "userMetadata._fwd_type20"] }, "right" : { "type" : "hexstr", @@ -5500,11 +8167,11 @@ } }, "true_next" : "FabricIngress.forwarding.mpls", - "false_next" : "node_17" + "false_next" : "node_35" }, { - "name" : "node_17", - "id" : 7, + "name" : "node_35", + "id" : 15, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 152, @@ -5517,7 +8184,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type12"] + "value" : ["scalars", "userMetadata._fwd_type20"] }, "right" : { "type" : "hexstr", @@ -5526,35 +8193,62 @@ } }, "true_next" : "FabricIngress.forwarding.routing_v4", - "false_next" : "FabricIngress.acl.acl" + "false_next" : "node_37" }, { - "name" : "node_20", - "id" : 8, + "name" : "node_37", + "id" : 16, "source_info" : { "filename" : "fabric.p4", - "line" : 73, + "line" : 83, "column" : 12, - "source_fragment" : "fabric_metadata.skip_next == false" + "source_fragment" : "fabric_metadata.skip_next" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next11"] + "value" : ["scalars", "userMetadata._skip_next19"] } } - }, + } + } + }, + "true_next" : "FabricIngress.pre_next.next_mpls", + "false_next" : "FabricIngress.acl.acl" + }, + { + "name" : "node_41", + "id" : 17, + "source_info" : { + "filename" : "fabric.p4", + "line" : 87, + "column" : 12, + "source_fragment" : "fabric_metadata.skip_next" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "not", + "left" : null, "right" : { - "type" : "bool", - "value" : false + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next19"] + } + } } } }, @@ -5562,8 +8256,8 @@ "false_next" : "FabricIngress.bng_ingress.t_line_map" }, { - "name" : "node_24", - "id" : 9, + "name" : "node_44", + "id" : 18, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 30, @@ -5584,12 +8278,12 @@ } } }, - "true_next" : "tbl_act_3", - "false_next" : "node_26" + "true_next" : "tbl_port_counter31", + "false_next" : "node_46" }, { - "name" : "node_26", - "id" : 10, + "name" : "node_46", + "id" : 19, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 33, @@ -5610,12 +8304,12 @@ } } }, - "true_next" : "tbl_act_4", + "true_next" : "tbl_port_counter34", "false_next" : "FabricIngress.bng_ingress.t_line_map" }, { - "name" : "node_29", - "id" : 11, + "name" : "node_49", + "id" : 20, "source_info" : { "filename" : "include/bng.p4", "line" : 341, @@ -5633,29 +8327,12 @@ } } }, - "true_next" : "tbl_act_5", + "true_next" : "tbl_bng342", "false_next" : "FabricIngress.bng_ingress.downstream.t_line_session_map" }, { - "name" : "node_34", - "id" : 12, - "expression" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "bng_ingress_upstream_tmp"] - } - } - }, - "true_next" : "tbl_act_8", - "false_next" : "node_36" - }, - { - "name" : "node_36", - "id" : 13, + "name" : "node_53", + "id" : 21, "expression" : { "type" : "expression", "value" : { @@ -5674,12 +8351,12 @@ } } }, - "false_next" : null, - "true_next" : "node_37" + "true_next" : "node_54", + "false_next" : "tbl_slicing114" }, { - "name" : "node_37", - "id" : 14, + "name" : "node_54", + "id" : 22, "source_info" : { "filename" : "include/bng.p4", "line" : 128, @@ -5697,29 +8374,12 @@ } } }, - "false_next" : null, - "true_next" : "FabricIngress.bng_ingress.upstream.t_pppoe_term_v4" - }, - { - "name" : "node_43", - "id" : 15, - "expression" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "bng_ingress_downstream_tmp"] - } - } - }, - "false_next" : null, - "true_next" : "node_44" + "true_next" : "FabricIngress.bng_ingress.upstream.t_pppoe_term_v4", + "false_next" : "tbl_slicing114" }, { - "name" : "node_44", - "id" : 16, + "name" : "node_58", + "id" : 23, "source_info" : { "filename" : "include/bng.p4", "line" : 235, @@ -5737,8 +8397,8 @@ } } }, - "false_next" : null, - "true_next" : "FabricIngress.bng_ingress.downstream.t_qos_v4" + "true_next" : "FabricIngress.bng_ingress.downstream.t_qos_v4", + "false_next" : "tbl_slicing114" } ] }, @@ -5747,15 +8407,15 @@ "id" : 1, "source_info" : { "filename" : "fabric.p4", - "line" : 91, + "line" : 105, "column" : 8, "source_fragment" : "FabricEgress" }, - "init_table" : "node_50", + "init_table" : "node_66", "tables" : [ { - "name" : "tbl_act_14", - "id" : 29, + "name" : "tbl_packetio41", + "id" : 38, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 41, @@ -5769,22 +8429,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [58], - "actions" : ["act_14"], - "base_default_next" : "node_52", + "action_ids" : [72], + "actions" : ["packetio41"], + "base_default_next" : "node_68", "next_tables" : { - "act_14" : "node_52" + "packetio41" : "node_68" }, "default_entry" : { - "action_id" : 58, + "action_id" : 72, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_15", - "id" : 30, + "name" : "tbl_packetio44", + "id" : 39, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 44, @@ -5798,25 +8458,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [59], - "actions" : ["act_15"], - "base_default_next" : "node_54", + "action_ids" : [73], + "actions" : ["packetio44"], + "base_default_next" : "node_70", "next_tables" : { - "act_15" : "node_54" + "packetio44" : "node_70" }, "default_entry" : { - "action_id" : 59, + "action_id" : 73, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_16", - "id" : 31, + "name" : "tbl_next283", + "id" : 40, "source_info" : { "filename" : "include/control/next.p4", - "line" : 337, + "line" : 283, "column" : 12, "source_fragment" : "mark_to_drop(standard_metadata)" }, @@ -5827,14 +8487,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [60], - "actions" : ["act_16"], - "base_default_next" : "node_56", + "action_ids" : [74], + "actions" : ["next283"], + "base_default_next" : "node_72", "next_tables" : { - "act_16" : "node_56" + "next283" : "node_72" }, "default_entry" : { - "action_id" : 60, + "action_id" : 74, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5842,10 +8502,10 @@ }, { "name" : "tbl_egress_next_pop_mpls_if_present", - "id" : 32, + "id" : 41, "source_info" : { "filename" : "include/control/next.p4", - "line" : 341, + "line" : 287, "column" : 36, "source_fragment" : "pop_mpls_if_present()" }, @@ -5856,14 +8516,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [52], + "action_ids" : [63], "actions" : ["FabricEgress.egress_next.pop_mpls_if_present"], - "base_default_next" : "node_60", + "base_default_next" : "node_76", "next_tables" : { - "FabricEgress.egress_next.pop_mpls_if_present" : "node_60" + "FabricEgress.egress_next.pop_mpls_if_present" : "node_76" }, "default_entry" : { - "action_id" : 52, + "action_id" : 63, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5871,10 +8531,10 @@ }, { "name" : "tbl_egress_next_set_mpls", - "id" : 33, + "id" : 42, "source_info" : { "filename" : "include/control/next.p4", - "line" : 343, + "line" : 289, "column" : 12, "source_fragment" : "set_mpls()" }, @@ -5885,27 +8545,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [53], + "action_ids" : [64], "actions" : ["FabricEgress.egress_next.set_mpls"], - "base_default_next" : "node_60", + "base_default_next" : "node_76", "next_tables" : { - "FabricEgress.egress_next.set_mpls" : "node_60" + "FabricEgress.egress_next.set_mpls" : "node_76" }, "default_entry" : { - "action_id" : 53, + "action_id" : 64, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_egress_next_push_vlan", - "id" : 34, + "name" : "tbl_egress_next_push_outer_vlan", + "id" : 43, "source_info" : { "filename" : "include/control/next.p4", - "line" : 349, + "line" : 295, "column" : 12, - "source_fragment" : "push_vlan()" + "source_fragment" : "push_outer_vlan()" }, "key" : [], "match_type" : "exact", @@ -5914,14 +8574,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [54], - "actions" : ["FabricEgress.egress_next.push_vlan"], + "action_ids" : [65], + "actions" : ["FabricEgress.egress_next.push_outer_vlan"], "base_default_next" : "tbl_egress_next_push_inner_vlan", "next_tables" : { - "FabricEgress.egress_next.push_vlan" : "tbl_egress_next_push_inner_vlan" + "FabricEgress.egress_next.push_outer_vlan" : "tbl_egress_next_push_inner_vlan" }, "default_entry" : { - "action_id" : 54, + "action_id" : 65, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5929,10 +8589,10 @@ }, { "name" : "tbl_egress_next_push_inner_vlan", - "id" : 35, + "id" : 44, "source_info" : { "filename" : "include/control/next.p4", - "line" : 350, + "line" : 296, "column" : 12, "source_fragment" : "push_inner_vlan()" }, @@ -5943,25 +8603,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [56], + "action_ids" : [66], "actions" : ["FabricEgress.egress_next.push_inner_vlan"], - "base_default_next" : "node_70", + "base_default_next" : "node_81", "next_tables" : { - "FabricEgress.egress_next.push_inner_vlan" : "node_70" + "FabricEgress.egress_next.push_inner_vlan" : "node_81" }, "default_entry" : { - "action_id" : 56, + "action_id" : 66, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_17", - "id" : 36, + "name" : "tbl_next299", + "id" : 45, "source_info" : { "filename" : "include/control/next.p4", - "line" : 353, + "line" : 299, "column" : 12, "source_fragment" : "hdr.inner_vlan_tag.setInvalid()" }, @@ -5972,14 +8632,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [63], - "actions" : ["act_19"], + "action_ids" : [75], + "actions" : ["next299"], "base_default_next" : "FabricEgress.egress_next.egress_vlan", "next_tables" : { - "act_19" : "FabricEgress.egress_next.egress_vlan" + "next299" : "FabricEgress.egress_next.egress_vlan" }, "default_entry" : { - "action_id" : 63, + "action_id" : 75, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5987,10 +8647,10 @@ }, { "name" : "FabricEgress.egress_next.egress_vlan", - "id" : 37, + "id" : 46, "source_info" : { "filename" : "include/control/next.p4", - "line" : 320, + "line" : 265, "column" : 10, "source_fragment" : "egress_vlan" }, @@ -5998,7 +8658,7 @@ { "match_type" : "exact", "name" : "vlan_id", - "target" : ["scalars", "fabric_metadata_t._vlan_id1"], + "target" : ["scalars", "userMetadata._vlan_id9"], "mask" : null }, { @@ -6014,23 +8674,30 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [57, 50], - "actions" : ["FabricEgress.egress_next.pop_vlan", "nop"], - "base_default_next" : null, + "action_ids" : [67, 68, 69], + "actions" : ["FabricEgress.egress_next.push_vlan", "FabricEgress.egress_next.pop_vlan", "FabricEgress.egress_next.drop"], + "base_default_next" : "node_81", "next_tables" : { - "__HIT__" : "tbl_act_18", - "__MISS__" : "tbl_act_19" + "FabricEgress.egress_next.push_vlan" : "node_81", + "FabricEgress.egress_next.pop_vlan" : "node_81", + "FabricEgress.egress_next.drop" : "node_81" }, "default_entry" : { - "action_id" : 50, + "action_id" : 69, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_18", - "id" : 38, + "name" : "tbl_next309", + "id" : 47, + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 309, + "column" : 25, + "source_fragment" : "=" + }, "key" : [], "match_type" : "exact", "type" : "simple", @@ -6038,22 +8705,28 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [61], - "actions" : ["act_17"], - "base_default_next" : "node_67", + "action_ids" : [77], + "actions" : ["next309"], + "base_default_next" : "node_83", "next_tables" : { - "act_17" : "node_67" + "next309" : "node_83" }, "default_entry" : { - "action_id" : 61, + "action_id" : 77, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_19", - "id" : 39, + "name" : "tbl_next310", + "id" : 48, + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 310, + "column" : 35, + "source_fragment" : "mark_to_drop(standard_metadata)" + }, "key" : [], "match_type" : "exact", "type" : "simple", @@ -6061,27 +8734,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [62], - "actions" : ["act_18"], - "base_default_next" : "node_67", + "action_ids" : [76], + "actions" : ["next310"], + "base_default_next" : "node_89", "next_tables" : { - "act_18" : "node_67" + "next310" : "node_89" }, "default_entry" : { - "action_id" : 62, + "action_id" : 76, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_egress_next_push_vlan_0", - "id" : 40, + "name" : "tbl_next313", + "id" : 49, "source_info" : { "filename" : "include/control/next.p4", - "line" : 360, - "column" : 20, - "source_fragment" : "push_vlan()" + "line" : 313, + "column" : 29, + "source_fragment" : "=" }, "key" : [], "match_type" : "exact", @@ -6090,27 +8763,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [55], - "actions" : ["FabricEgress.egress_next.push_vlan"], - "base_default_next" : "node_70", + "action_ids" : [79], + "actions" : ["next313"], + "base_default_next" : "node_87", "next_tables" : { - "FabricEgress.egress_next.push_vlan" : "node_70" + "next313" : "node_87" }, "default_entry" : { - "action_id" : 55, + "action_id" : 79, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_20", - "id" : 41, + "name" : "tbl_next314", + "id" : 50, "source_info" : { "filename" : "include/control/next.p4", - "line" : 369, - "column" : 25, - "source_fragment" : "=" + "line" : 314, + "column" : 39, + "source_fragment" : "mark_to_drop(standard_metadata)" }, "key" : [], "match_type" : "exact", @@ -6119,27 +8792,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [65], - "actions" : ["act_21"], - "base_default_next" : "node_72", + "action_ids" : [78], + "actions" : ["next314"], + "base_default_next" : "node_89", "next_tables" : { - "act_21" : "node_72" + "next314" : "node_89" }, "default_entry" : { - "action_id" : 65, + "action_id" : 78, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_21", - "id" : 42, + "name" : "tbl_bng_egress_downstream_encap_v4", + "id" : 51, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 370, - "column" : 35, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/bng.p4", + "line" : 297, + "column" : 12, + "source_fragment" : "encap_v4()" }, "key" : [], "match_type" : "exact", @@ -6148,27 +8821,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [64], - "actions" : ["act_20"], - "base_default_next" : "node_78", + "action_ids" : [62], + "actions" : ["FabricEgress.bng_egress.downstream.encap_v4"], + "base_default_next" : "tbl_slicing126", "next_tables" : { - "act_20" : "node_78" + "FabricEgress.bng_egress.downstream.encap_v4" : "tbl_slicing126" }, "default_entry" : { - "action_id" : 64, + "action_id" : 62, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_22", - "id" : 43, + "name" : "tbl_slicing126", + "id" : 52, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 373, - "column" : 29, - "source_fragment" : "=" + "filename" : "include/control/slicing.p4", + "line" : 126, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.dscp;" }, "key" : [], "match_type" : "exact", @@ -6177,56 +8850,64 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [67], - "actions" : ["act_23"], - "base_default_next" : "node_76", + "action_ids" : [81], + "actions" : ["slicing126"], + "base_default_next" : "FabricEgress.dscp_rewriter.rewriter", "next_tables" : { - "act_23" : "node_76" + "slicing126" : "FabricEgress.dscp_rewriter.rewriter" }, "default_entry" : { - "action_id" : 67, + "action_id" : 81, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_23", - "id" : 44, + "name" : "FabricEgress.dscp_rewriter.rewriter", + "id" : 53, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 374, - "column" : 39, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/control/slicing.p4", + "line" : 138, + "column" : 10, + "source_fragment" : "rewriter" }, - "key" : [], + "key" : [ + { + "match_type" : "exact", + "name" : "eg_port", + "target" : ["standard_metadata", "egress_port"], + "mask" : null + } + ], "match_type" : "exact", "type" : "simple", - "max_size" : 1024, + "max_size" : 512, "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [66], - "actions" : ["act_22"], - "base_default_next" : "node_78", + "action_ids" : [70, 71, 61], + "actions" : ["FabricEgress.dscp_rewriter.rewrite", "FabricEgress.dscp_rewriter.clear", "nop"], + "base_default_next" : null, "next_tables" : { - "act_22" : "node_78" + "__MISS__" : null, + "__HIT__" : "node_94" }, "default_entry" : { - "action_id" : 66, + "action_id" : 61, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_bng_egress_downstream_encap_v4", - "id" : 45, + "name" : "tbl_slicing159", + "id" : 54, "source_info" : { - "filename" : "include/bng.p4", - "line" : 297, - "column" : 12, - "source_fragment" : "encap_v4()" + "filename" : "include/control/slicing.p4", + "line" : 159, + "column" : 36, + "source_fragment" : "=" }, "key" : [], "match_type" : "exact", @@ -6235,14 +8916,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [51], - "actions" : ["FabricEgress.bng_egress.downstream.encap_v4"], + "action_ids" : [80], + "actions" : ["slicing159"], "base_default_next" : null, "next_tables" : { - "FabricEgress.bng_egress.downstream.encap_v4" : null + "slicing159" : null }, "default_entry" : { - "action_id" : 51, + "action_id" : 80, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -6252,41 +8933,31 @@ "action_profiles" : [], "conditionals" : [ { - "name" : "node_50", - "id" : 17, + "name" : "node_66", + "id" : 24, "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 39, - "column" : 12, - "source_fragment" : "fabric_metadata.is_controller_packet_out == true" + "filename" : "fabric.p4", + "line" : 118, + "column" : 33, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_controller_packet_out15"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._is_controller_packet_out23"] } } }, - "true_next" : "tbl_act_14", - "false_next" : "node_52" + "true_next" : "tbl_packetio41", + "false_next" : "node_68" }, { - "name" : "node_52", - "id" : 18, + "name" : "node_68", + "id" : 25, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 43, @@ -6307,15 +8978,15 @@ } } }, - "true_next" : "tbl_act_15", - "false_next" : "node_54" + "true_next" : "tbl_packetio44", + "false_next" : "node_70" }, { - "name" : "node_54", - "id" : 19, + "name" : "node_70", + "id" : 26, "source_info" : { "filename" : "include/control/next.p4", - "line" : 335, + "line" : 281, "column" : 12, "source_fragment" : "fabric_metadata.is_multicast == true ..." }, @@ -6326,21 +8997,11 @@ "left" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_multicast14"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._is_multicast22"] } } }, @@ -6360,15 +9021,15 @@ } } }, - "true_next" : "tbl_act_16", - "false_next" : "node_56" + "true_next" : "tbl_next283", + "false_next" : "node_72" }, { - "name" : "node_56", - "id" : 20, + "name" : "node_72", + "id" : 27, "source_info" : { "filename" : "include/control/next.p4", - "line" : 340, + "line" : 286, "column" : 12, "source_fragment" : "fabric_metadata.mpls_label == 0" }, @@ -6378,7 +9039,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label8"] + "value" : ["scalars", "userMetadata._mpls_label16"] }, "right" : { "type" : "hexstr", @@ -6386,15 +9047,15 @@ } } }, - "true_next" : "node_57", + "true_next" : "node_73", "false_next" : "tbl_egress_next_set_mpls" }, { - "name" : "node_57", - "id" : 21, + "name" : "node_73", + "id" : 28, "source_info" : { "filename" : "include/control/next.p4", - "line" : 341, + "line" : 287, "column" : 16, "source_fragment" : "hdr.mpls.isValid()" }, @@ -6410,103 +9071,37 @@ } }, "true_next" : "tbl_egress_next_pop_mpls_if_present", - "false_next" : "node_60" - }, - { - "name" : "node_60", - "id" : 22, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 347, - "column" : 12, - "source_fragment" : "fabric_metadata.push_double_vlan == true" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._push_double_vlan4"] - } - } - }, - "right" : { - "type" : "bool", - "value" : true - } - } - }, - "true_next" : "tbl_egress_next_push_vlan", - "false_next" : "tbl_act_17" + "false_next" : "node_76" }, { - "name" : "node_67", - "id" : 23, + "name" : "node_76", + "id" : 29, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 357, - "column" : 16, - "source_fragment" : "!egress_vlan.apply().hit" + "filename" : "fabric.p4", + "line" : 119, + "column" : 31, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", "value" : { - "op" : "not", + "op" : "d2b", "left" : null, "right" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - } - } - } - } - }, - "true_next" : "node_68", - "false_next" : "node_70" - }, - { - "name" : "node_68", - "id" : 24, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 359, - "column" : 20, - "source_fragment" : "fabric_metadata.vlan_id != DEFAULT_VLAN_ID" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x0ffe" + "value" : ["scalars", "userMetadata._push_double_vlan12"] } } }, - "true_next" : "tbl_egress_next_push_vlan_0", - "false_next" : "node_70" + "true_next" : "tbl_egress_next_push_outer_vlan", + "false_next" : "tbl_next299" }, { - "name" : "node_70", - "id" : 25, + "name" : "node_81", + "id" : 30, "source_info" : { "filename" : "include/control/next.p4", - "line" : 368, + "line" : 308, "column" : 12, "source_fragment" : "hdr.mpls.isValid()" }, @@ -6521,15 +9116,15 @@ } } }, - "true_next" : "tbl_act_20", - "false_next" : "node_74" + "true_next" : "tbl_next309", + "false_next" : "node_85" }, { - "name" : "node_72", - "id" : 26, + "name" : "node_83", + "id" : 31, "source_info" : { "filename" : "include/control/next.p4", - "line" : 370, + "line" : 310, "column" : 16, "source_fragment" : "hdr.mpls.ttl == 0" }, @@ -6547,15 +9142,15 @@ } } }, - "true_next" : "tbl_act_21", - "false_next" : "node_78" + "true_next" : "tbl_next310", + "false_next" : "node_89" }, { - "name" : "node_74", - "id" : 27, + "name" : "node_85", + "id" : 32, "source_info" : { "filename" : "include/control/next.p4", - "line" : 372, + "line" : 312, "column" : 15, "source_fragment" : "hdr.ipv4.isValid() && fabric_metadata.fwd_type != FWD_BRIDGING" }, @@ -6580,7 +9175,7 @@ "op" : "!=", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type12"] + "value" : ["scalars", "userMetadata._fwd_type20"] }, "right" : { "type" : "hexstr", @@ -6590,15 +9185,15 @@ } } }, - "true_next" : "tbl_act_22", - "false_next" : "node_78" + "true_next" : "tbl_next313", + "false_next" : "node_89" }, { - "name" : "node_76", - "id" : 28, + "name" : "node_87", + "id" : 33, "source_info" : { "filename" : "include/control/next.p4", - "line" : 374, + "line" : 314, "column" : 20, "source_fragment" : "hdr.ipv4.ttl == 0" }, @@ -6616,12 +9211,12 @@ } } }, - "true_next" : "tbl_act_23", - "false_next" : "node_78" + "true_next" : "tbl_next314", + "false_next" : "node_89" }, { - "name" : "node_78", - "id" : 29, + "name" : "node_89", + "id" : 34, "source_info" : { "filename" : "include/bng.p4", "line" : 358, @@ -6634,7 +9229,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_type21"] + "value" : ["scalars", "userMetadata._bng_type33"] }, "right" : { "type" : "hexstr", @@ -6642,12 +9237,12 @@ } } }, - "false_next" : null, - "true_next" : "node_79" + "true_next" : "node_90", + "false_next" : "tbl_slicing126" }, { - "name" : "node_79", - "id" : 30, + "name" : "node_90", + "id" : 35, "source_info" : { "filename" : "include/bng.p4", "line" : 296, @@ -6665,8 +9260,31 @@ } } }, + "true_next" : "tbl_bng_egress_downstream_encap_v4", + "false_next" : "tbl_slicing126" + }, + { + "name" : "node_94", + "id" : 36, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 158, + "column" : 16, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["ipv4", "$valid$"] + } + } + }, "false_next" : null, - "true_next" : "tbl_bng_egress_downstream_encap_v4" + "true_next" : "tbl_slicing159" } ] } @@ -6752,26 +9370,14 @@ "intrinsic_metadata.egress_global_timestamp", ["standard_metadata", "egress_global_timestamp"] ], - [ - "intrinsic_metadata.lf_field_list", - ["standard_metadata", "lf_field_list"] - ], [ "intrinsic_metadata.mcast_grp", ["standard_metadata", "mcast_grp"] ], - [ - "intrinsic_metadata.resubmit_flag", - ["standard_metadata", "resubmit_flag"] - ], [ "intrinsic_metadata.egress_rid", ["standard_metadata", "egress_rid"] ], - [ - "intrinsic_metadata.recirculate_flag", - ["standard_metadata", "recirculate_flag"] - ], [ "intrinsic_metadata.priority", ["standard_metadata", "priority"] @@ -6779,7 +9385,7 @@ ], "program" : "fabric.p4", "__meta__" : { - "version" : [2, 18], + "version" : [2, 23], "compiler" : "https://github.com/p4lang/p4c" } } \ No newline at end of file diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt index d95b294b1c9..b9097066b39 100644 --- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt +++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-bng/bmv2/default/p4info.txt @@ -3,7 +3,7 @@ pkg_info { } tables { preamble { - id: 33603300 + id: 34520804 name: "FabricIngress.bng_ingress.upstream.t_pppoe_cp" alias: "t_pppoe_cp" } @@ -20,19 +20,19 @@ tables { match_type: TERNARY } action_refs { - id: 16830893 + id: 19321261 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 + const_default_action_id: 28485346 size: 16 } tables { preamble { - id: 33595047 + id: 48668327 name: "FabricIngress.bng_ingress.upstream.t_pppoe_term_v4" alias: "t_pppoe_term_v4" } @@ -55,19 +55,19 @@ tables { match_type: EXACT } action_refs { - id: 16780562 + id: 32574738 } action_refs { - id: 16785853 + id: 27468221 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16785853 + const_default_action_id: 27468221 size: 32768 } tables { preamble { - id: 33594775 + id: 43294103 name: "FabricIngress.bng_ingress.downstream.t_line_session_map" alias: "t_line_session_map" } @@ -78,22 +78,22 @@ tables { match_type: EXACT } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } action_refs { - id: 16795395 + id: 29640451 } action_refs { - id: 16822844 + id: 32944700 } - const_default_action_id: 16819938 + const_default_action_id: 28485346 size: 8192 } tables { preamble { - id: 33602462 + id: 37862302 name: "FabricIngress.bng_ingress.downstream.t_qos_v4" alias: "t_qos_v4" } @@ -122,17 +122,17 @@ tables { match_type: TERNARY } action_refs { - id: 16830304 + id: 21221216 } action_refs { - id: 16804676 + id: 27355972 } - const_default_action_id: 16804676 + const_default_action_id: 27355972 size: 256 } tables { preamble { - id: 33592041 + id: 39686889 name: "FabricIngress.bng_ingress.t_line_map" alias: "t_line_map" } @@ -149,14 +149,14 @@ tables { match_type: EXACT } action_refs { - id: 16829385 + id: 29084617 } - const_default_action_id: 16829385 + const_default_action_id: 29084617 size: 8192 } tables { preamble { - id: 33611649 + id: 43310977 name: "FabricIngress.filtering.ingress_port_vlan" alias: "ingress_port_vlan" } @@ -185,21 +185,21 @@ tables { match_type: TERNARY } action_refs { - id: 16836487 + id: 17164167 } action_refs { - id: 16818236 + id: 24158268 } action_refs { - id: 16794911 + id: 24266015 } - const_default_action_id: 16836487 - direct_resource_ids: 318815501 + const_default_action_id: 17164167 + direct_resource_ids: 326221069 size: 8192 } tables { preamble { - id: 33596298 + id: 49718154 name: "FabricIngress.filtering.fwd_classifier" alias: "fwd_classifier" } @@ -228,15 +228,15 @@ tables { match_type: EXACT } action_refs { - id: 16840921 + id: 25032921 } - const_default_action_id: 16840921 - direct_resource_ids: 318827326 + const_default_action_id: 25032921 + direct_resource_ids: 335473470 size: 1024 } tables { preamble { - id: 33596749 + id: 43623757 name: "FabricIngress.forwarding.bridging" alias: "bridging" } @@ -253,20 +253,20 @@ tables { match_type: TERNARY } action_refs { - id: 16811012 + id: 21791748 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318770289 + const_default_action_id: 28485346 + direct_resource_ids: 330959985 size: 1024 } tables { preamble { - id: 33574274 + id: 37768578 name: "FabricIngress.forwarding.mpls" alias: "mpls" } @@ -277,20 +277,20 @@ tables { match_type: EXACT } action_refs { - id: 16827758 + id: 30066030 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318830507 + const_default_action_id: 28485346 + direct_resource_ids: 318961579 size: 1024 } tables { preamble { - id: 33562650 + id: 41754650 name: "FabricIngress.forwarding.routing_v4" alias: "routing_v4" } @@ -301,13 +301,13 @@ tables { match_type: LPM } action_refs { - id: 16777434 + id: 19792090 } action_refs { - id: 16804187 + id: 29124955 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } @@ -315,7 +315,58 @@ tables { } tables { preamble { - id: 33618978 + id: 36626242 + name: "FabricIngress.pre_next.next_mpls" + alias: "next_mpls" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 22765924 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 330020245 + size: 1024 +} +tables { + preamble { + id: 48011802 + name: "FabricIngress.pre_next.next_vlan" + alias: "next_vlan" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 33475378 + } + action_refs { + id: 26738842 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 333692067 + size: 1024 +} +tables { + preamble { + id: 44104738 name: "FabricIngress.acl.acl" alias: "acl" } @@ -327,94 +378,100 @@ tables { } match_fields { id: 2 - name: "ip_proto" - bitwidth: 8 + name: "eth_dst" + bitwidth: 48 match_type: TERNARY } match_fields { id: 3 - name: "l4_sport" - bitwidth: 16 + name: "eth_src" + bitwidth: 48 match_type: TERNARY } match_fields { id: 4 - name: "l4_dport" - bitwidth: 16 + name: "vlan_id" + bitwidth: 12 match_type: TERNARY } match_fields { id: 5 - name: "eth_dst" - bitwidth: 48 + name: "eth_type" + bitwidth: 16 match_type: TERNARY } match_fields { id: 6 - name: "eth_src" - bitwidth: 48 + name: "ipv4_src" + bitwidth: 32 match_type: TERNARY } match_fields { id: 7 - name: "vlan_id" - bitwidth: 12 + name: "ipv4_dst" + bitwidth: 32 match_type: TERNARY } match_fields { id: 8 - name: "eth_type" - bitwidth: 16 + name: "ip_proto" + bitwidth: 8 match_type: TERNARY } match_fields { id: 9 - name: "ipv4_src" - bitwidth: 32 + name: "icmp_type" + bitwidth: 8 match_type: TERNARY } match_fields { id: 10 - name: "ipv4_dst" - bitwidth: 32 + name: "icmp_code" + bitwidth: 8 match_type: TERNARY } match_fields { id: 11 - name: "icmp_type" - bitwidth: 8 + name: "l4_sport" + bitwidth: 16 match_type: TERNARY } match_fields { id: 12 - name: "icmp_code" - bitwidth: 8 + name: "l4_dport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 13 + name: "port_type" + bitwidth: 2 match_type: TERNARY } action_refs { - id: 16807382 + id: 23623126 } action_refs { - id: 16829684 + id: 23579892 } action_refs { - id: 16781601 + id: 16912673 } action_refs { - id: 16820765 + id: 23570973 } action_refs { - id: 16827694 + id: 29607214 } - const_default_action_id: 16827694 - direct_resource_ids: 318801025 + const_default_action_id: 29607214 + direct_resource_ids: 319194241 size: 1024 } tables { preamble { - id: 33599709 - name: "FabricIngress.next.next_vlan" - alias: "next_vlan" + id: 47960972 + name: "FabricIngress.next.hashed" + alias: "hashed" } match_fields { id: 1 @@ -423,25 +480,26 @@ tables { match_type: EXACT } action_refs { - id: 16790685 + id: 27301117 } action_refs { - id: 16803337 + id: 20985706 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318768144 + const_default_action_id: 28485346 + implementation_id: 291115404 + direct_resource_ids: 322798228 size: 1024 } tables { preamble { - id: 33608588 - name: "FabricIngress.next.hashed" - alias: "hashed" + id: 40619180 + name: "FabricIngress.next.multicast" + alias: "multicast" } match_fields { id: 1 @@ -450,51 +508,106 @@ tables { match_type: EXACT } action_refs { - id: 16815357 - } - action_refs { - id: 16791402 + id: 21629581 } action_refs { - id: 16779255 - } - action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - implementation_id: 285217164 - direct_resource_ids: 318800532 + const_default_action_id: 28485346 + direct_resource_ids: 319194968 size: 1024 } tables { preamble { - id: 33606828 - name: "FabricIngress.next.multicast" - alias: "multicast" + id: 34606298 + name: "FabricIngress.slice_tc_classifier.classifier" + alias: "classifier" } match_fields { id: 1 - name: "next_id" + name: "ig_port" + bitwidth: 9 + match_type: TERNARY + } + match_fields { + id: 2 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 3 + name: "ipv4_dst" bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 4 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 5 + name: "l4_sport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 6 + name: "l4_dport" + bitwidth: 16 + match_type: TERNARY + } + action_refs { + id: 23786376 + } + action_refs { + id: 25983516 + } + const_default_action_id: 23786376 + direct_resource_ids: 334706097 + size: 512 +} +tables { + preamble { + id: 36435258 + name: "FabricIngress.qos.queues" + alias: "queues" + } + match_fields { + id: 1 + name: "slice_id" + bitwidth: 4 match_type: EXACT } + match_fields { + id: 2 + name: "tc" + bitwidth: 2 + match_type: EXACT + } + match_fields { + id: 3 + name: "color" + bitwidth: 2 + match_type: TERNARY + } action_refs { - id: 16779917 + id: 32116918 } action_refs { - id: 16819938 - annotations: "@defaultonly" - scope: DEFAULT_ONLY + id: 28214351 } - const_default_action_id: 16819938 - direct_resource_ids: 318801752 - size: 1024 + const_default_action_id: 32116918 + direct_resource_ids: 327743278 + size: 128 } tables { preamble { - id: 33599342 + id: 49262446 name: "FabricEgress.egress_next.egress_vlan" alias: "egress_vlan" } @@ -511,48 +624,77 @@ tables { match_type: EXACT } action_refs { - id: 16790030 + id: 30307755 } action_refs { - id: 16819938 + id: 17183246 + } + action_refs { + id: 30812542 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318827144 + const_default_action_id: 30812542 + direct_resource_ids: 318892680 size: 1024 } +tables { + preamble { + id: 49970092 + name: "FabricEgress.dscp_rewriter.rewriter" + alias: "rewriter" + } + match_fields { + id: 1 + name: "eg_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 27951287 + } + action_refs { + id: 24120545 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + size: 512 +} actions { preamble { - id: 16819938 + id: 28485346 name: "nop" alias: "nop" } } actions { preamble { - id: 16830893 + id: 19321261 name: "FabricIngress.bng_ingress.upstream.punt_to_cpu" alias: "upstream.punt_to_cpu" } } actions { preamble { - id: 16785853 + id: 27468221 name: "FabricIngress.bng_ingress.upstream.term_disabled" alias: "term_disabled" } } actions { preamble { - id: 16780562 + id: 32574738 name: "FabricIngress.bng_ingress.upstream.term_enabled_v4" alias: "term_enabled_v4" } } actions { preamble { - id: 16795395 + id: 29640451 name: "FabricIngress.bng_ingress.downstream.set_session" alias: "set_session" } @@ -564,28 +706,28 @@ actions { } actions { preamble { - id: 16822844 + id: 32944700 name: "FabricIngress.bng_ingress.downstream.drop" alias: "downstream.drop" } } actions { preamble { - id: 16830304 + id: 21221216 name: "FabricIngress.bng_ingress.downstream.qos_prio" alias: "qos_prio" } } actions { preamble { - id: 16804676 + id: 27355972 name: "FabricIngress.bng_ingress.downstream.qos_besteff" alias: "qos_besteff" } } actions { preamble { - id: 16829385 + id: 29084617 name: "FabricIngress.bng_ingress.set_line" alias: "set_line" } @@ -597,21 +739,26 @@ actions { } actions { preamble { - id: 16836487 + id: 17164167 name: "FabricIngress.filtering.deny" alias: "deny" } } actions { preamble { - id: 16818236 + id: 24158268 name: "FabricIngress.filtering.permit" alias: "permit" } + params { + id: 1 + name: "port_type" + bitwidth: 2 + } } actions { preamble { - id: 16794911 + id: 24266015 name: "FabricIngress.filtering.permit_with_internal_vlan" alias: "permit_with_internal_vlan" } @@ -620,10 +767,15 @@ actions { name: "vlan_id" bitwidth: 12 } + params { + id: 2 + name: "port_type" + bitwidth: 2 + } } actions { preamble { - id: 16840921 + id: 25032921 name: "FabricIngress.filtering.set_forwarding_type" alias: "set_forwarding_type" } @@ -635,7 +787,7 @@ actions { } actions { preamble { - id: 16811012 + id: 21791748 name: "FabricIngress.forwarding.set_next_id_bridging" alias: "set_next_id_bridging" } @@ -647,7 +799,7 @@ actions { } actions { preamble { - id: 16827758 + id: 30066030 name: "FabricIngress.forwarding.pop_mpls_and_next" alias: "pop_mpls_and_next" } @@ -659,7 +811,7 @@ actions { } actions { preamble { - id: 16777434 + id: 19792090 name: "FabricIngress.forwarding.set_next_id_routing_v4" alias: "set_next_id_routing_v4" } @@ -671,14 +823,55 @@ actions { } actions { preamble { - id: 16804187 + id: 29124955 name: "FabricIngress.forwarding.nop_routing_v4" alias: "nop_routing_v4" } } actions { preamble { - id: 16807382 + id: 22765924 + name: "FabricIngress.pre_next.set_mpls_label" + alias: "set_mpls_label" + } + params { + id: 1 + name: "label" + bitwidth: 20 + } +} +actions { + preamble { + id: 33475378 + name: "FabricIngress.pre_next.set_vlan" + alias: "set_vlan" + } + params { + id: 1 + name: "vlan_id" + bitwidth: 12 + } +} +actions { + preamble { + id: 26738842 + name: "FabricIngress.pre_next.set_double_vlan" + alias: "set_double_vlan" + } + params { + id: 1 + name: "outer_vlan_id" + bitwidth: 12 + } + params { + id: 2 + name: "inner_vlan_id" + bitwidth: 12 + } +} +actions { + preamble { + id: 23623126 name: "FabricIngress.acl.set_next_id_acl" alias: "set_next_id_acl" } @@ -690,14 +883,14 @@ actions { } actions { preamble { - id: 16829684 + id: 23579892 name: "FabricIngress.acl.punt_to_cpu" alias: "acl.punt_to_cpu" } } actions { preamble { - id: 16781601 + id: 16912673 name: "FabricIngress.acl.set_clone_session_id" alias: "set_clone_session_id" } @@ -709,50 +902,21 @@ actions { } actions { preamble { - id: 16820765 + id: 23570973 name: "FabricIngress.acl.drop" alias: "acl.drop" } } actions { preamble { - id: 16827694 + id: 29607214 name: "FabricIngress.acl.nop_acl" alias: "nop_acl" } } actions { preamble { - id: 16790685 - name: "FabricIngress.next.set_vlan" - alias: "set_vlan" - } - params { - id: 1 - name: "vlan_id" - bitwidth: 12 - } -} -actions { - preamble { - id: 16803337 - name: "FabricIngress.next.set_double_vlan" - alias: "set_double_vlan" - } - params { - id: 1 - name: "outer_vlan_id" - bitwidth: 12 - } - params { - id: 2 - name: "inner_vlan_id" - bitwidth: 12 - } -} -actions { - preamble { - id: 16815357 + id: 27301117 name: "FabricIngress.next.output_hashed" alias: "output_hashed" } @@ -764,7 +928,7 @@ actions { } actions { preamble { - id: 16791402 + id: 20985706 name: "FabricIngress.next.routing_hashed" alias: "routing_hashed" } @@ -786,71 +950,115 @@ actions { } actions { preamble { - id: 16779255 - name: "FabricIngress.next.mpls_routing_hashed" - alias: "mpls_routing_hashed" + id: 21629581 + name: "FabricIngress.next.set_mcast_group_id" + alias: "set_mcast_group_id" } params { id: 1 - name: "port_num" - bitwidth: 9 + name: "group_id" + bitwidth: 16 } - params { - id: 2 - name: "smac" - bitwidth: 48 +} +actions { + preamble { + id: 23786376 + name: "FabricIngress.slice_tc_classifier.set_slice_id_tc" + alias: "set_slice_id_tc" } params { - id: 3 - name: "dmac" - bitwidth: 48 + id: 1 + name: "slice_id" + bitwidth: 4 } params { - id: 4 - name: "label" - bitwidth: 20 + id: 2 + name: "tc" + bitwidth: 2 } } actions { preamble { - id: 16779917 - name: "FabricIngress.next.set_mcast_group_id" - alias: "set_mcast_group_id" + id: 25983516 + name: "FabricIngress.slice_tc_classifier.trust_dscp" + alias: "trust_dscp" + } +} +actions { + preamble { + id: 32116918 + name: "FabricIngress.qos.set_queue" + alias: "set_queue" } params { id: 1 - name: "group_id" - bitwidth: 16 + name: "qid" + bitwidth: 5 + } +} +actions { + preamble { + id: 28214351 + name: "FabricIngress.qos.meter_drop" + alias: "meter_drop" } } actions { preamble { - id: 16784000 + id: 20781696 name: "FabricEgress.bng_egress.downstream.encap_v4" alias: "encap_v4" } } actions { preamble { - id: 16790030 + id: 30307755 + name: "FabricEgress.egress_next.push_vlan" + alias: "push_vlan" + } +} +actions { + preamble { + id: 17183246 name: "FabricEgress.egress_next.pop_vlan" alias: "pop_vlan" } } +actions { + preamble { + id: 30812542 + name: "FabricEgress.egress_next.drop" + alias: "egress_next.drop" + } +} +actions { + preamble { + id: 27951287 + name: "FabricEgress.dscp_rewriter.rewrite" + alias: "rewrite" + } +} +actions { + preamble { + id: 24120545 + name: "FabricEgress.dscp_rewriter.clear" + alias: "clear" + } +} action_profiles { preamble { - id: 285217164 + id: 291115404 name: "FabricIngress.next.hashed_selector" alias: "hashed_selector" } - table_ids: 33608588 + table_ids: 47960972 with_selector: true size: 1024 max_group_size: 16 } counters { preamble { - id: 302022672 + id: 316309520 name: "FabricIngress.bng_ingress.upstream.c_terminated" alias: "c_terminated" } @@ -861,7 +1069,7 @@ counters { } counters { preamble { - id: 302043418 + id: 310956314 name: "FabricIngress.bng_ingress.upstream.c_dropped" alias: "c_dropped" } @@ -872,7 +1080,7 @@ counters { } counters { preamble { - id: 302008909 + id: 302467661 name: "FabricIngress.bng_ingress.upstream.c_control" alias: "c_control" } @@ -883,7 +1091,7 @@ counters { } counters { preamble { - id: 302004781 + id: 304364077 name: "FabricIngress.bng_ingress.downstream.c_line_rx" alias: "c_line_rx" } @@ -894,7 +1102,7 @@ counters { } counters { preamble { - id: 302011205 + id: 314528581 name: "FabricIngress.port_counters_control.egress_port_counter" alias: "egress_port_counter" } @@ -905,7 +1113,7 @@ counters { } counters { preamble { - id: 302002771 + id: 312947283 name: "FabricIngress.port_counters_control.ingress_port_counter" alias: "ingress_port_counter" } @@ -916,7 +1124,7 @@ counters { } counters { preamble { - id: 302046535 + id: 311942471 name: "FabricEgress.bng_egress.downstream.c_line_tx" alias: "c_line_tx" } @@ -927,106 +1135,139 @@ counters { } direct_counters { preamble { - id: 318815501 + id: 326221069 name: "FabricIngress.filtering.ingress_port_vlan_counter" alias: "ingress_port_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33611649 + direct_table_id: 43310977 } direct_counters { preamble { - id: 318827326 + id: 335473470 name: "FabricIngress.filtering.fwd_classifier_counter" alias: "fwd_classifier_counter" } spec { unit: BOTH } - direct_table_id: 33596298 + direct_table_id: 49718154 } direct_counters { preamble { - id: 318770289 + id: 330959985 name: "FabricIngress.forwarding.bridging_counter" alias: "bridging_counter" } spec { unit: BOTH } - direct_table_id: 33596749 + direct_table_id: 43623757 } direct_counters { preamble { - id: 318830507 + id: 318961579 name: "FabricIngress.forwarding.mpls_counter" alias: "mpls_counter" } spec { unit: BOTH } - direct_table_id: 33574274 + direct_table_id: 37768578 } direct_counters { preamble { - id: 318801025 - name: "FabricIngress.acl.acl_counter" - alias: "acl_counter" + id: 330020245 + name: "FabricIngress.pre_next.next_mpls_counter" + alias: "next_mpls_counter" } spec { unit: BOTH } - direct_table_id: 33618978 + direct_table_id: 36626242 } direct_counters { preamble { - id: 318768144 - name: "FabricIngress.next.next_vlan_counter" + id: 333692067 + name: "FabricIngress.pre_next.next_vlan_counter" alias: "next_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33599709 + direct_table_id: 48011802 } direct_counters { preamble { - id: 318800532 + id: 319194241 + name: "FabricIngress.acl.acl_counter" + alias: "acl_counter" + } + spec { + unit: BOTH + } + direct_table_id: 44104738 +} +direct_counters { + preamble { + id: 322798228 name: "FabricIngress.next.hashed_counter" alias: "hashed_counter" } spec { unit: BOTH } - direct_table_id: 33608588 + direct_table_id: 47960972 } direct_counters { preamble { - id: 318801752 + id: 319194968 name: "FabricIngress.next.multicast_counter" alias: "multicast_counter" } spec { unit: BOTH } - direct_table_id: 33606828 + direct_table_id: 40619180 +} +direct_counters { + preamble { + id: 334706097 + name: "FabricIngress.slice_tc_classifier.classifier_stats" + alias: "classifier_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 34606298 } direct_counters { preamble { - id: 318827144 + id: 327743278 + name: "FabricIngress.qos.queues_stats" + alias: "queues_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 36435258 +} +direct_counters { + preamble { + id: 318892680 name: "FabricEgress.egress_next.egress_vlan_counter" alias: "egress_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33599342 + direct_table_id: 49262446 } meters { preamble { - id: 335569952 + id: 337077280 name: "FabricIngress.bng_ingress.downstream.m_besteff" alias: "m_besteff" } @@ -1037,7 +1278,7 @@ meters { } meters { preamble { - id: 335568260 + id: 349920644 name: "FabricIngress.bng_ingress.downstream.m_prio" alias: "m_prio" } @@ -1046,9 +1287,20 @@ meters { } size: 8192 } +meters { + preamble { + id: 348573637 + name: "FabricIngress.qos.slice_tc_meter" + alias: "slice_tc_meter" + } + spec { + unit: BYTES + } + size: 64 +} controller_packet_metadata { preamble { - id: 67146229 + id: 81826293 name: "packet_in" alias: "packet_in" annotations: "@controller_header(\"packet_in\")" @@ -1066,7 +1318,7 @@ controller_packet_metadata { } controller_packet_metadata { preamble { - id: 67121543 + id: 76689799 name: "packet_out" alias: "packet_out" annotations: "@controller_header(\"packet_out\")" @@ -1078,8 +1330,13 @@ controller_packet_metadata { } metadata { id: 2 + name: "do_forwarding" + bitwidth: 1 + } + metadata { + id: 3 name: "_pad" - bitwidth: 7 + bitwidth: 6 } } type_info { diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json index 560e3e91cbc..cb1372ca2a1 100644 --- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json +++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/bmv2.json @@ -4,87 +4,124 @@ "name" : "scalars_0", "id" : 0, "fields" : [ + ["tmp_0", 1, false], + ["tmp_2", 3, false], + ["tmp_4", 8, false], + ["tmp_8", 32, false], ["last_ipv4_dscp_0", 6, false], - ["tmp_0", 16, false], + ["gtpu_ext_len_0", 8, false], ["tmp_1", 16, false], - ["tmp_2", 4, false], - ["tmp", 32, false], - ["tmp_3", 32, false], - ["tmp_4", 32, false], - ["bng_ingress_upstream_tmp", 1, false], - ["bng_ingress_downstream_tmp", 1, false], - ["spgw_ingress_hasReturned", 1, false], + ["tmp_3", 16, false], + ["tmp_5", 4, false], + ["tmp_6", 16, false], + ["tmp_7", 64, false], + ["tmp_9", 32, false], + ["tmp_10", 32, false], + ["tmp_11", 32, false], ["bng_ingress_upstream_hasReturned", 1, false], ["key_0", 64, false], - ["egress_next_tmp", 1, false], - ["spgw_egress_hasReturned", 1, false], + ["dscp_rewriter_tmp_dscp", 6, false], ["process_int_main_process_int_transit_hasReturned", 1, false], - ["fabric_metadata_t._ip_eth_type0", 16, false], - ["fabric_metadata_t._vlan_id1", 12, false], - ["fabric_metadata_t._vlan_pri2", 3, false], - ["fabric_metadata_t._vlan_cfi3", 1, false], - ["fabric_metadata_t._push_double_vlan4", 1, false], - ["fabric_metadata_t._inner_vlan_id5", 12, false], - ["fabric_metadata_t._inner_vlan_pri6", 3, false], - ["fabric_metadata_t._inner_vlan_cfi7", 1, false], - ["fabric_metadata_t._mpls_label8", 20, false], - ["fabric_metadata_t._mpls_ttl9", 8, false], - ["fabric_metadata_t._skip_forwarding10", 1, false], - ["fabric_metadata_t._skip_next11", 1, false], - ["fabric_metadata_t._fwd_type12", 3, false], - ["fabric_metadata_t._next_id13", 32, false], - ["fabric_metadata_t._is_multicast14", 1, false], - ["fabric_metadata_t._is_controller_packet_out15", 1, false], - ["fabric_metadata_t._ip_proto16", 8, false], - ["fabric_metadata_t._l4_sport17", 16, false], - ["fabric_metadata_t._l4_dport18", 16, false], - ["fabric_metadata_t._ipv4_src_addr19", 32, false], - ["fabric_metadata_t._ipv4_dst_addr20", 32, false], - ["fabric_metadata_t._inner_l4_sport21", 16, false], - ["fabric_metadata_t._inner_l4_dport22", 16, false], - ["fabric_metadata_t._spgw_direction23", 2, false], - ["fabric_metadata_t._spgw_ipv4_len24", 16, false], - ["fabric_metadata_t._spgw_teid25", 32, false], - ["fabric_metadata_t._spgw_tunnel_src_port26", 16, false], - ["fabric_metadata_t._spgw_tunnel_src_addr27", 32, false], - ["fabric_metadata_t._spgw_tunnel_dst_addr28", 32, false], - ["fabric_metadata_t._spgw_ctr_id29", 32, false], - ["fabric_metadata_t._spgw_far_id30", 32, false], - ["fabric_metadata_t._spgw_src_iface31", 8, false], - ["fabric_metadata_t._spgw_skip_spgw32", 1, false], - ["fabric_metadata_t._spgw_pdr_hit33", 1, false], - ["fabric_metadata_t._spgw_far_dropped34", 1, false], - ["fabric_metadata_t._spgw_notify_spgwc35", 1, false], - ["fabric_metadata_t._spgw_needs_gtpu_encap36", 1, false], - ["fabric_metadata_t._spgw_needs_gtpu_decap37", 1, false], - ["fabric_metadata_t._bng_type38", 2, false], - ["fabric_metadata_t._bng_line_id39", 32, false], - ["fabric_metadata_t._bng_pppoe_session_id40", 16, false], - ["fabric_metadata_t._bng_ds_meter_result41", 32, false], - ["fabric_metadata_t._bng_s_tag42", 12, false], - ["fabric_metadata_t._bng_c_tag43", 12, false], - ["fabric_metadata_t._int_meta_source44", 1, false], - ["fabric_metadata_t._int_meta_transit45", 1, false], - ["fabric_metadata_t._int_meta_sink46", 1, false], - ["fabric_metadata_t._int_meta_switch_id47", 32, false], - ["fabric_metadata_t._int_meta_new_words48", 8, false], - ["fabric_metadata_t._int_meta_new_bytes49", 16, false], - ["fabric_metadata_t._int_meta_ig_tstamp50", 32, false], - ["fabric_metadata_t._int_meta_eg_tstamp51", 32, false], - ["_padding_0", 6, false] + ["userMetadata._lkp_is_ipv40", 1, false], + ["userMetadata._lkp_ipv4_src1", 32, false], + ["userMetadata._lkp_ipv4_dst2", 32, false], + ["userMetadata._lkp_ip_proto3", 8, false], + ["userMetadata._lkp_l4_sport4", 16, false], + ["userMetadata._lkp_l4_dport5", 16, false], + ["userMetadata._lkp_icmp_type6", 8, false], + ["userMetadata._lkp_icmp_code7", 8, false], + ["userMetadata._ip_eth_type8", 16, false], + ["userMetadata._vlan_id9", 12, false], + ["userMetadata._vlan_pri10", 3, false], + ["userMetadata._vlan_cfi11", 1, false], + ["userMetadata._push_double_vlan12", 1, false], + ["userMetadata._inner_vlan_id13", 12, false], + ["userMetadata._inner_vlan_pri14", 3, false], + ["userMetadata._inner_vlan_cfi15", 1, false], + ["userMetadata._mpls_label16", 20, false], + ["userMetadata._mpls_ttl17", 8, false], + ["userMetadata._skip_forwarding18", 1, false], + ["userMetadata._skip_next19", 1, false], + ["userMetadata._fwd_type20", 3, false], + ["userMetadata._next_id21", 32, false], + ["userMetadata._is_multicast22", 1, false], + ["userMetadata._is_controller_packet_out23", 1, false], + ["userMetadata._ip_proto24", 8, false], + ["userMetadata._l4_sport25", 16, false], + ["userMetadata._l4_dport26", 16, false], + ["userMetadata._ipv4_src_addr27", 32, false], + ["userMetadata._ipv4_dst_addr28", 32, false], + ["userMetadata._slice_id29", 4, false], + ["userMetadata._packet_color30", 2, false], + ["userMetadata._tc31", 2, false], + ["userMetadata._dscp32", 6, false], + ["userMetadata._inner_l4_sport33", 16, false], + ["userMetadata._inner_l4_dport34", 16, false], + ["userMetadata._spgw_ipv4_len35", 16, false], + ["userMetadata._spgw_teid36", 32, false], + ["userMetadata._spgw_tunnel_src_port37", 16, false], + ["userMetadata._spgw_tunnel_src_addr38", 32, false], + ["userMetadata._spgw_tunnel_dst_addr39", 32, false], + ["userMetadata._spgw_ctr_id40", 32, false], + ["userMetadata._spgw_far_id41", 32, false], + ["userMetadata._spgw_src_iface42", 8, false], + ["userMetadata._spgw_qfi43", 6, false], + ["userMetadata._spgw_skip_spgw44", 1, false], + ["userMetadata._spgw_notify_spgwc45", 1, false], + ["userMetadata._spgw_needs_gtpu_encap46", 1, false], + ["userMetadata._spgw_needs_gtpu_decap47", 1, false], + ["userMetadata._spgw_skip_egress_pdr_ctr48", 1, false], + ["userMetadata._spgw_needs_qfi_push49", 1, false], + ["userMetadata._bng_type50", 2, false], + ["userMetadata._bng_line_id51", 32, false], + ["userMetadata._bng_pppoe_session_id52", 16, false], + ["userMetadata._bng_ds_meter_result53", 32, false], + ["userMetadata._bng_s_tag54", 12, false], + ["userMetadata._bng_c_tag55", 12, false], + ["userMetadata._int_meta_source56", 1, false], + ["userMetadata._int_meta_transit57", 1, false], + ["userMetadata._int_meta_sink58", 1, false], + ["userMetadata._int_meta_switch_id59", 32, false], + ["userMetadata._int_meta_new_words60", 8, false], + ["userMetadata._int_meta_new_bytes61", 16, false], + ["userMetadata._int_meta_ig_tstamp62", 32, false], + ["userMetadata._int_meta_eg_tstamp63", 32, false], + ["userMetadata._port_type64", 2, false], + ["_padding_0", 4, false] ] }, { - "name" : "standard_metadata", + "name" : "packet_out_header_t", "id" : 1, + "fields" : [ + ["egress_port", 9, false], + ["do_forwarding", 1, false], + ["_pad", 6, false] + ] + }, + { + "name" : "gtpu_t", + "id" : 2, + "fields" : [ + ["version", 3, false], + ["pt", 1, false], + ["spare", 1, false], + ["ex_flag", 1, false], + ["seq_flag", 1, false], + ["npdu_flag", 1, false], + ["msgtype", 8, false], + ["msglen", 16, false], + ["teid", 32, false] + ] + }, + { + "name" : "standard_metadata", + "id" : 3, "fields" : [ ["ingress_port", 9, false], ["egress_spec", 9, false], ["egress_port", 9, false], - ["clone_spec", 32, false], ["instance_type", 32, false], - ["drop", 1, false], - ["recirculate_port", 16, false], ["packet_length", 32, false], ["enq_timestamp", 32, false], ["enq_qdepth", 19, false], @@ -92,20 +129,17 @@ ["deq_qdepth", 19, false], ["ingress_global_timestamp", 48, false], ["egress_global_timestamp", 48, false], - ["lf_field_list", 32, false], ["mcast_grp", 16, false], - ["resubmit_flag", 32, false], ["egress_rid", 16, false], - ["recirculate_flag", 32, false], ["checksum_error", 1, false], ["parser_error", 32, false], ["priority", 3, false], - ["_padding", 2, false] + ["_padding", 3, false] ] }, { "name" : "ethernet_t", - "id" : 2, + "id" : 4, "fields" : [ ["dst_addr", 48, false], ["src_addr", 48, false] @@ -113,7 +147,7 @@ }, { "name" : "vlan_tag_t", - "id" : 3, + "id" : 5, "fields" : [ ["eth_type", 16, false], ["pri", 3, false], @@ -123,14 +157,14 @@ }, { "name" : "eth_type_t", - "id" : 4, + "id" : 6, "fields" : [ ["value", 16, false] ] }, { "name" : "pppoe_t", - "id" : 5, + "id" : 7, "fields" : [ ["version", 4, false], ["type_id", 4, false], @@ -142,7 +176,7 @@ }, { "name" : "mpls_t", - "id" : 6, + "id" : 8, "fields" : [ ["label", 20, false], ["tc", 3, false], @@ -152,7 +186,7 @@ }, { "name" : "ipv4_t", - "id" : 7, + "id" : 9, "fields" : [ ["version", 4, false], ["ihl", 4, false], @@ -171,7 +205,7 @@ }, { "name" : "udp_t", - "id" : 8, + "id" : 10, "fields" : [ ["sport", 16, false], ["dport", 16, false], @@ -180,23 +214,30 @@ ] }, { - "name" : "gtpu_t", - "id" : 9, + "name" : "gtpu_options_t", + "id" : 11, "fields" : [ - ["version", 3, false], - ["pt", 1, false], - ["spare", 1, false], - ["ex_flag", 1, false], - ["seq_flag", 1, false], - ["npdu_flag", 1, false], - ["msgtype", 8, false], - ["msglen", 16, false], - ["teid", 32, false] + ["seq_num", 16, false], + ["n_pdu_num", 8, false], + ["next_ext", 8, false] + ] + }, + { + "name" : "gtpu_ext_psc_t", + "id" : 12, + "fields" : [ + ["len", 8, false], + ["type", 4, false], + ["spare0", 4, false], + ["ppp", 1, false], + ["rqi", 1, false], + ["qfi", 6, false], + ["next_ext", 8, false] ] }, { "name" : "tcp_t", - "id" : 10, + "id" : 13, "fields" : [ ["sport", 16, false], ["dport", 16, false], @@ -213,7 +254,7 @@ }, { "name" : "icmp_t", - "id" : 11, + "id" : 14, "fields" : [ ["icmp_type", 8, false], ["icmp_code", 8, false], @@ -225,7 +266,7 @@ }, { "name" : "ipv6_t", - "id" : 12, + "id" : 15, "fields" : [ ["version", 4, false], ["traffic_class", 8, false], @@ -237,17 +278,9 @@ ["dst_addr", 128, false] ] }, - { - "name" : "packet_out_header_t", - "id" : 13, - "fields" : [ - ["egress_port", 9, false], - ["_pad", 7, false] - ] - }, { "name" : "packet_in_header_t", - "id" : 14, + "id" : 16, "fields" : [ ["ingress_port", 9, false], ["_pad", 7, false] @@ -255,7 +288,7 @@ }, { "name" : "report_fixed_header_t", - "id" : 15, + "id" : 17, "fields" : [ ["ver", 4, false], ["nproto", 4, false], @@ -270,7 +303,7 @@ }, { "name" : "intl4_shim_t", - "id" : 16, + "id" : 18, "fields" : [ ["int_type", 8, false], ["rsvd1", 8, false], @@ -280,7 +313,7 @@ }, { "name" : "int_header_t", - "id" : 17, + "id" : 19, "fields" : [ ["ver", 2, false], ["rep", 2, false], @@ -299,14 +332,14 @@ }, { "name" : "int_switch_id_t", - "id" : 18, + "id" : 20, "fields" : [ ["switch_id", 32, false] ] }, { "name" : "int_port_ids_t", - "id" : 19, + "id" : 21, "fields" : [ ["ingress_port_id", 16, false], ["egress_port_id", 16, false] @@ -314,14 +347,14 @@ }, { "name" : "int_hop_latency_t", - "id" : 20, + "id" : 22, "fields" : [ ["hop_latency", 32, false] ] }, { "name" : "int_q_occupancy_t", - "id" : 21, + "id" : 23, "fields" : [ ["q_id", 8, false], ["q_occupancy", 24, false] @@ -329,21 +362,21 @@ }, { "name" : "int_ingress_tstamp_t", - "id" : 22, + "id" : 24, "fields" : [ ["ingress_tstamp", 32, false] ] }, { "name" : "int_egress_tstamp_t", - "id" : 23, + "id" : 25, "fields" : [ ["egress_tstamp", 32, false] ] }, { "name" : "int_q_congestion_t", - "id" : 24, + "id" : 26, "fields" : [ ["q_id", 8, false], ["q_congestion", 24, false] @@ -351,14 +384,14 @@ }, { "name" : "int_egress_port_tx_util_t", - "id" : 25, + "id" : 27, "fields" : [ ["egress_port_tx_util", 32, false] ] }, { "name" : "int_data_t", - "id" : 26, + "id" : 28, "fields" : [ ["data", "*"] ], @@ -366,7 +399,7 @@ }, { "name" : "intl4_tail_t", - "id" : 27, + "id" : 29, "fields" : [ ["next_proto", 8, false], ["dest_port", 16, false], @@ -377,281 +410,323 @@ ], "headers" : [ { - "name" : "scalars", + "name" : "tmp", "id" : 0, + "header_type" : "packet_out_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_0", + "id" : 1, + "header_type" : "gtpu_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "scalars", + "id" : 2, "header_type" : "scalars_0", "metadata" : true, "pi_omit" : true }, { "name" : "standard_metadata", - "id" : 1, + "id" : 3, "header_type" : "standard_metadata", "metadata" : true, "pi_omit" : true }, { "name" : "ethernet", - "id" : 2, + "id" : 4, "header_type" : "ethernet_t", "metadata" : false, "pi_omit" : true }, { "name" : "vlan_tag", - "id" : 3, + "id" : 5, "header_type" : "vlan_tag_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_vlan_tag", - "id" : 4, + "id" : 6, "header_type" : "vlan_tag_t", "metadata" : false, "pi_omit" : true }, { "name" : "eth_type", - "id" : 5, + "id" : 7, "header_type" : "eth_type_t", "metadata" : false, "pi_omit" : true }, { "name" : "pppoe", - "id" : 6, + "id" : 8, "header_type" : "pppoe_t", "metadata" : false, "pi_omit" : true }, { "name" : "mpls", - "id" : 7, + "id" : 9, "header_type" : "mpls_t", "metadata" : false, "pi_omit" : true }, { "name" : "gtpu_ipv4", - "id" : 8, + "id" : 10, "header_type" : "ipv4_t", "metadata" : false, "pi_omit" : true }, { "name" : "gtpu_udp", - "id" : 9, + "id" : 11, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "outer_gtpu", - "id" : 10, + "id" : 12, "header_type" : "gtpu_t", "metadata" : false, "pi_omit" : true }, + { + "name" : "outer_gtpu_options", + "id" : 13, + "header_type" : "gtpu_options_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "outer_gtpu_ext_psc", + "id" : 14, + "header_type" : "gtpu_ext_psc_t", + "metadata" : false, + "pi_omit" : true + }, { "name" : "gtpu", - "id" : 11, + "id" : 15, "header_type" : "gtpu_t", "metadata" : false, "pi_omit" : true }, + { + "name" : "gtpu_options", + "id" : 16, + "header_type" : "gtpu_options_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_ext_psc", + "id" : 17, + "header_type" : "gtpu_ext_psc_t", + "metadata" : false, + "pi_omit" : true + }, { "name" : "inner_ipv4", - "id" : 12, + "id" : 18, "header_type" : "ipv4_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_udp", - "id" : 13, + "id" : 19, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_tcp", - "id" : 14, + "id" : 20, "header_type" : "tcp_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_icmp", - "id" : 15, + "id" : 21, "header_type" : "icmp_t", "metadata" : false, "pi_omit" : true }, { "name" : "ipv4", - "id" : 16, + "id" : 22, "header_type" : "ipv4_t", "metadata" : false, "pi_omit" : true }, { "name" : "ipv6", - "id" : 17, + "id" : 23, "header_type" : "ipv6_t", "metadata" : false, "pi_omit" : true }, { "name" : "tcp", - "id" : 18, + "id" : 24, "header_type" : "tcp_t", "metadata" : false, "pi_omit" : true }, { "name" : "udp", - "id" : 19, + "id" : 25, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "icmp", - "id" : 20, + "id" : 26, "header_type" : "icmp_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_out", - "id" : 21, + "id" : 27, "header_type" : "packet_out_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_in", - "id" : 22, + "id" : 28, "header_type" : "packet_in_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "report_ethernet", - "id" : 23, + "id" : 29, "header_type" : "ethernet_t", "metadata" : false, "pi_omit" : true }, { "name" : "report_eth_type", - "id" : 24, + "id" : 30, "header_type" : "eth_type_t", "metadata" : false, "pi_omit" : true }, { "name" : "report_ipv4", - "id" : 25, + "id" : 31, "header_type" : "ipv4_t", "metadata" : false, "pi_omit" : true }, { "name" : "report_udp", - "id" : 26, + "id" : 32, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "report_fixed_header", - "id" : 27, + "id" : 33, "header_type" : "report_fixed_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "intl4_shim", - "id" : 28, + "id" : 34, "header_type" : "intl4_shim_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_header", - "id" : 29, + "id" : 35, "header_type" : "int_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_switch_id", - "id" : 30, + "id" : 36, "header_type" : "int_switch_id_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_port_ids", - "id" : 31, + "id" : 37, "header_type" : "int_port_ids_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_hop_latency", - "id" : 32, + "id" : 38, "header_type" : "int_hop_latency_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_q_occupancy", - "id" : 33, + "id" : 39, "header_type" : "int_q_occupancy_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_ingress_tstamp", - "id" : 34, + "id" : 40, "header_type" : "int_ingress_tstamp_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_egress_tstamp", - "id" : 35, + "id" : 41, "header_type" : "int_egress_tstamp_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_q_congestion", - "id" : 36, + "id" : 42, "header_type" : "int_q_congestion_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_egress_tx_util", - "id" : 37, + "id" : 43, "header_type" : "int_egress_port_tx_util_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_data", - "id" : 38, + "id" : 44, "header_type" : "int_data_t", "metadata" : false, "pi_omit" : true }, { "name" : "intl4_tail", - "id" : 39, + "id" : 45, "header_type" : "intl4_tail_t", "metadata" : false, "pi_omit" : true @@ -667,7 +742,7 @@ "name" : "fl", "source_info" : { "filename" : "include/control/acl.p4", - "line" : 46, + "line" : 45, "column" : 40, "source_fragment" : "{standard_metadata.ingress_port}" }, @@ -734,10 +809,11 @@ "type" : "hexstr", "value" : "0x00ff", "mask" : null, - "next_state" : "parse_packet_out" + "next_state" : "check_packet_out" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_ethernet" } @@ -750,71 +826,313 @@ ] }, { - "name" : "parse_packet_out", + "name" : "check_packet_out", "id" : 1, "parser_ops" : [ { "parameters" : [ { - "type" : "regular", - "value" : "packet_out" - } - ], - "op" : "extract" - } - ], - "transitions" : [ - { - "value" : "default", - "mask" : null, - "next_state" : "parse_ethernet" - } - ], - "transition_key" : [] - }, - { - "name" : "parse_ethernet", - "id" : 2, - "parser_ops" : [ - { - "parameters" : [ + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, { - "type" : "regular", - "value" : "ethernet" + "type" : "lookahead", + "value" : [0, 16] } ], - "op" : "extract" + "op" : "set" }, { "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] - }, - { - "type" : "hexstr", - "value" : "0x0ffe" + "parameters" : [ + { + "type" : "header", + "value" : "tmp" + } + ], + "op" : "add_header" } ], - "op" : "set" + "op" : "primitive" }, { "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_0"] + "value" : ["tmp", "egress_port"] }, { - "type" : "lookahead", - "value" : [0, 16] - } - ], - "op" : "set" - } - ], - "transitions" : [ - { - "type" : "hexstr", + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x7" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp", "do_forwarding"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x6" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp", "_pad"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x6" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x00", + "mask" : null, + "next_state" : "parse_packet_out_and_accept" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "strip_packet_out" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_0"] + } + ] + }, + { + "name" : "parse_packet_out_and_accept", + "id" : 2, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "packet_out" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "strip_packet_out", + "id" : 3, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x00000010" + } + ], + "op" : "advance" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ethernet" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_ethernet", + "id" : 4, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "ethernet" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_1"] + }, + { + "type" : "lookahead", + "value" : [0, 16] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", "value" : "0x88a8", "mask" : null, "next_state" : "parse_vlan_tag" @@ -832,7 +1150,8 @@ "next_state" : "parse_vlan_tag" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -840,13 +1159,13 @@ "transition_key" : [ { "type" : "field", - "value" : ["scalars", "tmp_0"] + "value" : ["scalars", "tmp_1"] } ] }, { "name" : "parse_vlan_tag", - "id" : 3, + "id" : 5, "parser_ops" : [ { "parameters" : [ @@ -861,7 +1180,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_s_tag42"] + "value" : ["scalars", "userMetadata._bng_s_tag54"] }, { "type" : "field", @@ -874,7 +1193,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_1"] + "value" : ["scalars", "tmp_3"] }, { "type" : "lookahead", @@ -892,7 +1211,8 @@ "next_state" : "parse_inner_vlan_tag" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -900,13 +1220,13 @@ "transition_key" : [ { "type" : "field", - "value" : ["scalars", "tmp_1"] + "value" : ["scalars", "tmp_3"] } ] }, { "name" : "parse_inner_vlan_tag", - "id" : 4, + "id" : 6, "parser_ops" : [ { "parameters" : [ @@ -921,7 +1241,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_c_tag43"] + "value" : ["scalars", "userMetadata._bng_c_tag55"] }, { "type" : "field", @@ -933,7 +1253,8 @@ ], "transitions" : [ { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -942,7 +1263,7 @@ }, { "name" : "parse_eth_type", - "id" : 5, + "id" : 7, "parser_ops" : [ { "parameters" : [ @@ -986,7 +1307,8 @@ "next_state" : "parse_pppoe" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -1000,7 +1322,7 @@ }, { "name" : "parse_pppoe", - "id" : 6, + "id" : 8, "parser_ops" : [ { "parameters" : [ @@ -1032,7 +1354,8 @@ "next_state" : "parse_ipv6" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -1046,7 +1369,7 @@ }, { "name" : "parse_mpls", - "id" : 7, + "id" : 9, "parser_ops" : [ { "parameters" : [ @@ -1061,7 +1384,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label8"] + "value" : ["scalars", "userMetadata._mpls_label16"] }, { "type" : "field", @@ -1074,7 +1397,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl9"] + "value" : ["scalars", "userMetadata._mpls_ttl17"] }, { "type" : "field", @@ -1087,7 +1410,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_2"] + "value" : ["scalars", "tmp_5"] }, { "type" : "lookahead", @@ -1111,7 +1434,8 @@ "next_state" : "parse_ipv6" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_ethernet" } @@ -1119,13 +1443,13 @@ "transition_key" : [ { "type" : "field", - "value" : ["scalars", "tmp_2"] + "value" : ["scalars", "tmp_5"] } ] }, { "name" : "parse_ipv4", - "id" : 8, + "id" : 10, "parser_ops" : [ { "parameters" : [ @@ -1140,7 +1464,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto16"] + "value" : ["scalars", "userMetadata._ip_proto24"] }, { "type" : "field", @@ -1153,7 +1477,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] }, { "type" : "hexstr", @@ -1166,7 +1490,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr19"] + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] }, { "type" : "field", @@ -1179,7 +1503,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr20"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] }, { "type" : "field", @@ -1222,7 +1546,8 @@ "next_state" : "parse_icmp" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -1236,7 +1561,7 @@ }, { "name" : "parse_ipv6", - "id" : 9, + "id" : 11, "parser_ops" : [ { "parameters" : [ @@ -1251,7 +1576,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto16"] + "value" : ["scalars", "userMetadata._ip_proto24"] }, { "type" : "field", @@ -1264,7 +1589,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] }, { "type" : "hexstr", @@ -1294,7 +1619,8 @@ "next_state" : "parse_icmp" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -1308,7 +1634,7 @@ }, { "name" : "parse_tcp", - "id" : 10, + "id" : 12, "parser_ops" : [ { "parameters" : [ @@ -1323,7 +1649,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport17"] + "value" : ["scalars", "userMetadata._l4_sport25"] }, { "type" : "field", @@ -1336,7 +1662,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport18"] + "value" : ["scalars", "userMetadata._l4_dport26"] }, { "type" : "field", @@ -1348,7 +1674,8 @@ ], "transitions" : [ { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_int" } @@ -1357,7 +1684,7 @@ }, { "name" : "parse_udp", - "id" : 11, + "id" : 13, "parser_ops" : [ { "parameters" : [ @@ -1372,7 +1699,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport17"] + "value" : ["scalars", "userMetadata._l4_sport25"] }, { "type" : "field", @@ -1385,7 +1712,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport18"] + "value" : ["scalars", "userMetadata._l4_dport26"] }, { "type" : "field", @@ -1393,244 +1720,39 @@ } ], "op" : "set" - } - ], - "transitions" : [ - { - "type" : "hexstr", - "value" : "0x0868", - "mask" : null, - "next_state" : "parse_gtpu" - }, - { - "value" : "default", - "mask" : null, - "next_state" : "parse_int" - } - ], - "transition_key" : [ - { - "type" : "field", - "value" : ["udp", "dport"] - } - ] - }, - { - "name" : "parse_icmp", - "id" : 12, - "parser_ops" : [ - { - "parameters" : [ - { - "type" : "regular", - "value" : "icmp" - } - ], - "op" : "extract" - } - ], - "transitions" : [ - { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [] - }, - { - "name" : "parse_gtpu", - "id" : 13, - "parser_ops" : [ - { - "parameters" : [ - { - "type" : "regular", - "value" : "gtpu" - } - ], - "op" : "extract" - }, - { - "parameters" : [ - { - "type" : "regular", - "value" : "inner_ipv4" - } - ], - "op" : "extract" - }, - { - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "last_ipv4_dscp_0"] - }, - { - "type" : "field", - "value" : ["inner_ipv4", "dscp"] - } - ], - "op" : "set" - } - ], - "transitions" : [ - { - "type" : "hexstr", - "value" : "0x06", - "mask" : null, - "next_state" : "parse_tcp" - }, - { - "type" : "hexstr", - "value" : "0x11", - "mask" : null, - "next_state" : "parse_inner_udp" - }, - { - "type" : "hexstr", - "value" : "0x01", - "mask" : null, - "next_state" : "parse_icmp" - }, - { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [ - { - "type" : "field", - "value" : ["inner_ipv4", "protocol"] - } - ] - }, - { - "name" : "parse_inner_udp", - "id" : 14, - "parser_ops" : [ - { - "parameters" : [ - { - "type" : "regular", - "value" : "inner_udp" - } - ], - "op" : "extract" - }, - { - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport21"] - }, - { - "type" : "field", - "value" : ["inner_udp", "sport"] - } - ], - "op" : "set" }, { "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport22"] + "value" : ["scalars", "tmp_7"] }, { - "type" : "field", - "value" : ["inner_udp", "dport"] + "type" : "lookahead", + "value" : [0, 64] } ], "op" : "set" - } - ], - "transitions" : [ - { - "value" : "default", - "mask" : null, - "next_state" : "parse_int" - } - ], - "transition_key" : [] - }, - { - "name" : "parse_int", - "id" : 15, - "parser_ops" : [], - "transitions" : [ - { - "type" : "hexstr", - "value" : "0x01", - "mask" : "0x01", - "next_state" : "parse_intl4_shim" - }, - { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [ - { - "type" : "field", - "value" : ["scalars", "last_ipv4_dscp_0"] - } - ] - }, - { - "name" : "parse_intl4_shim", - "id" : 16, - "parser_ops" : [ - { - "parameters" : [ - { - "type" : "regular", - "value" : "intl4_shim" - } - ], - "op" : "extract" }, { "parameters" : [ { - "type" : "regular", - "value" : "int_header" + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_0" + } + ], + "op" : "add_header" } ], - "op" : "extract" - } - ], - "transitions" : [ - { - "type" : "hexstr", - "value" : "0x04", - "mask" : null, - "next_state" : "parse_intl4_tail" + "op" : "primitive" }, - { - "value" : "default", - "mask" : null, - "next_state" : "parse_int_data" - } - ], - "transition_key" : [ - { - "type" : "field", - "value" : ["intl4_shim", "len_words"] - } - ] - }, - { - "name" : "parse_int_data", - "id" : 17, - "parser_ops" : [ { "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp"] + "value" : ["gtpu_0", "version"] }, { "type" : "expression", @@ -1641,50 +1763,30 @@ "left" : { "type" : "expression", "value" : { - "op" : "<<", + "op" : "&", "left" : { "type" : "expression", "value" : { - "op" : "&", + "op" : ">>", "left" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["intl4_shim", "len_words"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xfc" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } + "type" : "field", + "value" : ["scalars", "tmp_7"] }, "right" : { "type" : "hexstr", - "value" : "0xffffffff" + "value" : "0x3d" } } }, "right" : { "type" : "hexstr", - "value" : "0x5" + "value" : "0xffffffffffffffff" } } }, "right" : { "type" : "hexstr", - "value" : "0xffffffff" + "value" : "0x07" } } } @@ -1695,658 +1797,4165 @@ { "parameters" : [ { - "type" : "regular", - "value" : "int_data" + "type" : "field", + "value" : ["gtpu_0", "pt"] }, { "type" : "expression", "value" : { - "type" : "field", - "value" : ["scalars", "tmp"] - } - } - ], - "op" : "extract_VL" - } - ], - "transitions" : [ + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3c" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "spare"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3b" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "ex_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3a" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "seq_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x39" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "npdu_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x38" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msgtype"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msglen"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x20" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "teid"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x086801ff", + "mask" : null, + "next_state" : "parse_gtpu" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_int" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["udp", "dport"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + } + ] + }, + { + "name" : "parse_icmp", + "id" : 14, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "icmp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_gtpu", + "id" : 15, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x000000", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_gtpu_options" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu", "ex_flag"] + }, + { + "type" : "field", + "value" : ["gtpu", "seq_flag"] + }, + { + "type" : "field", + "value" : ["gtpu", "npdu_flag"] + } + ] + }, + { + "name" : "parse_gtpu_options", + "id" : 16, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu_options" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + }, + { + "type" : "lookahead", + "value" : [0, 8] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x8501", + "mask" : null, + "next_state" : "parse_gtpu_ext_psc" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu_options", "next_ext"] + }, + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + } + ] + }, + { + "name" : "parse_gtpu_ext_psc", + "id" : 17, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu_ext_psc" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_qfi43"] + }, + { + "type" : "field", + "value" : ["gtpu_ext_psc", "qfi"] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x00", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu_ext_psc", "next_ext"] + } + ] + }, + { + "name" : "parse_inner_ipv4", + "id" : 18, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_ipv4" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "last_ipv4_dscp_0"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dscp"] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_inner_tcp" + }, + { + "type" : "hexstr", + "value" : "0x11", + "mask" : null, + "next_state" : "parse_inner_udp" + }, + { + "type" : "hexstr", + "value" : "0x01", + "mask" : null, + "next_state" : "parse_inner_icmp" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ] + }, + { + "name" : "parse_inner_udp", + "id" : 19, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_udp" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport33"] + }, + { + "type" : "field", + "value" : ["inner_udp", "sport"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport34"] + }, + { + "type" : "field", + "value" : ["inner_udp", "dport"] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_int" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_tcp", + "id" : 20, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_tcp" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport33"] + }, + { + "type" : "field", + "value" : ["inner_tcp", "sport"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport34"] + }, + { + "type" : "field", + "value" : ["inner_tcp", "dport"] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_icmp", + "id" : 21, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_icmp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_int", + "id" : 22, + "parser_ops" : [], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x01", + "mask" : "0x01", + "next_state" : "parse_intl4_shim" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "last_ipv4_dscp_0"] + } + ] + }, + { + "name" : "parse_intl4_shim", + "id" : 23, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "intl4_shim" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "regular", + "value" : "int_header" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x04", + "mask" : null, + "next_state" : "parse_intl4_tail" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_int_data" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["intl4_shim", "len_words"] + } + ] + }, + { + "name" : "parse_int_data", + "id" : 24, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_8"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["intl4_shim", "len_words"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xfc" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x5" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "regular", + "value" : "int_data" + }, + { + "type" : "expression", + "value" : { + "type" : "field", + "value" : ["scalars", "tmp_8"] + } + } + ], + "op" : "extract_VL" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_intl4_tail" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_intl4_tail", + "id" : 25, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "intl4_tail" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + } + ] + } + ], + "parse_vsets" : [], + "deparsers" : [ + { + "name" : "deparser", + "id" : 0, + "source_info" : { + "filename" : "include/parser.p4", + "line" : 308, + "column" : 8, + "source_fragment" : "FabricDeparser" + }, + "order" : ["packet_in", "report_ethernet", "report_eth_type", "report_ipv4", "report_udp", "report_fixed_header", "ethernet", "vlan_tag", "inner_vlan_tag", "eth_type", "pppoe", "mpls", "gtpu_ipv4", "gtpu_udp", "outer_gtpu", "outer_gtpu_options", "outer_gtpu_ext_psc", "ipv4", "ipv6", "tcp", "udp", "icmp", "gtpu", "gtpu_options", "gtpu_ext_psc", "inner_ipv4", "inner_tcp", "inner_udp", "inner_icmp", "intl4_shim", "int_header", "int_switch_id", "int_port_ids", "int_hop_latency", "int_q_occupancy", "int_ingress_tstamp", "int_egress_tstamp", "int_q_congestion", "int_egress_tx_util", "int_data", "intl4_tail"], + "primitives" : [] + } + ], + "meter_arrays" : [ + { + "name" : "FabricIngress.bng_ingress.downstream.m_besteff", + "id" : 0, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 154, + "column" : 33, + "source_fragment" : "m_besteff" + }, + "is_direct" : false, + "size" : 8192, + "rate_count" : 2, + "type" : "bytes" + }, + { + "name" : "FabricIngress.bng_ingress.downstream.m_prio", + "id" : 1, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 155, + "column" : 33, + "source_fragment" : "m_prio" + }, + "is_direct" : false, + "size" : 8192, + "rate_count" : 2, + "type" : "bytes" + }, + { + "name" : "FabricIngress.qos.slice_tc_meter", + "id" : 2, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 78, + "column" : 41, + "source_fragment" : "slice_tc_meter" + }, + "is_direct" : false, + "size" : 64, + "rate_count" : 2, + "type" : "bytes" + } + ], + "counter_arrays" : [ + { + "name" : "FabricIngress.process_set_source_sink.counter_set_source", + "id" : 0, + "is_direct" : true, + "binding" : "FabricIngress.process_set_source_sink.tb_set_source", + "source_info" : { + "filename" : "include/int/int_main.p4", + "line" : 39, + "column" : 50, + "source_fragment" : "counter_set_source" + } + }, + { + "name" : "FabricIngress.process_set_source_sink.counter_set_sink", + "id" : 1, + "is_direct" : true, + "binding" : "FabricIngress.process_set_source_sink.tb_set_sink", + "source_info" : { + "filename" : "include/int/int_main.p4", + "line" : 60, + "column" : 50, + "source_fragment" : "counter_set_sink" + } + }, + { + "name" : "FabricIngress.bng_ingress.upstream.c_terminated", + "id" : 2, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 36, + "column" : 37, + "source_fragment" : "c_terminated" + }, + "size" : 8192, + "is_direct" : false + }, + { + "name" : "FabricIngress.bng_ingress.upstream.c_dropped", + "id" : 3, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 37, + "column" : 37, + "source_fragment" : "c_dropped" + }, + "size" : 8192, + "is_direct" : false + }, + { + "name" : "FabricIngress.bng_ingress.upstream.c_control", + "id" : 4, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 38, + "column" : 39, + "source_fragment" : "c_control" + }, + "size" : 8192, + "is_direct" : false + }, + { + "name" : "FabricIngress.bng_ingress.downstream.c_line_rx", + "id" : 5, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 152, + "column" : 37, + "source_fragment" : "c_line_rx" + }, + "size" : 8192, + "is_direct" : false + }, + { + "name" : "FabricIngress.filtering.ingress_port_vlan_counter", + "id" : 6, + "is_direct" : true, + "binding" : "FabricIngress.filtering.ingress_port_vlan", + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 31, + "column" : 50, + "source_fragment" : "ingress_port_vlan_counter" + } + }, + { + "name" : "FabricIngress.filtering.fwd_classifier_counter", + "id" : 7, + "is_direct" : true, + "binding" : "FabricIngress.filtering.fwd_classifier", + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 87, + "column" : 50, + "source_fragment" : "fwd_classifier_counter" + } + }, + { + "name" : "FabricIngress.forwarding.bridging_counter", + "id" : 8, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.bridging", + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 36, + "column" : 50, + "source_fragment" : "bridging_counter" + } + }, + { + "name" : "FabricIngress.forwarding.mpls_counter", + "id" : 9, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.mpls", + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 63, + "column" : 50, + "source_fragment" : "mpls_counter" + } + }, + { + "name" : "FabricIngress.forwarding.routing_v6_counter", + "id" : 10, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.routing_v6", + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 128, + "column" : 50, + "source_fragment" : "routing_v6_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_mpls_counter", + "id" : 11, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_mpls", + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 29, + "column" : 50, + "source_fragment" : "next_mpls_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_vlan_counter", + "id" : 12, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_vlan", + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 54, + "column" : 50, + "source_fragment" : "next_vlan_counter" + } + }, + { + "name" : "FabricIngress.acl.acl_counter", + "id" : 13, + "is_direct" : true, + "binding" : "FabricIngress.acl.acl", + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 29, + "column" : 50, + "source_fragment" : "acl_counter" + } + }, + { + "name" : "FabricIngress.next.xconnect_counter", + "id" : 14, + "is_direct" : true, + "binding" : "FabricIngress.next.xconnect", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 56, + "column" : 50, + "source_fragment" : "xconnect_counter" + } + }, + { + "name" : "FabricIngress.next.simple_counter", + "id" : 15, + "is_direct" : true, + "binding" : "FabricIngress.next.simple", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 89, + "column" : 50, + "source_fragment" : "simple_counter" + } + }, + { + "name" : "FabricIngress.next.hashed_counter", + "id" : 16, + "is_direct" : true, + "binding" : "FabricIngress.next.hashed", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 126, + "column" : 50, + "source_fragment" : "hashed_counter" + } + }, + { + "name" : "FabricIngress.next.multicast_counter", + "id" : 17, + "is_direct" : true, + "binding" : "FabricIngress.next.multicast", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 163, + "column" : 50, + "source_fragment" : "multicast_counter" + } + }, + { + "name" : "FabricIngress.slice_tc_classifier.classifier_stats", + "id" : 18, + "is_direct" : true, + "binding" : "FabricIngress.slice_tc_classifier.classifier", + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 32, + "column" : 40, + "source_fragment" : "classifier_stats" + } + }, + { + "name" : "FabricIngress.qos.queues_stats", + "id" : 19, + "is_direct" : true, + "binding" : "FabricIngress.qos.queues", + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 80, + "column" : 40, + "source_fragment" : "queues_stats" + } + }, + { + "name" : "FabricIngress.port_counters_control.egress_port_counter", + "id" : 20, + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 26, + "column" : 48, + "source_fragment" : "egress_port_counter" + }, + "size" : 511, + "is_direct" : false + }, + { + "name" : "FabricIngress.port_counters_control.ingress_port_counter", + "id" : 21, + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 27, + "column" : 48, + "source_fragment" : "ingress_port_counter" + }, + "size" : 511, + "is_direct" : false + }, + { + "name" : "FabricIngress.spgw.pdr_counter", + "id" : 22, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 110, + "column" : 53, + "source_fragment" : "pdr_counter" + }, + "size" : 2048, + "is_direct" : false + }, + { + "name" : "FabricEgress.bng_egress.downstream.c_line_tx", + "id" : 23, + "source_info" : { + "filename" : "include/bng.p4", + "line" : 267, + "column" : 37, + "source_fragment" : "c_line_tx" + }, + "size" : 8192, + "is_direct" : false + }, + { + "name" : "FabricEgress.process_int_main.process_int_source.counter_int_source", + "id" : 24, + "is_direct" : true, + "binding" : "FabricEgress.process_int_main.process_int_source.tb_int_source", + "source_info" : { + "filename" : "include/int/int_source.p4", + "line" : 27, + "column" : 50, + "source_fragment" : "counter_int_source" + } + }, + { + "name" : "FabricEgress.egress_next.egress_vlan_counter", + "id" : 25, + "is_direct" : true, + "binding" : "FabricEgress.egress_next.egress_vlan", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 248, + "column" : 50, + "source_fragment" : "egress_vlan_counter" + } + }, + { + "name" : "FabricEgress.spgw.pdr_counter", + "id" : 26, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 307, + "column" : 53, + "source_fragment" : "pdr_counter" + }, + "size" : 2048, + "is_direct" : false + } + ], + "register_arrays" : [], + "calculations" : [ + { + "name" : "calc", + "id" : 0, + "source_info" : { + "filename" : "include/checksum.p4", + "line" : 28, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["ipv4", "version"] + }, + { + "type" : "field", + "value" : ["ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["ipv4", "dst_addr"] + } + ] + }, + { + "name" : "calc_0", + "id" : 1, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 393, + "column" : 8, + "source_fragment" : "update_checksum(gtpu_ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["gtpu_ipv4", "version"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "dst_addr"] + } + ] + }, + { + "name" : "calc_1", + "id" : 2, + "source_info" : { + "filename" : "include/checksum.p4", + "line" : 57, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["ipv4", "version"] + }, + { + "type" : "field", + "value" : ["ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["ipv4", "dst_addr"] + } + ] + } + ], + "learn_lists" : [], + "actions" : [ + { + "name" : "nop", + "id" : 0, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 1, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 2, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 3, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 4, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 5, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 6, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 7, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 8, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 9, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 10, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 11, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 12, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 13, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "NoAction", + "id" : 14, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "NoAction", + "id" : 15, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.process_set_source_sink.int_set_source", + "id" : 16, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_source56"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_main.p4", + "line" : 42, + "column" : 40, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.process_set_source_sink.int_set_sink", + "id" : 17, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_sink58"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_main.p4", + "line" : 63, + "column" : 38, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.bng_ingress.upstream.punt_to_cpu", + "id" : 18, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "hexstr", + "value" : "0x00ff" + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 44, + "column" : 8, + "source_fragment" : "smeta.egress_spec = 255" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "mcast_grp"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "smeta.mcast_grp = 0" + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.bng_ingress.upstream.c_control" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_line_id51"] + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "c_control.count(fmeta.bng.line_id)" + } + } + ] + }, + { + "name" : "FabricIngress.bng_ingress.upstream.term_disabled", + "id" : 19, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_type50"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/../header.p4", + "line" : 184, + "column" : 36, + "source_fragment" : "2w0x0; ..." + } + }, + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 77, + "column" : 8, + "source_fragment" : "mark_to_drop(smeta)" + } + } + ] + }, + { + "name" : "FabricIngress.bng_ingress.upstream.term_disabled", + "id" : 20, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_type50"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/../header.p4", + "line" : 184, + "column" : 36, + "source_fragment" : "2w0x0; ..." + } + }, + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 77, + "column" : 8, + "source_fragment" : "mark_to_drop(smeta)" + } + } + ] + }, + { + "name" : "FabricIngress.bng_ingress.upstream.term_enabled_v4", + "id" : 21, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "pppoe" + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 71, + "column" : 8, + "source_fragment" : "hdr.pppoe.setInvalid()" + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.bng_ingress.upstream.c_terminated" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_line_id51"] + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 72, + "column" : 8, + "source_fragment" : "c_terminated.count(fmeta.bng.line_id)" + } + } + ] + }, + { + "name" : "FabricIngress.bng_ingress.upstream.term_enabled_v6", + "id" : 22, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0x86dd" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 150, + "column" : 31, + "source_fragment" : "0x86dd; ..." + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "pppoe" + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 71, + "column" : 8, + "source_fragment" : "hdr.pppoe.setInvalid()" + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.bng_ingress.upstream.c_terminated" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_line_id51"] + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 72, + "column" : 8, + "source_fragment" : "c_terminated.count(fmeta.bng.line_id)" + } + } + ] + }, + { + "name" : "FabricIngress.bng_ingress.downstream.set_session", + "id" : 23, + "runtime_data" : [ + { + "name" : "pppoe_session_id", + "bitwidth" : 16 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_type50"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "include/control/../header.p4", + "line" : 186, + "column" : 39, + "source_fragment" : "2w0x2;; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_pppoe_session_id52"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 159, + "column" : 35, + "source_fragment" : "= pppoe_session_id; ..." + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.bng_ingress.downstream.c_line_rx" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_line_id51"] + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 160, + "column" : 8, + "source_fragment" : "c_line_rx.count(fmeta.bng.line_id)" + } + } + ] + }, + { + "name" : "FabricIngress.bng_ingress.downstream.drop", + "id" : 24, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_type50"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "include/control/../header.p4", + "line" : 186, + "column" : 39, + "source_fragment" : "2w0x2;; ..." + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.bng_ingress.downstream.c_line_rx" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_line_id51"] + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 165, + "column" : 8, + "source_fragment" : "c_line_rx.count(fmeta.bng.line_id)" + } + }, + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 166, + "column" : 8, + "source_fragment" : "mark_to_drop(smeta)" + } + } + ] + }, + { + "name" : "FabricIngress.bng_ingress.downstream.qos_prio", + "id" : 25, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.bng_ingress.downstream.qos_prio", + "id" : 26, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.bng_ingress.downstream.qos_besteff", + "id" : 27, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.bng_ingress.downstream.qos_besteff", + "id" : 28, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.bng_ingress.set_line", + "id" : 29, + "runtime_data" : [ + { + "name" : "line_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_line_id51"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 320, + "column" : 30, + "source_fragment" : "= line_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.deny", + "id" : 30, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_forwarding18"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 36, + "column" : 40, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next19"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 37, + "column" : 34, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type64"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 136, + "column" : 38, + "source_fragment" : "0x0; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit", + "id" : 31, + "runtime_data" : [ + { + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type64"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 44, + "column" : 34, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit_with_internal_vlan", + "id" : 32, + "runtime_data" : [ + { + "name" : "vlan_id", + "bitwidth" : 12 + }, + { + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 49, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type64"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 44, + "column" : 34, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.set_forwarding_type", + "id" : 33, + "runtime_data" : [ + { + "name" : "fwd_type", + "bitwidth" : 3 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._fwd_type20"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 90, + "column" : 33, + "source_fragment" : "= fwd_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_bridging", + "id" : 34, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.pop_mpls_and_next", + "id" : 35, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label16"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 66, + "column" : 35, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_routing_v4", + "id" : 36, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.nop_routing_v4", + "id" : 37, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_routing_v6", + "id" : 38, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.pre_next.set_mpls_label", + "id" : 39, + "runtime_data" : [ + { + "name" : "label", + "bitwidth" : 20 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label16"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 32, + "column" : 35, + "source_fragment" : "= label; ..." + } + } + ] + }, + { + "name" : "FabricIngress.pre_next.set_vlan", + "id" : 40, + "runtime_data" : [ + { + "name" : "vlan_id", + "bitwidth" : 12 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 57, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.pre_next.set_double_vlan", + "id" : 41, + "runtime_data" : [ + { + "name" : "outer_vlan_id", + "bitwidth" : 12 + }, + { + "name" : "inner_vlan_id", + "bitwidth" : 12 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 57, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._push_double_vlan12"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 64, + "column" : 41, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ { - "value" : "default", - "mask" : null, - "next_state" : "parse_intl4_tail" + "type" : "field", + "value" : ["scalars", "userMetadata._inner_vlan_id13"] + }, + { + "type" : "runtime_data", + "value" : 1 } ], - "transition_key" : [] + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 65, + "column" : 38, + "source_fragment" : "= inner_vlan_id; ..." + } }, { - "name" : "parse_intl4_tail", - "id" : 18, - "parser_ops" : [ + "op" : "assign", + "parameters" : [ { - "parameters" : [ - { - "type" : "regular", - "value" : "intl4_tail" - } - ], - "op" : "extract" + "type" : "field", + "value" : ["scalars", "userMetadata._bng_s_tag54"] + }, + { + "type" : "runtime_data", + "value" : 0 } ], - "transitions" : [ + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 67, + "column" : 34, + "source_fragment" : "= outer_vlan_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ { - "value" : "default", - "mask" : null, - "next_state" : null + "type" : "field", + "value" : ["scalars", "userMetadata._bng_c_tag55"] + }, + { + "type" : "runtime_data", + "value" : 1 } ], - "transition_key" : [] + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 68, + "column" : 34, + "source_fragment" : "= inner_vlan_id; ..." + } } ] - } - ], - "parse_vsets" : [], - "deparsers" : [ - { - "name" : "deparser", - "id" : 0, - "source_info" : { - "filename" : "include/parser.p4", - "line" : 268, - "column" : 8, - "source_fragment" : "FabricDeparser" - }, - "order" : ["packet_in", "report_ethernet", "report_eth_type", "report_ipv4", "report_udp", "report_fixed_header", "ethernet", "vlan_tag", "inner_vlan_tag", "eth_type", "pppoe", "mpls", "gtpu_ipv4", "gtpu_udp", "outer_gtpu", "ipv4", "ipv6", "tcp", "udp", "icmp", "gtpu", "inner_ipv4", "inner_tcp", "inner_udp", "inner_icmp", "intl4_shim", "int_header", "int_switch_id", "int_port_ids", "int_hop_latency", "int_q_occupancy", "int_ingress_tstamp", "int_egress_tstamp", "int_q_congestion", "int_egress_tx_util", "int_data", "intl4_tail"] - } - ], - "meter_arrays" : [ - { - "name" : "FabricIngress.bng_ingress.downstream.m_besteff", - "id" : 0, - "source_info" : { - "filename" : "include/bng.p4", - "line" : 154, - "column" : 33, - "source_fragment" : "m_besteff" - }, - "is_direct" : false, - "size" : 8192, - "rate_count" : 2, - "type" : "bytes" - }, - { - "name" : "FabricIngress.bng_ingress.downstream.m_prio", - "id" : 1, - "source_info" : { - "filename" : "include/bng.p4", - "line" : 155, - "column" : 33, - "source_fragment" : "m_prio" - }, - "is_direct" : false, - "size" : 8192, - "rate_count" : 2, - "type" : "bytes" - } - ], - "counter_arrays" : [ - { - "name" : "FabricIngress.process_set_source_sink.counter_set_source", - "id" : 0, - "is_direct" : true, - "binding" : "FabricIngress.process_set_source_sink.tb_set_source", - "source_info" : { - "filename" : "include/int/int_main.p4", - "line" : 39, - "column" : 50, - "source_fragment" : "counter_set_source" - } - }, - { - "name" : "FabricIngress.process_set_source_sink.counter_set_sink", - "id" : 1, - "is_direct" : true, - "binding" : "FabricIngress.process_set_source_sink.tb_set_sink", - "source_info" : { - "filename" : "include/int/int_main.p4", - "line" : 60, - "column" : 50, - "source_fragment" : "counter_set_sink" - } - }, - { - "name" : "FabricIngress.bng_ingress.upstream.c_terminated", - "id" : 2, - "source_info" : { - "filename" : "include/bng.p4", - "line" : 36, - "column" : 37, - "source_fragment" : "c_terminated" - }, - "size" : 8192, - "is_direct" : false - }, - { - "name" : "FabricIngress.bng_ingress.upstream.c_dropped", - "id" : 3, - "source_info" : { - "filename" : "include/bng.p4", - "line" : 37, - "column" : 37, - "source_fragment" : "c_dropped" - }, - "size" : 8192, - "is_direct" : false - }, - { - "name" : "FabricIngress.bng_ingress.upstream.c_control", - "id" : 4, - "source_info" : { - "filename" : "include/bng.p4", - "line" : 38, - "column" : 39, - "source_fragment" : "c_control" - }, - "size" : 8192, - "is_direct" : false - }, - { - "name" : "FabricIngress.bng_ingress.downstream.c_line_rx", - "id" : 5, - "source_info" : { - "filename" : "include/bng.p4", - "line" : 152, - "column" : 37, - "source_fragment" : "c_line_rx" - }, - "size" : 8192, - "is_direct" : false - }, - { - "name" : "FabricIngress.filtering.ingress_port_vlan_counter", - "id" : 6, - "is_direct" : true, - "binding" : "FabricIngress.filtering.ingress_port_vlan", - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 31, - "column" : 50, - "source_fragment" : "ingress_port_vlan_counter" - } }, { - "name" : "FabricIngress.filtering.fwd_classifier_counter", - "id" : 7, - "is_direct" : true, - "binding" : "FabricIngress.filtering.fwd_classifier", - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 85, - "column" : 50, - "source_fragment" : "fwd_classifier_counter" - } + "name" : "FabricIngress.acl.set_next_id_acl", + "id" : 42, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 32, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] }, { - "name" : "FabricIngress.forwarding.bridging_counter", - "id" : 8, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.bridging", - "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 36, - "column" : 50, - "source_fragment" : "bridging_counter" - } + "name" : "FabricIngress.acl.punt_to_cpu", + "id" : 43, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "hexstr", + "value" : "0x00ff" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "standard_metadata.egress_spec = 255" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next19"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 39, + "column" : 28, + "source_fragment" : "= true; ..." + } + } + ] }, { - "name" : "FabricIngress.forwarding.mpls_counter", - "id" : 9, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.mpls", - "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 63, - "column" : 50, - "source_fragment" : "mpls_counter" - } + "name" : "FabricIngress.acl.set_clone_session_id", + "id" : 44, + "runtime_data" : [ + { + "name" : "clone_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "clone_ingress_pkt_to_egress", + "parameters" : [ + { + "type" : "runtime_data", + "value" : 0 + }, + { + "type" : "hexstr", + "value" : "0x1" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})" + } + } + ] }, { - "name" : "FabricIngress.forwarding.routing_v6_counter", - "id" : 10, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.routing_v6", - "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 128, - "column" : 50, - "source_fragment" : "routing_v6_counter" - } + "name" : "FabricIngress.acl.drop", + "id" : 45, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 50, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next19"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 51, + "column" : 28, + "source_fragment" : "= true; ..." + } + } + ] }, { - "name" : "FabricIngress.acl.acl_counter", - "id" : 11, - "is_direct" : true, - "binding" : "FabricIngress.acl.acl", - "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 30, - "column" : 50, - "source_fragment" : "acl_counter" - } + "name" : "FabricIngress.acl.nop_acl", + "id" : 46, + "runtime_data" : [], + "primitives" : [] }, { - "name" : "FabricIngress.next.next_vlan_counter", - "id" : 12, - "is_direct" : true, - "binding" : "FabricIngress.next.next_vlan", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 67, - "column" : 50, - "source_fragment" : "next_vlan_counter" - } + "name" : "FabricIngress.next.output_xconnect", + "id" : 47, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] }, { - "name" : "FabricIngress.next.xconnect_counter", - "id" : 13, - "is_direct" : true, - "binding" : "FabricIngress.next.xconnect", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 107, - "column" : 50, - "source_fragment" : "xconnect_counter" - } + "name" : "FabricIngress.next.set_next_id_xconnect", + "id" : 48, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 64, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] }, { - "name" : "FabricIngress.next.simple_counter", - "id" : 14, - "is_direct" : true, - "binding" : "FabricIngress.next.simple", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 140, - "column" : 50, - "source_fragment" : "simple_counter" - } + "name" : "FabricIngress.next.output_simple", + "id" : 49, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] }, { - "name" : "FabricIngress.next.hashed_counter", - "id" : 15, - "is_direct" : true, - "binding" : "FabricIngress.next.hashed", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 184, - "column" : 50, - "source_fragment" : "hashed_counter" - } + "name" : "FabricIngress.next.routing_simple", + "id" : 50, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + }, + { + "name" : "smac", + "bitwidth" : 48 + }, + { + "name" : "dmac", + "bitwidth" : 48 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ethernet", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 36, + "column" : 8, + "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ethernet", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] }, { - "name" : "FabricIngress.next.multicast_counter", - "id" : 16, - "is_direct" : true, - "binding" : "FabricIngress.next.multicast", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 228, - "column" : 50, - "source_fragment" : "multicast_counter" - } + "name" : "FabricIngress.next.output_hashed", + "id" : 51, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] }, { - "name" : "FabricIngress.port_counters_control.egress_port_counter", - "id" : 17, - "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 26, - "column" : 48, - "source_fragment" : "egress_port_counter" - }, - "size" : 511, - "is_direct" : false + "name" : "FabricIngress.next.routing_hashed", + "id" : 52, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + }, + { + "name" : "smac", + "bitwidth" : 48 + }, + { + "name" : "dmac", + "bitwidth" : 48 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ethernet", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 36, + "column" : 8, + "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ethernet", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] }, { - "name" : "FabricIngress.port_counters_control.ingress_port_counter", - "id" : 18, - "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 27, - "column" : 48, - "source_fragment" : "ingress_port_counter" - }, - "size" : 511, - "is_direct" : false + "name" : "FabricIngress.next.set_mcast_group_id", + "id" : 53, + "runtime_data" : [ + { + "name" : "group_id", + "bitwidth" : 16 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "mcast_grp"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 166, + "column" : 8, + "source_fragment" : "standard_metadata.mcast_grp = group_id" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._is_multicast22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 167, + "column" : 37, + "source_fragment" : "= true; ..." + } + } + ] }, { - "name" : "FabricIngress.spgw_ingress.pdr_counter", - "id" : 19, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 180, - "column" : 53, - "source_fragment" : "pdr_counter" - }, - "size" : 2048, - "is_direct" : false + "name" : "FabricIngress.slice_tc_classifier.set_slice_id_tc", + "id" : 54, + "runtime_data" : [ + { + "name" : "slice_id", + "bitwidth" : 4 + }, + { + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id29"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 35, + "column" : 27, + "source_fragment" : "= slice_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc31"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 36, + "column" : 21, + "source_fragment" : "= tc; ..." + } + } + ] }, { - "name" : "FabricEgress.bng_egress.downstream.c_line_tx", - "id" : 20, - "source_info" : { - "filename" : "include/bng.p4", - "line" : 267, - "column" : 37, - "source_fragment" : "c_line_tx" - }, - "size" : 8192, - "is_direct" : false + "name" : "FabricIngress.slice_tc_classifier.trust_dscp", + "id" : 55, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id29"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x0f" + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 44, + "column" : 27, + "source_fragment" : "= hdr.ipv4.dscp[4 +2 -1:2]; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc31"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 45, + "column" : 21, + "source_fragment" : "= hdr.ipv4.dscp[2 -1:0]; ..." + } + } + ] }, { - "name" : "FabricEgress.process_int_main.process_int_source.counter_int_source", - "id" : 21, - "is_direct" : true, - "binding" : "FabricEgress.process_int_main.process_int_source.tb_int_source", - "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 27, - "column" : 50, - "source_fragment" : "counter_int_source" - } + "name" : "FabricIngress.qos.set_queue", + "id" : 56, + "runtime_data" : [ + { + "name" : "qid", + "bitwidth" : 5 + } + ], + "primitives" : [] }, { - "name" : "FabricEgress.egress_next.egress_vlan_counter", - "id" : 22, - "is_direct" : true, - "binding" : "FabricEgress.egress_next.egress_vlan", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 313, - "column" : 50, - "source_fragment" : "egress_vlan_counter" - } + "name" : "FabricIngress.qos.meter_drop", + "id" : 57, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 89, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + } + ] }, { - "name" : "FabricEgress.spgw_egress.pdr_counter", - "id" : 23, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 301, - "column" : 53, - "source_fragment" : "pdr_counter" - }, - "size" : 2048, - "is_direct" : false - } - ], - "register_arrays" : [], - "calculations" : [ - { - "name" : "calc", - "id" : 0, - "source_info" : { - "filename" : "include/checksum.p4", - "line" : 28, - "column" : 8, - "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_tcp", + "id" : 58, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, { - "type" : "field", - "value" : ["ipv4", "version"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "ihl"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "dscp"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport25"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport33"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "ecn"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport26"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport34"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "total_len"] + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } }, { - "type" : "field", - "value" : ["ipv4", "identification"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "flags"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "frag_offset"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "ttl"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "protocol"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "src_addr"] + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "tcp" + }, + { + "type" : "header", + "value" : "inner_tcp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.tcp = hdr.inner_tcp" + } }, { - "type" : "field", - "value" : ["ipv4", "dst_addr"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_tcp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 56, + "column" : 8, + "source_fragment" : "hdr.inner_tcp.setInvalid()" + } } ] }, { - "name" : "calc_0", - "id" : 1, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 362, - "column" : 8, - "source_fragment" : "update_checksum(gtpu_ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_udp", + "id" : 59, + "runtime_data" : [], + "primitives" : [ { - "type" : "field", - "value" : ["gtpu_ipv4", "version"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "ihl"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "dscp"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "ecn"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport25"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport33"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "total_len"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport26"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport34"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "identification"] + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "flags"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "frag_offset"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "ttl"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "protocol"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "src_addr"] + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + }, + { + "type" : "header", + "value" : "inner_udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.udp = hdr.inner_udp" + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "dst_addr"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 62, + "column" : 8, + "source_fragment" : "hdr.inner_udp.setInvalid()" + } } ] }, { - "name" : "calc_1", - "id" : 2, - "source_info" : { - "filename" : "include/checksum.p4", - "line" : 57, - "column" : 8, - "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_icmp", + "id" : 60, + "runtime_data" : [], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "version"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "ihl"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "dscp"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport25"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport33"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "ecn"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport26"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport34"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "total_len"] + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } }, { - "type" : "field", - "value" : ["ipv4", "identification"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "flags"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "frag_offset"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "ttl"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "protocol"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 67, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "src_addr"] + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "icmp" + }, + { + "type" : "header", + "value" : "inner_icmp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 68, + "column" : 8, + "source_fragment" : "hdr.icmp = hdr.inner_icmp" + } }, { - "type" : "field", - "value" : ["ipv4", "dst_addr"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_icmp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 69, + "column" : 8, + "source_fragment" : "hdr.inner_icmp.setInvalid()" + } } ] - } - ], - "learn_lists" : [], - "actions" : [ - { - "name" : "nop", - "id" : 0, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 1, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 2, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 3, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 4, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 5, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 6, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 7, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 8, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 9, - "runtime_data" : [], - "primitives" : [] }, { - "name" : "nop", - "id" : 10, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 11, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 12, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.process_set_source_sink.int_set_source", - "id" : 13, + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_unknown", + "id" : 61, "runtime_data" : [], "primitives" : [ { @@ -2354,90 +5963,75 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_source44"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto24"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["inner_ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/int/int_main.p4", - "line" : 42, - "column" : 40, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." } - } - ] - }, - { - "name" : "FabricIngress.process_set_source_sink.int_set_sink", - "id" : 14, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_sink46"] + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/int/int_main.p4", - "line" : 63, - "column" : 38, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." } - } - ] - }, - { - "name" : "FabricIngress.bng_ingress.upstream.punt_to_cpu", - "id" : 15, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] }, { - "type" : "hexstr", - "value" : "0x00ff" + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 44, - "column" : 8, - "source_fragment" : "smeta.egress_spec = 255" + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." } }, { @@ -2445,44 +6039,138 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "mcast_grp"] + "value" : ["scalars", "userMetadata._l4_sport25"] }, { - "type" : "hexstr", - "value" : "0x0000" + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport33"] } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 47, - "column" : 8, - "source_fragment" : "smeta.mcast_grp = 0" + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." } }, { - "op" : "count", + "op" : "assign", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.bng_ingress.upstream.c_control" + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport26"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] + "value" : ["scalars", "userMetadata._inner_l4_dport34"] } ], "source_info" : { - "filename" : "include/bng.p4", + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", "line" : 48, "column" : 8, - "source_fragment" : "c_control.count(fmeta.bng.line_id)" + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" } } ] }, { - "name" : "FabricIngress.bng_ingress.upstream.term_disabled", - "id" : 16, + "name" : "FabricIngress.spgw.decap_gtpu.decap_inner_tcp", + "id" : 62, "runtime_data" : [], "primitives" : [ { @@ -2490,160 +6178,162 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_type38"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x0800" } ], "source_info" : { - "filename" : "include/control/../header.p4", - "line" : 163, - "column" : 36, - "source_fragment" : "2w0x0; ..." + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." } }, { - "op" : "mark_to_drop", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "standard_metadata" + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 77, - "column" : 8, - "source_fragment" : "mark_to_drop(smeta)" + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." } - } - ] - }, - { - "name" : "FabricIngress.bng_ingress.upstream.term_disabled", - "id" : 17, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_type38"] + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/control/../header.p4", - "line" : 163, - "column" : 36, - "source_fragment" : "2w0x0; ..." + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." } }, { - "op" : "mark_to_drop", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "standard_metadata" + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport25"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport33"] } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 77, - "column" : 8, - "source_fragment" : "mark_to_drop(smeta)" + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." } - } - ] - }, - { - "name" : "FabricIngress.bng_ingress.upstream.term_enabled_v4", - "id" : 18, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["eth_type", "value"] + "value" : ["scalars", "userMetadata._l4_dport26"] }, { - "type" : "hexstr", - "value" : "0x0800" + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport34"] } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." } }, { - "op" : "remove_header", + "op" : "assign_header", "parameters" : [ { "type" : "header", - "value" : "pppoe" + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 71, + "filename" : "include/control/spgw.p4", + "line" : 45, "column" : 8, - "source_fragment" : "hdr.pppoe.setInvalid()" + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" } }, { - "op" : "count", + "op" : "remove_header", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.bng_ingress.upstream.c_terminated" - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] + "type" : "header", + "value" : "inner_ipv4" } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 72, + "filename" : "include/control/spgw.p4", + "line" : 46, "column" : 8, - "source_fragment" : "c_terminated.count(fmeta.bng.line_id)" + "source_fragment" : "hdr.inner_ipv4.setInvalid()" } - } - ] - }, - { - "name" : "FabricIngress.bng_ingress.upstream.term_enabled_v6", - "id" : 19, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["eth_type", "value"] - }, - { - "type" : "hexstr", - "value" : "0x86dd" + "type" : "header", + "value" : "gtpu" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 129, - "column" : 31, - "source_fragment" : "0x86dd; ..." + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" } }, { @@ -2651,109 +6341,85 @@ "parameters" : [ { "type" : "header", - "value" : "pppoe" + "value" : "gtpu_options" } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 71, + "filename" : "include/control/spgw.p4", + "line" : 48, "column" : 8, - "source_fragment" : "hdr.pppoe.setInvalid()" + "source_fragment" : "hdr.gtpu_options.setInvalid()" } }, { - "op" : "count", + "op" : "remove_header", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.bng_ingress.upstream.c_terminated" - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] + "type" : "header", + "value" : "gtpu_ext_psc" } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 72, + "filename" : "include/control/spgw.p4", + "line" : 49, "column" : 8, - "source_fragment" : "c_terminated.count(fmeta.bng.line_id)" + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" } - } - ] - }, - { - "name" : "FabricIngress.bng_ingress.downstream.set_session", - "id" : 20, - "runtime_data" : [ - { - "name" : "pppoe_session_id", - "bitwidth" : 16 - } - ], - "primitives" : [ + }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_type38"] - }, - { - "type" : "hexstr", - "value" : "0x02" + "type" : "header", + "value" : "udp" } ], "source_info" : { - "filename" : "include/control/../header.p4", - "line" : 165, - "column" : 39, - "source_fragment" : "2w0x2;; ..." + "filename" : "include/control/spgw.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" } }, { - "op" : "assign", + "op" : "assign_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_pppoe_session_id40"] + "type" : "header", + "value" : "tcp" }, { - "type" : "runtime_data", - "value" : 0 + "type" : "header", + "value" : "inner_tcp" } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 159, - "column" : 35, - "source_fragment" : "= pppoe_session_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.tcp = hdr.inner_tcp" } }, { - "op" : "count", + "op" : "remove_header", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.bng_ingress.downstream.c_line_rx" - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] + "type" : "header", + "value" : "inner_tcp" } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 160, + "filename" : "include/control/spgw.p4", + "line" : 56, "column" : 8, - "source_fragment" : "c_line_rx.count(fmeta.bng.line_id)" + "source_fragment" : "hdr.inner_tcp.setInvalid()" } } ] }, { - "name" : "FabricIngress.bng_ingress.downstream.drop", - "id" : 21, + "name" : "FabricIngress.spgw.decap_gtpu.decap_inner_udp", + "id" : 63, "runtime_data" : [], "primitives" : [ { @@ -2761,143 +6427,75 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_type38"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] }, { "type" : "hexstr", - "value" : "0x02" + "value" : "0x0800" } ], "source_info" : { - "filename" : "include/control/../header.p4", - "line" : 165, - "column" : 39, - "source_fragment" : "2w0x2;; ..." + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." } }, { - "op" : "count", + "op" : "assign", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.bng_ingress.downstream.c_line_rx" + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto24"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] - } - ], - "source_info" : { - "filename" : "include/bng.p4", - "line" : 165, - "column" : 8, - "source_fragment" : "c_line_rx.count(fmeta.bng.line_id)" - } - }, - { - "op" : "mark_to_drop", - "parameters" : [ - { - "type" : "header", - "value" : "standard_metadata" + "value" : ["inner_ipv4", "protocol"] } ], - "source_info" : { - "filename" : "include/bng.p4", - "line" : 166, - "column" : 8, - "source_fragment" : "mark_to_drop(smeta)" - } - } - ] - }, - { - "name" : "FabricIngress.bng_ingress.downstream.qos_prio", - "id" : 22, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.bng_ingress.downstream.qos_prio", - "id" : 23, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.bng_ingress.downstream.qos_besteff", - "id" : 24, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.bng_ingress.downstream.qos_besteff", - "id" : 25, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.bng_ingress.set_line", - "id" : 26, - "runtime_data" : [ - { - "name" : "line_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 320, - "column" : 30, - "source_fragment" : "= line_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." } - } - ] - }, - { - "name" : "FabricIngress.filtering.deny", - "id" : 27, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_forwarding10"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 36, - "column" : 40, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." } }, { @@ -2905,302 +6503,233 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next11"] + "value" : ["scalars", "userMetadata._l4_sport25"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport33"] } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 37, - "column" : 34, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." } - } - ] - }, - { - "name" : "FabricIngress.filtering.permit", - "id" : 28, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.filtering.permit_with_internal_vlan", - "id" : 29, - "runtime_data" : [ - { - "name" : "vlan_id", - "bitwidth" : 12 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._l4_dport26"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport34"] } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 47, - "column" : 32, - "source_fragment" : "= vlan_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." } - } - ] - }, - { - "name" : "FabricIngress.filtering.set_forwarding_type", - "id" : 30, - "runtime_data" : [ - { - "name" : "fwd_type", - "bitwidth" : 3 - } - ], - "primitives" : [ + }, { - "op" : "assign", + "op" : "assign_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type12"] + "type" : "header", + "value" : "ipv4" }, { - "type" : "runtime_data", - "value" : 0 + "type" : "header", + "value" : "inner_ipv4" } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 88, - "column" : 33, - "source_fragment" : "= fwd_type; ..." + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id_bridging", - "id" : 31, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id13"] - }, - { - "type" : "runtime_data", - "value" : 0 + "type" : "header", + "value" : "inner_ipv4" } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" } - } - ] - }, - { - "name" : "FabricIngress.forwarding.pop_mpls_and_next", - "id" : 32, - "runtime_data" : [ + }, { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label8"] - }, + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ { - "type" : "hexstr", - "value" : "0x000000" + "type" : "header", + "value" : "gtpu_ext_psc" } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 66, - "column" : 35, - "source_fragment" : "= 0; ..." + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" } }, { - "op" : "assign", + "op" : "assign_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id13"] + "type" : "header", + "value" : "udp" }, { - "type" : "runtime_data", - "value" : 0 + "type" : "header", + "value" : "inner_udp" } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.udp = hdr.inner_udp" } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id_routing_v4", - "id" : 33, - "runtime_data" : [ + }, { - "name" : "next_id", - "bitwidth" : 32 + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 62, + "column" : 8, + "source_fragment" : "hdr.inner_udp.setInvalid()" + } } - ], + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu.decap_inner_icmp", + "id" : 64, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id13"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "hexstr", + "value" : "0x0800" } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." } - } - ] - }, - { - "name" : "FabricIngress.forwarding.nop_routing_v4", - "id" : 34, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.forwarding.set_next_id_routing_v6", - "id" : 35, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id13"] + "value" : ["scalars", "userMetadata._ip_proto24"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." } - } - ] - }, - { - "name" : "FabricIngress.acl.set_next_id_acl", - "id" : 36, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id13"] + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 33, + "filename" : "include/control/spgw.p4", + "line" : 40, "column" : 32, - "source_fragment" : "= next_id; ..." + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." } - } - ] - }, - { - "name" : "FabricIngress.acl.punt_to_cpu", - "id" : 37, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] }, { - "type" : "hexstr", - "value" : "0x00ff" + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 39, - "column" : 8, - "source_fragment" : "standard_metadata.egress_spec = 255" + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." } }, { @@ -3208,400 +6737,248 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next11"] + "value" : ["scalars", "userMetadata._l4_sport25"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport33"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 40, - "column" : 34, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." } - } - ] - }, - { - "name" : "FabricIngress.acl.set_clone_session_id", - "id" : 38, - "runtime_data" : [ - { - "name" : "clone_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { - "op" : "clone_ingress_pkt_to_egress", + "op" : "assign", "parameters" : [ { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport26"] }, { - "type" : "hexstr", - "value" : "0x1" + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport34"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 46, - "column" : 8, - "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})" + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." } - } - ] - }, - { - "name" : "FabricIngress.acl.drop", - "id" : 39, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "mark_to_drop", + "op" : "assign_header", "parameters" : [ { "type" : "header", - "value" : "standard_metadata" + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 51, + "filename" : "include/control/spgw.p4", + "line" : 45, "column" : 8, - "source_fragment" : "mark_to_drop(standard_metadata)" + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next11"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "header", + "value" : "inner_ipv4" } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 52, - "column" : 34, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" } - } - ] - }, - { - "name" : "FabricIngress.acl.nop_acl", - "id" : 40, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.next.set_vlan", - "id" : 41, - "runtime_data" : [ - { - "name" : "vlan_id", - "bitwidth" : 12 - } - ], - "primitives" : [ + }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] - }, - { - "type" : "runtime_data", - "value" : 0 + "type" : "header", + "value" : "gtpu" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 70, - "column" : 32, - "source_fragment" : "= vlan_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" } - } - ] - }, - { - "name" : "FabricIngress.next.set_double_vlan", - "id" : 42, - "runtime_data" : [ - { - "name" : "outer_vlan_id", - "bitwidth" : 12 }, { - "name" : "inner_vlan_id", - "bitwidth" : 12 - } - ], - "primitives" : [ - { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] - }, - { - "type" : "runtime_data", - "value" : 0 + "type" : "header", + "value" : "gtpu_options" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 70, - "column" : 32, - "source_fragment" : "= vlan_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._push_double_vlan4"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "header", + "value" : "gtpu_ext_psc" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 77, - "column" : 41, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_id5"] - }, - { - "type" : "runtime_data", - "value" : 1 + "type" : "header", + "value" : "udp" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 78, - "column" : 38, - "source_fragment" : "= inner_vlan_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 67, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" } }, { - "op" : "assign", + "op" : "assign_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_s_tag42"] + "type" : "header", + "value" : "icmp" }, { - "type" : "runtime_data", - "value" : 0 + "type" : "header", + "value" : "inner_icmp" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 80, - "column" : 34, - "source_fragment" : "= outer_vlan_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 68, + "column" : 8, + "source_fragment" : "hdr.icmp = hdr.inner_icmp" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_c_tag43"] - }, - { - "type" : "runtime_data", - "value" : 1 + "type" : "header", + "value" : "inner_icmp" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 81, - "column" : 34, - "source_fragment" : "= inner_vlan_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 69, + "column" : 8, + "source_fragment" : "hdr.inner_icmp.setInvalid()" } } ] }, { - "name" : "FabricIngress.next.output_xconnect", - "id" : 43, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - } - ], + "name" : "FabricIngress.spgw.decap_gtpu.decap_inner_unknown", + "id" : 65, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "hexstr", + "value" : "0x0800" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.set_next_id_xconnect", - "id" : 44, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id13"] + "value" : ["scalars", "userMetadata._ip_proto24"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 115, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.output_simple", - "id" : 45, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.routing_simple", - "id" : 46, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - }, - { - "name" : "smac", - "bitwidth" : 48 }, - { - "name" : "dmac", - "bitwidth" : 48 - } - ], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["ethernet", "src_addr"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." } }, { @@ -3609,18 +6986,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "dst_addr"] + "value" : ["scalars", "userMetadata._l4_sport25"] }, { - "type" : "runtime_data", - "value" : 2 + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport33"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." } }, { @@ -3628,168 +7005,127 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._l4_dport26"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport34"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.mpls_routing_simple", - "id" : 47, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - }, - { - "name" : "smac", - "bitwidth" : 48 - }, - { - "name" : "dmac", - "bitwidth" : 48 }, { - "name" : "label", - "bitwidth" : 20 - } - ], - "primitives" : [ - { - "op" : "assign", + "op" : "assign_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label8"] + "type" : "header", + "value" : "ipv4" }, { - "type" : "runtime_data", - "value" : 3 + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" } ], "source_info" : { - "filename" : "include/control/next.p4", + "filename" : "include/control/spgw.p4", "line" : 46, - "column" : 35, - "source_fragment" : "= label; ..." + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["ethernet", "src_addr"] - }, - { - "type" : "runtime_data", - "value" : 1 + "type" : "header", + "value" : "gtpu" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, + "filename" : "include/control/spgw.p4", + "line" : 47, "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + "source_fragment" : "hdr.gtpu.setInvalid()" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["ethernet", "dst_addr"] - }, - { - "type" : "runtime_data", - "value" : 2 + "type" : "header", + "value" : "gtpu_options" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, + "filename" : "include/control/spgw.p4", + "line" : 48, "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + "source_fragment" : "hdr.gtpu_options.setInvalid()" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["standard_metadata", "egress_spec"] - }, - { - "type" : "runtime_data", - "value" : 0 + "type" : "header", + "value" : "gtpu_ext_psc" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" } - } - ] - }, - { - "name" : "FabricIngress.next.output_hashed", - "id" : 48, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - } - ], - "primitives" : [ + }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["standard_metadata", "egress_spec"] - }, - { - "type" : "runtime_data", - "value" : 0 + "type" : "header", + "value" : "udp" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/spgw.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" } } ] }, { - "name" : "FabricIngress.next.routing_hashed", - "id" : 49, + "name" : "FabricIngress.spgw.load_iface", + "id" : 66, "runtime_data" : [ { - "name" : "port_num", - "bitwidth" : 9 - }, - { - "name" : "smac", - "bitwidth" : 48 + "name" : "src_iface", + "bitwidth" : 8 }, { - "name" : "dmac", - "bitwidth" : 48 + "name" : "slice_id", + "bitwidth" : 4 } ], "primitives" : [ @@ -3798,18 +7134,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "src_addr"] + "value" : ["scalars", "userMetadata._spgw_src_iface42"] }, { "type" : "runtime_data", - "value" : 1 + "value" : 0 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + "filename" : "include/control/spgw.p4", + "line" : 122, + "column" : 33, + "source_fragment" : "= src_iface; ..." } }, { @@ -3817,18 +7153,28 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "dst_addr"] + "value" : ["scalars", "userMetadata._spgw_skip_spgw44"] }, { - "type" : "runtime_data", - "value" : 2 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + "filename" : "include/control/spgw.p4", + "line" : 123, + "column" : 33, + "source_fragment" : "= false; ..." } }, { @@ -3836,61 +7182,44 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._slice_id29"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 1 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/spgw.p4", + "line" : 124, + "column" : 27, + "source_fragment" : "= slice_id; ..." } } ] }, { - "name" : "FabricIngress.next.mpls_routing_hashed", - "id" : 50, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - }, - { - "name" : "smac", - "bitwidth" : 48 - }, - { - "name" : "dmac", - "bitwidth" : 48 - }, - { - "name" : "label", - "bitwidth" : 20 - } - ], + "name" : "FabricIngress.spgw.iface_miss", + "id" : 67, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label8"] + "value" : ["scalars", "userMetadata._spgw_src_iface42"] }, { - "type" : "runtime_data", - "value" : 3 + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 46, - "column" : 35, - "source_fragment" : "= label; ..." + "filename" : "include/control/../define.p4", + "line" : 127, + "column" : 44, + "source_fragment" : "8w0; ..." } }, { @@ -3898,45 +7227,60 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "src_addr"] + "value" : ["scalars", "userMetadata._spgw_skip_spgw44"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + "filename" : "include/control/spgw.p4", + "line" : 128, + "column" : 33, + "source_fragment" : "= true; ..." } + } + ] + }, + { + "name" : "FabricIngress.spgw.load_pdr", + "id" : 68, + "runtime_data" : [ + { + "name" : "ctr_id", + "bitwidth" : 32 }, { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["ethernet", "dst_addr"] - }, - { - "type" : "runtime_data", - "value" : 2 - } - ], - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." - } + "name" : "far_id", + "bitwidth" : 32 + }, + { + "name" : "needs_gtpu_decap", + "bitwidth" : 1 }, + { + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._spgw_ctr_id40"] }, { "type" : "runtime_data", @@ -3944,41 +7288,29 @@ } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." - } - } - ] - }, - { - "name" : "FabricIngress.next.set_mcast_group_id", - "id" : 51, - "runtime_data" : [ - { - "name" : "group_id", - "bitwidth" : 16 - } - ], - "primitives" : [ + "filename" : "include/control/spgw.p4", + "line" : 153, + "column" : 30, + "source_fragment" : "= ctr_id; ..." + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "mcast_grp"] + "value" : ["scalars", "userMetadata._spgw_far_id41"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 1 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 231, - "column" : 8, - "source_fragment" : "standard_metadata.mcast_grp = group_id" + "filename" : "include/control/spgw.p4", + "line" : 154, + "column" : 30, + "source_fragment" : "= far_id; ..." } }, { @@ -3986,7 +7318,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_multicast14"] + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap47"] }, { "type" : "expression", @@ -3996,37 +7328,70 @@ "op" : "b2d", "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 2 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } } } } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 232, - "column" : 37, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 155, + "column" : 40, + "source_fragment" : "= (bool)needs_gtpu_decap; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc31"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 156, + "column" : 21, + "source_fragment" : "= tc; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.set_source_iface", - "id" : 52, + "name" : "FabricIngress.spgw.load_pdr", + "id" : 69, "runtime_data" : [ { - "name" : "src_iface", - "bitwidth" : 8 + "name" : "ctr_id", + "bitwidth" : 32 }, { - "name" : "direction", - "bitwidth" : 2 + "name" : "far_id", + "bitwidth" : 32 }, { - "name" : "skip_spgw", + "name" : "needs_gtpu_decap", "bitwidth" : 1 + }, + { + "name" : "tc", + "bitwidth" : 2 } ], "primitives" : [ @@ -4035,7 +7400,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_src_iface31"] + "value" : ["scalars", "userMetadata._spgw_ctr_id40"] }, { "type" : "runtime_data", @@ -4044,9 +7409,9 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 50, - "column" : 33, - "source_fragment" : "= src_iface; ..." + "line" : 153, + "column" : 30, + "source_fragment" : "= ctr_id; ..." } }, { @@ -4054,7 +7419,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_direction23"] + "value" : ["scalars", "userMetadata._spgw_far_id41"] }, { "type" : "runtime_data", @@ -4063,9 +7428,9 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 51, - "column" : 33, - "source_fragment" : "= direction; ..." + "line" : 154, + "column" : 30, + "source_fragment" : "= far_id; ..." } }, { @@ -4073,7 +7438,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_skip_spgw32"] + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap47"] }, { "type" : "expression", @@ -4102,16 +7467,35 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 52, - "column" : 33, - "source_fragment" : "= (bool)skip_spgw; ..." + "line" : 155, + "column" : 40, + "source_fragment" : "= (bool)needs_gtpu_decap; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc31"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 156, + "column" : 21, + "source_fragment" : "= tc; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.set_pdr_attributes", - "id" : 53, + "name" : "FabricIngress.spgw.load_pdr_qos", + "id" : 70, "runtime_data" : [ { "name" : "ctr_id", @@ -4124,6 +7508,18 @@ { "name" : "needs_gtpu_decap", "bitwidth" : 1 + }, + { + "name" : "needs_qfi_push", + "bitwidth" : 1 + }, + { + "name" : "qfi", + "bitwidth" : 6 + }, + { + "name" : "tc", + "bitwidth" : 2 } ], "primitives" : [ @@ -4132,7 +7528,45 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_pdr_hit33"] + "value" : ["scalars", "userMetadata._spgw_ctr_id40"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 153, + "column" : 30, + "source_fragment" : "= ctr_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_far_id41"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 154, + "column" : 30, + "source_fragment" : "= far_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap47"] }, { "type" : "expression", @@ -4142,8 +7576,18 @@ "op" : "b2d", "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 2 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } } } } @@ -4151,9 +7595,9 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 75, - "column" : 31, - "source_fragment" : "= true; ..." + "line" : 155, + "column" : 40, + "source_fragment" : "= (bool)needs_gtpu_decap; ..." } }, { @@ -4161,18 +7605,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id29"] + "value" : ["scalars", "userMetadata._tc31"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 5 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 76, - "column" : 30, - "source_fragment" : "= ctr_id; ..." + "line" : 156, + "column" : 21, + "source_fragment" : "= tc; ..." } }, { @@ -4180,18 +7624,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_id30"] + "value" : ["scalars", "userMetadata._spgw_qfi43"] }, { "type" : "runtime_data", - "value" : 1 + "value" : 4 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 77, - "column" : 30, - "source_fragment" : "= far_id; ..." + "line" : 167, + "column" : 27, + "source_fragment" : "= qfi; ..." } }, { @@ -4199,7 +7643,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_decap37"] + "value" : ["scalars", "userMetadata._spgw_needs_qfi_push49"] }, { "type" : "expression", @@ -4214,7 +7658,7 @@ "op" : "!=", "left" : { "type" : "local", - "value" : 2 + "value" : 3 }, "right" : { "type" : "hexstr", @@ -4228,16 +7672,16 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 78, - "column" : 40, - "source_fragment" : "= (bool)needs_gtpu_decap; ..." + "line" : 168, + "column" : 38, + "source_fragment" : "= (bool)needs_qfi_push; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.set_pdr_attributes", - "id" : 54, + "name" : "FabricIngress.spgw.load_pdr_qos", + "id" : 71, "runtime_data" : [ { "name" : "ctr_id", @@ -4250,6 +7694,18 @@ { "name" : "needs_gtpu_decap", "bitwidth" : 1 + }, + { + "name" : "needs_qfi_push", + "bitwidth" : 1 + }, + { + "name" : "qfi", + "bitwidth" : 6 + }, + { + "name" : "tc", + "bitwidth" : 2 } ], "primitives" : [ @@ -4258,7 +7714,45 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_pdr_hit33"] + "value" : ["scalars", "userMetadata._spgw_ctr_id40"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 153, + "column" : 30, + "source_fragment" : "= ctr_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_far_id41"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 154, + "column" : 30, + "source_fragment" : "= far_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap47"] }, { "type" : "expression", @@ -4268,8 +7762,18 @@ "op" : "b2d", "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 2 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } } } } @@ -4277,9 +7781,9 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 75, - "column" : 31, - "source_fragment" : "= true; ..." + "line" : 155, + "column" : 40, + "source_fragment" : "= (bool)needs_gtpu_decap; ..." } }, { @@ -4287,18 +7791,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id29"] + "value" : ["scalars", "userMetadata._tc31"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 5 } ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 76, - "column" : 30, - "source_fragment" : "= ctr_id; ..." + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 156, + "column" : 21, + "source_fragment" : "= tc; ..." } }, { @@ -4306,18 +7810,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_id30"] + "value" : ["scalars", "userMetadata._spgw_qfi43"] }, { "type" : "runtime_data", - "value" : 1 + "value" : 4 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 77, - "column" : 30, - "source_fragment" : "= far_id; ..." + "line" : 167, + "column" : 27, + "source_fragment" : "= qfi; ..." } }, { @@ -4325,7 +7829,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_decap37"] + "value" : ["scalars", "userMetadata._spgw_needs_qfi_push49"] }, { "type" : "expression", @@ -4340,7 +7844,7 @@ "op" : "!=", "left" : { "type" : "local", - "value" : 2 + "value" : 3 }, "right" : { "type" : "hexstr", @@ -4354,16 +7858,16 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 78, - "column" : 40, - "source_fragment" : "= (bool)needs_gtpu_decap; ..." + "line" : 168, + "column" : 38, + "source_fragment" : "= (bool)needs_qfi_push; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.load_normal_far_attributes", - "id" : 55, + "name" : "FabricIngress.spgw.load_normal_far", + "id" : 72, "runtime_data" : [ { "name" : "drop", @@ -4380,7 +7884,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_dropped34"] + "value" : ["scalars", "userMetadata._skip_forwarding18"] }, { "type" : "expression", @@ -4409,8 +7913,47 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 138, - "column" : 35, + "line" : 207, + "column" : 34, + "source_fragment" : "= (bool)drop; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next19"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 208, + "column" : 28, "source_fragment" : "= (bool)drop; ..." } }, @@ -4419,7 +7962,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_notify_spgwc35"] + "value" : ["scalars", "userMetadata._spgw_notify_spgwc45"] }, { "type" : "expression", @@ -4448,7 +7991,7 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 139, + "line" : 209, "column" : 36, "source_fragment" : "= (bool)notify_cp; ..." } @@ -4456,8 +7999,8 @@ ] }, { - "name" : "FabricIngress.spgw_ingress.load_tunnel_far_attributes", - "id" : 56, + "name" : "FabricIngress.spgw.load_tunnel_far", + "id" : 73, "runtime_data" : [ { "name" : "drop", @@ -4490,7 +8033,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_dropped34"] + "value" : ["scalars", "userMetadata._skip_forwarding18"] }, { "type" : "expression", @@ -4519,8 +8062,8 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 148, - "column" : 35, + "line" : 218, + "column" : 34, "source_fragment" : "= (bool)drop; ..." } }, @@ -4529,7 +8072,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_notify_spgwc35"] + "value" : ["scalars", "userMetadata._skip_next19"] }, { "type" : "expression", @@ -4544,7 +8087,7 @@ "op" : "!=", "left" : { "type" : "local", - "value" : 1 + "value" : 0 }, "right" : { "type" : "hexstr", @@ -4558,9 +8101,9 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 149, - "column" : 36, - "source_fragment" : "= (bool)notify_cp; ..." + "line" : 219, + "column" : 28, + "source_fragment" : "= (bool)drop; ..." } }, { @@ -4568,7 +8111,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_encap36"] + "value" : ["scalars", "userMetadata._spgw_notify_spgwc45"] }, { "type" : "expression", @@ -4578,8 +8121,18 @@ "op" : "b2d", "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 1 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } } } } @@ -4587,142 +8140,9 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 151, - "column" : 40, - "source_fragment" : "= true; ..." - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_teid25"] - }, - { - "type" : "runtime_data", - "value" : 5 - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 152, - "column" : 28, - "source_fragment" : "= teid; ..." - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_port26"] - }, - { - "type" : "runtime_data", - "value" : 2 - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 153, - "column" : 39, - "source_fragment" : "= tunnel_src_port; ..." - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_addr27"] - }, - { - "type" : "runtime_data", - "value" : 3 - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 154, - "column" : 39, - "source_fragment" : "= tunnel_src_addr; ..." - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_dst_addr28"] - }, - { - "type" : "runtime_data", - "value" : 4 - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 155, - "column" : 39, - "source_fragment" : "= tunnel_dst_addr; ..." - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr19"] - }, - { - "type" : "runtime_data", - "value" : 3 - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 157, - "column" : 32, - "source_fragment" : "= tunnel_src_addr; ..." - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr20"] - }, - { - "type" : "runtime_data", - "value" : 4 - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 158, - "column" : 32, - "source_fragment" : "= tunnel_dst_addr; ..." - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport17"] - }, - { - "type" : "runtime_data", - "value" : 2 - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 159, - "column" : 27, - "source_fragment" : "= tunnel_src_port; ..." + "line" : 220, + "column" : 36, + "source_fragment" : "= (bool)notify_cp; ..." } }, { @@ -4730,44 +8150,28 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport18"] + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_encap46"] }, { - "type" : "hexstr", - "value" : "0x0868" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 160, - "column" : 27, - "source_fragment" : "= 2152; ..." - } - } - ] - }, - { - "name" : "FabricIngress.spgw_ingress.decap_inner_tcp", - "id" : 57, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] - }, - { - "type" : "hexstr", - "value" : "0x0800" - } - ], - "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "line" : 222, + "column" : 40, + "source_fragment" : "= true; ..." } }, { @@ -4775,18 +8179,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto16"] + "value" : ["scalars", "userMetadata._spgw_teid36"] }, { - "type" : "field", - "value" : ["inner_ipv4", "protocol"] + "type" : "runtime_data", + "value" : 5 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 187, - "column" : 27, - "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + "line" : 223, + "column" : 28, + "source_fragment" : "= teid; ..." } }, { @@ -4794,18 +8198,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr19"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_port37"] }, { - "type" : "field", - "value" : ["inner_ipv4", "src_addr"] + "type" : "runtime_data", + "value" : 2 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 188, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + "line" : 224, + "column" : 39, + "source_fragment" : "= tunnel_src_port; ..." } }, { @@ -4813,18 +8217,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr20"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_addr38"] }, { - "type" : "field", - "value" : ["inner_ipv4", "dst_addr"] + "type" : "runtime_data", + "value" : 3 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 189, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + "line" : 225, + "column" : 39, + "source_fragment" : "= tunnel_src_addr; ..." } }, { @@ -4832,18 +8236,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport17"] + "value" : ["scalars", "userMetadata._spgw_tunnel_dst_addr39"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport21"] + "type" : "runtime_data", + "value" : 4 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 190, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_sport; ..." + "line" : 226, + "column" : 39, + "source_fragment" : "= tunnel_dst_addr; ..." } }, { @@ -4851,142 +8255,224 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport18"] + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport22"] + "type" : "runtime_data", + "value" : 3 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 191, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_dport; ..." + "line" : 228, + "column" : 32, + "source_fragment" : "= tunnel_src_addr; ..." } }, { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] }, { - "type" : "header", - "value" : "inner_ipv4" + "type" : "runtime_data", + "value" : 4 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 193, - "column" : 8, - "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + "line" : 229, + "column" : 32, + "source_fragment" : "= tunnel_dst_addr; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport25"] + }, + { + "type" : "runtime_data", + "value" : 2 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 194, - "column" : 8, - "source_fragment" : "hdr.inner_ipv4.setInvalid()" + "line" : 230, + "column" : 27, + "source_fragment" : "= tunnel_src_port; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu" + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport26"] + }, + { + "type" : "hexstr", + "value" : "0x0868" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 195, - "column" : 8, - "source_fragment" : "hdr.gtpu.setInvalid()" + "line" : 231, + "column" : 27, + "source_fragment" : "= 2152; ..." } + } + ] + }, + { + "name" : "FabricIngress.spgw.load_dbuf_far", + "id" : 74, + "runtime_data" : [ + { + "name" : "drop", + "bitwidth" : 1 }, { - "op" : "remove_header", - "parameters" : [ - { - "type" : "header", - "value" : "udp" - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 199, - "column" : 8, - "source_fragment" : "hdr.udp.setInvalid()" - } + "name" : "notify_cp", + "bitwidth" : 1 }, { - "op" : "assign_header", + "name" : "tunnel_src_port", + "bitwidth" : 16 + }, + { + "name" : "tunnel_src_addr", + "bitwidth" : 32 + }, + { + "name" : "tunnel_dst_addr", + "bitwidth" : 32 + }, + { + "name" : "teid", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "tcp" + "type" : "field", + "value" : ["scalars", "userMetadata._skip_forwarding18"] }, { - "type" : "header", - "value" : "inner_tcp" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 200, - "column" : 8, - "source_fragment" : "hdr.tcp = hdr.inner_tcp" + "line" : 218, + "column" : 34, + "source_fragment" : "= (bool)drop; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_tcp" + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next19"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 201, - "column" : 8, - "source_fragment" : "hdr.inner_tcp.setInvalid()" + "line" : 219, + "column" : 28, + "source_fragment" : "= (bool)drop; ..." } - } - ] - }, - { - "name" : "FabricIngress.spgw_ingress.decap_inner_udp", - "id" : 58, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._spgw_notify_spgwc45"] }, { - "type" : "hexstr", - "value" : "0x0800" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 1 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/control/spgw.p4", + "line" : 220, + "column" : 36, + "source_fragment" : "= (bool)notify_cp; ..." } }, { @@ -4994,18 +8480,28 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto16"] + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_encap46"] }, { - "type" : "field", - "value" : ["inner_ipv4", "protocol"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 187, - "column" : 27, - "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + "line" : 222, + "column" : 40, + "source_fragment" : "= true; ..." } }, { @@ -5013,18 +8509,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr19"] + "value" : ["scalars", "userMetadata._spgw_teid36"] }, { - "type" : "field", - "value" : ["inner_ipv4", "src_addr"] + "type" : "runtime_data", + "value" : 5 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 188, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + "line" : 223, + "column" : 28, + "source_fragment" : "= teid; ..." } }, { @@ -5032,18 +8528,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr20"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_port37"] }, { - "type" : "field", - "value" : ["inner_ipv4", "dst_addr"] + "type" : "runtime_data", + "value" : 2 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 189, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + "line" : 224, + "column" : 39, + "source_fragment" : "= tunnel_src_port; ..." } }, { @@ -5051,18 +8547,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport17"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_addr38"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport21"] + "type" : "runtime_data", + "value" : 3 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 190, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_sport; ..." + "line" : 225, + "column" : 39, + "source_fragment" : "= tunnel_src_addr; ..." } }, { @@ -5070,108 +8566,130 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport18"] + "value" : ["scalars", "userMetadata._spgw_tunnel_dst_addr39"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport22"] + "type" : "runtime_data", + "value" : 4 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 191, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_dport; ..." + "line" : 226, + "column" : 39, + "source_fragment" : "= tunnel_dst_addr; ..." } }, { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] }, { - "type" : "header", - "value" : "inner_ipv4" + "type" : "runtime_data", + "value" : 3 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 193, - "column" : 8, - "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + "line" : 228, + "column" : 32, + "source_fragment" : "= tunnel_src_addr; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] + }, + { + "type" : "runtime_data", + "value" : 4 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 194, - "column" : 8, - "source_fragment" : "hdr.inner_ipv4.setInvalid()" + "line" : 229, + "column" : 32, + "source_fragment" : "= tunnel_dst_addr; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu" + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport25"] + }, + { + "type" : "runtime_data", + "value" : 2 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 195, - "column" : 8, - "source_fragment" : "hdr.gtpu.setInvalid()" + "line" : 230, + "column" : 27, + "source_fragment" : "= tunnel_src_port; ..." } }, { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "udp" + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport26"] }, { - "type" : "header", - "value" : "inner_udp" + "type" : "hexstr", + "value" : "0x0868" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 205, - "column" : 8, - "source_fragment" : "hdr.udp = hdr.inner_udp" + "line" : 231, + "column" : 27, + "source_fragment" : "= 2152; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_udp" + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_skip_egress_pdr_ctr48"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 206, - "column" : 8, - "source_fragment" : "hdr.inner_udp.setInvalid()" + "line" : 242, + "column" : 43, + "source_fragment" : "= true; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.decap_inner_icmp", - "id" : 59, + "name" : "lookup_md_init37", + "id" : 75, "runtime_data" : [], "primitives" : [ { @@ -5179,18 +8697,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "hexstr", - "value" : "0x0800" + "type" : "field", + "value" : ["inner_tcp", "sport"] } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 37, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." } }, { @@ -5198,37 +8716,44 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto16"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { "type" : "field", - "value" : ["inner_ipv4", "protocol"] + "value" : ["inner_tcp", "dport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 187, - "column" : 27, - "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 38, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.dport; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init40", + "id" : 76, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr19"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { "type" : "field", - "value" : ["inner_ipv4", "src_addr"] + "value" : ["inner_udp", "sport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 188, + "filename" : "include/control/lookup_md_init.p4", + "line" : 40, "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + "source_fragment" : "= hdr.inner_udp.sport; ..." } }, { @@ -5236,37 +8761,44 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr20"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { "type" : "field", - "value" : ["inner_ipv4", "dst_addr"] + "value" : ["inner_udp", "dport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 189, + "filename" : "include/control/lookup_md_init.p4", + "line" : 41, "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + "source_fragment" : "= hdr.inner_udp.dport; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init43", + "id" : 77, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport17"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport21"] + "value" : ["inner_icmp", "icmp_type"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 190, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_sport; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 43, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." } }, { @@ -5274,123 +8806,163 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport18"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport22"] + "value" : ["inner_icmp", "icmp_code"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 191, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_dport; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 44, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_code; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init32", + "id" : 78, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] }, { - "type" : "header", - "value" : "inner_ipv4" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 193, - "column" : 8, - "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + "filename" : "include/control/lookup_md_init.p4", + "line" : 32, + "column" : 27, + "source_fragment" : "= true; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 194, - "column" : 8, - "source_fragment" : "hdr.inner_ipv4.setInvalid()" + "filename" : "include/control/lookup_md_init.p4", + "line" : 33, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 195, - "column" : 8, - "source_fragment" : "hdr.gtpu.setInvalid()" + "filename" : "include/control/lookup_md_init.p4", + "line" : 34, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "udp" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 210, - "column" : 8, - "source_fragment" : "hdr.udp.setInvalid()" + "filename" : "include/control/lookup_md_init.p4", + "line" : 35, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init52", + "id" : 79, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "icmp" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "header", - "value" : "inner_icmp" + "type" : "field", + "value" : ["tcp", "sport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 211, - "column" : 8, - "source_fragment" : "hdr.icmp = hdr.inner_icmp" + "filename" : "include/control/lookup_md_init.p4", + "line" : 52, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_icmp" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] + }, + { + "type" : "field", + "value" : ["tcp", "dport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 212, - "column" : 8, - "source_fragment" : "hdr.inner_icmp.setInvalid()" + "filename" : "include/control/lookup_md_init.p4", + "line" : 53, + "column" : 32, + "source_fragment" : "= hdr.tcp.dport; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.decap_inner_unknown", - "id" : 60, + "name" : "lookup_md_init55", + "id" : 80, "runtime_data" : [], "primitives" : [ { @@ -5398,18 +8970,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "hexstr", - "value" : "0x0800" + "type" : "field", + "value" : ["udp", "sport"] } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 55, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." } }, { @@ -5417,37 +8989,44 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto16"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { "type" : "field", - "value" : ["inner_ipv4", "protocol"] + "value" : ["udp", "dport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 187, - "column" : 27, - "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 56, + "column" : 32, + "source_fragment" : "= hdr.udp.dport; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init58", + "id" : 81, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr19"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { "type" : "field", - "value" : ["inner_ipv4", "src_addr"] + "value" : ["icmp", "icmp_type"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 188, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 58, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." } }, { @@ -5455,37 +9034,54 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr20"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { "type" : "field", - "value" : ["inner_ipv4", "dst_addr"] + "value" : ["icmp", "icmp_code"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 189, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 59, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_code; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init47", + "id" : 82, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport17"] + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport21"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 190, + "filename" : "include/control/lookup_md_init.p4", + "line" : 47, "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_sport; ..." + "source_fragment" : "= true; ..." } }, { @@ -5493,123 +9089,149 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport18"] + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport22"] + "value" : ["ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 191, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_dport; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 48, + "column" : 28, + "source_fragment" : "= hdr.ipv4.src_addr; ..." } }, { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 193, - "column" : 8, - "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + "filename" : "include/control/lookup_md_init.p4", + "line" : 49, + "column" : 28, + "source_fragment" : "= hdr.ipv4.dst_addr; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] + }, + { + "type" : "field", + "value" : ["ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 194, - "column" : 8, - "source_fragment" : "hdr.inner_ipv4.setInvalid()" + "filename" : "include/control/lookup_md_init.p4", + "line" : 50, + "column" : 28, + "source_fragment" : "= hdr.ipv4.protocol; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init23", + "id" : 83, + "runtime_data" : [], + "primitives" : [ { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 195, - "column" : 8, - "source_fragment" : "hdr.gtpu.setInvalid()" + "filename" : "include/control/lookup_md_init.p4", + "line" : 23, + "column" : 23, + "source_fragment" : "= false; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "udp" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 216, - "column" : 8, - "source_fragment" : "hdr.udp.setInvalid()" + "filename" : "include/control/lookup_md_init.p4", + "line" : 24, + "column" : 24, + "source_fragment" : "= 0; ..." } - } - ] - }, - { - "name" : "act", - "id" : 61, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "field", - "value" : ["packet_out", "egress_port"] + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { - "filename" : "include/control/packetio.p4", + "filename" : "include/control/lookup_md_init.p4", "line" : 25, - "column" : 12, - "source_fragment" : "standard_metadata.egress_spec = hdr.packet_out.egress_port" + "column" : 24, + "source_fragment" : "= 0; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "packet_out" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] + }, + { + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/packetio.p4", + "filename" : "include/control/lookup_md_init.p4", "line" : 26, - "column" : 12, - "source_fragment" : "hdr.packet_out.setInvalid()" + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -5617,166 +9239,116 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_controller_packet_out15"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/packetio.p4", + "filename" : "include/control/lookup_md_init.p4", "line" : 27, - "column" : 53, - "source_fragment" : "= true; ..." + "column" : 24, + "source_fragment" : "= 0; ..." } }, { - "op" : "exit", - "parameters" : [], + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 29, - "column" : 12, - "source_fragment" : "exit" + "filename" : "include/control/lookup_md_init.p4", + "line" : 28, + "column" : 24, + "source_fragment" : "= 0; ..." } - } - ] - }, - { - "name" : "act_0", - "id" : 62, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "spgw_ingress_hasReturned"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } + "type" : "hexstr", + "value" : "0x00" } - ] - } - ] - }, - { - "name" : "act_1", - "id" : 63, - "runtime_data" : [], - "primitives" : [ + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 29, + "column" : 25, + "source_fragment" : "= 0; ..." + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "spgw_ingress_hasReturned"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 249, - "column" : 46, - "source_fragment" : "return" + "filename" : "include/control/lookup_md_init.p4", + "line" : 30, + "column" : 25, + "source_fragment" : "= 0; ..." } } ] }, { - "name" : "act_2", - "id" : 64, + "name" : "packetio25", + "id" : 84, "runtime_data" : [], "primitives" : [ { - "op" : "count", + "op" : "assign", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.spgw_ingress.pdr_counter" + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id29"] + "value" : ["packet_out", "egress_port"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 263, - "column" : 8, - "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" + "filename" : "include/control/packetio.p4", + "line" : 25, + "column" : 12, + "source_fragment" : "standard_metadata.egress_spec = hdr.packet_out.egress_port" } - } - ] - }, - { - "name" : "act_3", - "id" : 65, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_forwarding10"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "header", + "value" : "packet_out" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 280, - "column" : 38, - "source_fragment" : "= true; ..." + "filename" : "include/control/packetio.p4", + "line" : 26, + "column" : 12, + "source_fragment" : "hdr.packet_out.setInvalid()" } }, { @@ -5784,7 +9356,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next11"] + "value" : ["scalars", "userMetadata._is_controller_packet_out23"] }, { "type" : "expression", @@ -5802,43 +9374,27 @@ } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 281, - "column" : 32, + "filename" : "include/control/packetio.p4", + "line" : 27, + "column" : 53, "source_fragment" : "= true; ..." } - } - ] - }, - { - "name" : "act_4", - "id" : 66, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len24"] - }, - { - "type" : "field", - "value" : ["ipv4", "total_len"] - } - ], + "op" : "exit", + "parameters" : [], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 289, - "column" : 32, - "source_fragment" : "= hdr.ipv4.total_len; ..." + "filename" : "include/control/packetio.p4", + "line" : 29, + "column" : 12, + "source_fragment" : "exit" } } ] }, { - "name" : "act_5", - "id" : 67, + "name" : "filtering113", + "id" : 85, "runtime_data" : [], "primitives" : [ { @@ -5846,7 +9402,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._vlan_id9"] }, { "type" : "field", @@ -5855,7 +9411,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 111, + "line" : 113, "column" : 36, "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." } @@ -5865,7 +9421,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_pri2"] + "value" : ["scalars", "userMetadata._vlan_pri10"] }, { "type" : "field", @@ -5874,7 +9430,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 112, + "line" : 114, "column" : 37, "source_fragment" : "= hdr.vlan_tag.pri; ..." } @@ -5884,7 +9440,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_cfi3"] + "value" : ["scalars", "userMetadata._vlan_cfi11"] }, { "type" : "field", @@ -5893,7 +9449,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 113, + "line" : 115, "column" : 37, "source_fragment" : "= hdr.vlan_tag.cfi; ..." } @@ -5901,8 +9457,8 @@ ] }, { - "name" : "act_6", - "id" : 68, + "name" : "filtering119", + "id" : 86, "runtime_data" : [], "primitives" : [ { @@ -5910,7 +9466,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_id5"] + "value" : ["scalars", "userMetadata._inner_vlan_id13"] }, { "type" : "field", @@ -5919,7 +9475,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 117, + "line" : 119, "column" : 42, "source_fragment" : "= hdr.inner_vlan_tag.vlan_id; ..." } @@ -5929,7 +9485,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_pri6"] + "value" : ["scalars", "userMetadata._inner_vlan_pri14"] }, { "type" : "field", @@ -5938,7 +9494,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 118, + "line" : 120, "column" : 43, "source_fragment" : "= hdr.inner_vlan_tag.pri; ..." } @@ -5948,7 +9504,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_cfi7"] + "value" : ["scalars", "userMetadata._inner_vlan_cfi15"] }, { "type" : "field", @@ -5957,7 +9513,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 119, + "line" : 121, "column" : 43, "source_fragment" : "= hdr.inner_vlan_tag.cfi; ..." } @@ -5965,8 +9521,8 @@ ] }, { - "name" : "act_7", - "id" : 69, + "name" : "filtering129", + "id" : 87, "runtime_data" : [], "primitives" : [ { @@ -5974,7 +9530,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl9"] + "value" : ["scalars", "userMetadata._mpls_ttl17"] }, { "type" : "hexstr", @@ -5983,7 +9539,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 127, + "line" : 129, "column" : 37, "source_fragment" : "= DEFAULT_MPLS_TTL + 1; ..." } @@ -5991,8 +9547,34 @@ ] }, { - "name" : "act_8", - "id" : 70, + "name" : "spgw277", + "id" : 88, + "runtime_data" : [], + "primitives" : [ + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.spgw.pdr_counter" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ctr_id40"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 277, + "column" : 16, + "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" + } + } + ] + }, + { + "name" : "spgw294", + "id" : 89, "runtime_data" : [], "primitives" : [ { @@ -6000,7 +9582,33 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_3"] + "value" : ["scalars", "userMetadata._spgw_ipv4_len35"] + }, + { + "type" : "field", + "value" : ["ipv4", "total_len"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 294, + "column" : 36, + "source_fragment" : "= hdr.ipv4.total_len; ..." + } + } + ] + }, + { + "name" : "port_counter31", + "id" : 90, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_9"] }, { "type" : "expression", @@ -6036,7 +9644,7 @@ }, { "type" : "field", - "value" : ["scalars", "tmp_3"] + "value" : ["scalars", "tmp_9"] } ], "source_info" : { @@ -6049,8 +9657,8 @@ ] }, { - "name" : "act_9", - "id" : 71, + "name" : "port_counter34", + "id" : 91, "runtime_data" : [], "primitives" : [ { @@ -6058,7 +9666,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_4"] + "value" : ["scalars", "tmp_10"] }, { "type" : "expression", @@ -6094,7 +9702,7 @@ }, { "type" : "field", - "value" : ["scalars", "tmp_4"] + "value" : ["scalars", "tmp_10"] } ], "source_info" : { @@ -6107,8 +9715,8 @@ ] }, { - "name" : "act_10", - "id" : 72, + "name" : "int_main89", + "id" : 92, "runtime_data" : [], "primitives" : [ { @@ -6133,8 +9741,8 @@ ] }, { - "name" : "act_11", - "id" : 73, + "name" : "bng126", + "id" : 93, "runtime_data" : [], "primitives" : [ { @@ -6142,7 +9750,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "bng_ingress_upstream_tmp"] + "value" : ["scalars", "bng_ingress_upstream_hasReturned"] }, { "type" : "expression", @@ -6158,94 +9766,40 @@ } } } - ] - } - ] - }, - { - "name" : "act_12", - "id" : 74, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "bng_ingress_upstream_tmp"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } - } - ] - } - ] - }, - { - "name" : "act_13", - "id" : 75, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_type38"] - }, - { - "type" : "hexstr", - "value" : "0x01" - } ], "source_info" : { - "filename" : "include/control/../header.p4", - "line" : 164, - "column" : 37, - "source_fragment" : "2w0x1; ..." + "filename" : "include/bng.p4", + "line" : 126, + "column" : 12, + "source_fragment" : "return" } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "bng_ingress_upstream_hasReturned"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } - } - ] } ] }, { - "name" : "act_14", - "id" : 76, + "name" : "bng342", + "id" : 94, "runtime_data" : [], "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._bng_type50"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "include/control/../header.p4", + "line" : 185, + "column" : 37, + "source_fragment" : "2w0x1; ..." + } + }, { "op" : "assign", "parameters" : [ @@ -6262,24 +9816,18 @@ "left" : null, "right" : { "type" : "bool", - "value" : true + "value" : false } } } } - ], - "source_info" : { - "filename" : "include/bng.p4", - "line" : 126, - "column" : 12, - "source_fragment" : "return" - } + ] } ] }, { - "name" : "act_15", - "id" : 77, + "name" : "bng131", + "id" : 95, "runtime_data" : [], "primitives" : [ { @@ -6291,7 +9839,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] + "value" : ["scalars", "userMetadata._bng_line_id51"] } ], "source_info" : { @@ -6304,8 +9852,8 @@ ] }, { - "name" : "act_16", - "id" : 78, + "name" : "bng139", + "id" : 96, "runtime_data" : [], "primitives" : [ { @@ -6317,7 +9865,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] + "value" : ["scalars", "userMetadata._bng_line_id51"] } ], "source_info" : { @@ -6330,8 +9878,8 @@ ] }, { - "name" : "act_17", - "id" : 79, + "name" : "bng112", + "id" : 97, "runtime_data" : [], "primitives" : [ { @@ -6383,74 +9931,74 @@ "filename" : "include/bng.p4", "line" : 112, "column" : 12, - "source_fragment" : "hdr.ipv6.src_addr[127:64]" + "source_fragment" : " hdr.ipv6.src_addr[127:64] : exact @name(\\\"ipv6_src_net_id\\\");" } } ] }, { - "name" : "act_18", - "id" : 80, + "name" : "bng238", + "id" : 98, "runtime_data" : [], "primitives" : [ { - "op" : "assign", + "op" : "execute_meter", "parameters" : [ + { + "type" : "meter_array", + "value" : "FabricIngress.bng_ingress.downstream.m_prio" + }, { "type" : "field", - "value" : ["scalars", "bng_ingress_downstream_tmp"] + "value" : ["scalars", "userMetadata._bng_line_id51"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._bng_ds_meter_result53"] } - ] + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 238, + "column" : 24, + "source_fragment" : "m_prio.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)" + } } ] }, { - "name" : "act_19", - "id" : 81, + "name" : "bng241", + "id" : 99, "runtime_data" : [], "primitives" : [ { - "op" : "assign", + "op" : "execute_meter", "parameters" : [ + { + "type" : "meter_array", + "value" : "FabricIngress.bng_ingress.downstream.m_besteff" + }, { "type" : "field", - "value" : ["scalars", "bng_ingress_downstream_tmp"] + "value" : ["scalars", "userMetadata._bng_line_id51"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._bng_ds_meter_result53"] } - ] + ], + "source_info" : { + "filename" : "include/bng.p4", + "line" : 241, + "column" : 24, + "source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)" + } } ] }, { - "name" : "act_20", - "id" : 82, + "name" : "bng250", + "id" : 100, "runtime_data" : [], "primitives" : [ { @@ -6462,16 +10010,16 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] + "value" : ["scalars", "userMetadata._bng_line_id51"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_ds_meter_result41"] + "value" : ["scalars", "userMetadata._bng_ds_meter_result53"] } ], "source_info" : { "filename" : "include/bng.p4", - "line" : 238, + "line" : 250, "column" : 24, "source_fragment" : "m_prio.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)" } @@ -6479,8 +10027,8 @@ ] }, { - "name" : "act_21", - "id" : 83, + "name" : "bng253", + "id" : 101, "runtime_data" : [], "primitives" : [ { @@ -6492,16 +10040,16 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] + "value" : ["scalars", "userMetadata._bng_line_id51"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_ds_meter_result41"] + "value" : ["scalars", "userMetadata._bng_ds_meter_result53"] } ], "source_info" : { "filename" : "include/bng.p4", - "line" : 241, + "line" : 253, "column" : 24, "source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)" } @@ -6509,104 +10057,248 @@ ] }, { - "name" : "act_22", - "id" : 84, + "name" : "slicing114", + "id" : 102, "runtime_data" : [], "primitives" : [ { - "op" : "execute_meter", + "op" : "assign", "parameters" : [ - { - "type" : "meter_array", - "value" : "FabricIngress.bng_ingress.downstream.m_prio" - }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] + "value" : ["scalars", "tmp_11"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_ds_meter_result41"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id29"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._tc31"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 250, - "column" : 24, - "source_fragment" : "m_prio.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)" + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 37, + "source_fragment" : "(bit<32>) slice_tc" } - } - ] - }, - { - "name" : "act_23", - "id" : 85, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "execute_meter", "parameters" : [ { "type" : "meter_array", - "value" : "FabricIngress.bng_ingress.downstream.m_besteff" + "value" : "FabricIngress.qos.slice_tc_meter" }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] + "value" : ["scalars", "tmp_11"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_ds_meter_result41"] + "value" : ["scalars", "userMetadata._packet_color30"] + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 8, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) slice_tc, fabric_md.packet_color)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._dscp32"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id29"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._tc31"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/bng.p4", - "line" : 253, - "column" : 24, - "source_fragment" : "m_besteff.execute_meter(fmeta.bng.line_id, fmeta.bng.ds_meter_result)" + "filename" : "include/control/slicing.p4", + "line" : 110, + "column" : 26, + "source_fragment" : "fabric_md.slice_id++fabric_md.tc; ..." } } ] }, { "name" : "nop", - "id" : 86, + "id" : 103, "runtime_data" : [], "primitives" : [] }, { "name" : "nop", - "id" : 87, + "id" : 104, "runtime_data" : [], "primitives" : [] }, { "name" : "nop", - "id" : 88, + "id" : 105, "runtime_data" : [], "primitives" : [] }, { "name" : "nop", - "id" : 89, + "id" : 106, "runtime_data" : [], "primitives" : [] }, { "name" : "NoAction", - "id" : 90, + "id" : 107, "runtime_data" : [], "primitives" : [] }, { "name" : "NoAction", - "id" : 91, + "id" : 108, "runtime_data" : [], "primitives" : [] }, { "name" : "FabricEgress.bng_egress.downstream.encap_v4", - "id" : 92, + "id" : 109, "runtime_data" : [], "primitives" : [ { @@ -6623,7 +10315,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 132, + "line" : 153, "column" : 33, "source_fragment" : "0x8864; ..." } @@ -6709,7 +10401,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_pppoe_session_id40"] + "value" : ["scalars", "userMetadata._bng_pppoe_session_id52"] } ], "source_info" : { @@ -6728,7 +10420,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] + "value" : ["scalars", "userMetadata._bng_line_id51"] } ], "source_info" : { @@ -6794,7 +10486,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 134, + "line" : 155, "column" : 35, "source_fragment" : "0x0021; ..." } @@ -6803,7 +10495,7 @@ }, { "name" : "FabricEgress.bng_egress.downstream.encap_v6", - "id" : 93, + "id" : 110, "runtime_data" : [], "primitives" : [ { @@ -6820,7 +10512,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 132, + "line" : 153, "column" : 33, "source_fragment" : "0x8864; ..." } @@ -6906,7 +10598,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_pppoe_session_id40"] + "value" : ["scalars", "userMetadata._bng_pppoe_session_id52"] } ], "source_info" : { @@ -6925,7 +10617,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_line_id39"] + "value" : ["scalars", "userMetadata._bng_line_id51"] } ], "source_info" : { @@ -6991,7 +10683,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 135, + "line" : 156, "column" : 35, "source_fragment" : "0x0057; ..." } @@ -7000,7 +10692,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_source.int_source_dscp", - "id" : 94, + "id" : 111, "runtime_data" : [ { "name" : "max_hop", @@ -7068,7 +10760,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 165, + "line" : 186, "column" : 36, "source_fragment" : "4; ..." } @@ -7359,7 +11051,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport18"] + "value" : ["scalars", "userMetadata._l4_dport26"] } ], "source_info" : { @@ -7377,15 +11069,257 @@ "value" : ["intl4_tail", "dscp"] }, { - "type" : "field", - "value" : ["ipv4", "dscp"] + "type" : "field", + "value" : ["ipv4", "dscp"] + } + ], + "source_info" : { + "filename" : "include/int/int_source.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.intl4_tail.dscp = hdr.ipv4.dscp" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0010" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_source.p4", + "line" : 56, + "column" : 8, + "source_fragment" : "hdr.ipv4.total_len = hdr.ipv4.total_len + INT_HEADER_LEN_BYTES" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["udp", "len"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["udp", "len"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0010" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_source.p4", + "line" : 57, + "column" : 8, + "source_fragment" : "hdr.udp.len = hdr.udp.len + INT_HEADER_LEN_BYTES" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 182, + "column" : 24, + "source_fragment" : "0x1; ..." + } + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.init_metadata", + "id" : 112, + "runtime_data" : [ + { + "name" : "switch_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_transit57"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 26, + "column" : 31, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_switch_id59"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 31, + "column" : 33, + "source_fragment" : "= switch_id; ..." + } + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i0", + "id" : 113, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i1", + "id" : 114, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_q_occupancy" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 60, + "column" : 8, + "source_fragment" : "hdr.int_q_occupancy.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_q_occupancy", "q_id"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 62, + "column" : 8, + "source_fragment" : "hdr.int_q_occupancy.q_id = 8w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_q_occupancy", "q_occupancy"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "deq_qdepth"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffff" + } + } + } } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 54, + "filename" : "include/int/int_transit.p4", + "line" : 63, "column" : 8, - "source_fragment" : "hdr.intl4_tail.dscp = hdr.ipv4.dscp" + "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" } }, { @@ -7393,7 +11327,7 @@ "parameters" : [ { "type" : "field", - "value" : ["ipv4", "total_len"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -7407,27 +11341,27 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["ipv4", "total_len"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x0010" + "value" : "0x01" } } }, "right" : { "type" : "hexstr", - "value" : "0xffff" + "value" : "0xff" } } } } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 56, - "column" : 8, - "source_fragment" : "hdr.ipv4.total_len = hdr.ipv4.total_len + INT_HEADER_LEN_BYTES" + "filename" : "include/int/int_transit.p4", + "line" : 97, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." } }, { @@ -7435,7 +11369,7 @@ "parameters" : [ { "type" : "field", - "value" : ["udp", "len"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -7449,11 +11383,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["udp", "len"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0010" + "value" : "0x0004" } } }, @@ -7466,10 +11400,32 @@ } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 57, + "filename" : "include/int/int_transit.p4", + "line" : 98, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + } + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i2", + "id" : 115, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_hop_latency" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 54, "column" : 8, - "source_fragment" : "hdr.udp.len = hdr.udp.len + INT_HEADER_LEN_BYTES" + "source_fragment" : "hdr.int_hop_latency.setValid()" } }, { @@ -7477,49 +11433,50 @@ "parameters" : [ { "type" : "field", - "value" : ["ipv4", "dscp"] + "value" : ["int_hop_latency", "hop_latency"] }, { - "type" : "hexstr", - "value" : "0x01" + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 161, - "column" : 24, - "source_fragment" : "0x1; ..." + "filename" : "include/int/int_transit.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.init_metadata", - "id" : 95, - "runtime_data" : [ - { - "name" : "switch_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_transit45"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", "value" : { "type" : "expression", "value" : { - "op" : "b2d", - "left" : null, + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_words60"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0xff" } } } @@ -7527,9 +11484,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 26, - "column" : 31, - "source_fragment" : "= true; ..." + "line" : 97, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." } }, { @@ -7537,31 +11494,48 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id47"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0004" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 31, + "line" : 98, "column" : 33, - "source_fragment" : "= switch_id; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i0", - "id" : 96, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i1", - "id" : 97, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i3", + "id" : 116, "runtime_data" : [], "primitives" : [ { @@ -7630,12 +11604,46 @@ "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" } }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_hop_latency" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_hop_latency", "hop_latency"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -7649,11 +11657,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x01" + "value" : "0x02" } } }, @@ -7667,9 +11675,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 97, + "line" : 103, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -7677,7 +11685,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -7691,11 +11699,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0004" + "value" : "0x0008" } } }, @@ -7709,16 +11717,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 98, + "line" : 104, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i2", - "id" : 98, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i4", + "id" : 117, "runtime_data" : [], "primitives" : [ { @@ -7726,14 +11734,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_hop_latency" + "value" : "int_port_ids" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 54, + "line" : 47, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.setValid()" + "source_fragment" : "hdr.int_port_ids.setValid()" } }, { @@ -7741,18 +11749,63 @@ "parameters" : [ { "type" : "field", - "value" : ["int_hop_latency", "hop_latency"] + "value" : ["int_port_ids", "ingress_port_id"] }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" + } + }, + { + "op" : "assign", + "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] + "value" : ["int_port_ids", "egress_port_id"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 55, + "line" : 49, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" } }, { @@ -7760,7 +11813,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -7774,7 +11827,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", @@ -7802,7 +11855,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -7816,7 +11869,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", @@ -7842,8 +11895,8 @@ ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i3", - "id" : 99, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i5", + "id" : 118, "runtime_data" : [], "primitives" : [ { @@ -7917,14 +11970,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_hop_latency" + "value" : "int_port_ids" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 54, + "line" : 47, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.setValid()" + "source_fragment" : "hdr.int_port_ids.setValid()" } }, { @@ -7932,18 +11985,63 @@ "parameters" : [ { "type" : "field", - "value" : ["int_hop_latency", "hop_latency"] + "value" : ["int_port_ids", "ingress_port_id"] }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" + } + }, + { + "op" : "assign", + "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] + "value" : ["int_port_ids", "egress_port_id"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 55, + "line" : 49, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" } }, { @@ -7951,7 +12049,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -7965,7 +12063,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", @@ -7993,7 +12091,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -8007,7 +12105,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", @@ -8033,10 +12131,44 @@ ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i4", - "id" : 100, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i6", + "id" : 119, "runtime_data" : [], "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_hop_latency" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_hop_latency", "hop_latency"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + } + }, { "op" : "add_header", "parameters" : [ @@ -8121,7 +12253,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -8135,11 +12267,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x01" + "value" : "0x02" } } }, @@ -8153,9 +12285,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 97, + "line" : 103, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -8163,7 +12295,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -8177,11 +12309,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0004" + "value" : "0x0008" } } }, @@ -8195,16 +12327,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 98, + "line" : 104, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i5", - "id" : 101, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i7", + "id" : 120, "runtime_data" : [], "primitives" : [ { @@ -8273,6 +12405,40 @@ "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" } }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_hop_latency" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_hop_latency", "hop_latency"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + } + }, { "op" : "add_header", "parameters" : [ @@ -8357,7 +12523,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -8371,11 +12537,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x03" } } }, @@ -8389,9 +12555,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 109, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -8399,7 +12565,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -8413,11 +12579,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x000c" } } }, @@ -8431,97 +12597,31 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i6", - "id" : 102, - "runtime_data" : [], - "primitives" : [ - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_hop_latency" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 54, - "column" : 8, - "source_fragment" : "hdr.int_hop_latency.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["int_hop_latency", "hop_latency"] - }, - { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 55, - "column" : 8, - "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_port_ids" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 47, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["int_port_ids", "ingress_port_id"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i8", + "id" : 121, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_switch_id" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 48, + "line" : 41, "column" : 8, - "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" + "source_fragment" : "hdr.int_switch_id.setValid()" } }, { @@ -8529,31 +12629,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "egress_port_id"] + "value" : ["int_switch_id", "switch_id"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "egress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_switch_id59"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 49, + "line" : 42, "column" : 8, - "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" + "source_fragment" : "hdr.int_switch_id.switch_id = fmeta.int_meta.switch_id; ..." } }, { @@ -8561,7 +12648,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -8575,11 +12662,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x01" } } }, @@ -8593,9 +12680,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 97, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." } }, { @@ -8603,7 +12690,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -8617,11 +12704,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x0004" } } }, @@ -8635,16 +12722,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 98, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i7", - "id" : 103, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i9", + "id" : 122, "runtime_data" : [], "primitives" : [ { @@ -8718,48 +12805,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_hop_latency" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 54, - "column" : 8, - "source_fragment" : "hdr.int_hop_latency.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["int_hop_latency", "hop_latency"] - }, - { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 55, - "column" : 8, - "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_port_ids" + "value" : "int_switch_id" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 47, + "line" : 41, "column" : 8, - "source_fragment" : "hdr.int_port_ids.setValid()" + "source_fragment" : "hdr.int_switch_id.setValid()" } }, { @@ -8767,63 +12820,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "ingress_port_id"] + "value" : ["int_switch_id", "switch_id"] }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 48, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" - } - }, - { - "op" : "assign", - "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "egress_port_id"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "egress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "value" : ["scalars", "userMetadata._int_meta_switch_id59"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 49, + "line" : 42, "column" : 8, - "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" + "source_fragment" : "hdr.int_switch_id.switch_id = fmeta.int_meta.switch_id; ..." } }, { @@ -8831,7 +12839,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -8845,11 +12853,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x03" + "value" : "0x02" } } }, @@ -8863,9 +12871,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 109, + "line" : 103, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -8873,7 +12881,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -8887,11 +12895,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x000c" + "value" : "0x0008" } } }, @@ -8905,18 +12913,52 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 110, + "line" : 104, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i8", - "id" : 104, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i10", + "id" : 123, "runtime_data" : [], "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_hop_latency" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_hop_latency", "hop_latency"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + } + }, { "op" : "add_header", "parameters" : [ @@ -8941,7 +12983,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id47"] + "value" : ["scalars", "userMetadata._int_meta_switch_id59"] } ], "source_info" : { @@ -8956,7 +12998,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -8970,11 +13012,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x01" + "value" : "0x02" } } }, @@ -8988,9 +13030,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 97, + "line" : 103, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -8998,7 +13040,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -9012,11 +13054,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0004" + "value" : "0x0008" } } }, @@ -9030,16 +13072,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 98, + "line" : 104, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i9", - "id" : 105, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i11", + "id" : 124, "runtime_data" : [], "primitives" : [ { @@ -9081,31 +13123,65 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_occupancy", "q_occupancy"] + "value" : ["int_q_occupancy", "q_occupancy"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "deq_qdepth"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 63, + "column" : 8, + "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_hop_latency" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_hop_latency", "hop_latency"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "deq_qdepth"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffff" - } - } - } + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 63, + "line" : 55, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" + "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" } }, { @@ -9132,7 +13208,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id47"] + "value" : ["scalars", "userMetadata._int_meta_switch_id59"] } ], "source_info" : { @@ -9147,7 +13223,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -9161,11 +13237,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x03" } } }, @@ -9179,9 +13255,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 109, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -9189,7 +13265,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -9203,11 +13279,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x000c" } } }, @@ -9221,16 +13297,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i10", - "id" : 106, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i12", + "id" : 125, "runtime_data" : [], "primitives" : [ { @@ -9238,14 +13314,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_hop_latency" + "value" : "int_port_ids" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 54, + "line" : 47, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.setValid()" + "source_fragment" : "hdr.int_port_ids.setValid()" } }, { @@ -9253,18 +13329,63 @@ "parameters" : [ { "type" : "field", - "value" : ["int_hop_latency", "hop_latency"] + "value" : ["int_port_ids", "ingress_port_id"] }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" + } + }, + { + "op" : "assign", + "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] + "value" : ["int_port_ids", "egress_port_id"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 55, + "line" : 49, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" } }, { @@ -9291,7 +13412,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id47"] + "value" : ["scalars", "userMetadata._int_meta_switch_id59"] } ], "source_info" : { @@ -9306,7 +13427,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -9320,7 +13441,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", @@ -9348,7 +13469,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -9362,7 +13483,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", @@ -9388,8 +13509,8 @@ ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i11", - "id" : 107, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i13", + "id" : 126, "runtime_data" : [], "primitives" : [ { @@ -9463,14 +13584,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_hop_latency" + "value" : "int_port_ids" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 54, + "line" : 47, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.setValid()" + "source_fragment" : "hdr.int_port_ids.setValid()" } }, { @@ -9478,18 +13599,63 @@ "parameters" : [ { "type" : "field", - "value" : ["int_hop_latency", "hop_latency"] + "value" : ["int_port_ids", "ingress_port_id"] }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" + } + }, + { + "op" : "assign", + "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] + "value" : ["int_port_ids", "egress_port_id"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 55, + "line" : 49, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" } }, { @@ -9516,7 +13682,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id47"] + "value" : ["scalars", "userMetadata._int_meta_switch_id59"] } ], "source_info" : { @@ -9531,7 +13697,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -9545,7 +13711,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", @@ -9573,7 +13739,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -9587,7 +13753,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", @@ -9613,10 +13779,44 @@ ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i12", - "id" : 108, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i14", + "id" : 127, "runtime_data" : [], "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_hop_latency" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_hop_latency", "hop_latency"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + } + }, { "op" : "add_header", "parameters" : [ @@ -9720,7 +13920,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id47"] + "value" : ["scalars", "userMetadata._int_meta_switch_id59"] } ], "source_info" : { @@ -9735,7 +13935,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -9749,11 +13949,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x03" } } }, @@ -9767,9 +13967,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 109, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -9777,7 +13977,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -9791,11 +13991,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x000c" } } }, @@ -9809,16 +14009,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i13", - "id" : 109, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i15", + "id" : 128, "runtime_data" : [], "primitives" : [ { @@ -9887,6 +14087,40 @@ "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" } }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_hop_latency" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_hop_latency", "hop_latency"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + } + }, { "op" : "add_header", "parameters" : [ @@ -9990,7 +14224,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id47"] + "value" : ["scalars", "userMetadata._int_meta_switch_id59"] } ], "source_info" : { @@ -10005,7 +14239,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -10019,11 +14253,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x03" + "value" : "0x04" } } }, @@ -10037,9 +14271,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 109, + "line" : 115, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 4; ..." } }, { @@ -10047,7 +14281,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -10061,11 +14295,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x000c" + "value" : "0x0010" } } }, @@ -10079,16 +14313,22 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 110, + "line" : 116, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 16; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i14", - "id" : 110, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0", + "id" : 129, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1", + "id" : 130, "runtime_data" : [], "primitives" : [ { @@ -10096,14 +14336,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_hop_latency" + "value" : "int_egress_tx_util" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 54, + "line" : 88, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.setValid()" + "source_fragment" : "hdr.int_egress_tx_util.setValid()" } }, { @@ -10111,33 +14351,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_hop_latency", "hop_latency"] + "value" : ["int_egress_tx_util", "egress_port_tx_util"] }, { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 55, - "column" : 8, - "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_port_ids" + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 47, + "line" : 90, "column" : 8, - "source_fragment" : "hdr.int_port_ids.setValid()" + "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" } }, { @@ -10145,7 +14370,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "ingress_port_id"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -10154,12 +14379,22 @@ "value" : { "op" : "&", "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_words60"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } }, "right" : { "type" : "hexstr", - "value" : "0xffff" + "value" : "0xff" } } } @@ -10167,9 +14402,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 48, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" + "line" : 97, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." } }, { @@ -10177,7 +14412,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "egress_port_id"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -10186,8 +14421,18 @@ "value" : { "op" : "&", "left" : { - "type" : "field", - "value" : ["standard_metadata", "egress_port"] + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0004" + } + } }, "right" : { "type" : "hexstr", @@ -10199,24 +14444,31 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 49, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" + "line" : 98, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." } - }, + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2", + "id" : 131, + "runtime_data" : [], + "primitives" : [ { "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "int_switch_id" + "value" : "int_q_congestion" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 41, + "line" : 80, "column" : 8, - "source_fragment" : "hdr.int_switch_id.setValid()" + "source_fragment" : "hdr.int_q_congestion.setValid()" } }, { @@ -10224,18 +14476,37 @@ "parameters" : [ { "type" : "field", - "value" : ["int_switch_id", "switch_id"] + "value" : ["int_q_congestion", "q_id"] }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 82, + "column" : 8, + "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" + } + }, + { + "op" : "assign", + "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id47"] + "value" : ["int_q_congestion", "q_congestion"] + }, + { + "type" : "hexstr", + "value" : "0x000000" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 42, + "line" : 83, "column" : 8, - "source_fragment" : "hdr.int_switch_id.switch_id = fmeta.int_meta.switch_id; ..." + "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" } }, { @@ -10243,7 +14514,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -10257,11 +14528,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x03" + "value" : "0x01" } } }, @@ -10275,9 +14546,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 109, + "line" : 97, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." } }, { @@ -10285,7 +14556,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -10299,11 +14570,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x000c" + "value" : "0x0004" } } }, @@ -10317,16 +14588,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 110, + "line" : 98, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i15", - "id" : 111, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3", + "id" : 132, "runtime_data" : [], "primitives" : [ { @@ -10334,14 +14605,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_q_occupancy" + "value" : "int_egress_tx_util" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 60, + "line" : 88, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.setValid()" + "source_fragment" : "hdr.int_egress_tx_util.setValid()" } }, { @@ -10349,50 +14620,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_occupancy", "q_id"] + "value" : ["int_egress_tx_util", "egress_port_tx_util"] }, { "type" : "hexstr", - "value" : "0x00" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 62, - "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.q_id = 8w0" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["int_q_occupancy", "q_occupancy"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "deq_qdepth"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffff" - } - } - } + "value" : "0x00000000" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 63, + "line" : 90, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" + "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" } }, { @@ -10400,14 +14639,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_hop_latency" + "value" : "int_q_congestion" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 54, + "line" : 80, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.setValid()" + "source_fragment" : "hdr.int_q_congestion.setValid()" } }, { @@ -10415,33 +14654,37 @@ "parameters" : [ { "type" : "field", - "value" : ["int_hop_latency", "hop_latency"] + "value" : ["int_q_congestion", "q_id"] }, { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 55, + "line" : 82, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_port_ids" + "type" : "field", + "value" : ["int_q_congestion", "q_congestion"] + }, + { + "type" : "hexstr", + "value" : "0x000000" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 47, + "line" : 83, "column" : 8, - "source_fragment" : "hdr.int_port_ids.setValid()" + "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" } }, { @@ -10449,7 +14692,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "ingress_port_id"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -10458,12 +14701,22 @@ "value" : { "op" : "&", "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_words60"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x02" + } + } }, "right" : { "type" : "hexstr", - "value" : "0xffff" + "value" : "0xff" } } } @@ -10471,9 +14724,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 48, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" + "line" : 103, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -10481,7 +14734,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "egress_port_id"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -10490,8 +14743,18 @@ "value" : { "op" : "&", "left" : { - "type" : "field", - "value" : ["standard_metadata", "egress_port"] + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0008" + } + } }, "right" : { "type" : "hexstr", @@ -10503,24 +14766,31 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 49, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" + "line" : 104, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } - }, + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4", + "id" : 133, + "runtime_data" : [], + "primitives" : [ { "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "int_switch_id" + "value" : "int_egress_tstamp" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 41, + "line" : 74, "column" : 8, - "source_fragment" : "hdr.int_switch_id.setValid()" + "source_fragment" : "hdr.int_egress_tstamp.setValid()" } }, { @@ -10528,18 +14798,41 @@ "parameters" : [ { "type" : "field", - "value" : ["int_switch_id", "switch_id"] + "value" : ["int_egress_tstamp", "egress_tstamp"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id47"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 42, + "line" : 75, "column" : 8, - "source_fragment" : "hdr.int_switch_id.switch_id = fmeta.int_meta.switch_id; ..." + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" } }, { @@ -10547,7 +14840,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -10561,11 +14854,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x04" + "value" : "0x01" } } }, @@ -10579,9 +14872,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 115, + "line" : 97, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." } }, { @@ -10589,7 +14882,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -10603,11 +14896,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0010" + "value" : "0x0004" } } }, @@ -10621,22 +14914,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 116, + "line" : 98, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 16; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0", - "id" : 112, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1", - "id" : 113, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5", + "id" : 134, "runtime_data" : [], "primitives" : [ { @@ -10673,12 +14960,69 @@ "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" } }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tstamp" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_tstamp", "egress_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 75, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -10692,11 +15036,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x01" + "value" : "0x02" } } }, @@ -10710,9 +15054,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 97, + "line" : 103, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -10720,7 +15064,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -10734,11 +15078,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0004" + "value" : "0x0008" } } }, @@ -10752,16 +15096,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 98, + "line" : 104, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2", - "id" : 114, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6", + "id" : 135, "runtime_data" : [], "primitives" : [ { @@ -10817,12 +15161,69 @@ "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" } }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tstamp" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_tstamp", "egress_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 75, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -10836,11 +15237,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x01" + "value" : "0x02" } } }, @@ -10854,9 +15255,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 97, + "line" : 103, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -10864,7 +15265,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -10878,11 +15279,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0004" + "value" : "0x0008" } } }, @@ -10896,16 +15297,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 98, + "line" : 104, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3", - "id" : 115, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7", + "id" : 136, "runtime_data" : [], "primitives" : [ { @@ -10971,9 +15372,43 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 82, + "line" : 82, + "column" : 8, + "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_q_congestion", "q_congestion"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 83, + "column" : 8, + "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tstamp" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 74, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" + "source_fragment" : "hdr.int_egress_tstamp.setValid()" } }, { @@ -10981,18 +15416,41 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_congestion"] + "value" : ["int_egress_tstamp", "egress_tstamp"] }, { - "type" : "hexstr", - "value" : "0x000000" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 83, + "line" : 75, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" } }, { @@ -11000,7 +15458,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -11014,11 +15472,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x03" } } }, @@ -11032,9 +15490,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 109, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -11042,7 +15500,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -11056,11 +15514,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x000c" } } }, @@ -11074,16 +15532,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4", - "id" : 116, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8", + "id" : 137, "runtime_data" : [], "primitives" : [ { @@ -11091,14 +15549,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_egress_tstamp" + "value" : "int_ingress_tstamp" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 74, + "line" : 68, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.int_ingress_tstamp.setValid()" } }, { @@ -11106,41 +15564,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["int_ingress_tstamp", "ingress_tstamp"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] - }, - "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 75, + "line" : 69, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" } }, { @@ -11148,7 +15583,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -11162,7 +15597,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", @@ -11190,7 +15625,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -11204,7 +15639,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", @@ -11230,8 +15665,8 @@ ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5", - "id" : 117, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9", + "id" : 138, "runtime_data" : [], "primitives" : [ { @@ -11273,14 +15708,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_egress_tstamp" + "value" : "int_ingress_tstamp" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 74, + "line" : 68, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.int_ingress_tstamp.setValid()" } }, { @@ -11288,41 +15723,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["int_ingress_tstamp", "ingress_tstamp"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] - }, - "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 75, + "line" : 69, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" } }, { @@ -11330,7 +15742,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -11344,7 +15756,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", @@ -11372,7 +15784,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -11386,7 +15798,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", @@ -11412,8 +15824,8 @@ ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6", - "id" : 118, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10", + "id" : 139, "runtime_data" : [], "primitives" : [ { @@ -11474,14 +15886,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_egress_tstamp" + "value" : "int_ingress_tstamp" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 74, + "line" : 68, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.int_ingress_tstamp.setValid()" } }, { @@ -11489,41 +15901,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["int_ingress_tstamp", "ingress_tstamp"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] - }, - "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 75, + "line" : 69, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" } }, { @@ -11531,7 +15920,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -11545,7 +15934,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", @@ -11573,7 +15962,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -11587,7 +15976,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", @@ -11613,8 +16002,8 @@ ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7", - "id" : 119, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11", + "id" : 140, "runtime_data" : [], "primitives" : [ { @@ -11709,14 +16098,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_egress_tstamp" + "value" : "int_ingress_tstamp" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 74, + "line" : 68, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.int_ingress_tstamp.setValid()" } }, { @@ -11724,7 +16113,26 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["int_ingress_tstamp", "ingress_tstamp"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 69, + "column" : 8, + "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -11738,17 +16146,17 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] + "type" : "hexstr", + "value" : "0x03" } } }, "right" : { "type" : "hexstr", - "value" : "0xffffffff" + "value" : "0xff" } } } @@ -11756,9 +16164,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 75, - "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "line" : 109, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -11766,7 +16174,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -11780,17 +16188,17 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x03" + "value" : "0x000c" } } }, "right" : { "type" : "hexstr", - "value" : "0xff" + "value" : "0xffff" } } } @@ -11798,9 +16206,31 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 109, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + } + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12", + "id" : 141, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tstamp" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.setValid()" } }, { @@ -11808,7 +16238,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["int_egress_tstamp", "egress_tstamp"] }, { "type" : "expression", @@ -11822,17 +16252,17 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["standard_metadata", "enq_timestamp"] }, "right" : { - "type" : "hexstr", - "value" : "0x000c" + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] } } }, "right" : { "type" : "hexstr", - "value" : "0xffff" + "value" : "0xffffffff" } } } @@ -11840,18 +16270,11 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 110, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "line" : 75, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8", - "id" : 120, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "add_header", "parameters" : [ @@ -11891,7 +16314,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -11905,11 +16328,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x01" + "value" : "0x02" } } }, @@ -11923,9 +16346,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 97, + "line" : 103, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -11933,7 +16356,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -11947,11 +16370,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0004" + "value" : "0x0008" } } }, @@ -11965,16 +16388,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 98, + "line" : 104, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9", - "id" : 121, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13", + "id" : 142, "runtime_data" : [], "primitives" : [ { @@ -12011,6 +16434,63 @@ "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" } }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tstamp" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_tstamp", "egress_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 75, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + } + }, { "op" : "add_header", "parameters" : [ @@ -12050,7 +16530,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -12064,11 +16544,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x03" } } }, @@ -12082,9 +16562,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 109, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -12092,7 +16572,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -12106,11 +16586,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x000c" } } }, @@ -12124,16 +16604,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10", - "id" : 122, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14", + "id" : 143, "runtime_data" : [], "primitives" : [ { @@ -12189,6 +16669,63 @@ "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" } }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tstamp" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_tstamp", "egress_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 75, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + } + }, { "op" : "add_header", "parameters" : [ @@ -12228,7 +16765,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -12242,11 +16779,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x03" } } }, @@ -12260,9 +16797,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 109, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -12270,7 +16807,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -12284,11 +16821,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x000c" } } }, @@ -12302,16 +16839,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11", - "id" : 123, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15", + "id" : 144, "runtime_data" : [], "primitives" : [ { @@ -12348,91 +16885,19 @@ "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" } }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_q_congestion" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 80, - "column" : 8, - "source_fragment" : "hdr.int_q_congestion.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["int_q_congestion", "q_id"] - }, - { - "type" : "hexstr", - "value" : "0x00" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 82, - "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["int_q_congestion", "q_congestion"] - }, - { - "type" : "hexstr", - "value" : "0x000000" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 83, - "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_ingress_tstamp" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 68, - "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["int_ingress_tstamp", "ingress_tstamp"] - }, + { + "op" : "add_header", + "parameters" : [ { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] + "type" : "header", + "value" : "int_q_congestion" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 69, + "line" : 80, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" + "source_fragment" : "hdr.int_q_congestion.setValid()" } }, { @@ -12440,41 +16905,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["int_q_congestion", "q_id"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x03" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 109, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "line" : 82, + "column" : 8, + "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" } }, { @@ -12482,50 +16924,20 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["int_q_congestion", "q_congestion"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x000c" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "hexstr", + "value" : "0x000000" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 110, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "line" : 83, + "column" : 8, + "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12", - "id" : 124, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "add_header", "parameters" : [ @@ -12622,7 +17034,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, { "type" : "expression", @@ -12636,11 +17048,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["scalars", "userMetadata._int_meta_new_words60"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x04" } } }, @@ -12654,9 +17066,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 115, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 4; ..." } }, { @@ -12664,7 +17076,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, { "type" : "expression", @@ -12678,11 +17090,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x0010" } } }, @@ -12696,31 +17108,52 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 116, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 16; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13", - "id" : 125, - "runtime_data" : [], + "name" : "FabricEgress.process_int_main.process_int_report.do_report_encapsulation", + "id" : 145, + "runtime_data" : [ + { + "name" : "src_mac", + "bitwidth" : 48 + }, + { + "name" : "mon_mac", + "bitwidth" : 48 + }, + { + "name" : "src_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_port", + "bitwidth" : 16 + } + ], "primitives" : [ { "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "int_egress_tx_util" + "value" : "report_ethernet" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 88, + "filename" : "include/int/int_report.p4", + "line" : 50, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.setValid()" + "source_fragment" : "hdr.report_ethernet.setValid()" } }, { @@ -12728,18 +17161,37 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tx_util", "egress_port_tx_util"] + "value" : ["report_ethernet", "dst_addr"] }, { - "type" : "hexstr", - "value" : "0x00000000" + "type" : "runtime_data", + "value" : 1 } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 90, + "filename" : "include/int/int_report.p4", + "line" : 51, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + "source_fragment" : "hdr.report_ethernet.dst_addr = mon_mac" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["report_ethernet", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/int/int_report.p4", + "line" : 52, + "column" : 8, + "source_fragment" : "hdr.report_ethernet.src_addr = src_mac" } }, { @@ -12747,14 +17199,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_egress_tstamp" + "value" : "report_eth_type" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 74, + "filename" : "include/int/int_report.p4", + "line" : 53, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.report_eth_type.setValid()" } }, { @@ -12762,56 +17214,90 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["report_eth_type", "value"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] - }, - "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + "type" : "hexstr", + "value" : "0x0800" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 75, + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "report_ipv4" + } + ], + "source_info" : { + "filename" : "include/int/int_report.p4", + "line" : 57, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["report_ipv4", "version"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "include/int/int_report.p4", + "line" : 58, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.version = 4w4" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["report_ipv4", "ihl"] + }, + { + "type" : "hexstr", + "value" : "0x05" + } + ], + "source_info" : { + "filename" : "include/int/int_report.p4", + "line" : 59, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.report_ipv4.ihl = 4w5" } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_ingress_tstamp" + "type" : "field", + "value" : ["report_ipv4", "dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 68, + "filename" : "include/int/int_report.p4", + "line" : 60, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.setValid()" + "source_fragment" : "hdr.report_ipv4.dscp = 6w0" } }, { @@ -12819,18 +17305,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_ingress_tstamp", "ingress_tstamp"] + "value" : ["report_ipv4", "ecn"] }, { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 69, + "filename" : "include/int/int_report.p4", + "line" : 61, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" + "source_fragment" : "hdr.report_ipv4.ecn = 2w0" } }, { @@ -12838,7 +17324,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["report_ipv4", "total_len"] }, { "type" : "expression", @@ -12851,28 +17337,28 @@ "value" : { "op" : "+", "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "type" : "hexstr", + "value" : "0x0036" }, "right" : { - "type" : "hexstr", - "value" : "0x03" + "type" : "field", + "value" : ["ipv4", "total_len"] } } }, "right" : { "type" : "hexstr", - "value" : "0xff" + "value" : "0xffff" } } } } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 109, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "filename" : "include/int/int_report.p4", + "line" : 63, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.total_len = (bit<16>) IPV4_MIN_HEAD_LEN + (bit<16>) UDP_HEADER_LEN + ..." } }, { @@ -12880,63 +17366,37 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["report_ipv4", "identification"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x000c" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 110, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "filename" : "include/int/int_report.p4", + "line" : 66, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.identification = 0" } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14", - "id" : 126, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_q_congestion" + "type" : "field", + "value" : ["report_ipv4", "flags"] + }, + { + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 80, + "filename" : "include/int/int_report.p4", + "line" : 67, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.setValid()" + "source_fragment" : "hdr.report_ipv4.flags = 0" } }, { @@ -12944,18 +17404,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_id"] + "value" : ["report_ipv4", "frag_offset"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 82, + "filename" : "include/int/int_report.p4", + "line" : 68, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" + "source_fragment" : "hdr.report_ipv4.frag_offset = 0" } }, { @@ -12963,33 +17423,56 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_congestion"] + "value" : ["report_ipv4", "ttl"] }, { "type" : "hexstr", - "value" : "0x000000" + "value" : "0xff" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 83, + "filename" : "include/int/int_report.p4", + "line" : 69, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" + "source_fragment" : "hdr.report_ipv4.ttl = 0xFF" } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_egress_tstamp" + "type" : "field", + "value" : ["report_ipv4", "protocol"] + }, + { + "type" : "hexstr", + "value" : "0x11" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 74, + "filename" : "include/control/../define.p4", + "line" : 161, + "column" : 25, + "source_fragment" : "17; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["report_ipv4", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "include/int/int_report.p4", + "line" : 71, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.report_ipv4.src_addr = src_ip" } }, { @@ -12997,41 +17480,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["report_ipv4", "dst_addr"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] - }, - "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + "type" : "runtime_data", + "value" : 3 } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 75, + "filename" : "include/int/int_report.p4", + "line" : 72, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.report_ipv4.dst_addr = mon_ip" } }, { @@ -13039,14 +17499,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_ingress_tstamp" + "value" : "report_udp" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 68, + "filename" : "include/int/int_report.p4", + "line" : 75, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.setValid()" + "source_fragment" : "hdr.report_udp.setValid()" } }, { @@ -13054,18 +17514,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_ingress_tstamp", "ingress_tstamp"] + "value" : ["report_udp", "sport"] }, { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 69, + "filename" : "include/int/int_report.p4", + "line" : 76, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" + "source_fragment" : "hdr.report_udp.sport = 0" } }, { @@ -13073,41 +17533,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["report_udp", "dport"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x03" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } + "type" : "runtime_data", + "value" : 4 } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 109, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "filename" : "include/int/int_report.p4", + "line" : 77, + "column" : 8, + "source_fragment" : "hdr.report_udp.dport = mon_port" } }, { @@ -13115,7 +17552,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["report_udp", "len"] }, { "type" : "expression", @@ -13128,12 +17565,12 @@ "value" : { "op" : "+", "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "type" : "hexstr", + "value" : "0x0022" }, "right" : { - "type" : "hexstr", - "value" : "0x000c" + "type" : "field", + "value" : ["ipv4", "total_len"] } } }, @@ -13146,32 +17583,25 @@ } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 110, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "filename" : "include/int/int_report.p4", + "line" : 78, + "column" : 8, + "source_fragment" : "hdr.report_udp.len = (bit<16>) UDP_HEADER_LEN + (bit<16>) REPORT_FIXED_HEADER_LEN + ..." } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15", - "id" : 127, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "int_egress_tx_util" + "value" : "report_fixed_header" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 88, + "filename" : "include/int/int_report.p4", + "line" : 31, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.setValid()" + "source_fragment" : "hdr.report_fixed_header.setValid()" } }, { @@ -13179,33 +17609,37 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tx_util", "egress_port_tx_util"] + "value" : ["report_fixed_header", "ver"] }, { "type" : "hexstr", - "value" : "0x00000000" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 90, + "filename" : "include/int/int_report.p4", + "line" : 32, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + "source_fragment" : "hdr.report_fixed_header.ver = 0" } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_q_congestion" + "type" : "field", + "value" : ["report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 80, - "column" : 8, - "source_fragment" : "hdr.int_q_congestion.setValid()" + "filename" : "include/control/../define.p4", + "line" : 192, + "column" : 31, + "source_fragment" : "0; ..." } }, { @@ -13213,7 +17647,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_id"] + "value" : ["report_fixed_header", "d"] }, { "type" : "hexstr", @@ -13221,10 +17655,10 @@ } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 82, + "filename" : "include/int/int_report.p4", + "line" : 35, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" + "source_fragment" : "hdr.report_fixed_header.d = 0" } }, { @@ -13232,33 +17666,37 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_congestion"] + "value" : ["report_fixed_header", "q"] }, { "type" : "hexstr", - "value" : "0x000000" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 83, + "filename" : "include/int/int_report.p4", + "line" : 36, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" + "source_fragment" : "hdr.report_fixed_header.q = 0" } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_egress_tstamp" + "type" : "field", + "value" : ["report_fixed_header", "f"] + }, + { + "type" : "hexstr", + "value" : "0x01" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 74, + "filename" : "include/int/int_report.p4", + "line" : 37, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.report_fixed_header.f = 1" } }, { @@ -13266,56 +17704,56 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["report_fixed_header", "rsvd"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] - }, - "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 75, + "filename" : "include/int/int_report.p4", + "line" : 38, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.report_fixed_header.rsvd = 0" } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_ingress_tstamp" + "type" : "field", + "value" : ["report_fixed_header", "hw_id"] + }, + { + "type" : "hexstr", + "value" : "0x01" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 68, + "filename" : "include/control/../define.p4", + "line" : 196, + "column" : 21, + "source_fragment" : "1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["report_fixed_header", "seq_no"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + } + ], + "source_info" : { + "filename" : "include/int/int_report.p4", + "line" : 42, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.setValid()" + "source_fragment" : "hdr.report_fixed_header.seq_no = 0" } }, { @@ -13323,7 +17761,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_ingress_tstamp", "ingress_tstamp"] + "value" : ["report_fixed_header", "ingress_tstamp"] }, { "type" : "field", @@ -13331,10 +17769,36 @@ } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 69, + "filename" : "include/int/int_report.p4", + "line" : 44, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" + "source_fragment" : "hdr.report_fixed_header.ingress_tstamp = (bit<32>) standard_metadata.enq_timestamp" + } + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_sink.restore_header", + "id" : 146, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["udp", "dport"] + }, + { + "type" : "field", + "value" : ["intl4_tail", "dest_port"] + } + ], + "source_info" : { + "filename" : "include/int/int_sink.p4", + "line" : 27, + "column" : 8, + "source_fragment" : "hdr.udp.dport = hdr.intl4_tail.dest_port" } }, { @@ -13342,7 +17806,33 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["intl4_tail", "dscp"] + } + ], + "source_info" : { + "filename" : "include/int/int_sink.p4", + "line" : 28, + "column" : 8, + "source_fragment" : "hdr.ipv4.dscp = hdr.intl4_tail.dscp" + } + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_sink.int_sink", + "id" : 147, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ipv4", "total_len"] }, { "type" : "expression", @@ -13353,30 +17843,60 @@ "left" : { "type" : "expression", "value" : { - "op" : "+", + "op" : "-", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] + "value" : ["ipv4", "total_len"] }, "right" : { - "type" : "hexstr", - "value" : "0x04" + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "field", + "value" : ["intl4_shim", "len_words"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x02" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } } } }, "right" : { "type" : "hexstr", - "value" : "0xff" + "value" : "0xffff" } } } } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 115, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 4; ..." + "filename" : "include/int/int_sink.p4", + "line" : 35, + "column" : 8, + "source_fragment" : "hdr.ipv4.total_len = hdr.ipv4.total_len - len_bytes" } }, { @@ -13384,7 +17904,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["udp", "len"] }, { "type" : "expression", @@ -13395,14 +17915,44 @@ "left" : { "type" : "expression", "value" : { - "op" : "+", + "op" : "-", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] + "value" : ["udp", "len"] }, "right" : { - "type" : "hexstr", - "value" : "0x0010" + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "field", + "value" : ["intl4_shim", "len_words"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x02" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } } } }, @@ -13415,197 +17965,212 @@ } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 116, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 16; ..." + "filename" : "include/int/int_sink.p4", + "line" : 36, + "column" : 8, + "source_fragment" : "hdr.udp.len = hdr.udp.len - len_bytes" } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_report.do_report_encapsulation", - "id" : 128, - "runtime_data" : [ - { - "name" : "src_mac", - "bitwidth" : 48 }, { - "name" : "mon_mac", - "bitwidth" : 48 + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_header" + } + ], + "source_info" : { + "filename" : "include/int/int_sink.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "hdr.int_header.setInvalid()" + } }, { - "name" : "src_ip", - "bitwidth" : 32 + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_data" + } + ], + "source_info" : { + "filename" : "include/int/int_sink.p4", + "line" : 39, + "column" : 8, + "source_fragment" : "hdr.int_data.setInvalid()" + } }, { - "name" : "mon_ip", - "bitwidth" : 32 + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "intl4_shim" + } + ], + "source_info" : { + "filename" : "include/int/int_sink.p4", + "line" : 40, + "column" : 8, + "source_fragment" : "hdr.intl4_shim.setInvalid()" + } }, { - "name" : "mon_port", - "bitwidth" : 16 - } - ], - "primitives" : [ - { - "op" : "add_header", + "op" : "remove_header", "parameters" : [ { "type" : "header", - "value" : "report_ethernet" + "value" : "intl4_tail" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 50, + "filename" : "include/int/int_sink.p4", + "line" : 41, "column" : 8, - "source_fragment" : "hdr.report_ethernet.setValid()" + "source_fragment" : "hdr.intl4_tail.setInvalid()" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["report_ethernet", "dst_addr"] - }, - { - "type" : "runtime_data", - "value" : 1 + "type" : "header", + "value" : "int_switch_id" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 51, + "filename" : "include/int/int_sink.p4", + "line" : 42, "column" : 8, - "source_fragment" : "hdr.report_ethernet.dst_addr = mon_mac" + "source_fragment" : "hdr.int_switch_id.setInvalid()" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["report_ethernet", "src_addr"] - }, - { - "type" : "runtime_data", - "value" : 0 + "type" : "header", + "value" : "int_port_ids" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 52, + "filename" : "include/int/int_sink.p4", + "line" : 43, "column" : 8, - "source_fragment" : "hdr.report_ethernet.src_addr = src_mac" + "source_fragment" : "hdr.int_port_ids.setInvalid()" } }, { - "op" : "add_header", + "op" : "remove_header", "parameters" : [ { "type" : "header", - "value" : "report_eth_type" + "value" : "int_hop_latency" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 53, + "filename" : "include/int/int_sink.p4", + "line" : 44, "column" : 8, - "source_fragment" : "hdr.report_eth_type.setValid()" + "source_fragment" : "hdr.int_hop_latency.setInvalid()" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["report_eth_type", "value"] - }, - { - "type" : "hexstr", - "value" : "0x0800" + "type" : "header", + "value" : "int_q_occupancy" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/int/int_sink.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.int_q_occupancy.setInvalid()" } }, { - "op" : "add_header", + "op" : "remove_header", "parameters" : [ { "type" : "header", - "value" : "report_ipv4" + "value" : "int_ingress_tstamp" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 57, + "filename" : "include/int/int_sink.p4", + "line" : 46, "column" : 8, - "source_fragment" : "hdr.report_ipv4.setValid()" + "source_fragment" : "hdr.int_ingress_tstamp.setInvalid()" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["report_ipv4", "version"] - }, - { - "type" : "hexstr", - "value" : "0x04" + "type" : "header", + "value" : "int_egress_tstamp" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 58, + "filename" : "include/int/int_sink.p4", + "line" : 47, "column" : 8, - "source_fragment" : "hdr.report_ipv4.version = 4w4" + "source_fragment" : "hdr.int_egress_tstamp.setInvalid()" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["report_ipv4", "ihl"] - }, - { - "type" : "hexstr", - "value" : "0x05" + "type" : "header", + "value" : "int_q_congestion" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 59, + "filename" : "include/int/int_sink.p4", + "line" : 48, "column" : 8, - "source_fragment" : "hdr.report_ipv4.ihl = 4w5" + "source_fragment" : "hdr.int_q_congestion.setInvalid()" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["report_ipv4", "dscp"] - }, + "type" : "header", + "value" : "int_egress_tx_util" + } + ], + "source_info" : { + "filename" : "include/int/int_sink.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.int_egress_tx_util.setInvalid()" + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.pop_mpls_if_present", + "id" : 148, + "runtime_data" : [], + "primitives" : [ + { + "op" : "remove_header", + "parameters" : [ { - "type" : "hexstr", - "value" : "0x00" + "type" : "header", + "value" : "mpls" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 60, + "filename" : "include/control/next.p4", + "line" : 204, "column" : 8, - "source_fragment" : "hdr.report_ipv4.dscp = 6w0" + "source_fragment" : "hdr.mpls.setInvalid()" } }, { @@ -13613,60 +18178,40 @@ "parameters" : [ { "type" : "field", - "value" : ["report_ipv4", "ecn"] + "value" : ["eth_type", "value"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 61, + "filename" : "include/control/next.p4", + "line" : 206, "column" : 8, - "source_fragment" : "hdr.report_ipv4.ecn = 2w0" + "source_fragment" : "hdr.eth_type.value = fabric_metadata.ip_eth_type; ..." } - }, + } + ] + }, + { + "name" : "FabricEgress.egress_next.set_mpls", + "id" : 149, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["report_ipv4", "total_len"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "hexstr", - "value" : "0x0036" - }, - "right" : { - "type" : "field", - "value" : ["ipv4", "total_len"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "header", + "value" : "mpls" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 63, + "filename" : "include/control/next.p4", + "line" : 211, "column" : 8, - "source_fragment" : "hdr.report_ipv4.total_len = (bit<16>) IPV4_MIN_HEAD_LEN + (bit<16>) UDP_HEADER_LEN + ..." + "source_fragment" : "hdr.mpls.setValid()" } }, { @@ -13674,18 +18219,18 @@ "parameters" : [ { "type" : "field", - "value" : ["report_ipv4", "identification"] + "value" : ["mpls", "label"] }, { - "type" : "hexstr", - "value" : "0x0000" + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label16"] } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 66, + "filename" : "include/control/next.p4", + "line" : 212, "column" : 8, - "source_fragment" : "hdr.report_ipv4.identification = 0" + "source_fragment" : "hdr.mpls.label = fabric_metadata.mpls_label; ..." } }, { @@ -13693,7 +18238,7 @@ "parameters" : [ { "type" : "field", - "value" : ["report_ipv4", "flags"] + "value" : ["mpls", "tc"] }, { "type" : "hexstr", @@ -13701,10 +18246,10 @@ } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 67, + "filename" : "include/control/next.p4", + "line" : 213, "column" : 8, - "source_fragment" : "hdr.report_ipv4.flags = 0" + "source_fragment" : "hdr.mpls.tc = 3w0" } }, { @@ -13712,18 +18257,18 @@ "parameters" : [ { "type" : "field", - "value" : ["report_ipv4", "frag_offset"] + "value" : ["mpls", "bos"] }, { "type" : "hexstr", - "value" : "0x0000" + "value" : "0x01" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 68, + "filename" : "include/control/next.p4", + "line" : 214, "column" : 8, - "source_fragment" : "hdr.report_ipv4.frag_offset = 0" + "source_fragment" : "hdr.mpls.bos = 1w1" } }, { @@ -13731,18 +18276,18 @@ "parameters" : [ { "type" : "field", - "value" : ["report_ipv4", "ttl"] + "value" : ["mpls", "ttl"] }, { - "type" : "hexstr", - "value" : "0xff" + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_ttl17"] } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 69, + "filename" : "include/control/next.p4", + "line" : 215, "column" : 8, - "source_fragment" : "hdr.report_ipv4.ttl = 0xFF" + "source_fragment" : "hdr.mpls.ttl = fabric_metadata.mpls_ttl; // Decrement after push. ..." } }, { @@ -13750,37 +18295,40 @@ "parameters" : [ { "type" : "field", - "value" : ["report_ipv4", "protocol"] + "value" : ["eth_type", "value"] }, { "type" : "hexstr", - "value" : "0x11" + "value" : "0x8847" } ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 140, - "column" : 25, - "source_fragment" : "17; ..." + "line" : 147, + "column" : 31, + "source_fragment" : "0x8847; ..." } - }, + } + ] + }, + { + "name" : "FabricEgress.egress_next.push_outer_vlan", + "id" : 150, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["report_ipv4", "src_addr"] - }, - { - "type" : "runtime_data", - "value" : 2 + "type" : "header", + "value" : "vlan_tag" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 71, + "filename" : "include/control/next.p4", + "line" : 223, "column" : 8, - "source_fragment" : "hdr.report_ipv4.src_addr = src_ip" + "source_fragment" : "hdr.vlan_tag.setValid()" } }, { @@ -13788,33 +18336,37 @@ "parameters" : [ { "type" : "field", - "value" : ["report_ipv4", "dst_addr"] + "value" : ["vlan_tag", "cfi"] }, { - "type" : "runtime_data", - "value" : 3 + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_cfi11"] } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 72, + "filename" : "include/control/next.p4", + "line" : 224, "column" : 8, - "source_fragment" : "hdr.report_ipv4.dst_addr = mon_ip" + "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi; ..." } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "report_udp" + "type" : "field", + "value" : ["vlan_tag", "pri"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_pri10"] } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 75, + "filename" : "include/control/next.p4", + "line" : 225, "column" : 8, - "source_fragment" : "hdr.report_udp.setValid()" + "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri; ..." } }, { @@ -13822,18 +18374,18 @@ "parameters" : [ { "type" : "field", - "value" : ["report_udp", "sport"] + "value" : ["vlan_tag", "eth_type"] }, { "type" : "hexstr", - "value" : "0x0000" + "value" : "0x8100" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 76, - "column" : 8, - "source_fragment" : "hdr.report_udp.sport = 0" + "filename" : "include/control/../define.p4", + "line" : 146, + "column" : 31, + "source_fragment" : "0x8100; ..." } }, { @@ -13841,18 +18393,40 @@ "parameters" : [ { "type" : "field", - "value" : ["report_udp", "dport"] + "value" : ["vlan_tag", "vlan_id"] }, { - "type" : "runtime_data", - "value" : 4 + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 77, + "filename" : "include/control/next.p4", + "line" : 227, "column" : 8, - "source_fragment" : "hdr.report_udp.dport = mon_port" + "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id; ..." + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.push_inner_vlan", + "id" : 151, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_vlan_tag" + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 234, + "column" : 8, + "source_fragment" : "hdr.inner_vlan_tag.setValid()" } }, { @@ -13860,56 +18434,37 @@ "parameters" : [ { "type" : "field", - "value" : ["report_udp", "len"] + "value" : ["inner_vlan_tag", "cfi"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "hexstr", - "value" : "0x0022" - }, - "right" : { - "type" : "field", - "value" : ["ipv4", "total_len"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._inner_vlan_cfi15"] } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 78, + "filename" : "include/control/next.p4", + "line" : 235, "column" : 8, - "source_fragment" : "hdr.report_udp.len = (bit<16>) UDP_HEADER_LEN + (bit<16>) REPORT_FIXED_HEADER_LEN + ..." + "source_fragment" : "hdr.inner_vlan_tag.cfi = fabric_metadata.inner_vlan_cfi; ..." } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "report_fixed_header" + "type" : "field", + "value" : ["inner_vlan_tag", "pri"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_vlan_pri14"] } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 31, + "filename" : "include/control/next.p4", + "line" : 236, "column" : 8, - "source_fragment" : "hdr.report_fixed_header.setValid()" + "source_fragment" : "hdr.inner_vlan_tag.pri = fabric_metadata.inner_vlan_pri; ..." } }, { @@ -13917,18 +18472,18 @@ "parameters" : [ { "type" : "field", - "value" : ["report_fixed_header", "ver"] + "value" : ["inner_vlan_tag", "vlan_id"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "field", + "value" : ["scalars", "userMetadata._inner_vlan_id13"] } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 32, + "filename" : "include/control/next.p4", + "line" : 237, "column" : 8, - "source_fragment" : "hdr.report_fixed_header.ver = 0" + "source_fragment" : "hdr.inner_vlan_tag.vlan_id = fabric_metadata.inner_vlan_id; ..." } }, { @@ -13936,18 +18491,18 @@ "parameters" : [ { "type" : "field", - "value" : ["report_fixed_header", "nproto"] + "value" : ["inner_vlan_tag", "eth_type"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x8100" } ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 171, + "line" : 146, "column" : 31, - "source_fragment" : "0; ..." + "source_fragment" : "0x8100; ..." } }, { @@ -13955,37 +18510,40 @@ "parameters" : [ { "type" : "field", - "value" : ["report_fixed_header", "d"] + "value" : ["vlan_tag", "eth_type"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x8100" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 35, - "column" : 8, - "source_fragment" : "hdr.report_fixed_header.d = 0" + "filename" : "include/control/../define.p4", + "line" : 146, + "column" : 31, + "source_fragment" : "0x8100; ..." } - }, + } + ] + }, + { + "name" : "FabricEgress.egress_next.push_vlan", + "id" : 152, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["report_fixed_header", "q"] - }, - { - "type" : "hexstr", - "value" : "0x00" + "type" : "header", + "value" : "vlan_tag" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 36, + "filename" : "include/control/next.p4", + "line" : 223, "column" : 8, - "source_fragment" : "hdr.report_fixed_header.q = 0" + "source_fragment" : "hdr.vlan_tag.setValid()" } }, { @@ -13993,18 +18551,18 @@ "parameters" : [ { "type" : "field", - "value" : ["report_fixed_header", "f"] + "value" : ["vlan_tag", "cfi"] }, { - "type" : "hexstr", - "value" : "0x01" + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_cfi11"] } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 37, + "filename" : "include/control/next.p4", + "line" : 224, "column" : 8, - "source_fragment" : "hdr.report_fixed_header.f = 1" + "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi; ..." } }, { @@ -14012,18 +18570,18 @@ "parameters" : [ { "type" : "field", - "value" : ["report_fixed_header", "rsvd"] + "value" : ["vlan_tag", "pri"] }, { - "type" : "hexstr", - "value" : "0x0000" + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_pri10"] } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 38, + "filename" : "include/control/next.p4", + "line" : 225, "column" : 8, - "source_fragment" : "hdr.report_fixed_header.rsvd = 0" + "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri; ..." } }, { @@ -14031,18 +18589,18 @@ "parameters" : [ { "type" : "field", - "value" : ["report_fixed_header", "hw_id"] + "value" : ["vlan_tag", "eth_type"] }, { "type" : "hexstr", - "value" : "0x01" + "value" : "0x8100" } ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 175, - "column" : 21, - "source_fragment" : "1; ..." + "line" : 146, + "column" : 31, + "source_fragment" : "0x8100; ..." } }, { @@ -14050,161 +18608,173 @@ "parameters" : [ { "type" : "field", - "value" : ["report_fixed_header", "seq_no"] + "value" : ["vlan_tag", "vlan_id"] }, { - "type" : "hexstr", - "value" : "0x00000000" + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 42, + "filename" : "include/control/next.p4", + "line" : 227, "column" : 8, - "source_fragment" : "hdr.report_fixed_header.seq_no = 0" + "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id; ..." } - }, + } + ] + }, + { + "name" : "FabricEgress.egress_next.pop_vlan", + "id" : 153, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["report_fixed_header", "ingress_tstamp"] - }, - { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] + "type" : "header", + "value" : "vlan_tag" } ], "source_info" : { - "filename" : "include/int/int_report.p4", - "line" : 44, + "filename" : "include/control/next.p4", + "line" : 256, "column" : 8, - "source_fragment" : "hdr.report_fixed_header.ingress_tstamp = (bit<32>) standard_metadata.enq_timestamp" + "source_fragment" : "hdr.vlan_tag.setInvalid()" } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_sink.restore_header", - "id" : 129, + "name" : "FabricEgress.egress_next.drop", + "id" : 154, "runtime_data" : [], "primitives" : [ { - "op" : "assign", + "op" : "mark_to_drop", "parameters" : [ { - "type" : "field", - "value" : ["udp", "dport"] - }, - { - "type" : "field", - "value" : ["intl4_tail", "dest_port"] + "type" : "header", + "value" : "standard_metadata" } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 27, + "filename" : "include/control/next.p4", + "line" : 261, "column" : 8, - "source_fragment" : "hdr.udp.dport = hdr.intl4_tail.dest_port" + "source_fragment" : "mark_to_drop(standard_metadata)" } - }, + } + ] + }, + { + "name" : "FabricEgress.dscp_rewriter.rewrite", + "id" : 155, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.dscp_rewriter.clear", + "id" : 156, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["ipv4", "dscp"] + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] }, { - "type" : "field", - "value" : ["intl4_tail", "dscp"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 28, + "filename" : "include/control/slicing.p4", + "line" : 135, "column" : 8, - "source_fragment" : "hdr.ipv4.dscp = hdr.intl4_tail.dscp" + "source_fragment" : "tmp_dscp = 0" } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_sink.int_sink", - "id" : 130, + "name" : "FabricEgress.spgw.gtpu_encap", + "id" : 157, "runtime_data" : [], "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 311, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.setValid()" + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["ipv4", "total_len"] + "value" : ["gtpu_ipv4", "version"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "-", - "left" : { - "type" : "field", - "value" : ["ipv4", "total_len"] - }, - "right" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "<<", - "left" : { - "type" : "field", - "value" : ["intl4_shim", "len_words"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x02" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 312, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.version = 4" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_ipv4", "ihl"] + }, + { + "type" : "hexstr", + "value" : "0x05" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 164, + "column" : 28, + "source_fragment" : "5; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_ipv4", "dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 35, + "filename" : "include/control/spgw.p4", + "line" : 314, "column" : 8, - "source_fragment" : "hdr.ipv4.total_len = hdr.ipv4.total_len - len_bytes" + "source_fragment" : "hdr.gtpu_ipv4.dscp = 0" } }, { @@ -14212,7 +18782,26 @@ "parameters" : [ { "type" : "field", - "value" : ["udp", "len"] + "value" : ["gtpu_ipv4", "ecn"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 315, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.ecn = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_ipv4", "total_len"] }, { "type" : "expression", @@ -14223,44 +18812,14 @@ "left" : { "type" : "expression", "value" : { - "op" : "-", + "op" : "+", "left" : { "type" : "field", - "value" : ["udp", "len"] + "value" : ["ipv4", "total_len"] }, "right" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "<<", - "left" : { - "type" : "field", - "value" : ["intl4_shim", "len_words"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x02" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } + "type" : "hexstr", + "value" : "0x0024" } } }, @@ -14273,212 +18832,257 @@ } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 36, + "filename" : "include/control/spgw.p4", + "line" : 316, "column" : 8, - "source_fragment" : "hdr.udp.len = hdr.udp.len - len_bytes" + "source_fragment" : "hdr.gtpu_ipv4.total_len = hdr.ipv4.total_len ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_header" - } - ], - "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 38, - "column" : 8, - "source_fragment" : "hdr.int_header.setInvalid()" - } - }, - { - "op" : "remove_header", - "parameters" : [ + "type" : "field", + "value" : ["gtpu_ipv4", "identification"] + }, { - "type" : "header", - "value" : "int_data" + "type" : "hexstr", + "value" : "0x1513" } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 39, + "filename" : "include/control/spgw.p4", + "line" : 318, "column" : 8, - "source_fragment" : "hdr.int_data.setInvalid()" + "source_fragment" : "hdr.gtpu_ipv4.identification = 0x1513" } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "intl4_shim" + "type" : "field", + "value" : ["gtpu_ipv4", "flags"] + }, + { + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 40, + "filename" : "include/control/spgw.p4", + "line" : 319, "column" : 8, - "source_fragment" : "hdr.intl4_shim.setInvalid()" + "source_fragment" : "hdr.gtpu_ipv4.flags = 0" } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "intl4_tail" + "type" : "field", + "value" : ["gtpu_ipv4", "frag_offset"] + }, + { + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 41, + "filename" : "include/control/spgw.p4", + "line" : 320, "column" : 8, - "source_fragment" : "hdr.intl4_tail.setInvalid()" + "source_fragment" : "hdr.gtpu_ipv4.frag_offset = 0" } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_switch_id" + "type" : "field", + "value" : ["gtpu_ipv4", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 42, - "column" : 8, - "source_fragment" : "hdr.int_switch_id.setInvalid()" + "filename" : "include/control/../define.p4", + "line" : 177, + "column" : 32, + "source_fragment" : "64; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_port_ids" + "type" : "field", + "value" : ["gtpu_ipv4", "protocol"] + }, + { + "type" : "hexstr", + "value" : "0x11" } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 43, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.setInvalid()" + "filename" : "include/control/../define.p4", + "line" : 161, + "column" : 25, + "source_fragment" : "17; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_hop_latency" + "type" : "field", + "value" : ["gtpu_ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_src_addr38"] } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 44, + "filename" : "include/control/spgw.p4", + "line" : 323, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.setInvalid()" + "source_fragment" : "hdr.gtpu_ipv4.src_addr = fabric_md.spgw.tunnel_src_addr; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_q_occupancy" + "type" : "field", + "value" : ["gtpu_ipv4", "dst_addr"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_dst_addr39"] } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 45, + "filename" : "include/control/spgw.p4", + "line" : 324, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.setInvalid()" + "source_fragment" : "hdr.gtpu_ipv4.dst_addr = fabric_md.spgw.tunnel_dst_addr; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_ingress_tstamp" + "type" : "field", + "value" : ["gtpu_ipv4", "hdr_checksum"] + }, + { + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 46, + "filename" : "include/control/spgw.p4", + "line" : 325, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.setInvalid()" + "source_fragment" : "hdr.gtpu_ipv4.hdr_checksum = 0" } }, { - "op" : "remove_header", + "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "int_egress_tstamp" + "value" : "gtpu_udp" } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 47, + "filename" : "include/control/spgw.p4", + "line" : 327, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setInvalid()" + "source_fragment" : "hdr.gtpu_udp.setValid()" } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_q_congestion" + "type" : "field", + "value" : ["gtpu_udp", "sport"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_src_port37"] } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 48, + "filename" : "include/control/spgw.p4", + "line" : 328, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.setInvalid()" + "source_fragment" : "hdr.gtpu_udp.sport = fabric_md.spgw.tunnel_src_port; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_egress_tx_util" + "type" : "field", + "value" : ["gtpu_udp", "dport"] + }, + { + "type" : "hexstr", + "value" : "0x0868" } ], "source_info" : { - "filename" : "include/int/int_sink.p4", - "line" : 49, + "filename" : "include/control/spgw.p4", + "line" : 329, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.setInvalid()" + "source_fragment" : "hdr.gtpu_udp.dport = 2152" } - } - ] - }, - { - "name" : "FabricEgress.egress_next.pop_mpls_if_present", - "id" : 131, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "mpls" + "type" : "field", + "value" : ["gtpu_udp", "len"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ipv4_len35"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0010" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 270, + "filename" : "include/control/spgw.p4", + "line" : 330, "column" : 8, - "source_fragment" : "hdr.mpls.setInvalid()" + "source_fragment" : "hdr.gtpu_udp.len = fabric_md.spgw.ipv4_len ..." } }, { @@ -14486,40 +19090,33 @@ "parameters" : [ { "type" : "field", - "value" : ["eth_type", "value"] + "value" : ["gtpu_udp", "checksum"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 272, + "filename" : "include/control/spgw.p4", + "line" : 332, "column" : 8, - "source_fragment" : "hdr.eth_type.value = fabric_metadata.ip_eth_type; ..." + "source_fragment" : "hdr.gtpu_udp.checksum = 0" } - } - ] - }, - { - "name" : "FabricEgress.egress_next.set_mpls", - "id" : 132, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "mpls" + "value" : "outer_gtpu" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 277, + "filename" : "include/control/spgw.p4", + "line" : 334, "column" : 8, - "source_fragment" : "hdr.mpls.setValid()" + "source_fragment" : "hdr.outer_gtpu.setValid()" } }, { @@ -14527,18 +19124,18 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "label"] + "value" : ["outer_gtpu", "version"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label8"] + "type" : "hexstr", + "value" : "0x01" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 278, + "filename" : "include/control/spgw.p4", + "line" : 335, "column" : 8, - "source_fragment" : "hdr.mpls.label = fabric_metadata.mpls_label; ..." + "source_fragment" : "hdr.outer_gtpu.version = 0x01" } }, { @@ -14546,18 +19143,18 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "tc"] + "value" : ["outer_gtpu", "pt"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x01" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 279, + "filename" : "include/control/spgw.p4", + "line" : 336, "column" : 8, - "source_fragment" : "hdr.mpls.tc = 3w0" + "source_fragment" : "hdr.outer_gtpu.pt = 0x01" } }, { @@ -14565,18 +19162,18 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "bos"] + "value" : ["outer_gtpu", "spare"] }, { "type" : "hexstr", - "value" : "0x01" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 280, + "filename" : "include/control/spgw.p4", + "line" : 337, "column" : 8, - "source_fragment" : "hdr.mpls.bos = 1w1" + "source_fragment" : "hdr.outer_gtpu.spare = 0" } }, { @@ -14584,18 +19181,18 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "ttl"] + "value" : ["outer_gtpu", "ex_flag"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl9"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 281, + "filename" : "include/control/spgw.p4", + "line" : 338, "column" : 8, - "source_fragment" : "hdr.mpls.ttl = fabric_metadata.mpls_ttl; // Decrement after push. ..." + "source_fragment" : "hdr.outer_gtpu.ex_flag = 0" } }, { @@ -14603,40 +19200,18 @@ "parameters" : [ { "type" : "field", - "value" : ["eth_type", "value"] + "value" : ["outer_gtpu", "seq_flag"] }, { "type" : "hexstr", - "value" : "0x8847" - } - ], - "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 126, - "column" : 31, - "source_fragment" : "0x8847; ..." - } - } - ] - }, - { - "name" : "FabricEgress.egress_next.push_vlan", - "id" : 133, - "runtime_data" : [], - "primitives" : [ - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "vlan_tag" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 289, + "filename" : "include/control/spgw.p4", + "line" : 339, "column" : 8, - "source_fragment" : "hdr.vlan_tag.setValid()" + "source_fragment" : "hdr.outer_gtpu.seq_flag = 0" } }, { @@ -14644,18 +19219,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "cfi"] + "value" : ["outer_gtpu", "npdu_flag"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_cfi3"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 290, + "filename" : "include/control/spgw.p4", + "line" : 340, "column" : 8, - "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi; ..." + "source_fragment" : "hdr.outer_gtpu.npdu_flag = 0" } }, { @@ -14663,18 +19238,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "pri"] + "value" : ["outer_gtpu", "msgtype"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_pri2"] + "type" : "hexstr", + "value" : "0xff" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 291, + "filename" : "include/control/spgw.p4", + "line" : 341, "column" : 8, - "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri; ..." + "source_fragment" : "hdr.outer_gtpu.msgtype = 0xff" } }, { @@ -14682,18 +19257,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "eth_type"] + "value" : ["outer_gtpu", "msglen"] }, { - "type" : "hexstr", - "value" : "0x8100" + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ipv4_len35"] } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 125, - "column" : 31, - "source_fragment" : "0x8100; ..." + "filename" : "include/control/spgw.p4", + "line" : 342, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.msglen = fabric_md.spgw.ipv4_len; ..." } }, { @@ -14701,25 +19276,25 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "vlan_id"] + "value" : ["outer_gtpu", "teid"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._spgw_teid36"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 293, + "filename" : "include/control/spgw.p4", + "line" : 343, "column" : 8, - "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id; ..." + "source_fragment" : "hdr.outer_gtpu.teid = fabric_md.spgw.teid; ..." } } ] }, { - "name" : "FabricEgress.egress_next.push_vlan", - "id" : 134, + "name" : "FabricEgress.spgw.gtpu_encap_qfi", + "id" : 158, "runtime_data" : [], "primitives" : [ { @@ -14727,14 +19302,14 @@ "parameters" : [ { "type" : "header", - "value" : "vlan_tag" + "value" : "gtpu_ipv4" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 289, + "filename" : "include/control/spgw.p4", + "line" : 311, "column" : 8, - "source_fragment" : "hdr.vlan_tag.setValid()" + "source_fragment" : "hdr.gtpu_ipv4.setValid()" } }, { @@ -14742,18 +19317,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "cfi"] + "value" : ["gtpu_ipv4", "version"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_cfi3"] + "type" : "hexstr", + "value" : "0x04" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 290, + "filename" : "include/control/spgw.p4", + "line" : 312, "column" : 8, - "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi; ..." + "source_fragment" : "hdr.gtpu_ipv4.version = 4" } }, { @@ -14761,18 +19336,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "pri"] + "value" : ["gtpu_ipv4", "ihl"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_pri2"] + "type" : "hexstr", + "value" : "0x05" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 291, - "column" : 8, - "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri; ..." + "filename" : "include/control/../define.p4", + "line" : 164, + "column" : 28, + "source_fragment" : "5; ..." } }, { @@ -14780,18 +19355,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "eth_type"] + "value" : ["gtpu_ipv4", "dscp"] }, { "type" : "hexstr", - "value" : "0x8100" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 125, - "column" : 31, - "source_fragment" : "0x8100; ..." + "filename" : "include/control/spgw.p4", + "line" : 314, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.dscp = 0" } }, { @@ -14799,40 +19374,60 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "vlan_id"] + "value" : ["gtpu_ipv4", "ecn"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 293, + "filename" : "include/control/spgw.p4", + "line" : 315, "column" : 8, - "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id; ..." + "source_fragment" : "hdr.gtpu_ipv4.ecn = 0" } - } - ] - }, - { - "name" : "FabricEgress.egress_next.push_inner_vlan", - "id" : 135, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_vlan_tag" + "type" : "field", + "value" : ["gtpu_ipv4", "total_len"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0024" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 300, + "filename" : "include/control/spgw.p4", + "line" : 316, "column" : 8, - "source_fragment" : "hdr.inner_vlan_tag.setValid()" + "source_fragment" : "hdr.gtpu_ipv4.total_len = hdr.ipv4.total_len ..." } }, { @@ -14840,18 +19435,18 @@ "parameters" : [ { "type" : "field", - "value" : ["inner_vlan_tag", "cfi"] + "value" : ["gtpu_ipv4", "identification"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_cfi7"] + "type" : "hexstr", + "value" : "0x1513" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 301, + "filename" : "include/control/spgw.p4", + "line" : 318, "column" : 8, - "source_fragment" : "hdr.inner_vlan_tag.cfi = fabric_metadata.inner_vlan_cfi; ..." + "source_fragment" : "hdr.gtpu_ipv4.identification = 0x1513" } }, { @@ -14859,18 +19454,18 @@ "parameters" : [ { "type" : "field", - "value" : ["inner_vlan_tag", "pri"] + "value" : ["gtpu_ipv4", "flags"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_pri6"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 302, + "filename" : "include/control/spgw.p4", + "line" : 319, "column" : 8, - "source_fragment" : "hdr.inner_vlan_tag.pri = fabric_metadata.inner_vlan_pri; ..." + "source_fragment" : "hdr.gtpu_ipv4.flags = 0" } }, { @@ -14878,18 +19473,18 @@ "parameters" : [ { "type" : "field", - "value" : ["inner_vlan_tag", "vlan_id"] + "value" : ["gtpu_ipv4", "frag_offset"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_vlan_id5"] + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 303, + "filename" : "include/control/spgw.p4", + "line" : 320, "column" : 8, - "source_fragment" : "hdr.inner_vlan_tag.vlan_id = fabric_metadata.inner_vlan_id; ..." + "source_fragment" : "hdr.gtpu_ipv4.frag_offset = 0" } }, { @@ -14897,18 +19492,18 @@ "parameters" : [ { "type" : "field", - "value" : ["inner_vlan_tag", "eth_type"] + "value" : ["gtpu_ipv4", "ttl"] }, { "type" : "hexstr", - "value" : "0x8100" + "value" : "0x40" } ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 125, - "column" : 31, - "source_fragment" : "0x8100; ..." + "line" : 177, + "column" : 32, + "source_fragment" : "64; ..." } }, { @@ -14916,62 +19511,56 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "eth_type"] + "value" : ["gtpu_ipv4", "protocol"] }, { "type" : "hexstr", - "value" : "0x8100" + "value" : "0x11" } ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 125, - "column" : 31, - "source_fragment" : "0x8100; ..." + "line" : 161, + "column" : 25, + "source_fragment" : "17; ..." } - } - ] - }, - { - "name" : "FabricEgress.egress_next.pop_vlan", - "id" : 136, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "vlan_tag" + "type" : "field", + "value" : ["gtpu_ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_src_addr38"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 316, + "filename" : "include/control/spgw.p4", + "line" : 323, "column" : 8, - "source_fragment" : "hdr.vlan_tag.setInvalid()" + "source_fragment" : "hdr.gtpu_ipv4.src_addr = fabric_md.spgw.tunnel_src_addr; ..." } - } - ] - }, - { - "name" : "FabricEgress.spgw_egress.gtpu_encap", - "id" : 137, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu_ipv4" + "type" : "field", + "value" : ["gtpu_ipv4", "dst_addr"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_dst_addr39"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 306, + "line" : 324, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.setValid()" + "source_fragment" : "hdr.gtpu_ipv4.dst_addr = fabric_md.spgw.tunnel_dst_addr; ..." } }, { @@ -14979,37 +19568,33 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "version"] + "value" : ["gtpu_ipv4", "hdr_checksum"] }, { "type" : "hexstr", - "value" : "0x04" + "value" : "0x0000" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 307, + "line" : 325, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.version = 4" + "source_fragment" : "hdr.gtpu_ipv4.hdr_checksum = 0" } }, { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["gtpu_ipv4", "ihl"] - }, - { - "type" : "hexstr", - "value" : "0x05" + "type" : "header", + "value" : "gtpu_udp" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 143, - "column" : 28, - "source_fragment" : "5; ..." + "filename" : "include/control/spgw.p4", + "line" : 327, + "column" : 8, + "source_fragment" : "hdr.gtpu_udp.setValid()" } }, { @@ -15017,18 +19602,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "dscp"] + "value" : ["gtpu_udp", "sport"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_src_port37"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 309, + "line" : 328, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.dscp = 0" + "source_fragment" : "hdr.gtpu_udp.sport = fabric_md.spgw.tunnel_src_port; ..." } }, { @@ -15036,18 +19621,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "ecn"] + "value" : ["gtpu_udp", "dport"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x0868" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 310, + "line" : 329, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.ecn = 0" + "source_fragment" : "hdr.gtpu_udp.dport = 2152" } }, { @@ -15055,7 +19640,7 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "total_len"] + "value" : ["gtpu_udp", "len"] }, { "type" : "expression", @@ -15069,11 +19654,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["ipv4", "total_len"] + "value" : ["scalars", "userMetadata._spgw_ipv4_len35"] }, "right" : { "type" : "hexstr", - "value" : "0x0024" + "value" : "0x0010" } } }, @@ -15087,9 +19672,9 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 311, + "line" : 330, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.total_len = hdr.ipv4.total_len ..." + "source_fragment" : "hdr.gtpu_udp.len = fabric_md.spgw.ipv4_len ..." } }, { @@ -15097,18 +19682,33 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "identification"] + "value" : ["gtpu_udp", "checksum"] }, { "type" : "hexstr", - "value" : "0x1513" + "value" : "0x0000" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 313, + "line" : 332, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.identification = 0x1513" + "source_fragment" : "hdr.gtpu_udp.checksum = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "outer_gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 334, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.setValid()" } }, { @@ -15116,18 +19716,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "flags"] + "value" : ["outer_gtpu", "version"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x01" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 314, + "line" : 335, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.flags = 0" + "source_fragment" : "hdr.outer_gtpu.version = 0x01" } }, { @@ -15135,18 +19735,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "frag_offset"] + "value" : ["outer_gtpu", "pt"] }, { "type" : "hexstr", - "value" : "0x0000" + "value" : "0x01" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 315, + "line" : 336, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.frag_offset = 0" + "source_fragment" : "hdr.outer_gtpu.pt = 0x01" } }, { @@ -15154,18 +19754,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "ttl"] + "value" : ["outer_gtpu", "spare"] }, { "type" : "hexstr", - "value" : "0x40" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 156, - "column" : 32, - "source_fragment" : "64; ..." + "filename" : "include/control/spgw.p4", + "line" : 337, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.spare = 0" } }, { @@ -15173,18 +19773,37 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "protocol"] + "value" : ["outer_gtpu", "ex_flag"] }, { "type" : "hexstr", - "value" : "0x11" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 140, - "column" : 25, - "source_fragment" : "17; ..." + "filename" : "include/control/spgw.p4", + "line" : 338, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.ex_flag = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["outer_gtpu", "seq_flag"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 339, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.seq_flag = 0" } }, { @@ -15192,18 +19811,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "src_addr"] + "value" : ["outer_gtpu", "npdu_flag"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_addr27"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 318, + "line" : 340, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.src_addr = fabric_md.spgw.tunnel_src_addr; ..." + "source_fragment" : "hdr.outer_gtpu.npdu_flag = 0" } }, { @@ -15211,18 +19830,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "dst_addr"] + "value" : ["outer_gtpu", "msgtype"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_dst_addr28"] + "type" : "hexstr", + "value" : "0xff" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 319, + "line" : 341, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.dst_addr = fabric_md.spgw.tunnel_dst_addr; ..." + "source_fragment" : "hdr.outer_gtpu.msgtype = 0xff" } }, { @@ -15230,33 +19849,37 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "hdr_checksum"] + "value" : ["outer_gtpu", "msglen"] }, { - "type" : "hexstr", - "value" : "0x0000" + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ipv4_len35"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 320, + "line" : 342, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.hdr_checksum = 0" + "source_fragment" : "hdr.outer_gtpu.msglen = fabric_md.spgw.ipv4_len; ..." } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu_udp" + "type" : "field", + "value" : ["outer_gtpu", "teid"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_teid36"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 322, + "line" : 343, "column" : 8, - "source_fragment" : "hdr.gtpu_udp.setValid()" + "source_fragment" : "hdr.outer_gtpu.teid = fabric_md.spgw.teid; ..." } }, { @@ -15264,18 +19887,41 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_udp", "sport"] + "value" : ["gtpu_ipv4", "total_len"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_port26"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x002c" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 323, + "line" : 349, "column" : 8, - "source_fragment" : "hdr.gtpu_udp.sport = fabric_md.spgw.tunnel_src_port; ..." + "source_fragment" : "hdr.gtpu_ipv4.total_len = hdr.ipv4.total_len ..." } }, { @@ -15283,18 +19929,41 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_udp", "dport"] + "value" : ["gtpu_udp", "len"] }, { - "type" : "hexstr", - "value" : "0x0868" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ipv4_len35"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0018" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 324, + "line" : 352, "column" : 8, - "source_fragment" : "hdr.gtpu_udp.dport = 2152" + "source_fragment" : "hdr.gtpu_udp.len = fabric_md.spgw.ipv4_len ..." } }, { @@ -15302,7 +19971,7 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_udp", "len"] + "value" : ["outer_gtpu", "msglen"] }, { "type" : "expression", @@ -15316,11 +19985,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len24"] + "value" : ["scalars", "userMetadata._spgw_ipv4_len35"] }, "right" : { "type" : "hexstr", - "value" : "0x0010" + "value" : "0x0008" } } }, @@ -15334,9 +20003,9 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 325, + "line" : 355, "column" : 8, - "source_fragment" : "hdr.gtpu_udp.len = fabric_md.spgw.ipv4_len ..." + "source_fragment" : "hdr.outer_gtpu.msglen = fabric_md.spgw.ipv4_len ..." } }, { @@ -15344,18 +20013,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_udp", "checksum"] + "value" : ["outer_gtpu", "ex_flag"] }, { "type" : "hexstr", - "value" : "0x0000" + "value" : "0x01" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 327, + "line" : 357, "column" : 8, - "source_fragment" : "hdr.gtpu_udp.checksum = 0" + "source_fragment" : "hdr.outer_gtpu.ex_flag = 1" } }, { @@ -15363,14 +20032,14 @@ "parameters" : [ { "type" : "header", - "value" : "outer_gtpu" + "value" : "outer_gtpu_options" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 330, + "line" : 358, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.setValid()" + "source_fragment" : "hdr.outer_gtpu_options.setValid()" } }, { @@ -15378,37 +20047,33 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "version"] + "value" : ["outer_gtpu_options", "next_ext"] }, { "type" : "hexstr", - "value" : "0x01" + "value" : "0x85" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 331, + "line" : 359, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.version = 0x01" + "source_fragment" : "hdr.outer_gtpu_options.next_ext = 0x85" } }, { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["outer_gtpu", "pt"] - }, - { - "type" : "hexstr", - "value" : "0x01" + "type" : "header", + "value" : "outer_gtpu_ext_psc" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 332, + "line" : 360, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.pt = 0x01" + "source_fragment" : "hdr.outer_gtpu_ext_psc.setValid()" } }, { @@ -15416,7 +20081,7 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "spare"] + "value" : ["outer_gtpu_ext_psc", "type"] }, { "type" : "hexstr", @@ -15424,10 +20089,10 @@ } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 333, - "column" : 8, - "source_fragment" : "hdr.outer_gtpu.spare = 0" + "filename" : "include/control/../define.p4", + "line" : 88, + "column" : 36, + "source_fragment" : "4w0; // Downlink ..." } }, { @@ -15435,18 +20100,18 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "ex_flag"] + "value" : ["outer_gtpu_ext_psc", "len"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x01" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 334, + "line" : 362, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.ex_flag = 0" + "source_fragment" : "hdr.outer_gtpu_ext_psc.len = 8w1" } }, { @@ -15454,18 +20119,18 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "seq_flag"] + "value" : ["outer_gtpu_ext_psc", "qfi"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_qfi43"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 335, + "line" : 363, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.seq_flag = 0" + "source_fragment" : "hdr.outer_gtpu_ext_psc.qfi = fabric_md.spgw.qfi; ..." } }, { @@ -15473,7 +20138,7 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "npdu_flag"] + "value" : ["outer_gtpu_ext_psc", "next_ext"] }, { "type" : "hexstr", @@ -15482,9 +20147,48 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 336, + "line" : 364, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.npdu_flag = 0" + "source_fragment" : "hdr.outer_gtpu_ext_psc.next_ext = 0x0" + } + } + ] + }, + { + "name" : "packetio41", + "id" : 159, + "runtime_data" : [], + "primitives" : [ + { + "op" : "exit", + "parameters" : [], + "source_info" : { + "filename" : "include/control/packetio.p4", + "line" : 41, + "column" : 12, + "source_fragment" : "exit" + } + } + ] + }, + { + "name" : "packetio44", + "id" : 160, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "packet_in" + } + ], + "source_info" : { + "filename" : "include/control/packetio.p4", + "line" : 44, + "column" : 12, + "source_fragment" : "hdr.packet_in.setValid()" } }, { @@ -15492,131 +20196,221 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "msgtype"] + "value" : ["packet_in", "ingress_port"] }, { - "type" : "hexstr", - "value" : "0xff" + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 337, - "column" : 8, - "source_fragment" : "hdr.outer_gtpu.msgtype = 0xff" + "filename" : "include/control/packetio.p4", + "line" : 45, + "column" : 12, + "source_fragment" : "hdr.packet_in.ingress_port = standard_metadata.ingress_port" } }, { - "op" : "assign", + "op" : "exit", + "parameters" : [], + "source_info" : { + "filename" : "include/control/packetio.p4", + "line" : 47, + "column" : 12, + "source_fragment" : "exit" + } + } + ] + }, + { + "name" : "next283", + "id" : 161, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", "parameters" : [ { - "type" : "field", - "value" : ["outer_gtpu", "msglen"] - }, + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 283, + "column" : 12, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + } + ] + }, + { + "name" : "next299", + "id" : 162, + "runtime_data" : [], + "primitives" : [ + { + "op" : "remove_header", + "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len24"] + "type" : "header", + "value" : "inner_vlan_tag" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 338, - "column" : 8, - "source_fragment" : "hdr.outer_gtpu.msglen = fabric_md.spgw.ipv4_len; ..." + "filename" : "include/control/next.p4", + "line" : 299, + "column" : 12, + "source_fragment" : "hdr.inner_vlan_tag.setInvalid()" } - }, + } + ] + }, + { + "name" : "next310", + "id" : 163, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign", + "op" : "mark_to_drop", "parameters" : [ { - "type" : "field", - "value" : ["outer_gtpu", "teid"] - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_teid25"] + "type" : "header", + "value" : "standard_metadata" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 339, - "column" : 8, - "source_fragment" : "hdr.outer_gtpu.teid = fabric_md.spgw.teid; ..." + "filename" : "include/control/next.p4", + "line" : 310, + "column" : 35, + "source_fragment" : "mark_to_drop(standard_metadata)" } } ] }, { - "name" : "act_24", - "id" : 138, + "name" : "next309", + "id" : 164, "runtime_data" : [], "primitives" : [ { - "op" : "exit", - "parameters" : [], + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["mpls", "ttl"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["mpls", "ttl"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 41, + "filename" : "include/control/next.p4", + "line" : 309, "column" : 12, - "source_fragment" : "exit" + "source_fragment" : "hdr.mpls.ttl = hdr.mpls.ttl - 1" } } ] }, { - "name" : "act_25", - "id" : 139, + "name" : "next314", + "id" : 165, "runtime_data" : [], "primitives" : [ { - "op" : "add_header", + "op" : "mark_to_drop", "parameters" : [ { "type" : "header", - "value" : "packet_in" + "value" : "standard_metadata" } ], "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 44, - "column" : 12, - "source_fragment" : "hdr.packet_in.setValid()" + "filename" : "include/control/next.p4", + "line" : 314, + "column" : 39, + "source_fragment" : "mark_to_drop(standard_metadata)" } - }, + } + ] + }, + { + "name" : "next313", + "id" : 166, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["packet_in", "ingress_port"] + "value" : ["ipv4", "ttl"] }, { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } } ], "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 45, - "column" : 12, - "source_fragment" : "hdr.packet_in.ingress_port = standard_metadata.ingress_port" - } - }, - { - "op" : "exit", - "parameters" : [], - "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 47, - "column" : 12, - "source_fragment" : "exit" + "filename" : "include/control/next.p4", + "line" : 313, + "column" : 16, + "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" } } ] }, { - "name" : "act_26", - "id" : 140, + "name" : "next319", + "id" : 167, "runtime_data" : [], "primitives" : [ { @@ -15629,16 +20423,16 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 337, - "column" : 12, + "line" : 319, + "column" : 45, "source_fragment" : "mark_to_drop(standard_metadata)" } } ] }, { - "name" : "act_27", - "id" : 141, + "name" : "next318", + "id" : 168, "runtime_data" : [], "primitives" : [ { @@ -15646,29 +20440,74 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "egress_next_tmp"] + "value" : ["ipv6", "hop_limit"] }, { "type" : "expression", "value" : { "type" : "expression", "value" : { - "op" : "b2d", - "left" : null, + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["ipv6", "hop_limit"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0xff" } } } } - ] + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 318, + "column" : 16, + "source_fragment" : "hdr.ipv6.hop_limit = hdr.ipv6.hop_limit - 1" + } } ] }, { - "name" : "act_28", - "id" : 142, + "name" : "spgw377", + "id" : 169, + "runtime_data" : [], + "primitives" : [ + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricEgress.spgw.pdr_counter" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ctr_id40"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 377, + "column" : 16, + "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" + } + } + ] + }, + { + "name" : "act", + "id" : 170, "runtime_data" : [], "primitives" : [ { @@ -15676,7 +20515,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "egress_next_tmp"] + "value" : ["scalars", "process_int_main_process_int_transit_hasReturned"] }, { "type" : "expression", @@ -15697,52 +20536,93 @@ ] }, { - "name" : "act_29", - "id" : 143, + "name" : "int_transit420", + "id" : 171, "runtime_data" : [], "primitives" : [ { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_vlan_tag" + "type" : "field", + "value" : ["scalars", "process_int_main_process_int_transit_hasReturned"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 353, + "filename" : "include/int/int_transit.p4", + "line" : 420, "column" : 12, - "source_fragment" : "hdr.inner_vlan_tag.setInvalid()" + "source_fragment" : "return" } } ] }, { - "name" : "act_30", - "id" : 144, + "name" : "int_transit428", + "id" : 172, "runtime_data" : [], "primitives" : [ { - "op" : "mark_to_drop", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "standard_metadata" + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 370, - "column" : 35, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/int/int_transit.p4", + "line" : 428, + "column" : 12, + "source_fragment" : "hdr.ipv4.total_len = hdr.ipv4.total_len + fmeta.int_meta.new_bytes" } } ] }, { - "name" : "act_31", - "id" : 145, + "name" : "int_transit425", + "id" : 173, "runtime_data" : [], "primitives" : [ { @@ -15750,7 +20630,7 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "ttl"] + "value" : ["int_header", "total_hop_cnt"] }, { "type" : "expression", @@ -15764,11 +20644,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["mpls", "ttl"] + "value" : ["int_header", "total_hop_cnt"] }, "right" : { "type" : "hexstr", - "value" : "0xff" + "value" : "0x01" } } }, @@ -15781,39 +20661,66 @@ } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 369, - "column" : 12, - "source_fragment" : "hdr.mpls.ttl = hdr.mpls.ttl - 1" + "filename" : "include/int/int_transit.p4", + "line" : 425, + "column" : 8, + "source_fragment" : "hdr.int_header.total_hop_cnt = hdr.int_header.total_hop_cnt + 1" } } ] }, { - "name" : "act_32", - "id" : 146, + "name" : "int_transit431", + "id" : 174, "runtime_data" : [], "primitives" : [ { - "op" : "mark_to_drop", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "standard_metadata" + "type" : "field", + "value" : ["udp", "len"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["udp", "len"] + }, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes61"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 374, - "column" : 39, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/int/int_transit.p4", + "line" : 431, + "column" : 12, + "source_fragment" : "hdr.udp.len = hdr.udp.len + fmeta.int_meta.new_bytes" } } ] }, { - "name" : "act_33", - "id" : 147, + "name" : "int_transit434", + "id" : 175, "runtime_data" : [], "primitives" : [ { @@ -15821,7 +20728,7 @@ "parameters" : [ { "type" : "field", - "value" : ["ipv4", "ttl"] + "value" : ["intl4_shim", "len_words"] }, { "type" : "expression", @@ -15835,11 +20742,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["ipv4", "ttl"] + "value" : ["intl4_shim", "len_words"] }, "right" : { - "type" : "hexstr", - "value" : "0xff" + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_words60"] } } }, @@ -15852,39 +20759,43 @@ } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 373, - "column" : 16, - "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" + "filename" : "include/int/int_transit.p4", + "line" : 434, + "column" : 12, + "source_fragment" : "hdr.intl4_shim.len_words = hdr.intl4_shim.len_words + fmeta.int_meta.new_words" } } ] }, { - "name" : "act_34", - "id" : 148, + "name" : "slicing155", + "id" : 176, "runtime_data" : [], "primitives" : [ { - "op" : "mark_to_drop", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "standard_metadata" + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 379, - "column" : 45, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/control/slicing.p4", + "line" : 155, + "column" : 16, + "source_fragment" : "hdr.ipv4.dscp = tmp_dscp" } } ] }, { - "name" : "act_35", - "id" : 149, + "name" : "slicing159", + "id" : 177, "runtime_data" : [], "primitives" : [ { @@ -15892,420 +20803,455 @@ "parameters" : [ { "type" : "field", - "value" : ["ipv6", "hop_limit"] + "value" : ["inner_ipv4", "dscp"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["ipv6", "hop_limit"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 378, + "filename" : "include/control/slicing.p4", + "line" : 159, "column" : 16, - "source_fragment" : "hdr.ipv6.hop_limit = hdr.ipv6.hop_limit - 1" + "source_fragment" : "hdr.inner_ipv4.dscp = tmp_dscp" + } + } + ] + }, + { + "name" : "slicing126", + "id" : 178, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._dscp32"] + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 126, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.dscp; ..." + } + } + ] + } + ], + "pipelines" : [ + { + "name" : "ingress", + "id" : 0, + "source_info" : { + "filename" : "fabric.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "FabricIngress" + }, + "init_table" : "tbl_lookup_md_init23", + "tables" : [ + { + "name" : "tbl_lookup_md_init23", + "id" : 0, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 23, + "column" : 23, + "source_fragment" : "= false; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [83], + "actions" : ["lookup_md_init23"], + "base_default_next" : "node_3", + "next_tables" : { + "lookup_md_init23" : "node_3" + }, + "default_entry" : { + "action_id" : 83, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init32", + "id" : 1, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 32, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [78], + "actions" : ["lookup_md_init32"], + "base_default_next" : "node_5", + "next_tables" : { + "lookup_md_init32" : "node_5" + }, + "default_entry" : { + "action_id" : 78, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init37", + "id" : 2, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 37, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [75], + "actions" : ["lookup_md_init37"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init37" : "node_19" + }, + "default_entry" : { + "action_id" : 75, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init40", + "id" : 3, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [76], + "actions" : ["lookup_md_init40"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init40" : "node_19" + }, + "default_entry" : { + "action_id" : 76, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init43", + "id" : 4, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 43, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [77], + "actions" : ["lookup_md_init43"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init43" : "node_19" + }, + "default_entry" : { + "action_id" : 77, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true } - } - ] - }, - { - "name" : "act_36", - "id" : 150, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "spgw_egress_hasReturned"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } - } - ], + "name" : "tbl_lookup_md_init47", + "id" : 5, "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 343, - "column" : 46, - "source_fragment" : "return" + "filename" : "include/control/lookup_md_init.p4", + "line" : 47, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [82], + "actions" : ["lookup_md_init47"], + "base_default_next" : "node_13", + "next_tables" : { + "lookup_md_init47" : "node_13" + }, + "default_entry" : { + "action_id" : 82, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true } - } - ] - }, - { - "name" : "act_37", - "id" : 151, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "spgw_egress_hasReturned"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } - } - ] - } - ] - }, - { - "name" : "act_38", - "id" : 152, - "runtime_data" : [], - "primitives" : [ + "name" : "tbl_lookup_md_init52", + "id" : 6, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 52, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [79], + "actions" : ["lookup_md_init52"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init52" : "node_19" + }, + "default_entry" : { + "action_id" : 79, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, { - "op" : "count", - "parameters" : [ - { - "type" : "counter_array", - "value" : "FabricEgress.spgw_egress.pdr_counter" - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id29"] - } - ], + "name" : "tbl_lookup_md_init55", + "id" : 7, "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 344, - "column" : 8, - "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" + "filename" : "include/control/lookup_md_init.p4", + "line" : 55, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [80], + "actions" : ["lookup_md_init55"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init55" : "node_19" + }, + "default_entry" : { + "action_id" : 80, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true } - } - ] - }, - { - "name" : "act_39", - "id" : 153, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "process_int_main_process_int_transit_hasReturned"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } - } - ] - } - ] - }, - { - "name" : "act_40", - "id" : 154, - "runtime_data" : [], - "primitives" : [ + "name" : "tbl_lookup_md_init58", + "id" : 8, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 58, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [81], + "actions" : ["lookup_md_init58"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init58" : "node_19" + }, + "default_entry" : { + "action_id" : 81, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "process_int_main_process_int_transit_hasReturned"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } - } - ], + "name" : "tbl_packetio25", + "id" : 9, "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 420, - "column" : 12, - "source_fragment" : "return" + "filename" : "include/control/packetio.p4", + "line" : 25, + "column" : 42, + "source_fragment" : "= hdr.packet_out.egress_port; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [84], + "actions" : ["packetio25"], + "base_default_next" : "FabricIngress.slice_tc_classifier.classifier", + "next_tables" : { + "packetio25" : "FabricIngress.slice_tc_classifier.classifier" + }, + "default_entry" : { + "action_id" : 84, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true } - } - ] - }, - { - "name" : "act_41", - "id" : 155, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "assign", - "parameters" : [ + "name" : "FabricIngress.slice_tc_classifier.classifier", + "id" : 10, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 49, + "column" : 10, + "source_fragment" : "classifier" + }, + "key" : [ { - "type" : "field", - "value" : ["ipv4", "total_len"] + "match_type" : "ternary", + "name" : "ig_port", + "target" : ["standard_metadata", "ingress_port"], + "mask" : null }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["ipv4", "total_len"] - }, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 428, - "column" : 12, - "source_fragment" : "hdr.ipv4.total_len = hdr.ipv4.total_len + fmeta.int_meta.new_bytes" - } - } - ] - }, - { - "name" : "act_42", - "id" : 156, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._lkp_ipv4_src1"], + "mask" : null + }, { - "type" : "field", - "value" : ["int_header", "total_hop_cnt"] + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._lkp_ipv4_dst2"], + "mask" : null }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["int_header", "total_hop_cnt"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x01" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 425, - "column" : 8, - "source_fragment" : "hdr.int_header.total_hop_cnt = hdr.int_header.total_hop_cnt + 1" - } - } - ] - }, - { - "name" : "act_43", - "id" : 157, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._lkp_ip_proto3"], + "mask" : null + }, { - "type" : "field", - "value" : ["udp", "len"] + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._lkp_l4_sport4"], + "mask" : null }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["udp", "len"] - }, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes49"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._lkp_l4_dport5"], + "mask" : null } ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 431, - "column" : 12, - "source_fragment" : "hdr.udp.len = hdr.udp.len + fmeta.int_meta.new_bytes" + "match_type" : "ternary", + "type" : "simple", + "max_size" : 512, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [54, 55], + "actions" : ["FabricIngress.slice_tc_classifier.set_slice_id_tc", "FabricIngress.slice_tc_classifier.trust_dscp"], + "base_default_next" : "node_22", + "next_tables" : { + "FabricIngress.slice_tc_classifier.set_slice_id_tc" : "node_22", + "FabricIngress.slice_tc_classifier.trust_dscp" : "node_22" + }, + "default_entry" : { + "action_id" : 54, + "action_const" : true, + "action_data" : ["0x0", "0x0"], + "action_entry_const" : true } - } - ] - }, - { - "name" : "act_44", - "id" : 158, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["intl4_shim", "len_words"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["intl4_shim", "len_words"] - }, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words48"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } - } - ], + "name" : "tbl_filtering113", + "id" : 11, "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 434, - "column" : 12, - "source_fragment" : "hdr.intl4_shim.len_words = hdr.intl4_shim.len_words + fmeta.int_meta.new_words" - } - } - ] - } - ], - "pipelines" : [ - { - "name" : "ingress", - "id" : 0, - "source_info" : { - "filename" : "fabric.p4", - "line" : 46, - "column" : 8, - "source_fragment" : "FabricIngress" - }, - "init_table" : "node_2", - "tables" : [ + "filename" : "include/control/filtering.p4", + "line" : 113, + "column" : 36, + "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [85], + "actions" : ["filtering113"], + "base_default_next" : "node_24", + "next_tables" : { + "filtering113" : "node_24" + }, + "default_entry" : { + "action_id" : 85, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, { - "name" : "tbl_act", - "id" : 0, + "name" : "tbl_filtering119", + "id" : 12, "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 25, + "filename" : "include/control/filtering.p4", + "line" : 119, "column" : 42, - "source_fragment" : "= hdr.packet_out.egress_port; ..." + "source_fragment" : "= hdr.inner_vlan_tag.vlan_id; ..." }, "key" : [], "match_type" : "exact", @@ -16314,22 +21260,28 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [61], - "actions" : ["act"], - "base_default_next" : "tbl_act_0", + "action_ids" : [86], + "actions" : ["filtering119"], + "base_default_next" : "node_26", "next_tables" : { - "act" : "tbl_act_0" + "filtering119" : "node_26" }, "default_entry" : { - "action_id" : 61, + "action_id" : 86, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_0", - "id" : 1, + "name" : "tbl_filtering129", + "id" : 13, + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 129, + "column" : 37, + "source_fragment" : "=" + }, "key" : [], "match_type" : "exact", "type" : "simple", @@ -16337,27 +21289,137 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [62], - "actions" : ["act_0"], - "base_default_next" : "FabricIngress.spgw_ingress.interface_lookup", + "action_ids" : [87], + "actions" : ["filtering129"], + "base_default_next" : "FabricIngress.filtering.ingress_port_vlan", "next_tables" : { - "act_0" : "FabricIngress.spgw_ingress.interface_lookup" + "filtering129" : "FabricIngress.filtering.ingress_port_vlan" }, "default_entry" : { - "action_id" : 62, + "action_id" : 87, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.spgw_ingress.interface_lookup", - "id" : 2, + "name" : "FabricIngress.filtering.ingress_port_vlan", + "id" : 14, "source_info" : { - "filename" : "include/control/spgw.p4", + "filename" : "include/control/filtering.p4", "line" : 55, "column" : 10, - "source_fragment" : "interface_lookup" + "source_fragment" : "ingress_port_vlan" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "ig_port", + "target" : ["standard_metadata", "ingress_port"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "vlan_is_valid", + "target" : ["vlan_tag", "$valid$"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "vlan_id", + "target" : ["vlan_tag", "vlan_id"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "inner_vlan_id", + "target" : ["inner_vlan_tag", "vlan_id"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 8192, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [30, 31, 32], + "actions" : ["FabricIngress.filtering.deny", "FabricIngress.filtering.permit", "FabricIngress.filtering.permit_with_internal_vlan"], + "base_default_next" : "FabricIngress.filtering.fwd_classifier", + "next_tables" : { + "FabricIngress.filtering.deny" : "FabricIngress.filtering.fwd_classifier", + "FabricIngress.filtering.permit" : "FabricIngress.filtering.fwd_classifier", + "FabricIngress.filtering.permit_with_internal_vlan" : "FabricIngress.filtering.fwd_classifier" + }, + "default_entry" : { + "action_id" : 30, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.filtering.fwd_classifier", + "id" : 15, + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 94, + "column" : 10, + "source_fragment" : "fwd_classifier" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "ig_port", + "target" : ["standard_metadata", "ingress_port"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_dst", + "target" : ["ethernet", "dst_addr"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_type", + "target" : ["eth_type", "value"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "ip_eth_type", + "target" : ["scalars", "userMetadata._ip_eth_type8"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [33], + "actions" : ["FabricIngress.filtering.set_forwarding_type"], + "base_default_next" : "node_30", + "next_tables" : { + "FabricIngress.filtering.set_forwarding_type" : "node_30" + }, + "default_entry" : { + "action_id" : 33, + "action_const" : true, + "action_data" : ["0x0"], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.spgw.interfaces", + "id" : 16, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 132, + "column" : 10, + "source_fragment" : "interfaces" }, "key" : [ { @@ -16379,68 +21441,186 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [52], - "actions" : ["FabricIngress.spgw_ingress.set_source_iface"], - "base_default_next" : "node_6", + "action_ids" : [66, 67], + "actions" : ["FabricIngress.spgw.load_iface", "FabricIngress.spgw.iface_miss"], + "base_default_next" : null, "next_tables" : { - "FabricIngress.spgw_ingress.set_source_iface" : "node_6" + "__HIT__" : "node_32", + "__MISS__" : "node_43" }, "default_entry" : { - "action_id" : 52, + "action_id" : 67, "action_const" : true, - "action_data" : ["0x0", "0x0", "0x1"], + "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_1", - "id" : 3, + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_gtpu", + "id" : 17, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 249, - "column" : 46, - "source_fragment" : "return" + "line" : 77, + "column" : 10, + "source_fragment" : "decap_gtpu" }, - "key" : [], + "key" : [ + { + "match_type" : "exact", + "name" : "hdr.inner_tcp.$valid$", + "target" : ["inner_tcp", "$valid$"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "hdr.inner_udp.$valid$", + "target" : ["inner_udp", "$valid$"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "hdr.inner_icmp.$valid$", + "target" : ["inner_icmp", "$valid$"], + "mask" : null + } + ], "match_type" : "exact", "type" : "simple", "max_size" : 1024, "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [63], - "actions" : ["act_1"], - "base_default_next" : "node_8", + "action_ids" : [58, 59, 60, 61], + "actions" : ["FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_tcp", "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_udp", "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_icmp", "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_unknown"], + "base_default_next" : "node_34", "next_tables" : { - "act_1" : "node_8" + "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_tcp" : "node_34", + "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_udp" : "node_34", + "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_icmp" : "node_34", + "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_unknown" : "node_34" }, "default_entry" : { - "action_id" : 63, + "action_id" : 61, "action_const" : true, "action_data" : [], "action_entry_const" : true - } + }, + "entries" : [ + { + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 91, + "column" : 12, + "source_fragment" : "(true, false, false) : decap_inner_tcp()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + } + ], + "action_entry" : { + "action_id" : 58, + "action_data" : [] + }, + "priority" : 1 + }, + { + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 92, + "column" : 12, + "source_fragment" : "(false, true, false) : decap_inner_udp()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + } + ], + "action_entry" : { + "action_id" : 59, + "action_data" : [] + }, + "priority" : 2 + }, + { + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 93, + "column" : 12, + "source_fragment" : "(false, false, true) : decap_inner_icmp()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x01" + } + ], + "action_entry" : { + "action_id" : 60, + "action_data" : [] + }, + "priority" : 3 + } + ] }, { - "name" : "FabricIngress.spgw_ingress.uplink_pdr_lookup", - "id" : 4, + "name" : "FabricIngress.spgw.uplink_pdrs", + "id" : 18, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 93, + "line" : 184, "column" : 10, - "source_fragment" : "uplink_pdr_lookup" + "source_fragment" : "uplink_pdrs" }, "key" : [ { "match_type" : "exact", - "name" : "tunnel_ipv4_dst", - "target" : ["ipv4", "dst_addr"], + "name" : "tunnel_ipv4_dst", + "target" : ["ipv4", "dst_addr"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "teid", + "target" : ["gtpu", "teid"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "has_qfi", + "target" : ["gtpu_ext_psc", "$valid$"], "mask" : null }, { "match_type" : "exact", - "name" : "teid", - "target" : ["gtpu", "teid"], + "name" : "qfi", + "target" : ["scalars", "userMetadata._spgw_qfi43"], "mask" : null } ], @@ -16450,27 +21630,29 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [54], - "actions" : ["FabricIngress.spgw_ingress.set_pdr_attributes"], - "base_default_next" : "tbl_act_2", + "action_ids" : [69, 71, 15], + "actions" : ["FabricIngress.spgw.load_pdr", "FabricIngress.spgw.load_pdr_qos", "NoAction"], + "base_default_next" : "node_37", "next_tables" : { - "FabricIngress.spgw_ingress.set_pdr_attributes" : "tbl_act_2" + "FabricIngress.spgw.load_pdr" : "node_37", + "FabricIngress.spgw.load_pdr_qos" : "node_37", + "NoAction" : "node_37" }, "default_entry" : { - "action_id" : 54, - "action_const" : true, - "action_data" : ["0x0", "0x0", "0x0"], - "action_entry_const" : true + "action_id" : 15, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false } }, { - "name" : "FabricIngress.spgw_ingress.downlink_pdr_lookup", - "id" : 5, + "name" : "FabricIngress.spgw.downlink_pdrs", + "id" : 19, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 82, + "line" : 172, "column" : 10, - "source_fragment" : "downlink_pdr_lookup" + "source_fragment" : "downlink_pdrs" }, "key" : [ { @@ -16486,26 +21668,28 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [53], - "actions" : ["FabricIngress.spgw_ingress.set_pdr_attributes"], - "base_default_next" : "tbl_act_2", + "action_ids" : [68, 70, 14], + "actions" : ["FabricIngress.spgw.load_pdr", "FabricIngress.spgw.load_pdr_qos", "NoAction"], + "base_default_next" : "node_37", "next_tables" : { - "FabricIngress.spgw_ingress.set_pdr_attributes" : "tbl_act_2" + "FabricIngress.spgw.load_pdr" : "node_37", + "FabricIngress.spgw.load_pdr_qos" : "node_37", + "NoAction" : "node_37" }, "default_entry" : { - "action_id" : 53, - "action_const" : true, - "action_data" : ["0x0", "0x0", "0x0"], - "action_entry_const" : true + "action_id" : 14, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false } }, { - "name" : "tbl_act_2", - "id" : 6, + "name" : "tbl_spgw277", + "id" : 20, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 263, - "column" : 8, + "line" : 277, + "column" : 16, "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" }, "key" : [], @@ -16515,25 +21699,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [64], - "actions" : ["act_2"], - "base_default_next" : "node_13", + "action_ids" : [88], + "actions" : ["spgw277"], + "base_default_next" : "node_39", "next_tables" : { - "act_2" : "node_13" + "spgw277" : "node_39" }, "default_entry" : { - "action_id" : 64, + "action_id" : 88, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.spgw_ingress.decap_gtpu", - "id" : 7, + "name" : "FabricIngress.spgw.decap_gtpu.decap_gtpu", + "id" : 21, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 219, + "line" : 77, "column" : 10, "source_fragment" : "decap_gtpu" }, @@ -16563,17 +21747,17 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [57, 58, 59, 60], - "actions" : ["FabricIngress.spgw_ingress.decap_inner_tcp", "FabricIngress.spgw_ingress.decap_inner_udp", "FabricIngress.spgw_ingress.decap_inner_icmp", "FabricIngress.spgw_ingress.decap_inner_unknown"], - "base_default_next" : "FabricIngress.spgw_ingress.far_lookup", + "action_ids" : [62, 63, 64, 65], + "actions" : ["FabricIngress.spgw.decap_gtpu.decap_inner_tcp", "FabricIngress.spgw.decap_gtpu.decap_inner_udp", "FabricIngress.spgw.decap_gtpu.decap_inner_icmp", "FabricIngress.spgw.decap_gtpu.decap_inner_unknown"], + "base_default_next" : "FabricIngress.spgw.fars", "next_tables" : { - "FabricIngress.spgw_ingress.decap_inner_tcp" : "FabricIngress.spgw_ingress.far_lookup", - "FabricIngress.spgw_ingress.decap_inner_udp" : "FabricIngress.spgw_ingress.far_lookup", - "FabricIngress.spgw_ingress.decap_inner_icmp" : "FabricIngress.spgw_ingress.far_lookup", - "FabricIngress.spgw_ingress.decap_inner_unknown" : "FabricIngress.spgw_ingress.far_lookup" + "FabricIngress.spgw.decap_gtpu.decap_inner_tcp" : "FabricIngress.spgw.fars", + "FabricIngress.spgw.decap_gtpu.decap_inner_udp" : "FabricIngress.spgw.fars", + "FabricIngress.spgw.decap_gtpu.decap_inner_icmp" : "FabricIngress.spgw.fars", + "FabricIngress.spgw.decap_gtpu.decap_inner_unknown" : "FabricIngress.spgw.fars" }, "default_entry" : { - "action_id" : 60, + "action_id" : 65, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -16582,7 +21766,7 @@ { "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 233, + "line" : 91, "column" : 12, "source_fragment" : "(true, false, false) : decap_inner_tcp()" }, @@ -16601,7 +21785,7 @@ } ], "action_entry" : { - "action_id" : 57, + "action_id" : 62, "action_data" : [] }, "priority" : 1 @@ -16609,7 +21793,7 @@ { "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 234, + "line" : 92, "column" : 12, "source_fragment" : "(false, true, false) : decap_inner_udp()" }, @@ -16628,7 +21812,7 @@ } ], "action_entry" : { - "action_id" : 58, + "action_id" : 63, "action_data" : [] }, "priority" : 2 @@ -16636,7 +21820,7 @@ { "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 235, + "line" : 93, "column" : 12, "source_fragment" : "(false, false, true) : decap_inner_icmp()" }, @@ -16655,7 +21839,7 @@ } ], "action_entry" : { - "action_id" : 59, + "action_id" : 64, "action_data" : [] }, "priority" : 3 @@ -16663,300 +21847,75 @@ ] }, { - "name" : "FabricIngress.spgw_ingress.far_lookup", - "id" : 8, + "name" : "FabricIngress.spgw.fars", + "id" : 22, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 163, + "line" : 245, "column" : 10, - "source_fragment" : "far_lookup" + "source_fragment" : "fars" }, "key" : [ { "match_type" : "exact", "name" : "far_id", - "target" : ["scalars", "fabric_metadata_t._spgw_far_id30"], + "target" : ["scalars", "userMetadata._spgw_far_id41"], "mask" : null } ], "match_type" : "exact", "type" : "simple", - "max_size" : 2048, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [55, 56], - "actions" : ["FabricIngress.spgw_ingress.load_normal_far_attributes", "FabricIngress.spgw_ingress.load_tunnel_far_attributes"], - "base_default_next" : "node_16", - "next_tables" : { - "FabricIngress.spgw_ingress.load_normal_far_attributes" : "node_16", - "FabricIngress.spgw_ingress.load_tunnel_far_attributes" : "node_16" - }, - "default_entry" : { - "action_id" : 55, - "action_const" : true, - "action_data" : ["0x1", "0x1"], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_3", - "id" : 9, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 280, - "column" : 38, - "source_fragment" : "= true; ..." - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [65], - "actions" : ["act_3"], - "base_default_next" : "tbl_act_4", - "next_tables" : { - "act_3" : "tbl_act_4" - }, - "default_entry" : { - "action_id" : 65, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_4", - "id" : 10, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 289, - "column" : 32, - "source_fragment" : "=" - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [66], - "actions" : ["act_4"], - "base_default_next" : "node_19", - "next_tables" : { - "act_4" : "node_19" - }, - "default_entry" : { - "action_id" : 66, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_5", - "id" : 11, - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 111, - "column" : 36, - "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [67], - "actions" : ["act_5"], - "base_default_next" : "node_21", - "next_tables" : { - "act_5" : "node_21" - }, - "default_entry" : { - "action_id" : 67, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_6", - "id" : 12, - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 117, - "column" : 42, - "source_fragment" : "= hdr.inner_vlan_tag.vlan_id; ..." - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [68], - "actions" : ["act_6"], - "base_default_next" : "node_23", - "next_tables" : { - "act_6" : "node_23" - }, - "default_entry" : { - "action_id" : 68, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_7", - "id" : 13, - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 127, - "column" : 37, - "source_fragment" : "=" - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [69], - "actions" : ["act_7"], - "base_default_next" : "FabricIngress.filtering.ingress_port_vlan", - "next_tables" : { - "act_7" : "FabricIngress.filtering.ingress_port_vlan" - }, - "default_entry" : { - "action_id" : 69, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "FabricIngress.filtering.ingress_port_vlan", - "id" : 14, - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 53, - "column" : 10, - "source_fragment" : "ingress_port_vlan" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "ig_port", - "target" : ["standard_metadata", "ingress_port"], - "mask" : null - }, - { - "match_type" : "exact", - "name" : "vlan_is_valid", - "target" : ["vlan_tag", "$valid$"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "vlan_id", - "target" : ["vlan_tag", "vlan_id"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "inner_vlan_id", - "target" : ["inner_vlan_tag", "vlan_id"], - "mask" : null - } - ], - "match_type" : "ternary", - "type" : "simple", - "max_size" : 8192, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [27, 28, 29], - "actions" : ["FabricIngress.filtering.deny", "FabricIngress.filtering.permit", "FabricIngress.filtering.permit_with_internal_vlan"], - "base_default_next" : "FabricIngress.filtering.fwd_classifier", - "next_tables" : { - "FabricIngress.filtering.deny" : "FabricIngress.filtering.fwd_classifier", - "FabricIngress.filtering.permit" : "FabricIngress.filtering.fwd_classifier", - "FabricIngress.filtering.permit_with_internal_vlan" : "FabricIngress.filtering.fwd_classifier" - }, - "default_entry" : { - "action_id" : 27, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "FabricIngress.filtering.fwd_classifier", - "id" : 15, - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 92, - "column" : 10, - "source_fragment" : "fwd_classifier" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "ig_port", - "target" : ["standard_metadata", "ingress_port"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "eth_dst", - "target" : ["ethernet", "dst_addr"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "eth_type", - "target" : ["eth_type", "value"], - "mask" : null - }, - { - "match_type" : "exact", - "name" : "ip_eth_type", - "target" : ["scalars", "fabric_metadata_t._ip_eth_type0"], - "mask" : null - } - ], - "match_type" : "ternary", - "type" : "simple", + "max_size" : 2048, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [72, 73, 74], + "actions" : ["FabricIngress.spgw.load_normal_far", "FabricIngress.spgw.load_tunnel_far", "FabricIngress.spgw.load_dbuf_far"], + "base_default_next" : "tbl_spgw294", + "next_tables" : { + "FabricIngress.spgw.load_normal_far" : "tbl_spgw294", + "FabricIngress.spgw.load_tunnel_far" : "tbl_spgw294", + "FabricIngress.spgw.load_dbuf_far" : "tbl_spgw294" + }, + "default_entry" : { + "action_id" : 72, + "action_const" : true, + "action_data" : ["0x1", "0x0"], + "action_entry_const" : true + } + }, + { + "name" : "tbl_spgw294", + "id" : 23, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 294, + "column" : 36, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", "max_size" : 1024, - "with_counters" : true, + "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [30], - "actions" : ["FabricIngress.filtering.set_forwarding_type"], - "base_default_next" : "node_27", + "action_ids" : [89], + "actions" : ["spgw294"], + "base_default_next" : "node_43", "next_tables" : { - "FabricIngress.filtering.set_forwarding_type" : "node_27" + "spgw294" : "node_43" }, "default_entry" : { - "action_id" : 30, + "action_id" : 89, "action_const" : true, - "action_data" : ["0x0"], + "action_data" : [], "action_entry_const" : true } }, { "name" : "FabricIngress.forwarding.bridging", - "id" : 16, + "id" : 24, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 46, @@ -16967,7 +21926,7 @@ { "match_type" : "exact", "name" : "vlan_id", - "target" : ["scalars", "fabric_metadata_t._vlan_id1"], + "target" : ["scalars", "userMetadata._vlan_id9"], "mask" : null }, { @@ -16983,12 +21942,12 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [31, 4], + "action_ids" : [34, 4], "actions" : ["FabricIngress.forwarding.set_next_id_bridging", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "base_default_next" : "node_52", "next_tables" : { - "FabricIngress.forwarding.set_next_id_bridging" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.set_next_id_bridging" : "node_52", + "nop" : "node_52" }, "default_entry" : { "action_id" : 4, @@ -16999,7 +21958,7 @@ }, { "name" : "FabricIngress.forwarding.mpls", - "id" : 17, + "id" : 25, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 71, @@ -17010,7 +21969,7 @@ { "match_type" : "exact", "name" : "mpls_label", - "target" : ["scalars", "fabric_metadata_t._mpls_label8"], + "target" : ["scalars", "userMetadata._mpls_label16"], "mask" : null } ], @@ -17020,12 +21979,12 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [32, 5], + "action_ids" : [35, 5], "actions" : ["FabricIngress.forwarding.pop_mpls_and_next", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "base_default_next" : "node_52", "next_tables" : { - "FabricIngress.forwarding.pop_mpls_and_next" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.pop_mpls_and_next" : "node_52", + "nop" : "node_52" }, "default_entry" : { "action_id" : 5, @@ -17036,7 +21995,7 @@ }, { "name" : "FabricIngress.forwarding.routing_v4", - "id" : 18, + "id" : 26, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 108, @@ -17047,7 +22006,7 @@ { "match_type" : "lpm", "name" : "ipv4_dst", - "target" : ["scalars", "fabric_metadata_t._ipv4_dst_addr20"], + "target" : ["scalars", "userMetadata._ipv4_dst_addr28"], "mask" : null } ], @@ -17057,13 +22016,13 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [33, 34, 6], + "action_ids" : [36, 37, 6], "actions" : ["FabricIngress.forwarding.set_next_id_routing_v4", "FabricIngress.forwarding.nop_routing_v4", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "base_default_next" : "node_52", "next_tables" : { - "FabricIngress.forwarding.set_next_id_routing_v4" : "FabricIngress.acl.acl", - "FabricIngress.forwarding.nop_routing_v4" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.set_next_id_routing_v4" : "node_52", + "FabricIngress.forwarding.nop_routing_v4" : "node_52", + "nop" : "node_52" }, "default_entry" : { "action_id" : 6, @@ -17074,7 +22033,7 @@ }, { "name" : "FabricIngress.forwarding.routing_v6", - "id" : 19, + "id" : 27, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 135, @@ -17095,15 +22054,90 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [35, 7], + "action_ids" : [38, 7], "actions" : ["FabricIngress.forwarding.set_next_id_routing_v6", "nop"], + "base_default_next" : "node_52", + "next_tables" : { + "FabricIngress.forwarding.set_next_id_routing_v6" : "node_52", + "nop" : "node_52" + }, + "default_entry" : { + "action_id" : 7, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.pre_next.next_mpls", + "id" : 28, + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 36, + "column" : 10, + "source_fragment" : "next_mpls" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [39, 8], + "actions" : ["FabricIngress.pre_next.set_mpls_label", "nop"], + "base_default_next" : "FabricIngress.pre_next.next_vlan", + "next_tables" : { + "FabricIngress.pre_next.set_mpls_label" : "FabricIngress.pre_next.next_vlan", + "nop" : "FabricIngress.pre_next.next_vlan" + }, + "default_entry" : { + "action_id" : 8, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.pre_next.next_vlan", + "id" : 29, + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 73, + "column" : 10, + "source_fragment" : "next_vlan" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [40, 41, 9], + "actions" : ["FabricIngress.pre_next.set_vlan", "FabricIngress.pre_next.set_double_vlan", "nop"], "base_default_next" : "FabricIngress.acl.acl", "next_tables" : { - "FabricIngress.forwarding.set_next_id_routing_v6" : "FabricIngress.acl.acl", + "FabricIngress.pre_next.set_vlan" : "FabricIngress.acl.acl", + "FabricIngress.pre_next.set_double_vlan" : "FabricIngress.acl.acl", "nop" : "FabricIngress.acl.acl" }, "default_entry" : { - "action_id" : 7, + "action_id" : 9, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -17111,10 +22145,10 @@ }, { "name" : "FabricIngress.acl.acl", - "id" : 20, + "id" : 30, "source_info" : { "filename" : "include/control/acl.p4", - "line" : 60, + "line" : 59, "column" : 10, "source_fragment" : "acl" }, @@ -17125,24 +22159,6 @@ "target" : ["standard_metadata", "ingress_port"], "mask" : null }, - { - "match_type" : "ternary", - "name" : "ip_proto", - "target" : ["scalars", "fabric_metadata_t._ip_proto16"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "l4_sport", - "target" : ["scalars", "fabric_metadata_t._l4_sport17"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "l4_dport", - "target" : ["scalars", "fabric_metadata_t._l4_dport18"], - "mask" : null - }, { "match_type" : "ternary", "name" : "eth_dst", @@ -17170,13 +22186,19 @@ { "match_type" : "ternary", "name" : "ipv4_src", - "target" : ["ipv4", "src_addr"], + "target" : ["scalars", "userMetadata._lkp_ipv4_src1"], "mask" : null }, { "match_type" : "ternary", "name" : "ipv4_dst", - "target" : ["ipv4", "dst_addr"], + "target" : ["scalars", "userMetadata._lkp_ipv4_dst2"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._lkp_ip_proto3"], "mask" : null }, { @@ -17190,6 +22212,24 @@ "name" : "icmp_code", "target" : ["icmp", "icmp_code"], "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._lkp_l4_sport4"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._lkp_l4_dport5"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "port_type", + "target" : ["scalars", "userMetadata._port_type64"], + "mask" : null } ], "match_type" : "ternary", @@ -17198,18 +22238,18 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [36, 37, 38, 39, 40], + "action_ids" : [42, 43, 44, 45, 46], "actions" : ["FabricIngress.acl.set_next_id_acl", "FabricIngress.acl.punt_to_cpu", "FabricIngress.acl.set_clone_session_id", "FabricIngress.acl.drop", "FabricIngress.acl.nop_acl"], - "base_default_next" : "node_37", + "base_default_next" : "node_56", "next_tables" : { - "FabricIngress.acl.set_next_id_acl" : "node_37", - "FabricIngress.acl.punt_to_cpu" : "node_37", - "FabricIngress.acl.set_clone_session_id" : "node_37", - "FabricIngress.acl.drop" : "node_37", - "FabricIngress.acl.nop_acl" : "node_37" + "FabricIngress.acl.set_next_id_acl" : "node_56", + "FabricIngress.acl.punt_to_cpu" : "node_56", + "FabricIngress.acl.set_clone_session_id" : "node_56", + "FabricIngress.acl.drop" : "node_56", + "FabricIngress.acl.nop_acl" : "node_56" }, "default_entry" : { - "action_id" : 40, + "action_id" : 46, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -17217,10 +22257,10 @@ }, { "name" : "FabricIngress.next.xconnect", - "id" : 21, + "id" : 31, "source_info" : { "filename" : "include/control/next.p4", - "line" : 119, + "line" : 68, "column" : 10, "source_fragment" : "xconnect" }, @@ -17234,7 +22274,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id13"], + "target" : ["scalars", "userMetadata._next_id21"], "mask" : null } ], @@ -17244,7 +22284,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [43, 44, 9], + "action_ids" : [47, 48, 10], "actions" : ["FabricIngress.next.output_xconnect", "FabricIngress.next.set_next_id_xconnect", "nop"], "base_default_next" : "FabricIngress.next.simple", "next_tables" : { @@ -17253,7 +22293,7 @@ "nop" : "FabricIngress.next.simple" }, "default_entry" : { - "action_id" : 9, + "action_id" : 10, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -17261,10 +22301,10 @@ }, { "name" : "FabricIngress.next.simple", - "id" : 22, + "id" : 32, "source_info" : { "filename" : "include/control/next.p4", - "line" : 158, + "line" : 101, "column" : 10, "source_fragment" : "simple" }, @@ -17272,7 +22312,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id13"], + "target" : ["scalars", "userMetadata._next_id21"], "mask" : null } ], @@ -17282,17 +22322,16 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [45, 46, 47, 10], - "actions" : ["FabricIngress.next.output_simple", "FabricIngress.next.routing_simple", "FabricIngress.next.mpls_routing_simple", "nop"], + "action_ids" : [49, 50, 11], + "actions" : ["FabricIngress.next.output_simple", "FabricIngress.next.routing_simple", "nop"], "base_default_next" : "FabricIngress.next.hashed", "next_tables" : { "FabricIngress.next.output_simple" : "FabricIngress.next.hashed", "FabricIngress.next.routing_simple" : "FabricIngress.next.hashed", - "FabricIngress.next.mpls_routing_simple" : "FabricIngress.next.hashed", "nop" : "FabricIngress.next.hashed" }, "default_entry" : { - "action_id" : 10, + "action_id" : 11, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -17300,10 +22339,10 @@ }, { "name" : "FabricIngress.next.hashed", - "id" : 23, + "id" : 33, "source_info" : { "filename" : "include/control/next.p4", - "line" : 202, + "line" : 138, "column" : 10, "source_fragment" : "hashed" }, @@ -17311,7 +22350,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id13"], + "target" : ["scalars", "userMetadata._next_id21"], "mask" : null } ], @@ -17322,22 +22361,21 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [48, 49, 50, 11], - "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "FabricIngress.next.mpls_routing_hashed", "nop"], + "action_ids" : [51, 52, 12], + "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "nop"], "base_default_next" : "FabricIngress.next.multicast", "next_tables" : { "FabricIngress.next.output_hashed" : "FabricIngress.next.multicast", "FabricIngress.next.routing_hashed" : "FabricIngress.next.multicast", - "FabricIngress.next.mpls_routing_hashed" : "FabricIngress.next.multicast", "nop" : "FabricIngress.next.multicast" } }, { "name" : "FabricIngress.next.multicast", - "id" : 24, + "id" : 34, "source_info" : { "filename" : "include/control/next.p4", - "line" : 236, + "line" : 171, "column" : 10, "source_fragment" : "multicast" }, @@ -17345,7 +22383,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id13"], + "target" : ["scalars", "userMetadata._next_id21"], "mask" : null } ], @@ -17355,61 +22393,23 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [51, 12], + "action_ids" : [53, 13], "actions" : ["FabricIngress.next.set_mcast_group_id", "nop"], - "base_default_next" : "FabricIngress.next.next_vlan", - "next_tables" : { - "FabricIngress.next.set_mcast_group_id" : "FabricIngress.next.next_vlan", - "nop" : "FabricIngress.next.next_vlan" - }, - "default_entry" : { - "action_id" : 12, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "FabricIngress.next.next_vlan", - "id" : 25, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 86, - "column" : 10, - "source_fragment" : "next_vlan" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id13"], - "mask" : null - } - ], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [41, 42, 8], - "actions" : ["FabricIngress.next.set_vlan", "FabricIngress.next.set_double_vlan", "nop"], - "base_default_next" : "node_43", + "base_default_next" : "node_61", "next_tables" : { - "FabricIngress.next.set_vlan" : "node_43", - "FabricIngress.next.set_double_vlan" : "node_43", - "nop" : "node_43" + "FabricIngress.next.set_mcast_group_id" : "node_61", + "nop" : "node_61" }, "default_entry" : { - "action_id" : 8, + "action_id" : 13, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_8", - "id" : 26, + "name" : "tbl_port_counter31", + "id" : 35, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 31, @@ -17423,22 +22423,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [70], - "actions" : ["act_8"], - "base_default_next" : "node_45", + "action_ids" : [90], + "actions" : ["port_counter31"], + "base_default_next" : "node_63", "next_tables" : { - "act_8" : "node_45" + "port_counter31" : "node_63" }, "default_entry" : { - "action_id" : 70, + "action_id" : 90, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_9", - "id" : 27, + "name" : "tbl_port_counter34", + "id" : 36, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 34, @@ -17452,14 +22452,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [71], - "actions" : ["act_9"], + "action_ids" : [91], + "actions" : ["port_counter34"], "base_default_next" : "FabricIngress.process_set_source_sink.tb_set_source", "next_tables" : { - "act_9" : "FabricIngress.process_set_source_sink.tb_set_source" + "port_counter34" : "FabricIngress.process_set_source_sink.tb_set_source" }, "default_entry" : { - "action_id" : 71, + "action_id" : 91, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -17467,7 +22467,7 @@ }, { "name" : "FabricIngress.process_set_source_sink.tb_set_source", - "id" : 28, + "id" : 37, "source_info" : { "filename" : "include/int/int_main.p4", "line" : 46, @@ -17488,7 +22488,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [13, 0], + "action_ids" : [16, 0], "actions" : ["FabricIngress.process_set_source_sink.int_set_source", "nop"], "base_default_next" : "FabricIngress.process_set_source_sink.tb_set_sink", "next_tables" : { @@ -17504,7 +22504,7 @@ }, { "name" : "FabricIngress.process_set_source_sink.tb_set_sink", - "id" : 29, + "id" : 38, "source_info" : { "filename" : "include/int/int_main.p4", "line" : 67, @@ -17525,12 +22525,12 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [14, 1], + "action_ids" : [17, 1], "actions" : ["FabricIngress.process_set_source_sink.int_set_sink", "nop"], - "base_default_next" : "node_49", + "base_default_next" : "node_67", "next_tables" : { - "FabricIngress.process_set_source_sink.int_set_sink" : "node_49", - "nop" : "node_49" + "FabricIngress.process_set_source_sink.int_set_sink" : "node_67", + "nop" : "node_67" }, "default_entry" : { "action_id" : 1, @@ -17540,8 +22540,8 @@ } }, { - "name" : "tbl_act_10", - "id" : 30, + "name" : "tbl_int_main89", + "id" : 39, "source_info" : { "filename" : "include/int/int_main.p4", "line" : 89, @@ -17555,14 +22555,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [72], - "actions" : ["act_10"], + "action_ids" : [92], + "actions" : ["int_main89"], "base_default_next" : "FabricIngress.bng_ingress.t_line_map", "next_tables" : { - "act_10" : "FabricIngress.bng_ingress.t_line_map" + "int_main89" : "FabricIngress.bng_ingress.t_line_map" }, "default_entry" : { - "action_id" : 72, + "action_id" : 92, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -17570,7 +22570,7 @@ }, { "name" : "FabricIngress.bng_ingress.t_line_map", - "id" : 31, + "id" : 40, "source_info" : { "filename" : "include/bng.p4", "line" : 323, @@ -17581,13 +22581,13 @@ { "match_type" : "exact", "name" : "s_tag", - "target" : ["scalars", "fabric_metadata_t._bng_s_tag42"], + "target" : ["scalars", "userMetadata._bng_s_tag54"], "mask" : null }, { "match_type" : "exact", "name" : "c_tag", - "target" : ["scalars", "fabric_metadata_t._bng_c_tag43"], + "target" : ["scalars", "userMetadata._bng_c_tag55"], "mask" : null } ], @@ -17597,22 +22597,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [26], + "action_ids" : [29], "actions" : ["FabricIngress.bng_ingress.set_line"], - "base_default_next" : "node_52", + "base_default_next" : "node_70", "next_tables" : { - "FabricIngress.bng_ingress.set_line" : "node_52" + "FabricIngress.bng_ingress.set_line" : "node_70" }, "default_entry" : { - "action_id" : 26, + "action_id" : 29, "action_const" : true, "action_data" : ["0x0"], "action_entry_const" : true } }, { - "name" : "tbl_act_11", - "id" : 32, + "name" : "tbl_bng342", + "id" : 41, "source_info" : { "filename" : "include/bng.p4", "line" : 342, @@ -17626,14 +22626,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [75], - "actions" : ["act_13"], + "action_ids" : [94], + "actions" : ["bng342"], "base_default_next" : "FabricIngress.bng_ingress.upstream.t_pppoe_cp", "next_tables" : { - "act_13" : "FabricIngress.bng_ingress.upstream.t_pppoe_cp" + "bng342" : "FabricIngress.bng_ingress.upstream.t_pppoe_cp" }, "default_entry" : { - "action_id" : 75, + "action_id" : 94, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -17641,7 +22641,7 @@ }, { "name" : "FabricIngress.bng_ingress.upstream.t_pppoe_cp", - "id" : 33, + "id" : 42, "source_info" : { "filename" : "include/bng.p4", "line" : 51, @@ -17668,12 +22668,12 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [15, 2], + "action_ids" : [18, 2], "actions" : ["FabricIngress.bng_ingress.upstream.punt_to_cpu", "nop"], "base_default_next" : null, "next_tables" : { - "__HIT__" : "tbl_act_12", - "__MISS__" : "tbl_act_13" + "__HIT__" : "tbl_bng126", + "__MISS__" : "node_74" }, "default_entry" : { "action_id" : 2, @@ -17683,54 +22683,8 @@ } }, { - "name" : "tbl_act_12", - "id" : 34, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [73], - "actions" : ["act_11"], - "base_default_next" : "node_57", - "next_tables" : { - "act_11" : "node_57" - }, - "default_entry" : { - "action_id" : 73, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_13", - "id" : 35, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [74], - "actions" : ["act_12"], - "base_default_next" : "node_57", - "next_tables" : { - "act_12" : "node_57" - }, - "default_entry" : { - "action_id" : 74, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_14", - "id" : 36, + "name" : "tbl_bng126", + "id" : 43, "source_info" : { "filename" : "include/bng.p4", "line" : 126, @@ -17744,14 +22698,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [76], - "actions" : ["act_14"], - "base_default_next" : "node_59", + "action_ids" : [93], + "actions" : ["bng126"], + "base_default_next" : "node_74", "next_tables" : { - "act_14" : "node_59" + "bng126" : "node_74" }, "default_entry" : { - "action_id" : 76, + "action_id" : 93, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -17759,7 +22713,7 @@ }, { "name" : "FabricIngress.bng_ingress.upstream.t_pppoe_term_v4", - "id" : 37, + "id" : 44, "source_info" : { "filename" : "include/bng.p4", "line" : 87, @@ -17770,7 +22724,7 @@ { "match_type" : "exact", "name" : "line_id", - "target" : ["scalars", "fabric_metadata_t._bng_line_id39"], + "target" : ["scalars", "userMetadata._bng_line_id51"], "mask" : null }, { @@ -17792,23 +22746,23 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [18, 16], + "action_ids" : [21, 19], "actions" : ["FabricIngress.bng_ingress.upstream.term_enabled_v4", "FabricIngress.bng_ingress.upstream.term_disabled"], - "base_default_next" : null, + "base_default_next" : "tbl_slicing114", "next_tables" : { - "FabricIngress.bng_ingress.upstream.term_disabled" : "tbl_act_15", - "FabricIngress.bng_ingress.upstream.term_enabled_v4" : null + "FabricIngress.bng_ingress.upstream.term_disabled" : "tbl_bng131", + "FabricIngress.bng_ingress.upstream.term_enabled_v4" : "tbl_slicing114" }, "default_entry" : { - "action_id" : 16, + "action_id" : 19, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_15", - "id" : 38, + "name" : "tbl_bng131", + "id" : 45, "source_info" : { "filename" : "include/bng.p4", "line" : 131, @@ -17822,27 +22776,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [77], - "actions" : ["act_15"], - "base_default_next" : null, + "action_ids" : [95], + "actions" : ["bng131"], + "base_default_next" : "tbl_slicing114", "next_tables" : { - "act_15" : null + "bng131" : "tbl_slicing114" }, "default_entry" : { - "action_id" : 77, + "action_id" : 95, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_16", - "id" : 39, + "name" : "tbl_bng112", + "id" : 46, "source_info" : { "filename" : "include/bng.p4", "line" : 112, "column" : 12, - "source_fragment" : "hdr.ipv6.src_addr[127:64]" + "source_fragment" : " hdr.ipv6.src_addr[127:64] : exact @name(\\\"ipv6_src_net_id\\\");" }, "key" : [], "match_type" : "exact", @@ -17851,14 +22805,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [79], - "actions" : ["act_17"], + "action_ids" : [97], + "actions" : ["bng112"], "base_default_next" : "FabricIngress.bng_ingress.upstream.t_pppoe_term_v6", "next_tables" : { - "act_17" : "FabricIngress.bng_ingress.upstream.t_pppoe_term_v6" + "bng112" : "FabricIngress.bng_ingress.upstream.t_pppoe_term_v6" }, "default_entry" : { - "action_id" : 79, + "action_id" : 97, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -17866,7 +22820,7 @@ }, { "name" : "FabricIngress.bng_ingress.upstream.t_pppoe_term_v6", - "id" : 40, + "id" : 47, "source_info" : { "filename" : "include/bng.p4", "line" : 109, @@ -17877,7 +22831,7 @@ { "match_type" : "exact", "name" : "line_id", - "target" : ["scalars", "fabric_metadata_t._bng_line_id39"], + "target" : ["scalars", "userMetadata._bng_line_id51"], "mask" : null }, { @@ -17899,23 +22853,23 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [19, 17], + "action_ids" : [22, 20], "actions" : ["FabricIngress.bng_ingress.upstream.term_enabled_v6", "FabricIngress.bng_ingress.upstream.term_disabled"], - "base_default_next" : null, + "base_default_next" : "tbl_slicing114", "next_tables" : { - "FabricIngress.bng_ingress.upstream.term_disabled" : "tbl_act_17", - "FabricIngress.bng_ingress.upstream.term_enabled_v6" : null + "FabricIngress.bng_ingress.upstream.term_disabled" : "tbl_bng139", + "FabricIngress.bng_ingress.upstream.term_enabled_v6" : "tbl_slicing114" }, "default_entry" : { - "action_id" : 17, + "action_id" : 20, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_17", - "id" : 41, + "name" : "tbl_bng139", + "id" : 48, "source_info" : { "filename" : "include/bng.p4", "line" : 139, @@ -17929,14 +22883,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [78], - "actions" : ["act_16"], - "base_default_next" : null, + "action_ids" : [96], + "actions" : ["bng139"], + "base_default_next" : "tbl_slicing114", "next_tables" : { - "act_16" : null + "bng139" : "tbl_slicing114" }, "default_entry" : { - "action_id" : 78, + "action_id" : 96, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -17944,7 +22898,7 @@ }, { "name" : "FabricIngress.bng_ingress.downstream.t_line_session_map", - "id" : 42, + "id" : 49, "source_info" : { "filename" : "include/bng.p4", "line" : 169, @@ -17955,7 +22909,7 @@ { "match_type" : "exact", "name" : "line_id", - "target" : ["scalars", "fabric_metadata_t._bng_line_id39"], + "target" : ["scalars", "userMetadata._bng_line_id51"], "mask" : null } ], @@ -17965,12 +22919,12 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [3, 20, 21], + "action_ids" : [3, 23, 24], "actions" : ["nop", "FabricIngress.bng_ingress.downstream.set_session", "FabricIngress.bng_ingress.downstream.drop"], "base_default_next" : null, "next_tables" : { - "__HIT__" : "tbl_act_18", - "__MISS__" : "tbl_act_19" + "__HIT__" : "node_83", + "__MISS__" : "tbl_slicing114" }, "default_entry" : { "action_id" : 3, @@ -17979,55 +22933,9 @@ "action_entry_const" : true } }, - { - "name" : "tbl_act_18", - "id" : 43, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [80], - "actions" : ["act_18"], - "base_default_next" : "node_70", - "next_tables" : { - "act_18" : "node_70" - }, - "default_entry" : { - "action_id" : 80, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_19", - "id" : 44, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [81], - "actions" : ["act_19"], - "base_default_next" : "node_70", - "next_tables" : { - "act_19" : "node_70" - }, - "default_entry" : { - "action_id" : 81, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, { "name" : "FabricIngress.bng_ingress.downstream.t_qos_v4", - "id" : 45, + "id" : 50, "source_info" : { "filename" : "include/bng.p4", "line" : 194, @@ -18038,7 +22946,7 @@ { "match_type" : "ternary", "name" : "line_id", - "target" : ["scalars", "fabric_metadata_t._bng_line_id39"], + "target" : ["scalars", "userMetadata._bng_line_id51"], "mask" : null }, { @@ -18066,23 +22974,23 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [22, 24], + "action_ids" : [25, 27], "actions" : ["FabricIngress.bng_ingress.downstream.qos_prio", "FabricIngress.bng_ingress.downstream.qos_besteff"], - "base_default_next" : null, + "base_default_next" : "tbl_slicing114", "next_tables" : { - "FabricIngress.bng_ingress.downstream.qos_prio" : "tbl_act_20", - "FabricIngress.bng_ingress.downstream.qos_besteff" : "tbl_act_21" + "FabricIngress.bng_ingress.downstream.qos_prio" : "tbl_bng238", + "FabricIngress.bng_ingress.downstream.qos_besteff" : "tbl_bng241" }, "default_entry" : { - "action_id" : 24, + "action_id" : 27, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_20", - "id" : 46, + "name" : "tbl_bng238", + "id" : 51, "source_info" : { "filename" : "include/bng.p4", "line" : 238, @@ -18096,22 +23004,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [82], - "actions" : ["act_20"], - "base_default_next" : null, + "action_ids" : [98], + "actions" : ["bng238"], + "base_default_next" : "tbl_slicing114", "next_tables" : { - "act_20" : null + "bng238" : "tbl_slicing114" }, "default_entry" : { - "action_id" : 82, + "action_id" : 98, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_21", - "id" : 47, + "name" : "tbl_bng241", + "id" : 52, "source_info" : { "filename" : "include/bng.p4", "line" : 241, @@ -18125,14 +23033,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [83], - "actions" : ["act_21"], - "base_default_next" : null, + "action_ids" : [99], + "actions" : ["bng241"], + "base_default_next" : "tbl_slicing114", "next_tables" : { - "act_21" : null + "bng241" : "tbl_slicing114" }, "default_entry" : { - "action_id" : 83, + "action_id" : 99, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -18140,7 +23048,7 @@ }, { "name" : "FabricIngress.bng_ingress.downstream.t_qos_v6", - "id" : 48, + "id" : 53, "source_info" : { "filename" : "include/bng.p4", "line" : 210, @@ -18151,7 +23059,7 @@ { "match_type" : "ternary", "name" : "line_id", - "target" : ["scalars", "fabric_metadata_t._bng_line_id39"], + "target" : ["scalars", "userMetadata._bng_line_id51"], "mask" : null }, { @@ -18173,23 +23081,23 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [23, 25], + "action_ids" : [26, 28], "actions" : ["FabricIngress.bng_ingress.downstream.qos_prio", "FabricIngress.bng_ingress.downstream.qos_besteff"], - "base_default_next" : null, + "base_default_next" : "tbl_slicing114", "next_tables" : { - "FabricIngress.bng_ingress.downstream.qos_prio" : "tbl_act_22", - "FabricIngress.bng_ingress.downstream.qos_besteff" : "tbl_act_23" + "FabricIngress.bng_ingress.downstream.qos_prio" : "tbl_bng250", + "FabricIngress.bng_ingress.downstream.qos_besteff" : "tbl_bng253" }, "default_entry" : { - "action_id" : 25, + "action_id" : 28, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_22", - "id" : 49, + "name" : "tbl_bng250", + "id" : 54, "source_info" : { "filename" : "include/bng.p4", "line" : 250, @@ -18203,22 +23111,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [84], - "actions" : ["act_22"], - "base_default_next" : null, + "action_ids" : [100], + "actions" : ["bng250"], + "base_default_next" : "tbl_slicing114", "next_tables" : { - "act_22" : null + "bng250" : "tbl_slicing114" }, "default_entry" : { - "action_id" : 84, + "action_id" : 100, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_23", - "id" : 50, + "name" : "tbl_bng253", + "id" : 55, "source_info" : { "filename" : "include/bng.p4", "line" : 253, @@ -18232,18 +23140,96 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [85], - "actions" : ["act_23"], - "base_default_next" : null, + "action_ids" : [101], + "actions" : ["bng253"], + "base_default_next" : "tbl_slicing114", "next_tables" : { - "act_23" : null + "bng253" : "tbl_slicing114" }, "default_entry" : { - "action_id" : 85, + "action_id" : 101, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing114", + "id" : 56, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 8, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) slice_tc, fabric_md.packet_color); ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [102], + "actions" : ["slicing114"], + "base_default_next" : "FabricIngress.qos.queues", + "next_tables" : { + "slicing114" : "FabricIngress.qos.queues" + }, + "default_entry" : { + "action_id" : 102, "action_const" : true, "action_data" : [], "action_entry_const" : true } + }, + { + "name" : "FabricIngress.qos.queues", + "id" : 57, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 93, + "column" : 10, + "source_fragment" : "queues" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "slice_id", + "target" : ["scalars", "userMetadata._slice_id29"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "tc", + "target" : ["scalars", "userMetadata._tc31"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "color", + "target" : ["scalars", "userMetadata._packet_color30"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 128, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [56, 57], + "actions" : ["FabricIngress.qos.set_queue", "FabricIngress.qos.meter_drop"], + "base_default_next" : null, + "next_tables" : { + "FabricIngress.qos.set_queue" : null, + "FabricIngress.qos.meter_drop" : null + }, + "default_entry" : { + "action_id" : 56, + "action_const" : true, + "action_data" : ["0x0"], + "action_entry_const" : true + } } ], "action_profiles" : [ @@ -18252,7 +23238,7 @@ "id" : 0, "source_info" : { "filename" : "include/control/next.p4", - "line" : 183, + "line" : 125, "column" : 57, "source_fragment" : "hashed_selector" }, @@ -18262,37 +23248,198 @@ "input" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr19"] + "value" : ["scalars", "userMetadata._ipv4_src_addr27"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr28"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr20"] + "value" : ["scalars", "userMetadata._ip_proto24"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto16"] + "value" : ["scalars", "userMetadata._l4_sport25"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport17"] - }, - { + "value" : ["scalars", "userMetadata._l4_dport26"] + } + ] + } + } + ], + "conditionals" : [ + { + "name" : "node_3", + "id" : 0, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 31, + "column" : 12, + "source_fragment" : "hdr.inner_ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init32", + "false_next" : "node_11" + }, + { + "name" : "node_5", + "id" : 1, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 36, + "column" : 16, + "source_fragment" : "hdr.inner_tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_tcp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init37", + "false_next" : "node_7" + }, + { + "name" : "node_7", + "id" : 2, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 39, + "column" : 23, + "source_fragment" : "hdr.inner_udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_udp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init40", + "false_next" : "node_9" + }, + { + "name" : "node_9", + "id" : 3, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 42, + "column" : 23, + "source_fragment" : "hdr.inner_icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_icmp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init43", + "false_next" : "node_19" + }, + { + "name" : "node_11", + "id" : 4, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 46, + "column" : 19, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init47", + "false_next" : "node_19" + }, + { + "name" : "node_13", + "id" : 5, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 51, + "column" : 16, + "source_fragment" : "hdr.tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["tcp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init52", + "false_next" : "node_15" + }, + { + "name" : "node_15", + "id" : 6, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 54, + "column" : 23, + "source_fragment" : "hdr.udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport18"] + "value" : ["udp", "$valid$"] } - ] - } - } - ], - "conditionals" : [ + } + }, + "true_next" : "tbl_lookup_md_init55", + "false_next" : "node_17" + }, { - "name" : "node_2", - "id" : 0, + "name" : "node_17", + "id" : 7, "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 24, - "column" : 12, - "source_fragment" : "hdr.packet_out.isValid()" + "filename" : "include/control/lookup_md_init.p4", + "line" : 57, + "column" : 23, + "source_fragment" : "hdr.icmp.isValid()" }, "expression" : { "type" : "expression", @@ -18301,78 +23448,67 @@ "left" : null, "right" : { "type" : "field", - "value" : ["packet_out", "$valid$"] + "value" : ["icmp", "$valid$"] } } }, - "true_next" : "tbl_act", - "false_next" : "tbl_act_0" + "true_next" : "tbl_lookup_md_init58", + "false_next" : "node_19" }, { - "name" : "node_6", - "id" : 1, + "name" : "node_19", + "id" : 8, "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 249, + "filename" : "include/control/packetio.p4", + "line" : 24, "column" : 12, - "source_fragment" : "fabric_md.spgw.skip_spgw == true" + "source_fragment" : "hdr.packet_out.isValid()" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_skip_spgw32"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["packet_out", "$valid$"] } } }, - "true_next" : "tbl_act_1", - "false_next" : "node_8" + "true_next" : "tbl_packetio25", + "false_next" : "FabricIngress.slice_tc_classifier.classifier" }, { - "name" : "node_8", - "id" : 2, + "name" : "node_22", + "id" : 9, + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 112, + "column" : 12, + "source_fragment" : "hdr.vlan_tag.isValid()" + }, "expression" : { "type" : "expression", "value" : { - "op" : "not", + "op" : "d2b", "left" : null, "right" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "spgw_ingress_hasReturned"] - } - } + "type" : "field", + "value" : ["vlan_tag", "$valid$"] } } }, - "true_next" : "node_9", - "false_next" : "node_19" + "true_next" : "tbl_filtering113", + "false_next" : "node_24" }, { - "name" : "node_9", - "id" : 3, + "name" : "node_24", + "id" : 10, "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 253, + "filename" : "include/control/filtering.p4", + "line" : 118, "column" : 12, - "source_fragment" : "hdr.gtpu.isValid()" + "source_fragment" : "hdr.inner_vlan_tag.isValid()" }, "expression" : { "type" : "expression", @@ -18381,87 +23517,107 @@ "left" : null, "right" : { "type" : "field", - "value" : ["gtpu", "$valid$"] + "value" : ["inner_vlan_tag", "$valid$"] } } }, - "true_next" : "FabricIngress.spgw_ingress.uplink_pdr_lookup", - "false_next" : "FabricIngress.spgw_ingress.downlink_pdr_lookup" + "true_next" : "tbl_filtering119", + "false_next" : "node_26" }, { - "name" : "node_13", - "id" : 4, + "name" : "node_26", + "id" : 11, "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 266, + "filename" : "include/control/filtering.p4", + "line" : 124, "column" : 12, - "source_fragment" : "fabric_md.spgw.needs_gtpu_decap == true" + "source_fragment" : "!hdr.mpls.isValid()" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_decap37"] + "value" : ["mpls", "$valid$"] } } - }, - "right" : { - "type" : "bool", - "value" : true } } }, - "true_next" : "FabricIngress.spgw_ingress.decap_gtpu", - "false_next" : "FabricIngress.spgw_ingress.far_lookup" + "true_next" : "tbl_filtering129", + "false_next" : "FabricIngress.filtering.ingress_port_vlan" }, { - "name" : "node_16", - "id" : 5, + "name" : "node_30", + "id" : 12, "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 277, + "filename" : "fabric.p4", + "line" : 76, "column" : 12, - "source_fragment" : "fabric_md.spgw.far_dropped == true" + "source_fragment" : "fabric_metadata.skip_forwarding" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_dropped34"] + "value" : ["scalars", "userMetadata._skip_forwarding18"] } } + } + } + }, + "true_next" : "FabricIngress.spgw.interfaces", + "false_next" : "node_43" + }, + { + "name" : "node_32", + "id" : 13, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 267, + "column" : 16, + "source_fragment" : "fabric_md.spgw.src_iface == SPGW_IFACE_FROM_DBUF" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_src_iface42"] }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0x03" } } }, - "true_next" : "tbl_act_3", - "false_next" : "tbl_act_4" + "true_next" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_gtpu", + "false_next" : "node_34" }, { - "name" : "node_19", - "id" : 6, + "name" : "node_34", + "id" : 14, "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 110, - "column" : 12, - "source_fragment" : "hdr.vlan_tag.isValid()" + "filename" : "include/control/spgw.p4", + "line" : 271, + "column" : 16, + "source_fragment" : "hdr.gtpu.isValid()" }, "expression" : { "type" : "expression", @@ -18470,102 +23626,95 @@ "left" : null, "right" : { "type" : "field", - "value" : ["vlan_tag", "$valid$"] + "value" : ["gtpu", "$valid$"] } } }, - "true_next" : "tbl_act_5", - "false_next" : "node_21" + "true_next" : "FabricIngress.spgw.uplink_pdrs", + "false_next" : "FabricIngress.spgw.downlink_pdrs" }, { - "name" : "node_21", - "id" : 7, + "name" : "node_37", + "id" : 15, "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 116, - "column" : 12, - "source_fragment" : "hdr.inner_vlan_tag.isValid()" + "filename" : "include/control/spgw.p4", + "line" : 276, + "column" : 16, + "source_fragment" : "fabric_md.spgw.src_iface != SPGW_IFACE_FROM_DBUF" }, "expression" : { "type" : "expression", "value" : { - "op" : "d2b", - "left" : null, - "right" : { + "op" : "!=", + "left" : { "type" : "field", - "value" : ["inner_vlan_tag", "$valid$"] + "value" : ["scalars", "userMetadata._spgw_src_iface42"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" } } }, - "true_next" : "tbl_act_6", - "false_next" : "node_23" + "true_next" : "tbl_spgw277", + "false_next" : "node_39" }, { - "name" : "node_23", - "id" : 8, + "name" : "node_39", + "id" : 16, "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 122, - "column" : 12, - "source_fragment" : "!hdr.mpls.isValid()" + "filename" : "fabric.p4", + "line" : 77, + "column" : 28, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", "value" : { - "op" : "not", + "op" : "d2b", "left" : null, "right" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["mpls", "$valid$"] - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap47"] } } }, - "true_next" : "tbl_act_7", - "false_next" : "FabricIngress.filtering.ingress_port_vlan" + "true_next" : "FabricIngress.spgw.decap_gtpu.decap_gtpu", + "false_next" : "FabricIngress.spgw.fars" }, { - "name" : "node_27", - "id" : 9, + "name" : "node_43", + "id" : 17, "source_info" : { "filename" : "fabric.p4", - "line" : 69, + "line" : 80, "column" : 12, - "source_fragment" : "fabric_metadata.skip_forwarding == false" + "source_fragment" : "fabric_metadata.skip_forwarding" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_forwarding10"] + "value" : ["scalars", "userMetadata._skip_forwarding18"] } } - }, - "right" : { - "type" : "bool", - "value" : false } } }, - "true_next" : "node_28", - "false_next" : "FabricIngress.acl.acl" + "true_next" : "node_44", + "false_next" : "node_52" }, { - "name" : "node_28", - "id" : 10, + "name" : "node_44", + "id" : 18, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 150, @@ -18578,7 +23727,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type12"] + "value" : ["scalars", "userMetadata._fwd_type20"] }, "right" : { "type" : "hexstr", @@ -18587,11 +23736,11 @@ } }, "true_next" : "FabricIngress.forwarding.bridging", - "false_next" : "node_30" + "false_next" : "node_46" }, { - "name" : "node_30", - "id" : 11, + "name" : "node_46", + "id" : 19, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 151, @@ -18604,7 +23753,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type12"] + "value" : ["scalars", "userMetadata._fwd_type20"] }, "right" : { "type" : "hexstr", @@ -18613,11 +23762,11 @@ } }, "true_next" : "FabricIngress.forwarding.mpls", - "false_next" : "node_32" + "false_next" : "node_48" }, { - "name" : "node_32", - "id" : 12, + "name" : "node_48", + "id" : 20, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 152, @@ -18630,7 +23779,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type12"] + "value" : ["scalars", "userMetadata._fwd_type20"] }, "right" : { "type" : "hexstr", @@ -18639,11 +23788,11 @@ } }, "true_next" : "FabricIngress.forwarding.routing_v4", - "false_next" : "node_34" + "false_next" : "node_50" }, { - "name" : "node_34", - "id" : 13, + "name" : "node_50", + "id" : 21, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 154, @@ -18656,7 +23805,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type12"] + "value" : ["scalars", "userMetadata._fwd_type20"] }, "right" : { "type" : "hexstr", @@ -18665,35 +23814,62 @@ } }, "true_next" : "FabricIngress.forwarding.routing_v6", + "false_next" : "node_52" + }, + { + "name" : "node_52", + "id" : 22, + "source_info" : { + "filename" : "fabric.p4", + "line" : 83, + "column" : 12, + "source_fragment" : "fabric_metadata.skip_next" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "not", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next19"] + } + } + } + } + }, + "true_next" : "FabricIngress.pre_next.next_mpls", "false_next" : "FabricIngress.acl.acl" }, { - "name" : "node_37", - "id" : 14, + "name" : "node_56", + "id" : 23, "source_info" : { "filename" : "fabric.p4", - "line" : 73, + "line" : 87, "column" : 12, - "source_fragment" : "fabric_metadata.skip_next == false" + "source_fragment" : "fabric_metadata.skip_next" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next11"] + "value" : ["scalars", "userMetadata._skip_next19"] } } - }, - "right" : { - "type" : "bool", - "value" : false } } }, @@ -18701,8 +23877,8 @@ "false_next" : "FabricIngress.bng_ingress.t_line_map" }, { - "name" : "node_43", - "id" : 15, + "name" : "node_61", + "id" : 24, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 30, @@ -18723,12 +23899,12 @@ } } }, - "true_next" : "tbl_act_8", - "false_next" : "node_45" + "true_next" : "tbl_port_counter31", + "false_next" : "node_63" }, { - "name" : "node_45", - "id" : 16, + "name" : "node_63", + "id" : 25, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 33, @@ -18749,45 +23925,35 @@ } } }, - "true_next" : "tbl_act_9", + "true_next" : "tbl_port_counter34", "false_next" : "FabricIngress.process_set_source_sink.tb_set_source" }, { - "name" : "node_49", - "id" : 17, + "name" : "node_67", + "id" : 26, "source_info" : { - "filename" : "include/int/int_main.p4", - "line" : 86, - "column" : 11, - "source_fragment" : "fabric_metadata.int_meta.sink == true" + "filename" : "fabric.p4", + "line" : 95, + "column" : 47, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_sink46"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_sink58"] } } }, - "true_next" : "tbl_act_10", + "true_next" : "tbl_int_main89", "false_next" : "FabricIngress.bng_ingress.t_line_map" }, { - "name" : "node_52", - "id" : 18, + "name" : "node_70", + "id" : 27, "source_info" : { "filename" : "include/bng.p4", "line" : 341, @@ -18805,29 +23971,12 @@ } } }, - "true_next" : "tbl_act_11", + "true_next" : "tbl_bng342", "false_next" : "FabricIngress.bng_ingress.downstream.t_line_session_map" }, { - "name" : "node_57", - "id" : 19, - "expression" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "bng_ingress_upstream_tmp"] - } - } - }, - "true_next" : "tbl_act_14", - "false_next" : "node_59" - }, - { - "name" : "node_59", - "id" : 20, + "name" : "node_74", + "id" : 28, "expression" : { "type" : "expression", "value" : { @@ -18846,12 +23995,12 @@ } } }, - "false_next" : null, - "true_next" : "node_60" + "true_next" : "node_75", + "false_next" : "tbl_slicing114" }, { - "name" : "node_60", - "id" : 21, + "name" : "node_75", + "id" : 29, "source_info" : { "filename" : "include/bng.p4", "line" : 128, @@ -18870,11 +24019,11 @@ } }, "true_next" : "FabricIngress.bng_ingress.upstream.t_pppoe_term_v4", - "false_next" : "node_63" + "false_next" : "node_78" }, { - "name" : "node_63", - "id" : 22, + "name" : "node_78", + "id" : 30, "source_info" : { "filename" : "include/bng.p4", "line" : 136, @@ -18892,29 +24041,12 @@ } } }, - "false_next" : null, - "true_next" : "tbl_act_16" - }, - { - "name" : "node_70", - "id" : 23, - "expression" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "bng_ingress_downstream_tmp"] - } - } - }, - "false_next" : null, - "true_next" : "node_71" + "true_next" : "tbl_bng112", + "false_next" : "tbl_slicing114" }, { - "name" : "node_71", - "id" : 24, + "name" : "node_83", + "id" : 31, "source_info" : { "filename" : "include/bng.p4", "line" : 235, @@ -18933,11 +24065,11 @@ } }, "true_next" : "FabricIngress.bng_ingress.downstream.t_qos_v4", - "false_next" : "node_75" + "false_next" : "node_87" }, { - "name" : "node_75", - "id" : 25, + "name" : "node_87", + "id" : 32, "source_info" : { "filename" : "include/bng.p4", "line" : 247, @@ -18955,8 +24087,8 @@ } } }, - "false_next" : null, - "true_next" : "FabricIngress.bng_ingress.downstream.t_qos_v6" + "true_next" : "FabricIngress.bng_ingress.downstream.t_qos_v6", + "false_next" : "tbl_slicing114" } ] }, @@ -18965,15 +24097,15 @@ "id" : 1, "source_info" : { "filename" : "fabric.p4", - "line" : 91, + "line" : 105, "column" : 8, "source_fragment" : "FabricEgress" }, - "init_table" : "node_81", + "init_table" : "node_95", "tables" : [ { - "name" : "tbl_act_24", - "id" : 51, + "name" : "tbl_packetio41", + "id" : 58, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 41, @@ -18987,22 +24119,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [138], - "actions" : ["act_24"], - "base_default_next" : "node_83", + "action_ids" : [159], + "actions" : ["packetio41"], + "base_default_next" : "node_97", "next_tables" : { - "act_24" : "node_83" + "packetio41" : "node_97" }, "default_entry" : { - "action_id" : 138, + "action_id" : 159, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_25", - "id" : 52, + "name" : "tbl_packetio44", + "id" : 59, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 44, @@ -19016,25 +24148,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [139], - "actions" : ["act_25"], - "base_default_next" : "node_85", + "action_ids" : [160], + "actions" : ["packetio44"], + "base_default_next" : "node_99", "next_tables" : { - "act_25" : "node_85" + "packetio44" : "node_99" }, "default_entry" : { - "action_id" : 139, + "action_id" : 160, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_26", - "id" : 53, + "name" : "tbl_next283", + "id" : 60, "source_info" : { "filename" : "include/control/next.p4", - "line" : 337, + "line" : 283, "column" : 12, "source_fragment" : "mark_to_drop(standard_metadata)" }, @@ -19045,14 +24177,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [140], - "actions" : ["act_26"], - "base_default_next" : "node_87", + "action_ids" : [161], + "actions" : ["next283"], + "base_default_next" : "node_101", "next_tables" : { - "act_26" : "node_87" + "next283" : "node_101" }, "default_entry" : { - "action_id" : 140, + "action_id" : 161, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -19060,10 +24192,10 @@ }, { "name" : "tbl_egress_next_pop_mpls_if_present", - "id" : 54, + "id" : 61, "source_info" : { "filename" : "include/control/next.p4", - "line" : 341, + "line" : 287, "column" : 36, "source_fragment" : "pop_mpls_if_present()" }, @@ -19074,14 +24206,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [131], + "action_ids" : [148], "actions" : ["FabricEgress.egress_next.pop_mpls_if_present"], - "base_default_next" : "node_91", + "base_default_next" : "node_105", "next_tables" : { - "FabricEgress.egress_next.pop_mpls_if_present" : "node_91" + "FabricEgress.egress_next.pop_mpls_if_present" : "node_105" }, "default_entry" : { - "action_id" : 131, + "action_id" : 148, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -19089,10 +24221,10 @@ }, { "name" : "tbl_egress_next_set_mpls", - "id" : 55, + "id" : 62, "source_info" : { "filename" : "include/control/next.p4", - "line" : 343, + "line" : 289, "column" : 12, "source_fragment" : "set_mpls()" }, @@ -19103,27 +24235,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [132], + "action_ids" : [149], "actions" : ["FabricEgress.egress_next.set_mpls"], - "base_default_next" : "node_91", + "base_default_next" : "node_105", "next_tables" : { - "FabricEgress.egress_next.set_mpls" : "node_91" + "FabricEgress.egress_next.set_mpls" : "node_105" }, "default_entry" : { - "action_id" : 132, + "action_id" : 149, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_egress_next_push_vlan", - "id" : 56, + "name" : "tbl_egress_next_push_outer_vlan", + "id" : 63, "source_info" : { "filename" : "include/control/next.p4", - "line" : 349, + "line" : 295, "column" : 12, - "source_fragment" : "push_vlan()" + "source_fragment" : "push_outer_vlan()" }, "key" : [], "match_type" : "exact", @@ -19132,14 +24264,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [133], - "actions" : ["FabricEgress.egress_next.push_vlan"], + "action_ids" : [150], + "actions" : ["FabricEgress.egress_next.push_outer_vlan"], "base_default_next" : "tbl_egress_next_push_inner_vlan", "next_tables" : { - "FabricEgress.egress_next.push_vlan" : "tbl_egress_next_push_inner_vlan" + "FabricEgress.egress_next.push_outer_vlan" : "tbl_egress_next_push_inner_vlan" }, "default_entry" : { - "action_id" : 133, + "action_id" : 150, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -19147,10 +24279,10 @@ }, { "name" : "tbl_egress_next_push_inner_vlan", - "id" : 57, + "id" : 64, "source_info" : { "filename" : "include/control/next.p4", - "line" : 350, + "line" : 296, "column" : 12, "source_fragment" : "push_inner_vlan()" }, @@ -19161,25 +24293,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [135], + "action_ids" : [151], "actions" : ["FabricEgress.egress_next.push_inner_vlan"], - "base_default_next" : "node_101", + "base_default_next" : "node_110", "next_tables" : { - "FabricEgress.egress_next.push_inner_vlan" : "node_101" + "FabricEgress.egress_next.push_inner_vlan" : "node_110" }, "default_entry" : { - "action_id" : 135, + "action_id" : 151, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_27", - "id" : 58, + "name" : "tbl_next299", + "id" : 65, "source_info" : { "filename" : "include/control/next.p4", - "line" : 353, + "line" : 299, "column" : 12, "source_fragment" : "hdr.inner_vlan_tag.setInvalid()" }, @@ -19190,14 +24322,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [143], - "actions" : ["act_29"], + "action_ids" : [162], + "actions" : ["next299"], "base_default_next" : "FabricEgress.egress_next.egress_vlan", "next_tables" : { - "act_29" : "FabricEgress.egress_next.egress_vlan" + "next299" : "FabricEgress.egress_next.egress_vlan" }, "default_entry" : { - "action_id" : 143, + "action_id" : 162, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -19205,10 +24337,10 @@ }, { "name" : "FabricEgress.egress_next.egress_vlan", - "id" : 59, + "id" : 66, "source_info" : { "filename" : "include/control/next.p4", - "line" : 320, + "line" : 265, "column" : 10, "source_fragment" : "egress_vlan" }, @@ -19216,7 +24348,7 @@ { "match_type" : "exact", "name" : "vlan_id", - "target" : ["scalars", "fabric_metadata_t._vlan_id1"], + "target" : ["scalars", "userMetadata._vlan_id9"], "mask" : null }, { @@ -19232,101 +24364,27 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [136, 89], - "actions" : ["FabricEgress.egress_next.pop_vlan", "nop"], - "base_default_next" : null, - "next_tables" : { - "__HIT__" : "tbl_act_28", - "__MISS__" : "tbl_act_29" - }, - "default_entry" : { - "action_id" : 89, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_28", - "id" : 60, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [141], - "actions" : ["act_27"], - "base_default_next" : "node_98", - "next_tables" : { - "act_27" : "node_98" - }, - "default_entry" : { - "action_id" : 141, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_29", - "id" : 61, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [142], - "actions" : ["act_28"], - "base_default_next" : "node_98", - "next_tables" : { - "act_28" : "node_98" - }, - "default_entry" : { - "action_id" : 142, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_egress_next_push_vlan_0", - "id" : 62, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 360, - "column" : 20, - "source_fragment" : "push_vlan()" - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [134], - "actions" : ["FabricEgress.egress_next.push_vlan"], - "base_default_next" : "node_101", + "action_ids" : [152, 153, 154], + "actions" : ["FabricEgress.egress_next.push_vlan", "FabricEgress.egress_next.pop_vlan", "FabricEgress.egress_next.drop"], + "base_default_next" : "node_110", "next_tables" : { - "FabricEgress.egress_next.push_vlan" : "node_101" + "FabricEgress.egress_next.push_vlan" : "node_110", + "FabricEgress.egress_next.pop_vlan" : "node_110", + "FabricEgress.egress_next.drop" : "node_110" }, "default_entry" : { - "action_id" : 134, + "action_id" : 154, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_30", - "id" : 63, + "name" : "tbl_next309", + "id" : 67, "source_info" : { "filename" : "include/control/next.p4", - "line" : 369, + "line" : 309, "column" : 25, "source_fragment" : "=" }, @@ -19337,25 +24395,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [145], - "actions" : ["act_31"], - "base_default_next" : "node_103", + "action_ids" : [164], + "actions" : ["next309"], + "base_default_next" : "node_112", "next_tables" : { - "act_31" : "node_103" + "next309" : "node_112" }, "default_entry" : { - "action_id" : 145, + "action_id" : 164, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_31", - "id" : 64, + "name" : "tbl_next310", + "id" : 68, "source_info" : { "filename" : "include/control/next.p4", - "line" : 370, + "line" : 310, "column" : 35, "source_fragment" : "mark_to_drop(standard_metadata)" }, @@ -19366,25 +24424,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [144], - "actions" : ["act_30"], - "base_default_next" : "tbl_act_36", + "action_ids" : [163], + "actions" : ["next310"], + "base_default_next" : "node_122", "next_tables" : { - "act_30" : "tbl_act_36" + "next310" : "node_122" }, "default_entry" : { - "action_id" : 144, + "action_id" : 163, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_32", - "id" : 65, + "name" : "tbl_next313", + "id" : 69, "source_info" : { "filename" : "include/control/next.p4", - "line" : 373, + "line" : 313, "column" : 29, "source_fragment" : "=" }, @@ -19395,25 +24453,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [147], - "actions" : ["act_33"], - "base_default_next" : "node_107", + "action_ids" : [166], + "actions" : ["next313"], + "base_default_next" : "node_116", "next_tables" : { - "act_33" : "node_107" + "next313" : "node_116" }, "default_entry" : { - "action_id" : 147, + "action_id" : 166, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_33", - "id" : 66, + "name" : "tbl_next314", + "id" : 70, "source_info" : { "filename" : "include/control/next.p4", - "line" : 374, + "line" : 314, "column" : 39, "source_fragment" : "mark_to_drop(standard_metadata)" }, @@ -19424,25 +24482,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [146], - "actions" : ["act_32"], - "base_default_next" : "tbl_act_36", + "action_ids" : [165], + "actions" : ["next314"], + "base_default_next" : "node_122", "next_tables" : { - "act_32" : "tbl_act_36" + "next314" : "node_122" }, "default_entry" : { - "action_id" : 146, + "action_id" : 165, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_34", - "id" : 67, + "name" : "tbl_next318", + "id" : 71, "source_info" : { "filename" : "include/control/next.p4", - "line" : 378, + "line" : 318, "column" : 35, "source_fragment" : "=" }, @@ -19453,25 +24511,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [149], - "actions" : ["act_35"], - "base_default_next" : "node_111", + "action_ids" : [168], + "actions" : ["next318"], + "base_default_next" : "node_120", "next_tables" : { - "act_35" : "node_111" + "next318" : "node_120" }, "default_entry" : { - "action_id" : 149, + "action_id" : 168, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_35", - "id" : 68, + "name" : "tbl_next319", + "id" : 72, "source_info" : { "filename" : "include/control/next.p4", - "line" : 379, + "line" : 319, "column" : 45, "source_fragment" : "mark_to_drop(standard_metadata)" }, @@ -19482,50 +24540,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [148], - "actions" : ["act_34"], - "base_default_next" : "tbl_act_36", - "next_tables" : { - "act_34" : "tbl_act_36" - }, - "default_entry" : { - "action_id" : 148, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_36", - "id" : 69, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [151], - "actions" : ["act_37"], - "base_default_next" : "node_114", + "action_ids" : [167], + "actions" : ["next319"], + "base_default_next" : "node_122", "next_tables" : { - "act_37" : "node_114" + "next319" : "node_122" }, "default_entry" : { - "action_id" : 151, + "action_id" : 167, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_37", - "id" : 70, + "name" : "tbl_spgw_gtpu_encap_qfi", + "id" : 73, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 343, - "column" : 46, - "source_fragment" : "return" + "line" : 371, + "column" : 20, + "source_fragment" : "gtpu_encap_qfi()" }, "key" : [], "match_type" : "exact", @@ -19534,27 +24569,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [150], - "actions" : ["act_36"], - "base_default_next" : "node_116", + "action_ids" : [158], + "actions" : ["FabricEgress.spgw.gtpu_encap_qfi"], + "base_default_next" : "node_127", "next_tables" : { - "act_36" : "node_116" + "FabricEgress.spgw.gtpu_encap_qfi" : "node_127" }, "default_entry" : { - "action_id" : 150, + "action_id" : 158, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_38", - "id" : 71, + "name" : "tbl_spgw_gtpu_encap", + "id" : 74, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 344, - "column" : 8, - "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" + "line" : 373, + "column" : 20, + "source_fragment" : "gtpu_encap()" }, "key" : [], "match_type" : "exact", @@ -19563,27 +24598,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [152], - "actions" : ["act_38"], - "base_default_next" : "node_118", + "action_ids" : [157], + "actions" : ["FabricEgress.spgw.gtpu_encap"], + "base_default_next" : "node_127", "next_tables" : { - "act_38" : "node_118" + "FabricEgress.spgw.gtpu_encap" : "node_127" }, "default_entry" : { - "action_id" : 152, + "action_id" : 157, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_spgw_egress_gtpu_encap", - "id" : 72, + "name" : "tbl_spgw377", + "id" : 75, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 347, - "column" : 12, - "source_fragment" : "gtpu_encap()" + "line" : 377, + "column" : 16, + "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" }, "key" : [], "match_type" : "exact", @@ -19592,14 +24627,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [137], - "actions" : ["FabricEgress.spgw_egress.gtpu_encap"], - "base_default_next" : "node_120", + "action_ids" : [169], + "actions" : ["spgw377"], + "base_default_next" : "node_129", "next_tables" : { - "FabricEgress.spgw_egress.gtpu_encap" : "node_120" + "spgw377" : "node_129" }, "default_entry" : { - "action_id" : 137, + "action_id" : 169, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -19607,7 +24642,7 @@ }, { "name" : "tbl_bng_egress_downstream_encap_v4", - "id" : 73, + "id" : 76, "source_info" : { "filename" : "include/bng.p4", "line" : 297, @@ -19621,14 +24656,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [92], + "action_ids" : [109], "actions" : ["FabricEgress.bng_egress.downstream.encap_v4"], - "base_default_next" : "node_125", + "base_default_next" : "node_134", "next_tables" : { - "FabricEgress.bng_egress.downstream.encap_v4" : "node_125" + "FabricEgress.bng_egress.downstream.encap_v4" : "node_134" }, "default_entry" : { - "action_id" : 92, + "action_id" : 109, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -19636,7 +24671,7 @@ }, { "name" : "tbl_bng_egress_downstream_encap_v6", - "id" : 74, + "id" : 77, "source_info" : { "filename" : "include/bng.p4", "line" : 302, @@ -19650,14 +24685,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [93], + "action_ids" : [110], "actions" : ["FabricEgress.bng_egress.downstream.encap_v6"], - "base_default_next" : "node_125", + "base_default_next" : "node_134", "next_tables" : { - "FabricEgress.bng_egress.downstream.encap_v6" : "node_125" + "FabricEgress.bng_egress.downstream.encap_v6" : "node_134" }, "default_entry" : { - "action_id" : 93, + "action_id" : 110, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -19665,7 +24700,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_source.tb_int_source", - "id" : 75, + "id" : 78, "source_info" : { "filename" : "include/int/int_source.p4", "line" : 66, @@ -19688,13 +24723,13 @@ { "match_type" : "ternary", "name" : "l4_sport", - "target" : ["scalars", "fabric_metadata_t._l4_sport17"], + "target" : ["scalars", "userMetadata._l4_sport25"], "mask" : null }, { "match_type" : "ternary", "name" : "l4_dport", - "target" : ["scalars", "fabric_metadata_t._l4_dport18"], + "target" : ["scalars", "userMetadata._l4_dport26"], "mask" : null } ], @@ -19704,23 +24739,23 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [94, 86], + "action_ids" : [111, 103], "actions" : ["FabricEgress.process_int_main.process_int_source.int_source_dscp", "nop"], - "base_default_next" : "node_128", + "base_default_next" : "node_137", "next_tables" : { - "FabricEgress.process_int_main.process_int_source.int_source_dscp" : "node_128", - "nop" : "node_128" + "FabricEgress.process_int_main.process_int_source.int_source_dscp" : "node_137", + "nop" : "node_137" }, "default_entry" : { - "action_id" : 86, + "action_id" : 103, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_39", - "id" : 76, + "name" : "tbl_act", + "id" : 79, "key" : [], "match_type" : "exact", "type" : "simple", @@ -19728,14 +24763,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [153], - "actions" : ["act_39"], + "action_ids" : [170], + "actions" : ["act"], "base_default_next" : "FabricEgress.process_int_main.process_int_transit.tb_int_insert", "next_tables" : { - "act_39" : "FabricEgress.process_int_main.process_int_transit.tb_int_insert" + "act" : "FabricEgress.process_int_main.process_int_transit.tb_int_insert" }, "default_entry" : { - "action_id" : 153, + "action_id" : 170, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -19743,7 +24778,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.tb_int_insert", - "id" : 77, + "id" : 80, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 315, @@ -19764,23 +24799,23 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [95, 87], + "action_ids" : [112, 104], "actions" : ["FabricEgress.process_int_main.process_int_transit.init_metadata", "nop"], - "base_default_next" : "node_131", + "base_default_next" : "node_140", "next_tables" : { - "FabricEgress.process_int_main.process_int_transit.init_metadata" : "node_131", - "nop" : "node_131" + "FabricEgress.process_int_main.process_int_transit.init_metadata" : "node_140", + "nop" : "node_140" }, "default_entry" : { - "action_id" : 87, + "action_id" : 104, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_40", - "id" : 78, + "name" : "tbl_int_transit420", + "id" : 81, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 420, @@ -19794,14 +24829,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [154], - "actions" : ["act_40"], - "base_default_next" : "node_133", + "action_ids" : [171], + "actions" : ["int_transit420"], + "base_default_next" : "node_142", "next_tables" : { - "act_40" : "node_133" + "int_transit420" : "node_142" }, "default_entry" : { - "action_id" : 154, + "action_id" : 171, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -19809,7 +24844,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0003", - "id" : 79, + "id" : 82, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 331, @@ -19830,7 +24865,7 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 90], + "action_ids" : [113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 107], "actions" : ["FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i0", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i1", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i2", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i3", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i4", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i5", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i6", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i7", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i8", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i9", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i10", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i11", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i12", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i13", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i14", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i15", "NoAction"], "base_default_next" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0407", "next_tables" : { @@ -19853,7 +24888,7 @@ "NoAction" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0407" }, "default_entry" : { - "action_id" : 90, + "action_id" : 107, "action_const" : false, "action_data" : [], "action_entry_const" : false @@ -19873,7 +24908,7 @@ } ], "action_entry" : { - "action_id" : 96, + "action_id" : 113, "action_data" : [] }, "priority" : 1 @@ -19892,7 +24927,7 @@ } ], "action_entry" : { - "action_id" : 97, + "action_id" : 114, "action_data" : [] }, "priority" : 2 @@ -19911,7 +24946,7 @@ } ], "action_entry" : { - "action_id" : 98, + "action_id" : 115, "action_data" : [] }, "priority" : 3 @@ -19930,7 +24965,7 @@ } ], "action_entry" : { - "action_id" : 99, + "action_id" : 116, "action_data" : [] }, "priority" : 4 @@ -19949,7 +24984,7 @@ } ], "action_entry" : { - "action_id" : 100, + "action_id" : 117, "action_data" : [] }, "priority" : 5 @@ -19968,7 +25003,7 @@ } ], "action_entry" : { - "action_id" : 101, + "action_id" : 118, "action_data" : [] }, "priority" : 6 @@ -19987,7 +25022,7 @@ } ], "action_entry" : { - "action_id" : 102, + "action_id" : 119, "action_data" : [] }, "priority" : 7 @@ -20006,7 +25041,7 @@ } ], "action_entry" : { - "action_id" : 103, + "action_id" : 120, "action_data" : [] }, "priority" : 8 @@ -20025,7 +25060,7 @@ } ], "action_entry" : { - "action_id" : 104, + "action_id" : 121, "action_data" : [] }, "priority" : 9 @@ -20044,7 +25079,7 @@ } ], "action_entry" : { - "action_id" : 105, + "action_id" : 122, "action_data" : [] }, "priority" : 10 @@ -20063,7 +25098,7 @@ } ], "action_entry" : { - "action_id" : 106, + "action_id" : 123, "action_data" : [] }, "priority" : 11 @@ -20082,7 +25117,7 @@ } ], "action_entry" : { - "action_id" : 107, + "action_id" : 124, "action_data" : [] }, "priority" : 12 @@ -20101,7 +25136,7 @@ } ], "action_entry" : { - "action_id" : 108, + "action_id" : 125, "action_data" : [] }, "priority" : 13 @@ -20120,7 +25155,7 @@ } ], "action_entry" : { - "action_id" : 109, + "action_id" : 126, "action_data" : [] }, "priority" : 14 @@ -20139,7 +25174,7 @@ } ], "action_entry" : { - "action_id" : 110, + "action_id" : 127, "action_data" : [] }, "priority" : 15 @@ -20158,7 +25193,7 @@ } ], "action_entry" : { - "action_id" : 111, + "action_id" : 128, "action_data" : [] }, "priority" : 16 @@ -20167,7 +25202,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0407", - "id" : 80, + "id" : 83, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 375, @@ -20188,30 +25223,30 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 91], + "action_ids" : [129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 108], "actions" : ["FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15", "NoAction"], - "base_default_next" : "tbl_act_41", + "base_default_next" : "tbl_int_transit425", "next_tables" : { - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14" : "tbl_act_41", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15" : "tbl_act_41", - "NoAction" : "tbl_act_41" + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15" : "tbl_int_transit425", + "NoAction" : "tbl_int_transit425" }, "default_entry" : { - "action_id" : 91, + "action_id" : 108, "action_const" : false, "action_data" : [], "action_entry_const" : false @@ -20231,7 +25266,7 @@ } ], "action_entry" : { - "action_id" : 112, + "action_id" : 129, "action_data" : [] }, "priority" : 1 @@ -20250,7 +25285,7 @@ } ], "action_entry" : { - "action_id" : 113, + "action_id" : 130, "action_data" : [] }, "priority" : 2 @@ -20269,7 +25304,7 @@ } ], "action_entry" : { - "action_id" : 114, + "action_id" : 131, "action_data" : [] }, "priority" : 3 @@ -20288,7 +25323,7 @@ } ], "action_entry" : { - "action_id" : 115, + "action_id" : 132, "action_data" : [] }, "priority" : 4 @@ -20307,7 +25342,7 @@ } ], "action_entry" : { - "action_id" : 116, + "action_id" : 133, "action_data" : [] }, "priority" : 5 @@ -20326,7 +25361,7 @@ } ], "action_entry" : { - "action_id" : 117, + "action_id" : 134, "action_data" : [] }, "priority" : 6 @@ -20345,7 +25380,7 @@ } ], "action_entry" : { - "action_id" : 118, + "action_id" : 135, "action_data" : [] }, "priority" : 7 @@ -20364,7 +25399,7 @@ } ], "action_entry" : { - "action_id" : 119, + "action_id" : 136, "action_data" : [] }, "priority" : 8 @@ -20383,7 +25418,7 @@ } ], "action_entry" : { - "action_id" : 120, + "action_id" : 137, "action_data" : [] }, "priority" : 9 @@ -20402,7 +25437,7 @@ } ], "action_entry" : { - "action_id" : 121, + "action_id" : 138, "action_data" : [] }, "priority" : 10 @@ -20421,7 +25456,7 @@ } ], "action_entry" : { - "action_id" : 122, + "action_id" : 139, "action_data" : [] }, "priority" : 11 @@ -20440,7 +25475,7 @@ } ], "action_entry" : { - "action_id" : 123, + "action_id" : 140, "action_data" : [] }, "priority" : 12 @@ -20459,7 +25494,7 @@ } ], "action_entry" : { - "action_id" : 124, + "action_id" : 141, "action_data" : [] }, "priority" : 13 @@ -20478,7 +25513,7 @@ } ], "action_entry" : { - "action_id" : 125, + "action_id" : 142, "action_data" : [] }, "priority" : 14 @@ -20497,7 +25532,7 @@ } ], "action_entry" : { - "action_id" : 126, + "action_id" : 143, "action_data" : [] }, "priority" : 15 @@ -20516,7 +25551,7 @@ } ], "action_entry" : { - "action_id" : 127, + "action_id" : 144, "action_data" : [] }, "priority" : 16 @@ -20524,8 +25559,8 @@ ] }, { - "name" : "tbl_act_41", - "id" : 81, + "name" : "tbl_int_transit425", + "id" : 84, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 425, @@ -20539,22 +25574,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [156], - "actions" : ["act_42"], - "base_default_next" : "node_137", + "action_ids" : [173], + "actions" : ["int_transit425"], + "base_default_next" : "node_146", "next_tables" : { - "act_42" : "node_137" + "int_transit425" : "node_146" }, "default_entry" : { - "action_id" : 156, + "action_id" : 173, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_42", - "id" : 82, + "name" : "tbl_int_transit428", + "id" : 85, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 428, @@ -20568,22 +25603,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [155], - "actions" : ["act_41"], - "base_default_next" : "node_139", + "action_ids" : [172], + "actions" : ["int_transit428"], + "base_default_next" : "node_148", "next_tables" : { - "act_41" : "node_139" + "int_transit428" : "node_148" }, "default_entry" : { - "action_id" : 155, + "action_id" : 172, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_43", - "id" : 83, + "name" : "tbl_int_transit431", + "id" : 86, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 431, @@ -20597,22 +25632,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [157], - "actions" : ["act_43"], - "base_default_next" : "node_141", + "action_ids" : [174], + "actions" : ["int_transit431"], + "base_default_next" : "node_150", "next_tables" : { - "act_43" : "node_141" + "int_transit431" : "node_150" }, "default_entry" : { - "action_id" : 157, + "action_id" : 174, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_44", - "id" : 84, + "name" : "tbl_int_transit434", + "id" : 87, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 434, @@ -20626,14 +25661,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [158], - "actions" : ["act_44"], - "base_default_next" : "node_143", + "action_ids" : [175], + "actions" : ["int_transit434"], + "base_default_next" : "node_152", "next_tables" : { - "act_44" : "node_143" + "int_transit434" : "node_152" }, "default_entry" : { - "action_id" : 158, + "action_id" : 175, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -20641,7 +25676,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_report.tb_generate_report", - "id" : 85, + "id" : 88, "source_info" : { "filename" : "include/int/int_report.p4", "line" : 87, @@ -20655,15 +25690,15 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [128, 88], + "action_ids" : [145, 105], "actions" : ["FabricEgress.process_int_main.process_int_report.do_report_encapsulation", "nop"], - "base_default_next" : "node_145", + "base_default_next" : "node_154", "next_tables" : { - "FabricEgress.process_int_main.process_int_report.do_report_encapsulation" : "node_145", - "nop" : "node_145" + "FabricEgress.process_int_main.process_int_report.do_report_encapsulation" : "node_154", + "nop" : "node_154" }, "default_entry" : { - "action_id" : 88, + "action_id" : 105, "action_const" : false, "action_data" : [], "action_entry_const" : false @@ -20671,7 +25706,7 @@ }, { "name" : "tbl_process_int_main_process_int_sink_restore_header", - "id" : 86, + "id" : 89, "source_info" : { "filename" : "include/int/int_sink.p4", "line" : 53, @@ -20685,14 +25720,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [129], + "action_ids" : [146], "actions" : ["FabricEgress.process_int_main.process_int_sink.restore_header"], "base_default_next" : "tbl_process_int_main_process_int_sink_int_sink", "next_tables" : { "FabricEgress.process_int_main.process_int_sink.restore_header" : "tbl_process_int_main_process_int_sink_int_sink" }, "default_entry" : { - "action_id" : 129, + "action_id" : 146, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -20700,7 +25735,7 @@ }, { "name" : "tbl_process_int_main_process_int_sink_int_sink", - "id" : 87, + "id" : 90, "source_info" : { "filename" : "include/int/int_sink.p4", "line" : 54, @@ -20714,14 +25749,138 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [130], + "action_ids" : [147], "actions" : ["FabricEgress.process_int_main.process_int_sink.int_sink"], + "base_default_next" : "tbl_slicing126", + "next_tables" : { + "FabricEgress.process_int_main.process_int_sink.int_sink" : "tbl_slicing126" + }, + "default_entry" : { + "action_id" : 147, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing126", + "id" : 91, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 126, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.dscp;" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [178], + "actions" : ["slicing126"], + "base_default_next" : "FabricEgress.dscp_rewriter.rewriter", + "next_tables" : { + "slicing126" : "FabricEgress.dscp_rewriter.rewriter" + }, + "default_entry" : { + "action_id" : 178, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.dscp_rewriter.rewriter", + "id" : 92, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 138, + "column" : 10, + "source_fragment" : "rewriter" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "eg_port", + "target" : ["standard_metadata", "egress_port"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 512, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [155, 156, 106], + "actions" : ["FabricEgress.dscp_rewriter.rewrite", "FabricEgress.dscp_rewriter.clear", "nop"], + "base_default_next" : null, + "next_tables" : { + "__MISS__" : null, + "__HIT__" : "node_159" + }, + "default_entry" : { + "action_id" : 106, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing155", + "id" : 93, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 155, + "column" : 30, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [176], + "actions" : ["slicing155"], + "base_default_next" : null, + "next_tables" : { + "slicing155" : null + }, + "default_entry" : { + "action_id" : 176, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing159", + "id" : 94, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 159, + "column" : 36, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [177], + "actions" : ["slicing159"], "base_default_next" : null, "next_tables" : { - "FabricEgress.process_int_main.process_int_sink.int_sink" : null + "slicing159" : null }, "default_entry" : { - "action_id" : 130, + "action_id" : 177, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -20731,41 +25890,31 @@ "action_profiles" : [], "conditionals" : [ { - "name" : "node_81", - "id" : 26, + "name" : "node_95", + "id" : 33, "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 39, - "column" : 12, - "source_fragment" : "fabric_metadata.is_controller_packet_out == true" + "filename" : "fabric.p4", + "line" : 118, + "column" : 33, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_controller_packet_out15"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._is_controller_packet_out23"] } } }, - "true_next" : "tbl_act_24", - "false_next" : "node_83" + "true_next" : "tbl_packetio41", + "false_next" : "node_97" }, { - "name" : "node_83", - "id" : 27, + "name" : "node_97", + "id" : 34, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 43, @@ -20786,15 +25935,15 @@ } } }, - "true_next" : "tbl_act_25", - "false_next" : "node_85" + "true_next" : "tbl_packetio44", + "false_next" : "node_99" }, { - "name" : "node_85", - "id" : 28, + "name" : "node_99", + "id" : 35, "source_info" : { "filename" : "include/control/next.p4", - "line" : 335, + "line" : 281, "column" : 12, "source_fragment" : "fabric_metadata.is_multicast == true ..." }, @@ -20805,21 +25954,11 @@ "left" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_multicast14"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._is_multicast22"] } } }, @@ -20839,153 +25978,87 @@ } } }, - "true_next" : "tbl_act_26", - "false_next" : "node_87" - }, - { - "name" : "node_87", - "id" : 29, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 340, - "column" : 12, - "source_fragment" : "fabric_metadata.mpls_label == 0" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "==", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label8"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x000000" - } - } - }, - "true_next" : "node_88", - "false_next" : "tbl_egress_next_set_mpls" - }, - { - "name" : "node_88", - "id" : 30, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 341, - "column" : 16, - "source_fragment" : "hdr.mpls.isValid()" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["mpls", "$valid$"] - } - } - }, - "true_next" : "tbl_egress_next_pop_mpls_if_present", - "false_next" : "node_91" + "true_next" : "tbl_next283", + "false_next" : "node_101" }, { - "name" : "node_91", - "id" : 31, + "name" : "node_101", + "id" : 36, "source_info" : { "filename" : "include/control/next.p4", - "line" : 347, + "line" : 286, "column" : 12, - "source_fragment" : "fabric_metadata.push_double_vlan == true" + "source_fragment" : "fabric_metadata.mpls_label == 0" }, "expression" : { "type" : "expression", "value" : { "op" : "==", "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._push_double_vlan4"] - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label16"] }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0x000000" } } }, - "true_next" : "tbl_egress_next_push_vlan", - "false_next" : "tbl_act_27" + "true_next" : "node_102", + "false_next" : "tbl_egress_next_set_mpls" }, { - "name" : "node_98", - "id" : 32, + "name" : "node_102", + "id" : 37, "source_info" : { "filename" : "include/control/next.p4", - "line" : 357, + "line" : 287, "column" : 16, - "source_fragment" : "!egress_vlan.apply().hit" + "source_fragment" : "hdr.mpls.isValid()" }, "expression" : { "type" : "expression", "value" : { - "op" : "not", + "op" : "d2b", "left" : null, "right" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - } - } + "type" : "field", + "value" : ["mpls", "$valid$"] } } }, - "true_next" : "node_99", - "false_next" : "node_101" + "true_next" : "tbl_egress_next_pop_mpls_if_present", + "false_next" : "node_105" }, { - "name" : "node_99", - "id" : 33, + "name" : "node_105", + "id" : 38, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 359, - "column" : 20, - "source_fragment" : "fabric_metadata.vlan_id != DEFAULT_VLAN_ID" + "filename" : "fabric.p4", + "line" : 119, + "column" : 31, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", "value" : { - "op" : "!=", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "hexstr", - "value" : "0x0ffe" + "type" : "field", + "value" : ["scalars", "userMetadata._push_double_vlan12"] } } }, - "true_next" : "tbl_egress_next_push_vlan_0", - "false_next" : "node_101" + "true_next" : "tbl_egress_next_push_outer_vlan", + "false_next" : "tbl_next299" }, { - "name" : "node_101", - "id" : 34, + "name" : "node_110", + "id" : 39, "source_info" : { "filename" : "include/control/next.p4", - "line" : 368, + "line" : 308, "column" : 12, "source_fragment" : "hdr.mpls.isValid()" }, @@ -21000,15 +26073,15 @@ } } }, - "true_next" : "tbl_act_30", - "false_next" : "node_105" + "true_next" : "tbl_next309", + "false_next" : "node_114" }, { - "name" : "node_103", - "id" : 35, + "name" : "node_112", + "id" : 40, "source_info" : { "filename" : "include/control/next.p4", - "line" : 370, + "line" : 310, "column" : 16, "source_fragment" : "hdr.mpls.ttl == 0" }, @@ -21026,15 +26099,15 @@ } } }, - "true_next" : "tbl_act_31", - "false_next" : "tbl_act_36" + "true_next" : "tbl_next310", + "false_next" : "node_122" }, { - "name" : "node_105", - "id" : 36, + "name" : "node_114", + "id" : 41, "source_info" : { "filename" : "include/control/next.p4", - "line" : 372, + "line" : 312, "column" : 15, "source_fragment" : "hdr.ipv4.isValid() && fabric_metadata.fwd_type != FWD_BRIDGING" }, @@ -21059,7 +26132,7 @@ "op" : "!=", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type12"] + "value" : ["scalars", "userMetadata._fwd_type20"] }, "right" : { "type" : "hexstr", @@ -21069,15 +26142,15 @@ } } }, - "true_next" : "tbl_act_32", - "false_next" : "node_109" + "true_next" : "tbl_next313", + "false_next" : "node_118" }, { - "name" : "node_107", - "id" : 37, + "name" : "node_116", + "id" : 42, "source_info" : { "filename" : "include/control/next.p4", - "line" : 374, + "line" : 314, "column" : 20, "source_fragment" : "hdr.ipv4.ttl == 0" }, @@ -21095,15 +26168,15 @@ } } }, - "true_next" : "tbl_act_33", - "false_next" : "tbl_act_36" + "true_next" : "tbl_next314", + "false_next" : "node_122" }, { - "name" : "node_109", - "id" : 38, + "name" : "node_118", + "id" : 43, "source_info" : { "filename" : "include/control/next.p4", - "line" : 377, + "line" : 317, "column" : 21, "source_fragment" : "hdr.ipv6.isValid() && fabric_metadata.fwd_type != FWD_BRIDGING" }, @@ -21128,7 +26201,7 @@ "op" : "!=", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type12"] + "value" : ["scalars", "userMetadata._fwd_type20"] }, "right" : { "type" : "hexstr", @@ -21138,15 +26211,15 @@ } } }, - "true_next" : "tbl_act_34", - "false_next" : "tbl_act_36" + "true_next" : "tbl_next318", + "false_next" : "node_122" }, { - "name" : "node_111", - "id" : 39, + "name" : "node_120", + "id" : 44, "source_info" : { "filename" : "include/control/next.p4", - "line" : 379, + "line" : 319, "column" : 20, "source_fragment" : "hdr.ipv6.hop_limit == 0" }, @@ -21164,102 +26237,118 @@ } } }, - "true_next" : "tbl_act_35", - "false_next" : "tbl_act_36" + "true_next" : "tbl_next319", + "false_next" : "node_122" }, { - "name" : "node_114", - "id" : 40, + "name" : "node_122", + "id" : 45, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 343, + "line" : 368, "column" : 12, - "source_fragment" : "fabric_md.spgw.skip_spgw == true" + "source_fragment" : "fabric_md.spgw.skip_spgw" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_skip_spgw32"] + "value" : ["scalars", "userMetadata._spgw_skip_spgw44"] } } - }, + } + } + }, + "true_next" : "node_123", + "false_next" : "node_129" + }, + { + "name" : "node_123", + "id" : 46, + "source_info" : { + "filename" : "fabric.p4", + "line" : 121, + "column" : 24, + "source_fragment" : "fabric_metadata" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_encap46"] } } }, - "true_next" : "tbl_act_37", - "false_next" : "node_116" + "true_next" : "node_124", + "false_next" : "node_127" }, { - "name" : "node_116", - "id" : 41, + "name" : "node_124", + "id" : 47, + "source_info" : { + "filename" : "fabric.p4", + "line" : 121, + "column" : 24, + "source_fragment" : "fabric_metadata" + }, "expression" : { "type" : "expression", "value" : { - "op" : "not", + "op" : "d2b", "left" : null, "right" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "spgw_egress_hasReturned"] - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_qfi_push49"] } } }, - "true_next" : "tbl_act_38", - "false_next" : "node_120" + "true_next" : "tbl_spgw_gtpu_encap_qfi", + "false_next" : "tbl_spgw_gtpu_encap" }, { - "name" : "node_118", - "id" : 42, + "name" : "node_127", + "id" : 48, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 346, - "column" : 12, - "source_fragment" : "fabric_md.spgw.needs_gtpu_encap == true" + "line" : 376, + "column" : 16, + "source_fragment" : "fabric_md.spgw.skip_egress_pdr_ctr" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_encap36"] + "value" : ["scalars", "userMetadata._spgw_skip_egress_pdr_ctr48"] } } - }, - "right" : { - "type" : "bool", - "value" : true } } }, - "true_next" : "tbl_spgw_egress_gtpu_encap", - "false_next" : "node_120" + "true_next" : "tbl_spgw377", + "false_next" : "node_129" }, { - "name" : "node_120", - "id" : 43, + "name" : "node_129", + "id" : 49, "source_info" : { "filename" : "include/bng.p4", "line" : 358, @@ -21272,7 +26361,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._bng_type38"] + "value" : ["scalars", "userMetadata._bng_type50"] }, "right" : { "type" : "hexstr", @@ -21280,12 +26369,12 @@ } } }, - "true_next" : "node_121", - "false_next" : "node_125" + "true_next" : "node_130", + "false_next" : "node_134" }, { - "name" : "node_121", - "id" : 44, + "name" : "node_130", + "id" : 50, "source_info" : { "filename" : "include/bng.p4", "line" : 296, @@ -21304,11 +26393,11 @@ } }, "true_next" : "tbl_bng_egress_downstream_encap_v4", - "false_next" : "node_123" + "false_next" : "node_132" }, { - "name" : "node_123", - "id" : 45, + "name" : "node_132", + "id" : 51, "source_info" : { "filename" : "include/bng.p4", "line" : 301, @@ -21327,11 +26416,11 @@ } }, "true_next" : "tbl_bng_egress_downstream_encap_v6", - "false_next" : "node_125" + "false_next" : "node_134" }, { - "name" : "node_125", - "id" : 46, + "name" : "node_134", + "id" : 52, "source_info" : { "filename" : "include/int/int_main.p4", "line" : 102, @@ -21406,45 +26495,35 @@ } } }, - "false_next" : null, - "true_next" : "node_126" + "true_next" : "node_135", + "false_next" : "tbl_slicing126" }, { - "name" : "node_126", - "id" : 47, + "name" : "node_135", + "id" : 53, "source_info" : { - "filename" : "include/int/int_main.p4", - "line" : 106, - "column" : 16, - "source_fragment" : "fabric_metadata.int_meta.source == true" + "filename" : "fabric.p4", + "line" : 127, + "column" : 36, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_source44"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_source56"] } } }, "true_next" : "FabricEgress.process_int_main.process_int_source.tb_int_source", - "false_next" : "node_128" + "false_next" : "node_137" }, { - "name" : "node_128", - "id" : 48, + "name" : "node_137", + "id" : 54, "source_info" : { "filename" : "include/int/int_main.p4", "line" : 110, @@ -21462,45 +26541,42 @@ } } }, - "false_next" : null, - "true_next" : "tbl_act_39" + "true_next" : "tbl_act", + "false_next" : "tbl_slicing126" }, { - "name" : "node_131", - "id" : 49, + "name" : "node_140", + "id" : 55, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 419, "column" : 12, - "source_fragment" : "fmeta.int_meta.transit == false" + "source_fragment" : "fmeta.int_meta.transit" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_transit45"] + "value" : ["scalars", "userMetadata._int_meta_transit57"] } } - }, - "right" : { - "type" : "bool", - "value" : false } } }, - "true_next" : "tbl_act_40", - "false_next" : "node_133" + "true_next" : "tbl_int_transit420", + "false_next" : "node_142" }, { - "name" : "node_133", - "id" : 50, + "name" : "node_142", + "id" : 56, "expression" : { "type" : "expression", "value" : { @@ -21520,11 +26596,11 @@ } }, "true_next" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0003", - "false_next" : "node_143" + "false_next" : "node_152" }, { - "name" : "node_137", - "id" : 51, + "name" : "node_146", + "id" : 57, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 427, @@ -21542,12 +26618,12 @@ } } }, - "true_next" : "tbl_act_42", - "false_next" : "node_139" + "true_next" : "tbl_int_transit428", + "false_next" : "node_148" }, { - "name" : "node_139", - "id" : 52, + "name" : "node_148", + "id" : 58, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 430, @@ -21565,12 +26641,12 @@ } } }, - "true_next" : "tbl_act_43", - "false_next" : "node_141" + "true_next" : "tbl_int_transit431", + "false_next" : "node_150" }, { - "name" : "node_141", - "id" : 53, + "name" : "node_150", + "id" : 59, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 433, @@ -21588,12 +26664,12 @@ } } }, - "true_next" : "tbl_act_44", - "false_next" : "node_143" + "true_next" : "tbl_int_transit434", + "false_next" : "node_152" }, { - "name" : "node_143", - "id" : 54, + "name" : "node_152", + "id" : 60, "source_info" : { "filename" : "include/int/int_main.p4", "line" : 115, @@ -21615,40 +26691,76 @@ } }, "true_next" : "FabricEgress.process_int_main.process_int_report.tb_generate_report", - "false_next" : "node_145" + "false_next" : "node_154" }, { - "name" : "node_145", - "id" : 55, + "name" : "node_154", + "id" : 61, "source_info" : { - "filename" : "include/int/int_main.p4", - "line" : 119, - "column" : 20, - "source_fragment" : "fabric_metadata.int_meta.sink == true" + "filename" : "fabric.p4", + "line" : 127, + "column" : 36, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_sink46"] - } - } - }, + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_sink58"] + } + } + }, + "true_next" : "tbl_process_int_main_process_int_sink_restore_header", + "false_next" : "tbl_slicing126" + }, + { + "name" : "node_159", + "id" : 62, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 154, + "column" : 16, + "source_fragment" : "hdr.gtpu_ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["gtpu_ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_slicing155", + "false_next" : "node_161" + }, + { + "name" : "node_161", + "id" : 63, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 158, + "column" : 16, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["ipv4", "$valid$"] } } }, "false_next" : null, - "true_next" : "tbl_process_int_main_process_int_sink_restore_header" + "true_next" : "tbl_slicing159" } ] } @@ -21685,7 +26797,7 @@ "id" : 1, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 362, + "line" : 393, "column" : 8, "source_fragment" : "update_checksum(gtpu_ipv4.isValid(), ..." }, @@ -21760,26 +26872,14 @@ "intrinsic_metadata.egress_global_timestamp", ["standard_metadata", "egress_global_timestamp"] ], - [ - "intrinsic_metadata.lf_field_list", - ["standard_metadata", "lf_field_list"] - ], [ "intrinsic_metadata.mcast_grp", ["standard_metadata", "mcast_grp"] ], - [ - "intrinsic_metadata.resubmit_flag", - ["standard_metadata", "resubmit_flag"] - ], [ "intrinsic_metadata.egress_rid", ["standard_metadata", "egress_rid"] ], - [ - "intrinsic_metadata.recirculate_flag", - ["standard_metadata", "recirculate_flag"] - ], [ "intrinsic_metadata.priority", ["standard_metadata", "priority"] @@ -21787,7 +26887,7 @@ ], "program" : "fabric.p4", "__meta__" : { - "version" : [2, 18], + "version" : [2, 23], "compiler" : "https://github.com/p4lang/p4c" } } \ No newline at end of file diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/p4info.txt b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/p4info.txt index 1d379f5595a..f38c9347a7e 100644 --- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/p4info.txt +++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-full/bmv2/default/p4info.txt @@ -3,7 +3,7 @@ pkg_info { } tables { preamble { - id: 33581620 + id: 44526132 name: "FabricIngress.process_set_source_sink.tb_set_source" alias: "tb_set_source" } @@ -14,20 +14,20 @@ tables { match_type: EXACT } action_refs { - id: 16778827 + id: 21235275 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318787614 + const_default_action_id: 28485346 + direct_resource_ids: 318984222 size: 511 } tables { preamble { - id: 33561619 + id: 35265555 name: "FabricIngress.process_set_source_sink.tb_set_sink" alias: "tb_set_sink" } @@ -38,20 +38,20 @@ tables { match_type: EXACT } action_refs { - id: 16788951 + id: 25570775 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318770551 + const_default_action_id: 28485346 + direct_resource_ids: 324013431 size: 511 } tables { preamble { - id: 33603300 + id: 34520804 name: "FabricIngress.bng_ingress.upstream.t_pppoe_cp" alias: "t_pppoe_cp" } @@ -68,19 +68,19 @@ tables { match_type: TERNARY } action_refs { - id: 16830893 + id: 19321261 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 + const_default_action_id: 28485346 size: 16 } tables { preamble { - id: 33595047 + id: 48668327 name: "FabricIngress.bng_ingress.upstream.t_pppoe_term_v4" alias: "t_pppoe_term_v4" } @@ -103,19 +103,19 @@ tables { match_type: EXACT } action_refs { - id: 16780562 + id: 32574738 } action_refs { - id: 16785853 + id: 27468221 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16785853 + const_default_action_id: 27468221 size: 32768 } tables { preamble { - id: 33579386 + id: 38756730 name: "FabricIngress.bng_ingress.upstream.t_pppoe_term_v6" alias: "t_pppoe_term_v6" } @@ -138,19 +138,19 @@ tables { match_type: EXACT } action_refs { - id: 16824882 + id: 25279026 } action_refs { - id: 16785853 + id: 27468221 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16785853 + const_default_action_id: 27468221 size: 32768 } tables { preamble { - id: 33594775 + id: 43294103 name: "FabricIngress.bng_ingress.downstream.t_line_session_map" alias: "t_line_session_map" } @@ -161,22 +161,22 @@ tables { match_type: EXACT } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } action_refs { - id: 16795395 + id: 29640451 } action_refs { - id: 16822844 + id: 32944700 } - const_default_action_id: 16819938 + const_default_action_id: 28485346 size: 8192 } tables { preamble { - id: 33602462 + id: 37862302 name: "FabricIngress.bng_ingress.downstream.t_qos_v4" alias: "t_qos_v4" } @@ -205,17 +205,17 @@ tables { match_type: TERNARY } action_refs { - id: 16830304 + id: 21221216 } action_refs { - id: 16804676 + id: 27355972 } - const_default_action_id: 16804676 + const_default_action_id: 27355972 size: 256 } tables { preamble { - id: 33616597 + id: 48034517 name: "FabricIngress.bng_ingress.downstream.t_qos_v6" alias: "t_qos_v6" } @@ -238,17 +238,17 @@ tables { match_type: TERNARY } action_refs { - id: 16830304 + id: 21221216 } action_refs { - id: 16804676 + id: 27355972 } - const_default_action_id: 16804676 + const_default_action_id: 27355972 size: 256 } tables { preamble { - id: 33592041 + id: 39686889 name: "FabricIngress.bng_ingress.t_line_map" alias: "t_line_map" } @@ -265,14 +265,14 @@ tables { match_type: EXACT } action_refs { - id: 16829385 + id: 29084617 } - const_default_action_id: 16829385 + const_default_action_id: 29084617 size: 8192 } tables { preamble { - id: 33611649 + id: 43310977 name: "FabricIngress.filtering.ingress_port_vlan" alias: "ingress_port_vlan" } @@ -301,21 +301,21 @@ tables { match_type: TERNARY } action_refs { - id: 16836487 + id: 17164167 } action_refs { - id: 16818236 + id: 24158268 } action_refs { - id: 16794911 + id: 24266015 } - const_default_action_id: 16836487 - direct_resource_ids: 318815501 + const_default_action_id: 17164167 + direct_resource_ids: 326221069 size: 8192 } tables { preamble { - id: 33596298 + id: 49718154 name: "FabricIngress.filtering.fwd_classifier" alias: "fwd_classifier" } @@ -344,15 +344,15 @@ tables { match_type: EXACT } action_refs { - id: 16840921 + id: 25032921 } - const_default_action_id: 16840921 - direct_resource_ids: 318827326 + const_default_action_id: 25032921 + direct_resource_ids: 335473470 size: 1024 } tables { preamble { - id: 33596749 + id: 43623757 name: "FabricIngress.forwarding.bridging" alias: "bridging" } @@ -369,20 +369,20 @@ tables { match_type: TERNARY } action_refs { - id: 16811012 + id: 21791748 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318770289 + const_default_action_id: 28485346 + direct_resource_ids: 330959985 size: 1024 } tables { preamble { - id: 33574274 + id: 37768578 name: "FabricIngress.forwarding.mpls" alias: "mpls" } @@ -393,20 +393,20 @@ tables { match_type: EXACT } action_refs { - id: 16827758 + id: 30066030 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318830507 + const_default_action_id: 28485346 + direct_resource_ids: 318961579 size: 1024 } tables { preamble { - id: 33562650 + id: 41754650 name: "FabricIngress.forwarding.routing_v4" alias: "routing_v4" } @@ -417,13 +417,13 @@ tables { match_type: LPM } action_refs { - id: 16777434 + id: 19792090 } action_refs { - id: 16804187 + id: 29124955 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } @@ -431,7 +431,7 @@ tables { } tables { preamble { - id: 33614081 + id: 49342721 name: "FabricIngress.forwarding.routing_v6" alias: "routing_v6" } @@ -442,20 +442,71 @@ tables { match_type: LPM } action_refs { - id: 16809751 + id: 21856023 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318799210 + const_default_action_id: 28485346 + direct_resource_ids: 324042090 size: 1024 } tables { preamble { - id: 33618978 + id: 36626242 + name: "FabricIngress.pre_next.next_mpls" + alias: "next_mpls" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 22765924 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 330020245 + size: 1024 +} +tables { + preamble { + id: 48011802 + name: "FabricIngress.pre_next.next_vlan" + alias: "next_vlan" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 33475378 + } + action_refs { + id: 26738842 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 333692067 + size: 1024 +} +tables { + preamble { + id: 44104738 name: "FabricIngress.acl.acl" alias: "acl" } @@ -467,119 +518,98 @@ tables { } match_fields { id: 2 - name: "ip_proto" - bitwidth: 8 + name: "eth_dst" + bitwidth: 48 match_type: TERNARY } match_fields { id: 3 - name: "l4_sport" - bitwidth: 16 + name: "eth_src" + bitwidth: 48 match_type: TERNARY } match_fields { id: 4 - name: "l4_dport" - bitwidth: 16 + name: "vlan_id" + bitwidth: 12 match_type: TERNARY } match_fields { id: 5 - name: "eth_dst" - bitwidth: 48 + name: "eth_type" + bitwidth: 16 match_type: TERNARY } match_fields { id: 6 - name: "eth_src" - bitwidth: 48 + name: "ipv4_src" + bitwidth: 32 match_type: TERNARY } match_fields { id: 7 - name: "vlan_id" - bitwidth: 12 + name: "ipv4_dst" + bitwidth: 32 match_type: TERNARY } match_fields { id: 8 - name: "eth_type" - bitwidth: 16 + name: "ip_proto" + bitwidth: 8 match_type: TERNARY } match_fields { id: 9 - name: "ipv4_src" - bitwidth: 32 + name: "icmp_type" + bitwidth: 8 match_type: TERNARY } match_fields { id: 10 - name: "ipv4_dst" - bitwidth: 32 + name: "icmp_code" + bitwidth: 8 match_type: TERNARY } match_fields { id: 11 - name: "icmp_type" - bitwidth: 8 + name: "l4_sport" + bitwidth: 16 match_type: TERNARY } match_fields { id: 12 - name: "icmp_code" - bitwidth: 8 + name: "l4_dport" + bitwidth: 16 match_type: TERNARY } - action_refs { - id: 16807382 + match_fields { + id: 13 + name: "port_type" + bitwidth: 2 + match_type: TERNARY } action_refs { - id: 16829684 + id: 23623126 } action_refs { - id: 16781601 + id: 23579892 } action_refs { - id: 16820765 + id: 16912673 } action_refs { - id: 16827694 - } - const_default_action_id: 16827694 - direct_resource_ids: 318801025 - size: 1024 -} -tables { - preamble { - id: 33599709 - name: "FabricIngress.next.next_vlan" - alias: "next_vlan" - } - match_fields { - id: 1 - name: "next_id" - bitwidth: 32 - match_type: EXACT - } - action_refs { - id: 16790685 + id: 23570973 } action_refs { - id: 16803337 + id: 29607214 } - action_refs { - id: 16819938 - annotations: "@defaultonly" - scope: DEFAULT_ONLY - } - const_default_action_id: 16819938 - direct_resource_ids: 318768144 + const_default_action_id: 29607214 + direct_resource_ids: 319194241 size: 1024 } tables { preamble { - id: 33596977 + id: 48735793 name: "FabricIngress.next.xconnect" alias: "xconnect" } @@ -596,23 +626,23 @@ tables { match_type: EXACT } action_refs { - id: 16842190 + id: 24640974 } action_refs { - id: 16837052 + id: 30599612 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318778156 + const_default_action_id: 28485346 + direct_resource_ids: 321989420 size: 1024 } tables { preamble { - id: 33571723 + id: 39142283 name: "FabricIngress.next.simple" alias: "simple" } @@ -623,26 +653,23 @@ tables { match_type: EXACT } action_refs { - id: 16802668 + id: 19358572 } action_refs { - id: 16814145 + id: 31887425 } action_refs { - id: 16783036 - } - action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318769096 + const_default_action_id: 28485346 + direct_resource_ids: 326633416 size: 1024 } tables { preamble { - id: 33608588 + id: 47960972 name: "FabricIngress.next.hashed" alias: "hashed" } @@ -653,27 +680,24 @@ tables { match_type: EXACT } action_refs { - id: 16815357 - } - action_refs { - id: 16791402 + id: 27301117 } action_refs { - id: 16779255 + id: 20985706 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - implementation_id: 285217164 - direct_resource_ids: 318800532 + const_default_action_id: 28485346 + implementation_id: 291115404 + direct_resource_ids: 322798228 size: 1024 } tables { preamble { - id: 33606828 + id: 40619180 name: "FabricIngress.next.multicast" alias: "multicast" } @@ -684,22 +708,108 @@ tables { match_type: EXACT } action_refs { - id: 16779917 + id: 21629581 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318801752 + const_default_action_id: 28485346 + direct_resource_ids: 319194968 size: 1024 } tables { preamble { - id: 33584493 - name: "FabricIngress.spgw_ingress.interface_lookup" - alias: "interface_lookup" + id: 34606298 + name: "FabricIngress.slice_tc_classifier.classifier" + alias: "classifier" + } + match_fields { + id: 1 + name: "ig_port" + bitwidth: 9 + match_type: TERNARY + } + match_fields { + id: 2 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 3 + name: "ipv4_dst" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 4 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 5 + name: "l4_sport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 6 + name: "l4_dport" + bitwidth: 16 + match_type: TERNARY + } + action_refs { + id: 23786376 + } + action_refs { + id: 25983516 + } + const_default_action_id: 23786376 + direct_resource_ids: 334706097 + size: 512 +} +tables { + preamble { + id: 36435258 + name: "FabricIngress.qos.queues" + alias: "queues" + } + match_fields { + id: 1 + name: "slice_id" + bitwidth: 4 + match_type: EXACT + } + match_fields { + id: 2 + name: "tc" + bitwidth: 2 + match_type: EXACT + } + match_fields { + id: 3 + name: "color" + bitwidth: 2 + match_type: TERNARY + } + action_refs { + id: 32116918 + } + action_refs { + id: 28214351 + } + const_default_action_id: 32116918 + direct_resource_ids: 327743278 + size: 128 +} +tables { + preamble { + id: 36113154 + name: "FabricIngress.spgw.interfaces" + alias: "interfaces" } match_fields { id: 1 @@ -714,16 +824,21 @@ tables { match_type: EXACT } action_refs { - id: 16797935 + id: 18186268 } - const_default_action_id: 16797935 + action_refs { + id: 29103810 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 29103810 size: 128 } tables { preamble { - id: 33586958 - name: "FabricIngress.spgw_ingress.downlink_pdr_lookup" - alias: "downlink_pdr_lookup" + id: 47394697 + name: "FabricIngress.spgw.downlink_pdrs" + alias: "downlink_pdrs" } match_fields { id: 1 @@ -732,16 +847,23 @@ tables { match_type: EXACT } action_refs { - id: 16799934 + id: 18504550 + } + action_refs { + id: 25764352 + } + action_refs { + id: 21257015 + annotations: "@defaultonly" + scope: DEFAULT_ONLY } - const_default_action_id: 16799934 size: 1024 } tables { preamble { - id: 33587070 - name: "FabricIngress.spgw_ingress.uplink_pdr_lookup" - alias: "uplink_pdr_lookup" + id: 46648074 + name: "FabricIngress.spgw.uplink_pdrs" + alias: "uplink_pdrs" } match_fields { id: 1 @@ -755,17 +877,36 @@ tables { bitwidth: 32 match_type: EXACT } + match_fields { + id: 3 + name: "has_qfi" + bitwidth: 1 + match_type: EXACT + } + match_fields { + id: 4 + name: "qfi" + bitwidth: 6 + match_type: EXACT + } action_refs { - id: 16799934 + id: 18504550 + } + action_refs { + id: 25764352 + } + action_refs { + id: 21257015 + annotations: "@defaultonly" + scope: DEFAULT_ONLY } - const_default_action_id: 16799934 size: 1024 } tables { preamble { - id: 33613200 - name: "FabricIngress.spgw_ingress.far_lookup" - alias: "far_lookup" + id: 47558728 + name: "FabricIngress.spgw.fars" + alias: "fars" } match_fields { id: 1 @@ -774,17 +915,20 @@ tables { match_type: EXACT } action_refs { - id: 16834935 + id: 24881235 + } + action_refs { + id: 29659841 } action_refs { - id: 16787606 + id: 30642777 } - const_default_action_id: 16834935 + const_default_action_id: 24881235 size: 2048 } tables { preamble { - id: 33612258 + id: 44818914 name: "FabricEgress.process_int_main.process_int_source.tb_int_source" alias: "tb_int_source" } @@ -813,20 +957,20 @@ tables { match_type: TERNARY } action_refs { - id: 16785857 + id: 20062657 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318800047 + const_default_action_id: 28485346 + direct_resource_ids: 322470063 size: 1024 } tables { preamble { - id: 33599867 + id: 34910587 name: "FabricEgress.process_int_main.process_int_transit.tb_int_insert" alias: "tb_int_insert" } @@ -837,27 +981,27 @@ tables { match_type: EXACT } action_refs { - id: 16780783 + id: 29232623 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 + const_default_action_id: 28485346 size: 1 } tables { preamble { - id: 33618104 + id: 48232632 name: "FabricEgress.process_int_main.process_int_report.tb_generate_report" alias: "tb_generate_report" } action_refs { - id: 16788620 + id: 19999884 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } @@ -865,7 +1009,7 @@ tables { } tables { preamble { - id: 33599342 + id: 49262446 name: "FabricEgress.egress_next.egress_vlan" alias: "egress_vlan" } @@ -882,69 +1026,106 @@ tables { match_type: EXACT } action_refs { - id: 16790030 + id: 30307755 } action_refs { - id: 16819938 + id: 17183246 + } + action_refs { + id: 30812542 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318827144 + const_default_action_id: 30812542 + direct_resource_ids: 318892680 size: 1024 } +tables { + preamble { + id: 49970092 + name: "FabricEgress.dscp_rewriter.rewriter" + alias: "rewriter" + } + match_fields { + id: 1 + name: "eg_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 27951287 + } + action_refs { + id: 24120545 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + size: 512 +} actions { preamble { - id: 16819938 + id: 28485346 name: "nop" alias: "nop" } } actions { preamble { - id: 16778827 + id: 21257015 + name: "NoAction" + alias: "NoAction" + annotations: "@noWarn(\"unused\")" + } +} +actions { + preamble { + id: 21235275 name: "FabricIngress.process_set_source_sink.int_set_source" alias: "int_set_source" } } actions { preamble { - id: 16788951 + id: 25570775 name: "FabricIngress.process_set_source_sink.int_set_sink" alias: "int_set_sink" } } actions { preamble { - id: 16830893 + id: 19321261 name: "FabricIngress.bng_ingress.upstream.punt_to_cpu" alias: "upstream.punt_to_cpu" } } actions { preamble { - id: 16785853 + id: 27468221 name: "FabricIngress.bng_ingress.upstream.term_disabled" alias: "term_disabled" } } actions { preamble { - id: 16780562 + id: 32574738 name: "FabricIngress.bng_ingress.upstream.term_enabled_v4" alias: "term_enabled_v4" } } actions { preamble { - id: 16824882 + id: 25279026 name: "FabricIngress.bng_ingress.upstream.term_enabled_v6" alias: "term_enabled_v6" } } actions { preamble { - id: 16795395 + id: 29640451 name: "FabricIngress.bng_ingress.downstream.set_session" alias: "set_session" } @@ -956,28 +1137,28 @@ actions { } actions { preamble { - id: 16822844 + id: 32944700 name: "FabricIngress.bng_ingress.downstream.drop" alias: "downstream.drop" } } actions { preamble { - id: 16830304 + id: 21221216 name: "FabricIngress.bng_ingress.downstream.qos_prio" alias: "qos_prio" } } actions { preamble { - id: 16804676 + id: 27355972 name: "FabricIngress.bng_ingress.downstream.qos_besteff" alias: "qos_besteff" } } actions { preamble { - id: 16829385 + id: 29084617 name: "FabricIngress.bng_ingress.set_line" alias: "set_line" } @@ -989,21 +1170,26 @@ actions { } actions { preamble { - id: 16836487 + id: 17164167 name: "FabricIngress.filtering.deny" alias: "deny" } } actions { preamble { - id: 16818236 + id: 24158268 name: "FabricIngress.filtering.permit" alias: "permit" } + params { + id: 1 + name: "port_type" + bitwidth: 2 + } } actions { preamble { - id: 16794911 + id: 24266015 name: "FabricIngress.filtering.permit_with_internal_vlan" alias: "permit_with_internal_vlan" } @@ -1012,10 +1198,15 @@ actions { name: "vlan_id" bitwidth: 12 } + params { + id: 2 + name: "port_type" + bitwidth: 2 + } } actions { preamble { - id: 16840921 + id: 25032921 name: "FabricIngress.filtering.set_forwarding_type" alias: "set_forwarding_type" } @@ -1027,7 +1218,7 @@ actions { } actions { preamble { - id: 16811012 + id: 21791748 name: "FabricIngress.forwarding.set_next_id_bridging" alias: "set_next_id_bridging" } @@ -1039,7 +1230,7 @@ actions { } actions { preamble { - id: 16827758 + id: 30066030 name: "FabricIngress.forwarding.pop_mpls_and_next" alias: "pop_mpls_and_next" } @@ -1051,7 +1242,7 @@ actions { } actions { preamble { - id: 16777434 + id: 19792090 name: "FabricIngress.forwarding.set_next_id_routing_v4" alias: "set_next_id_routing_v4" } @@ -1063,14 +1254,14 @@ actions { } actions { preamble { - id: 16804187 + id: 29124955 name: "FabricIngress.forwarding.nop_routing_v4" alias: "nop_routing_v4" } } actions { preamble { - id: 16809751 + id: 21856023 name: "FabricIngress.forwarding.set_next_id_routing_v6" alias: "set_next_id_routing_v6" } @@ -1082,7 +1273,48 @@ actions { } actions { preamble { - id: 16807382 + id: 22765924 + name: "FabricIngress.pre_next.set_mpls_label" + alias: "set_mpls_label" + } + params { + id: 1 + name: "label" + bitwidth: 20 + } +} +actions { + preamble { + id: 33475378 + name: "FabricIngress.pre_next.set_vlan" + alias: "set_vlan" + } + params { + id: 1 + name: "vlan_id" + bitwidth: 12 + } +} +actions { + preamble { + id: 26738842 + name: "FabricIngress.pre_next.set_double_vlan" + alias: "set_double_vlan" + } + params { + id: 1 + name: "outer_vlan_id" + bitwidth: 12 + } + params { + id: 2 + name: "inner_vlan_id" + bitwidth: 12 + } +} +actions { + preamble { + id: 23623126 name: "FabricIngress.acl.set_next_id_acl" alias: "set_next_id_acl" } @@ -1094,14 +1326,14 @@ actions { } actions { preamble { - id: 16829684 + id: 23579892 name: "FabricIngress.acl.punt_to_cpu" alias: "acl.punt_to_cpu" } } actions { preamble { - id: 16781601 + id: 16912673 name: "FabricIngress.acl.set_clone_session_id" alias: "set_clone_session_id" } @@ -1113,50 +1345,21 @@ actions { } actions { preamble { - id: 16820765 + id: 23570973 name: "FabricIngress.acl.drop" alias: "acl.drop" } } actions { preamble { - id: 16827694 + id: 29607214 name: "FabricIngress.acl.nop_acl" alias: "nop_acl" } } actions { preamble { - id: 16790685 - name: "FabricIngress.next.set_vlan" - alias: "set_vlan" - } - params { - id: 1 - name: "vlan_id" - bitwidth: 12 - } -} -actions { - preamble { - id: 16803337 - name: "FabricIngress.next.set_double_vlan" - alias: "set_double_vlan" - } - params { - id: 1 - name: "outer_vlan_id" - bitwidth: 12 - } - params { - id: 2 - name: "inner_vlan_id" - bitwidth: 12 - } -} -actions { - preamble { - id: 16842190 + id: 24640974 name: "FabricIngress.next.output_xconnect" alias: "output_xconnect" } @@ -1168,7 +1371,7 @@ actions { } actions { preamble { - id: 16837052 + id: 30599612 name: "FabricIngress.next.set_next_id_xconnect" alias: "set_next_id_xconnect" } @@ -1180,7 +1383,7 @@ actions { } actions { preamble { - id: 16802668 + id: 19358572 name: "FabricIngress.next.output_simple" alias: "output_simple" } @@ -1192,7 +1395,7 @@ actions { } actions { preamble { - id: 16814145 + id: 31887425 name: "FabricIngress.next.routing_simple" alias: "routing_simple" } @@ -1214,34 +1417,7 @@ actions { } actions { preamble { - id: 16783036 - name: "FabricIngress.next.mpls_routing_simple" - alias: "mpls_routing_simple" - } - params { - id: 1 - name: "port_num" - bitwidth: 9 - } - params { - id: 2 - name: "smac" - bitwidth: 48 - } - params { - id: 3 - name: "dmac" - bitwidth: 48 - } - params { - id: 4 - name: "label" - bitwidth: 20 - } -} -actions { - preamble { - id: 16815357 + id: 27301117 name: "FabricIngress.next.output_hashed" alias: "output_hashed" } @@ -1253,7 +1429,7 @@ actions { } actions { preamble { - id: 16791402 + id: 20985706 name: "FabricIngress.next.routing_hashed" alias: "routing_hashed" } @@ -1275,48 +1451,64 @@ actions { } actions { preamble { - id: 16779255 - name: "FabricIngress.next.mpls_routing_hashed" - alias: "mpls_routing_hashed" + id: 21629581 + name: "FabricIngress.next.set_mcast_group_id" + alias: "set_mcast_group_id" } params { id: 1 - name: "port_num" - bitwidth: 9 + name: "group_id" + bitwidth: 16 } - params { - id: 2 - name: "smac" - bitwidth: 48 +} +actions { + preamble { + id: 23786376 + name: "FabricIngress.slice_tc_classifier.set_slice_id_tc" + alias: "set_slice_id_tc" } params { - id: 3 - name: "dmac" - bitwidth: 48 + id: 1 + name: "slice_id" + bitwidth: 4 } params { - id: 4 - name: "label" - bitwidth: 20 + id: 2 + name: "tc" + bitwidth: 2 } } actions { preamble { - id: 16779917 - name: "FabricIngress.next.set_mcast_group_id" - alias: "set_mcast_group_id" + id: 25983516 + name: "FabricIngress.slice_tc_classifier.trust_dscp" + alias: "trust_dscp" + } +} +actions { + preamble { + id: 32116918 + name: "FabricIngress.qos.set_queue" + alias: "set_queue" } params { id: 1 - name: "group_id" - bitwidth: 16 + name: "qid" + bitwidth: 5 + } +} +actions { + preamble { + id: 28214351 + name: "FabricIngress.qos.meter_drop" + alias: "meter_drop" } } actions { preamble { - id: 16797935 - name: "FabricIngress.spgw_ingress.set_source_iface" - alias: "set_source_iface" + id: 18186268 + name: "FabricIngress.spgw.load_iface" + alias: "load_iface" } params { id: 1 @@ -1325,20 +1517,49 @@ actions { } params { id: 2 - name: "direction" - bitwidth: 2 + name: "slice_id" + bitwidth: 4 + } +} +actions { + preamble { + id: 29103810 + name: "FabricIngress.spgw.iface_miss" + alias: "iface_miss" + } +} +actions { + preamble { + id: 18504550 + name: "FabricIngress.spgw.load_pdr" + alias: "load_pdr" + } + params { + id: 1 + name: "ctr_id" + bitwidth: 32 + } + params { + id: 2 + name: "far_id" + bitwidth: 32 } params { id: 3 - name: "skip_spgw" + name: "needs_gtpu_decap" bitwidth: 1 } + params { + id: 4 + name: "tc" + bitwidth: 2 + } } actions { preamble { - id: 16799934 - name: "FabricIngress.spgw_ingress.set_pdr_attributes" - alias: "set_pdr_attributes" + id: 25764352 + name: "FabricIngress.spgw.load_pdr_qos" + alias: "load_pdr_qos" } params { id: 1 @@ -1355,12 +1576,27 @@ actions { name: "needs_gtpu_decap" bitwidth: 1 } + params { + id: 4 + name: "needs_qfi_push" + bitwidth: 1 + } + params { + id: 5 + name: "qfi" + bitwidth: 6 + } + params { + id: 6 + name: "tc" + bitwidth: 2 + } } actions { preamble { - id: 16834935 - name: "FabricIngress.spgw_ingress.load_normal_far_attributes" - alias: "load_normal_far_attributes" + id: 24881235 + name: "FabricIngress.spgw.load_normal_far" + alias: "load_normal_far" } params { id: 1 @@ -1375,9 +1611,9 @@ actions { } actions { preamble { - id: 16787606 - name: "FabricIngress.spgw_ingress.load_tunnel_far_attributes" - alias: "load_tunnel_far_attributes" + id: 29659841 + name: "FabricIngress.spgw.load_tunnel_far" + alias: "load_tunnel_far" } params { id: 1 @@ -1412,56 +1648,58 @@ actions { } actions { preamble { - id: 16829280 - name: "FabricIngress.spgw_ingress.decap_inner_tcp" - alias: "decap_inner_tcp" + id: 30642777 + name: "FabricIngress.spgw.load_dbuf_far" + alias: "load_dbuf_far" } -} -actions { - preamble { - id: 16815878 - name: "FabricIngress.spgw_ingress.decap_inner_udp" - alias: "decap_inner_udp" + params { + id: 1 + name: "drop" + bitwidth: 1 } -} -actions { - preamble { - id: 16801274 - name: "FabricIngress.spgw_ingress.decap_inner_icmp" - alias: "decap_inner_icmp" + params { + id: 2 + name: "notify_cp" + bitwidth: 1 } -} -actions { - preamble { - id: 16830582 - name: "FabricIngress.spgw_ingress.decap_inner_unknown" - alias: "decap_inner_unknown" + params { + id: 3 + name: "tunnel_src_port" + bitwidth: 16 } -} -actions { - preamble { - id: 16800567 - name: "NoAction" - alias: "NoAction" + params { + id: 4 + name: "tunnel_src_addr" + bitwidth: 32 + } + params { + id: 5 + name: "tunnel_dst_addr" + bitwidth: 32 + } + params { + id: 6 + name: "teid" + bitwidth: 32 } } actions { preamble { - id: 16784000 + id: 20781696 name: "FabricEgress.bng_egress.downstream.encap_v4" alias: "encap_v4" } } actions { preamble { - id: 16801306 + id: 17456666 name: "FabricEgress.bng_egress.downstream.encap_v6" alias: "encap_v6" } } actions { preamble { - id: 16785857 + id: 20062657 name: "FabricEgress.process_int_main.process_int_source.int_source_dscp" alias: "int_source_dscp" } @@ -1488,7 +1726,7 @@ actions { } actions { preamble { - id: 16780783 + id: 29232623 name: "FabricEgress.process_int_main.process_int_transit.init_metadata" alias: "init_metadata" } @@ -1500,7 +1738,7 @@ actions { } actions { preamble { - id: 16788620 + id: 19999884 name: "FabricEgress.process_int_main.process_int_report.do_report_encapsulation" alias: "do_report_encapsulation" } @@ -1532,25 +1770,53 @@ actions { } actions { preamble { - id: 16790030 + id: 30307755 + name: "FabricEgress.egress_next.push_vlan" + alias: "push_vlan" + } +} +actions { + preamble { + id: 17183246 name: "FabricEgress.egress_next.pop_vlan" alias: "pop_vlan" } } +actions { + preamble { + id: 30812542 + name: "FabricEgress.egress_next.drop" + alias: "egress_next.drop" + } +} +actions { + preamble { + id: 27951287 + name: "FabricEgress.dscp_rewriter.rewrite" + alias: "rewrite" + } +} +actions { + preamble { + id: 24120545 + name: "FabricEgress.dscp_rewriter.clear" + alias: "clear" + } +} action_profiles { preamble { - id: 285217164 + id: 291115404 name: "FabricIngress.next.hashed_selector" alias: "hashed_selector" } - table_ids: 33608588 + table_ids: 47960972 with_selector: true size: 1024 max_group_size: 16 } counters { preamble { - id: 302022672 + id: 316309520 name: "FabricIngress.bng_ingress.upstream.c_terminated" alias: "c_terminated" } @@ -1561,7 +1827,7 @@ counters { } counters { preamble { - id: 302043418 + id: 310956314 name: "FabricIngress.bng_ingress.upstream.c_dropped" alias: "c_dropped" } @@ -1572,7 +1838,7 @@ counters { } counters { preamble { - id: 302008909 + id: 302467661 name: "FabricIngress.bng_ingress.upstream.c_control" alias: "c_control" } @@ -1583,7 +1849,7 @@ counters { } counters { preamble { - id: 302004781 + id: 304364077 name: "FabricIngress.bng_ingress.downstream.c_line_rx" alias: "c_line_rx" } @@ -1594,7 +1860,7 @@ counters { } counters { preamble { - id: 302011205 + id: 314528581 name: "FabricIngress.port_counters_control.egress_port_counter" alias: "egress_port_counter" } @@ -1605,7 +1871,7 @@ counters { } counters { preamble { - id: 302002771 + id: 312947283 name: "FabricIngress.port_counters_control.ingress_port_counter" alias: "ingress_port_counter" } @@ -1616,9 +1882,9 @@ counters { } counters { preamble { - id: 302029884 - name: "FabricIngress.spgw_ingress.pdr_counter" - alias: "spgw_ingress.pdr_counter" + id: 308925232 + name: "FabricIngress.spgw.pdr_counter" + alias: "FabricIngress.spgw.pdr_counter" } spec { unit: BOTH @@ -1627,7 +1893,7 @@ counters { } counters { preamble { - id: 302046535 + id: 311942471 name: "FabricEgress.bng_egress.downstream.c_line_tx" alias: "c_line_tx" } @@ -1638,9 +1904,9 @@ counters { } counters { preamble { - id: 302012289 - name: "FabricEgress.spgw_egress.pdr_counter" - alias: "spgw_egress.pdr_counter" + id: 302049491 + name: "FabricEgress.spgw.pdr_counter" + alias: "FabricEgress.spgw.pdr_counter" } spec { unit: BOTH @@ -1649,172 +1915,205 @@ counters { } direct_counters { preamble { - id: 318787614 + id: 318984222 name: "FabricIngress.process_set_source_sink.counter_set_source" alias: "counter_set_source" } spec { unit: BOTH } - direct_table_id: 33581620 + direct_table_id: 44526132 } direct_counters { preamble { - id: 318770551 + id: 324013431 name: "FabricIngress.process_set_source_sink.counter_set_sink" alias: "counter_set_sink" } spec { unit: BOTH } - direct_table_id: 33561619 + direct_table_id: 35265555 } direct_counters { preamble { - id: 318815501 + id: 326221069 name: "FabricIngress.filtering.ingress_port_vlan_counter" alias: "ingress_port_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33611649 + direct_table_id: 43310977 } direct_counters { preamble { - id: 318827326 + id: 335473470 name: "FabricIngress.filtering.fwd_classifier_counter" alias: "fwd_classifier_counter" } spec { unit: BOTH } - direct_table_id: 33596298 + direct_table_id: 49718154 } direct_counters { preamble { - id: 318770289 + id: 330959985 name: "FabricIngress.forwarding.bridging_counter" alias: "bridging_counter" } spec { unit: BOTH } - direct_table_id: 33596749 + direct_table_id: 43623757 } direct_counters { preamble { - id: 318830507 + id: 318961579 name: "FabricIngress.forwarding.mpls_counter" alias: "mpls_counter" } spec { unit: BOTH } - direct_table_id: 33574274 + direct_table_id: 37768578 } direct_counters { preamble { - id: 318799210 + id: 324042090 name: "FabricIngress.forwarding.routing_v6_counter" alias: "routing_v6_counter" } spec { unit: BOTH } - direct_table_id: 33614081 + direct_table_id: 49342721 } direct_counters { preamble { - id: 318801025 - name: "FabricIngress.acl.acl_counter" - alias: "acl_counter" + id: 330020245 + name: "FabricIngress.pre_next.next_mpls_counter" + alias: "next_mpls_counter" } spec { unit: BOTH } - direct_table_id: 33618978 + direct_table_id: 36626242 } direct_counters { preamble { - id: 318768144 - name: "FabricIngress.next.next_vlan_counter" + id: 333692067 + name: "FabricIngress.pre_next.next_vlan_counter" alias: "next_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33599709 + direct_table_id: 48011802 +} +direct_counters { + preamble { + id: 319194241 + name: "FabricIngress.acl.acl_counter" + alias: "acl_counter" + } + spec { + unit: BOTH + } + direct_table_id: 44104738 } direct_counters { preamble { - id: 318778156 + id: 321989420 name: "FabricIngress.next.xconnect_counter" alias: "xconnect_counter" } spec { unit: BOTH } - direct_table_id: 33596977 + direct_table_id: 48735793 } direct_counters { preamble { - id: 318769096 + id: 326633416 name: "FabricIngress.next.simple_counter" alias: "simple_counter" } spec { unit: BOTH } - direct_table_id: 33571723 + direct_table_id: 39142283 } direct_counters { preamble { - id: 318800532 + id: 322798228 name: "FabricIngress.next.hashed_counter" alias: "hashed_counter" } spec { unit: BOTH } - direct_table_id: 33608588 + direct_table_id: 47960972 } direct_counters { preamble { - id: 318801752 + id: 319194968 name: "FabricIngress.next.multicast_counter" alias: "multicast_counter" } spec { unit: BOTH } - direct_table_id: 33606828 + direct_table_id: 40619180 +} +direct_counters { + preamble { + id: 334706097 + name: "FabricIngress.slice_tc_classifier.classifier_stats" + alias: "classifier_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 34606298 +} +direct_counters { + preamble { + id: 327743278 + name: "FabricIngress.qos.queues_stats" + alias: "queues_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 36435258 } direct_counters { preamble { - id: 318800047 + id: 322470063 name: "FabricEgress.process_int_main.process_int_source.counter_int_source" alias: "counter_int_source" } spec { unit: BOTH } - direct_table_id: 33612258 + direct_table_id: 44818914 } direct_counters { preamble { - id: 318827144 + id: 318892680 name: "FabricEgress.egress_next.egress_vlan_counter" alias: "egress_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33599342 + direct_table_id: 49262446 } meters { preamble { - id: 335569952 + id: 337077280 name: "FabricIngress.bng_ingress.downstream.m_besteff" alias: "m_besteff" } @@ -1825,7 +2124,7 @@ meters { } meters { preamble { - id: 335568260 + id: 349920644 name: "FabricIngress.bng_ingress.downstream.m_prio" alias: "m_prio" } @@ -1834,9 +2133,20 @@ meters { } size: 8192 } +meters { + preamble { + id: 348573637 + name: "FabricIngress.qos.slice_tc_meter" + alias: "slice_tc_meter" + } + spec { + unit: BYTES + } + size: 64 +} controller_packet_metadata { preamble { - id: 67146229 + id: 81826293 name: "packet_in" alias: "packet_in" annotations: "@controller_header(\"packet_in\")" @@ -1854,7 +2164,7 @@ controller_packet_metadata { } controller_packet_metadata { preamble { - id: 67121543 + id: 76689799 name: "packet_out" alias: "packet_out" annotations: "@controller_header(\"packet_out\")" @@ -1866,8 +2176,13 @@ controller_packet_metadata { } metadata { id: 2 + name: "do_forwarding" + bitwidth: 1 + } + metadata { + id: 3 name: "_pad" - bitwidth: 7 + bitwidth: 6 } } type_info { diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json index e2d828c283c..c639b1fecd8 100644 --- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json +++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/bmv2.json @@ -4,53 +4,94 @@ "name" : "scalars_0", "id" : 0, "fields" : [ + ["tmp_0", 1, false], + ["tmp_2", 3, false], + ["tmp_4", 8, false], ["last_ipv4_dscp_0", 6, false], - ["tmp_0", 16, false], + ["gtpu_ext_len_0", 8, false], ["tmp_1", 16, false], - ["tmp_2", 4, false], - ["tmp", 32, false], - ["tmp_3", 32, false], - ["egress_next_tmp", 1, false], + ["tmp_3", 16, false], + ["tmp_5", 4, false], + ["tmp_6", 16, false], + ["tmp_7", 64, false], + ["tmp_8", 32, false], + ["tmp_9", 32, false], + ["tmp_10", 32, false], + ["dscp_rewriter_tmp_dscp", 6, false], ["process_int_main_process_int_transit_hasReturned", 1, false], - ["fabric_metadata_t._ip_eth_type0", 16, false], - ["fabric_metadata_t._vlan_id1", 12, false], - ["fabric_metadata_t._vlan_pri2", 3, false], - ["fabric_metadata_t._vlan_cfi3", 1, false], - ["fabric_metadata_t._mpls_label4", 20, false], - ["fabric_metadata_t._mpls_ttl5", 8, false], - ["fabric_metadata_t._skip_forwarding6", 1, false], - ["fabric_metadata_t._skip_next7", 1, false], - ["fabric_metadata_t._fwd_type8", 3, false], - ["fabric_metadata_t._next_id9", 32, false], - ["fabric_metadata_t._is_multicast10", 1, false], - ["fabric_metadata_t._is_controller_packet_out11", 1, false], - ["fabric_metadata_t._ip_proto12", 8, false], - ["fabric_metadata_t._l4_sport13", 16, false], - ["fabric_metadata_t._l4_dport14", 16, false], - ["fabric_metadata_t._ipv4_src_addr15", 32, false], - ["fabric_metadata_t._ipv4_dst_addr16", 32, false], - ["fabric_metadata_t._int_meta_source17", 1, false], - ["fabric_metadata_t._int_meta_transit18", 1, false], - ["fabric_metadata_t._int_meta_sink19", 1, false], - ["fabric_metadata_t._int_meta_switch_id20", 32, false], - ["fabric_metadata_t._int_meta_new_words21", 8, false], - ["fabric_metadata_t._int_meta_new_bytes22", 16, false], - ["fabric_metadata_t._int_meta_ig_tstamp23", 32, false], - ["fabric_metadata_t._int_meta_eg_tstamp24", 32, false], - ["_padding_0", 6, false] + ["userMetadata._lkp_is_ipv40", 1, false], + ["userMetadata._lkp_ipv4_src1", 32, false], + ["userMetadata._lkp_ipv4_dst2", 32, false], + ["userMetadata._lkp_ip_proto3", 8, false], + ["userMetadata._lkp_l4_sport4", 16, false], + ["userMetadata._lkp_l4_dport5", 16, false], + ["userMetadata._lkp_icmp_type6", 8, false], + ["userMetadata._lkp_icmp_code7", 8, false], + ["userMetadata._ip_eth_type8", 16, false], + ["userMetadata._vlan_id9", 12, false], + ["userMetadata._vlan_pri10", 3, false], + ["userMetadata._vlan_cfi11", 1, false], + ["userMetadata._mpls_label12", 20, false], + ["userMetadata._mpls_ttl13", 8, false], + ["userMetadata._skip_forwarding14", 1, false], + ["userMetadata._skip_next15", 1, false], + ["userMetadata._fwd_type16", 3, false], + ["userMetadata._next_id17", 32, false], + ["userMetadata._is_multicast18", 1, false], + ["userMetadata._is_controller_packet_out19", 1, false], + ["userMetadata._ip_proto20", 8, false], + ["userMetadata._l4_sport21", 16, false], + ["userMetadata._l4_dport22", 16, false], + ["userMetadata._ipv4_src_addr23", 32, false], + ["userMetadata._ipv4_dst_addr24", 32, false], + ["userMetadata._slice_id25", 4, false], + ["userMetadata._packet_color26", 2, false], + ["userMetadata._tc27", 2, false], + ["userMetadata._dscp28", 6, false], + ["userMetadata._int_meta_source29", 1, false], + ["userMetadata._int_meta_transit30", 1, false], + ["userMetadata._int_meta_sink31", 1, false], + ["userMetadata._int_meta_switch_id32", 32, false], + ["userMetadata._int_meta_new_words33", 8, false], + ["userMetadata._int_meta_new_bytes34", 16, false], + ["userMetadata._int_meta_ig_tstamp35", 32, false], + ["userMetadata._int_meta_eg_tstamp36", 32, false], + ["userMetadata._port_type37", 2, false], + ["_padding_0", 4, false] ] }, { - "name" : "standard_metadata", + "name" : "packet_out_header_t", "id" : 1, + "fields" : [ + ["egress_port", 9, false], + ["do_forwarding", 1, false], + ["_pad", 6, false] + ] + }, + { + "name" : "gtpu_t", + "id" : 2, + "fields" : [ + ["version", 3, false], + ["pt", 1, false], + ["spare", 1, false], + ["ex_flag", 1, false], + ["seq_flag", 1, false], + ["npdu_flag", 1, false], + ["msgtype", 8, false], + ["msglen", 16, false], + ["teid", 32, false] + ] + }, + { + "name" : "standard_metadata", + "id" : 3, "fields" : [ ["ingress_port", 9, false], ["egress_spec", 9, false], ["egress_port", 9, false], - ["clone_spec", 32, false], ["instance_type", 32, false], - ["drop", 1, false], - ["recirculate_port", 16, false], ["packet_length", 32, false], ["enq_timestamp", 32, false], ["enq_qdepth", 19, false], @@ -58,20 +99,17 @@ ["deq_qdepth", 19, false], ["ingress_global_timestamp", 48, false], ["egress_global_timestamp", 48, false], - ["lf_field_list", 32, false], ["mcast_grp", 16, false], - ["resubmit_flag", 32, false], ["egress_rid", 16, false], - ["recirculate_flag", 32, false], ["checksum_error", 1, false], ["parser_error", 32, false], ["priority", 3, false], - ["_padding", 2, false] + ["_padding", 3, false] ] }, { "name" : "ethernet_t", - "id" : 2, + "id" : 4, "fields" : [ ["dst_addr", 48, false], ["src_addr", 48, false] @@ -79,7 +117,7 @@ }, { "name" : "vlan_tag_t", - "id" : 3, + "id" : 5, "fields" : [ ["eth_type", 16, false], ["pri", 3, false], @@ -89,14 +127,14 @@ }, { "name" : "eth_type_t", - "id" : 4, + "id" : 6, "fields" : [ ["value", 16, false] ] }, { "name" : "mpls_t", - "id" : 5, + "id" : 7, "fields" : [ ["label", 20, false], ["tc", 3, false], @@ -104,9 +142,31 @@ ["ttl", 8, false] ] }, + { + "name" : "gtpu_options_t", + "id" : 8, + "fields" : [ + ["seq_num", 16, false], + ["n_pdu_num", 8, false], + ["next_ext", 8, false] + ] + }, + { + "name" : "gtpu_ext_psc_t", + "id" : 9, + "fields" : [ + ["len", 8, false], + ["type", 4, false], + ["spare0", 4, false], + ["ppp", 1, false], + ["rqi", 1, false], + ["qfi", 6, false], + ["next_ext", 8, false] + ] + }, { "name" : "ipv4_t", - "id" : 6, + "id" : 10, "fields" : [ ["version", 4, false], ["ihl", 4, false], @@ -123,9 +183,19 @@ ["dst_addr", 32, false] ] }, + { + "name" : "udp_t", + "id" : 11, + "fields" : [ + ["sport", 16, false], + ["dport", 16, false], + ["len", 16, false], + ["checksum", 16, false] + ] + }, { "name" : "tcp_t", - "id" : 7, + "id" : 12, "fields" : [ ["sport", 16, false], ["dport", 16, false], @@ -140,19 +210,9 @@ ["urgent_ptr", 16, false] ] }, - { - "name" : "udp_t", - "id" : 8, - "fields" : [ - ["sport", 16, false], - ["dport", 16, false], - ["len", 16, false], - ["checksum", 16, false] - ] - }, { "name" : "icmp_t", - "id" : 9, + "id" : 13, "fields" : [ ["icmp_type", 8, false], ["icmp_code", 8, false], @@ -162,17 +222,9 @@ ["timestamp", 64, false] ] }, - { - "name" : "packet_out_header_t", - "id" : 10, - "fields" : [ - ["egress_port", 9, false], - ["_pad", 7, false] - ] - }, { "name" : "packet_in_header_t", - "id" : 11, + "id" : 14, "fields" : [ ["ingress_port", 9, false], ["_pad", 7, false] @@ -180,7 +232,7 @@ }, { "name" : "intl4_shim_t", - "id" : 12, + "id" : 15, "fields" : [ ["int_type", 8, false], ["rsvd1", 8, false], @@ -190,7 +242,7 @@ }, { "name" : "int_header_t", - "id" : 13, + "id" : 16, "fields" : [ ["ver", 2, false], ["rep", 2, false], @@ -209,14 +261,14 @@ }, { "name" : "int_switch_id_t", - "id" : 14, + "id" : 17, "fields" : [ ["switch_id", 32, false] ] }, { "name" : "int_port_ids_t", - "id" : 15, + "id" : 18, "fields" : [ ["ingress_port_id", 16, false], ["egress_port_id", 16, false] @@ -224,14 +276,14 @@ }, { "name" : "int_hop_latency_t", - "id" : 16, + "id" : 19, "fields" : [ ["hop_latency", 32, false] ] }, { "name" : "int_q_occupancy_t", - "id" : 17, + "id" : 20, "fields" : [ ["q_id", 8, false], ["q_occupancy", 24, false] @@ -239,21 +291,21 @@ }, { "name" : "int_ingress_tstamp_t", - "id" : 18, + "id" : 21, "fields" : [ ["ingress_tstamp", 32, false] ] }, { "name" : "int_egress_tstamp_t", - "id" : 19, + "id" : 22, "fields" : [ ["egress_tstamp", 32, false] ] }, { "name" : "int_q_congestion_t", - "id" : 20, + "id" : 23, "fields" : [ ["q_id", 8, false], ["q_congestion", 24, false] @@ -261,14 +313,14 @@ }, { "name" : "int_egress_port_tx_util_t", - "id" : 21, + "id" : 24, "fields" : [ ["egress_port_tx_util", 32, false] ] }, { "name" : "intl4_tail_t", - "id" : 22, + "id" : 25, "fields" : [ ["next_proto", 8, false], ["dest_port", 16, false], @@ -279,169 +331,232 @@ ], "headers" : [ { - "name" : "scalars", + "name" : "tmp", "id" : 0, + "header_type" : "packet_out_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_0", + "id" : 1, + "header_type" : "gtpu_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "scalars", + "id" : 2, "header_type" : "scalars_0", "metadata" : true, "pi_omit" : true }, { "name" : "standard_metadata", - "id" : 1, + "id" : 3, "header_type" : "standard_metadata", "metadata" : true, "pi_omit" : true }, { "name" : "ethernet", - "id" : 2, + "id" : 4, "header_type" : "ethernet_t", "metadata" : false, "pi_omit" : true }, { "name" : "vlan_tag", - "id" : 3, + "id" : 5, "header_type" : "vlan_tag_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_vlan_tag", - "id" : 4, + "id" : 6, "header_type" : "vlan_tag_t", "metadata" : false, "pi_omit" : true }, { "name" : "eth_type", - "id" : 5, + "id" : 7, "header_type" : "eth_type_t", "metadata" : false, "pi_omit" : true }, { "name" : "mpls", - "id" : 6, + "id" : 8, "header_type" : "mpls_t", "metadata" : false, "pi_omit" : true }, + { + "name" : "gtpu", + "id" : 9, + "header_type" : "gtpu_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_options", + "id" : 10, + "header_type" : "gtpu_options_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_ext_psc", + "id" : 11, + "header_type" : "gtpu_ext_psc_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "inner_ipv4", + "id" : 12, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "inner_udp", + "id" : 13, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "inner_tcp", + "id" : 14, + "header_type" : "tcp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "inner_icmp", + "id" : 15, + "header_type" : "icmp_t", + "metadata" : false, + "pi_omit" : true + }, { "name" : "ipv4", - "id" : 7, + "id" : 16, "header_type" : "ipv4_t", "metadata" : false, "pi_omit" : true }, { "name" : "tcp", - "id" : 8, + "id" : 17, "header_type" : "tcp_t", "metadata" : false, "pi_omit" : true }, { "name" : "udp", - "id" : 9, + "id" : 18, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "icmp", - "id" : 10, + "id" : 19, "header_type" : "icmp_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_out", - "id" : 11, + "id" : 20, "header_type" : "packet_out_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_in", - "id" : 12, + "id" : 21, "header_type" : "packet_in_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "intl4_shim", - "id" : 13, + "id" : 22, "header_type" : "intl4_shim_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_header", - "id" : 14, + "id" : 23, "header_type" : "int_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_switch_id", - "id" : 15, + "id" : 24, "header_type" : "int_switch_id_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_port_ids", - "id" : 16, + "id" : 25, "header_type" : "int_port_ids_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_hop_latency", - "id" : 17, + "id" : 26, "header_type" : "int_hop_latency_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_q_occupancy", - "id" : 18, + "id" : 27, "header_type" : "int_q_occupancy_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_ingress_tstamp", - "id" : 19, + "id" : 28, "header_type" : "int_ingress_tstamp_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_egress_tstamp", - "id" : 20, + "id" : 29, "header_type" : "int_egress_tstamp_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_q_congestion", - "id" : 21, + "id" : 30, "header_type" : "int_q_congestion_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_egress_tx_util", - "id" : 22, + "id" : 31, "header_type" : "int_egress_port_tx_util_t", "metadata" : false, "pi_omit" : true }, { "name" : "intl4_tail", - "id" : 23, + "id" : 32, "header_type" : "intl4_tail_t", "metadata" : false, "pi_omit" : true @@ -457,7 +572,7 @@ "name" : "fl", "source_info" : { "filename" : "include/control/acl.p4", - "line" : 46, + "line" : 45, "column" : 40, "source_fragment" : "{standard_metadata.ingress_port}" }, @@ -494,10 +609,11 @@ "type" : "hexstr", "value" : "0x00ff", "mask" : null, - "next_state" : "parse_packet_out" + "next_state" : "check_packet_out" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_ethernet" } @@ -510,50 +626,78 @@ ] }, { - "name" : "parse_packet_out", + "name" : "check_packet_out", "id" : 1, "parser_ops" : [ { "parameters" : [ { - "type" : "regular", - "value" : "packet_out" + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + { + "type" : "lookahead", + "value" : [0, 16] } ], - "op" : "extract" - } - ], - "transitions" : [ - { - "value" : "default", - "mask" : null, - "next_state" : "parse_ethernet" - } - ], - "transition_key" : [] - }, - { - "name" : "parse_ethernet", - "id" : 2, - "parser_ops" : [ + "op" : "set" + }, { "parameters" : [ { - "type" : "regular", - "value" : "ethernet" + "parameters" : [ + { + "type" : "header", + "value" : "tmp" + } + ], + "op" : "add_header" } ], - "op" : "extract" + "op" : "primitive" }, { "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["tmp", "egress_port"] }, { - "type" : "hexstr", - "value" : "0x0ffe" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x7" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } } ], "op" : "set" @@ -562,37 +706,252 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_0"] + "value" : ["tmp", "do_forwarding"] }, { - "type" : "lookahead", - "value" : [0, 16] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x6" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } } ], "op" : "set" - } - ], - "transitions" : [ - { - "type" : "hexstr", - "value" : "0x88a8", - "mask" : null, - "next_state" : "parse_vlan_tag" }, { - "type" : "hexstr", - "value" : "0x9100", - "mask" : null, - "next_state" : "parse_vlan_tag" - }, - { - "type" : "hexstr", - "value" : "0x8100", + "parameters" : [ + { + "type" : "field", + "value" : ["tmp", "_pad"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x6" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x00", + "mask" : null, + "next_state" : "parse_packet_out_and_accept" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "strip_packet_out" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_0"] + } + ] + }, + { + "name" : "parse_packet_out_and_accept", + "id" : 2, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "packet_out" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "strip_packet_out", + "id" : 3, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x00000010" + } + ], + "op" : "advance" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ethernet" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_ethernet", + "id" : 4, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "ethernet" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_1"] + }, + { + "type" : "lookahead", + "value" : [0, 16] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x88a8", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "hexstr", + "value" : "0x9100", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "hexstr", + "value" : "0x8100", "mask" : null, "next_state" : "parse_vlan_tag" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -600,13 +959,13 @@ "transition_key" : [ { "type" : "field", - "value" : ["scalars", "tmp_0"] + "value" : ["scalars", "tmp_1"] } ] }, { "name" : "parse_vlan_tag", - "id" : 3, + "id" : 5, "parser_ops" : [ { "parameters" : [ @@ -621,7 +980,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_1"] + "value" : ["scalars", "tmp_3"] }, { "type" : "lookahead", @@ -639,7 +998,8 @@ "next_state" : "parse_inner_vlan_tag" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -647,13 +1007,13 @@ "transition_key" : [ { "type" : "field", - "value" : ["scalars", "tmp_1"] + "value" : ["scalars", "tmp_3"] } ] }, { "name" : "parse_inner_vlan_tag", - "id" : 4, + "id" : 6, "parser_ops" : [ { "parameters" : [ @@ -667,7 +1027,8 @@ ], "transitions" : [ { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -676,7 +1037,7 @@ }, { "name" : "parse_eth_type", - "id" : 5, + "id" : 7, "parser_ops" : [ { "parameters" : [ @@ -702,7 +1063,8 @@ "next_state" : "parse_ipv4" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -716,7 +1078,7 @@ }, { "name" : "parse_mpls", - "id" : 6, + "id" : 8, "parser_ops" : [ { "parameters" : [ @@ -731,7 +1093,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "value" : ["scalars", "userMetadata._mpls_label12"] }, { "type" : "field", @@ -744,7 +1106,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl5"] + "value" : ["scalars", "userMetadata._mpls_ttl13"] }, { "type" : "field", @@ -757,7 +1119,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_2"] + "value" : ["scalars", "tmp_5"] }, { "type" : "lookahead", @@ -775,7 +1137,8 @@ "next_state" : "parse_ipv4" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_ethernet" } @@ -783,13 +1146,13 @@ "transition_key" : [ { "type" : "field", - "value" : ["scalars", "tmp_2"] + "value" : ["scalars", "tmp_5"] } ] }, { "name" : "parse_ipv4", - "id" : 7, + "id" : 9, "parser_ops" : [ { "parameters" : [ @@ -804,7 +1167,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] + "value" : ["scalars", "userMetadata._ip_proto20"] }, { "type" : "field", @@ -817,7 +1180,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] }, { "type" : "hexstr", @@ -830,7 +1193,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] }, { "type" : "field", @@ -843,7 +1206,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] }, { "type" : "field", @@ -886,7 +1249,8 @@ "next_state" : "parse_icmp" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -900,7 +1264,7 @@ }, { "name" : "parse_tcp", - "id" : 8, + "id" : 10, "parser_ops" : [ { "parameters" : [ @@ -915,7 +1279,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "field", @@ -928,7 +1292,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "userMetadata._l4_dport22"] }, { "type" : "field", @@ -940,7 +1304,8 @@ ], "transitions" : [ { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_int" } @@ -949,7 +1314,7 @@ }, { "name" : "parse_udp", - "id" : 9, + "id" : 11, "parser_ops" : [ { "parameters" : [ @@ -964,7 +1329,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "field", @@ -977,7 +1342,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "userMetadata._l4_dport22"] }, { "type" : "field", @@ -985,119 +1350,568 @@ } ], "op" : "set" - } - ], - "transitions" : [ - { - "value" : "default", - "mask" : null, - "next_state" : "parse_int" - } - ], - "transition_key" : [ - { - "type" : "field", - "value" : ["udp", "dport"] - } - ] - }, - { - "name" : "parse_icmp", - "id" : 10, - "parser_ops" : [ + }, { "parameters" : [ { - "type" : "regular", - "value" : "icmp" + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + { + "type" : "lookahead", + "value" : [0, 64] } ], - "op" : "extract" - } - ], - "transitions" : [ - { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [] - }, - { - "name" : "parse_int", - "id" : 11, - "parser_ops" : [], - "transitions" : [ - { - "type" : "hexstr", - "value" : "0x01", - "mask" : "0x01", - "next_state" : "parse_intl4_shim" + "op" : "set" }, - { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [ - { - "type" : "field", - "value" : ["scalars", "last_ipv4_dscp_0"] - } - ] - }, - { - "name" : "parse_intl4_shim", - "id" : 12, - "parser_ops" : [ { "parameters" : [ { - "type" : "regular", - "value" : "intl4_shim" + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_0" + } + ], + "op" : "add_header" } ], - "op" : "extract" + "op" : "primitive" }, { "parameters" : [ { - "type" : "regular", - "value" : "int_header" + "type" : "field", + "value" : ["gtpu_0", "version"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } } ], - "op" : "extract" + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "pt"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3c" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "spare"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3b" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "ex_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3a" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "seq_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x39" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "npdu_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x38" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msgtype"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msglen"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x20" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "teid"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" } ], "transitions" : [ { "type" : "hexstr", - "value" : "0x04", + "value" : "0x086801ff", "mask" : null, - "next_state" : "parse_intl4_tail" + "next_state" : "parse_gtpu" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, - "next_state" : "parse_int_data" + "next_state" : "parse_int" } ], "transition_key" : [ { "type" : "field", - "value" : ["intl4_shim", "len_words"] + "value" : ["udp", "dport"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_4"] } ] }, { - "name" : "parse_int_data", - "id" : 13, - "parser_ops" : [], + "name" : "parse_icmp", + "id" : 12, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "icmp" + } + ], + "op" : "extract" + } + ], "transitions" : [ { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -1105,14 +1919,14 @@ "transition_key" : [] }, { - "name" : "parse_intl4_tail", - "id" : 14, + "name" : "parse_gtpu", + "id" : 13, "parser_ops" : [ { "parameters" : [ { "type" : "regular", - "value" : "intl4_tail" + "value" : "gtpu" } ], "op" : "extract" @@ -1120,32 +1934,394 @@ ], "transitions" : [ { - "value" : "default", + "type" : "hexstr", + "value" : "0x000000", "mask" : null, - "next_state" : null + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_gtpu_options" } ], - "transition_key" : [] - } - ] - } - ], - "parse_vsets" : [], - "deparsers" : [ - { - "name" : "deparser", - "id" : 0, - "source_info" : { - "filename" : "include/parser.p4", - "line" : 268, - "column" : 8, - "source_fragment" : "FabricDeparser" - }, - "order" : ["packet_in", "ethernet", "vlan_tag", "inner_vlan_tag", "eth_type", "mpls", "ipv4", "tcp", "udp", "icmp", "intl4_shim", "int_header", "int_switch_id", "int_port_ids", "int_hop_latency", "int_q_occupancy", "int_ingress_tstamp", "int_egress_tstamp", "int_q_congestion", "int_egress_tx_util", "intl4_tail"] - } - ], - "meter_arrays" : [], - "counter_arrays" : [ + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu", "ex_flag"] + }, + { + "type" : "field", + "value" : ["gtpu", "seq_flag"] + }, + { + "type" : "field", + "value" : ["gtpu", "npdu_flag"] + } + ] + }, + { + "name" : "parse_gtpu_options", + "id" : 14, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu_options" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + }, + { + "type" : "lookahead", + "value" : [0, 8] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x8501", + "mask" : null, + "next_state" : "parse_gtpu_ext_psc" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu_options", "next_ext"] + }, + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + } + ] + }, + { + "name" : "parse_gtpu_ext_psc", + "id" : 15, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu_ext_psc" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x00", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu_ext_psc", "next_ext"] + } + ] + }, + { + "name" : "parse_inner_ipv4", + "id" : 16, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_ipv4" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "last_ipv4_dscp_0"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dscp"] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_inner_tcp" + }, + { + "type" : "hexstr", + "value" : "0x11", + "mask" : null, + "next_state" : "parse_inner_udp" + }, + { + "type" : "hexstr", + "value" : "0x01", + "mask" : null, + "next_state" : "parse_inner_icmp" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ] + }, + { + "name" : "parse_inner_udp", + "id" : 17, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_udp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_int" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_tcp", + "id" : 18, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_tcp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_icmp", + "id" : 19, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_icmp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_int", + "id" : 20, + "parser_ops" : [], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x01", + "mask" : "0x01", + "next_state" : "parse_intl4_shim" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "last_ipv4_dscp_0"] + } + ] + }, + { + "name" : "parse_intl4_shim", + "id" : 21, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "intl4_shim" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "regular", + "value" : "int_header" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x04", + "mask" : null, + "next_state" : "parse_intl4_tail" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_int_data" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["intl4_shim", "len_words"] + } + ] + }, + { + "name" : "parse_int_data", + "id" : 22, + "parser_ops" : [], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_intl4_tail", + "id" : 23, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "intl4_tail" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + } + ] + } + ], + "parse_vsets" : [], + "deparsers" : [ + { + "name" : "deparser", + "id" : 0, + "source_info" : { + "filename" : "include/parser.p4", + "line" : 308, + "column" : 8, + "source_fragment" : "FabricDeparser" + }, + "order" : ["packet_in", "ethernet", "vlan_tag", "inner_vlan_tag", "eth_type", "mpls", "ipv4", "tcp", "udp", "icmp", "gtpu", "gtpu_options", "gtpu_ext_psc", "inner_ipv4", "inner_tcp", "inner_udp", "inner_icmp", "intl4_shim", "int_header", "int_switch_id", "int_port_ids", "int_hop_latency", "int_q_occupancy", "int_ingress_tstamp", "int_egress_tstamp", "int_q_congestion", "int_egress_tx_util", "intl4_tail"], + "primitives" : [] + } + ], + "meter_arrays" : [ + { + "name" : "FabricIngress.qos.slice_tc_meter", + "id" : 0, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 78, + "column" : 41, + "source_fragment" : "slice_tc_meter" + }, + "is_direct" : false, + "size" : 64, + "rate_count" : 2, + "type" : "bytes" + } + ], + "counter_arrays" : [ { "name" : "FabricIngress.process_set_source_sink.counter_set_source", "id" : 0, @@ -1177,7 +2353,7 @@ "binding" : "FabricIngress.filtering.fwd_classifier", "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 85, + "line" : 87, "column" : 50, "source_fragment" : "fwd_classifier_counter" } @@ -1207,68 +2383,104 @@ } }, { - "name" : "FabricIngress.acl.acl_counter", + "name" : "FabricIngress.pre_next.next_mpls_counter", "id" : 5, "is_direct" : true, - "binding" : "FabricIngress.acl.acl", + "binding" : "FabricIngress.pre_next.next_mpls", "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 30, + "filename" : "include/control/pre_next.p4", + "line" : 29, "column" : 50, - "source_fragment" : "acl_counter" + "source_fragment" : "next_mpls_counter" } }, { - "name" : "FabricIngress.next.next_vlan_counter", + "name" : "FabricIngress.pre_next.next_vlan_counter", "id" : 6, "is_direct" : true, - "binding" : "FabricIngress.next.next_vlan", + "binding" : "FabricIngress.pre_next.next_vlan", "source_info" : { - "filename" : "include/control/next.p4", - "line" : 67, + "filename" : "include/control/pre_next.p4", + "line" : 54, "column" : 50, "source_fragment" : "next_vlan_counter" } }, { - "name" : "FabricIngress.next.xconnect_counter", + "name" : "FabricIngress.acl.acl_counter", "id" : 7, "is_direct" : true, + "binding" : "FabricIngress.acl.acl", + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 29, + "column" : 50, + "source_fragment" : "acl_counter" + } + }, + { + "name" : "FabricIngress.next.xconnect_counter", + "id" : 8, + "is_direct" : true, "binding" : "FabricIngress.next.xconnect", "source_info" : { "filename" : "include/control/next.p4", - "line" : 107, + "line" : 56, "column" : 50, "source_fragment" : "xconnect_counter" } }, { "name" : "FabricIngress.next.hashed_counter", - "id" : 8, + "id" : 9, "is_direct" : true, "binding" : "FabricIngress.next.hashed", "source_info" : { "filename" : "include/control/next.p4", - "line" : 184, + "line" : 126, "column" : 50, "source_fragment" : "hashed_counter" } }, { "name" : "FabricIngress.next.multicast_counter", - "id" : 9, + "id" : 10, "is_direct" : true, "binding" : "FabricIngress.next.multicast", "source_info" : { "filename" : "include/control/next.p4", - "line" : 228, + "line" : 163, "column" : 50, "source_fragment" : "multicast_counter" } }, + { + "name" : "FabricIngress.slice_tc_classifier.classifier_stats", + "id" : 11, + "is_direct" : true, + "binding" : "FabricIngress.slice_tc_classifier.classifier", + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 32, + "column" : 40, + "source_fragment" : "classifier_stats" + } + }, + { + "name" : "FabricIngress.qos.queues_stats", + "id" : 12, + "is_direct" : true, + "binding" : "FabricIngress.qos.queues", + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 80, + "column" : 40, + "source_fragment" : "queues_stats" + } + }, { "name" : "FabricIngress.port_counters_control.egress_port_counter", - "id" : 10, + "id" : 13, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 26, @@ -1280,7 +2492,7 @@ }, { "name" : "FabricIngress.port_counters_control.ingress_port_counter", - "id" : 11, + "id" : 14, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 27, @@ -1292,7 +2504,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_source.counter_int_source", - "id" : 12, + "id" : 15, "is_direct" : true, "binding" : "FabricEgress.process_int_main.process_int_source.tb_int_source", "source_info" : { @@ -1303,261 +2515,986 @@ } }, { - "name" : "FabricEgress.egress_next.egress_vlan_counter", - "id" : 13, - "is_direct" : true, - "binding" : "FabricEgress.egress_next.egress_vlan", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 313, - "column" : 50, - "source_fragment" : "egress_vlan_counter" - } - } - ], - "register_arrays" : [], - "calculations" : [ - { - "name" : "calc", - "id" : 0, - "source_info" : { - "filename" : "include/checksum.p4", - "line" : 28, - "column" : 8, - "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ + "name" : "FabricEgress.egress_next.egress_vlan_counter", + "id" : 16, + "is_direct" : true, + "binding" : "FabricEgress.egress_next.egress_vlan", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 248, + "column" : 50, + "source_fragment" : "egress_vlan_counter" + } + } + ], + "register_arrays" : [], + "calculations" : [ + { + "name" : "calc", + "id" : 0, + "source_info" : { + "filename" : "include/checksum.p4", + "line" : 28, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["ipv4", "version"] + }, + { + "type" : "field", + "value" : ["ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["ipv4", "dst_addr"] + } + ] + }, + { + "name" : "calc_0", + "id" : 1, + "source_info" : { + "filename" : "include/checksum.p4", + "line" : 57, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["ipv4", "version"] + }, + { + "type" : "field", + "value" : ["ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["ipv4", "dst_addr"] + } + ] + } + ], + "learn_lists" : [], + "actions" : [ + { + "name" : "nop", + "id" : 0, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 1, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 2, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 3, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 4, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 5, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 6, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 7, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 8, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.process_set_source_sink.int_set_source", + "id" : 9, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_source29"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_main.p4", + "line" : 42, + "column" : 40, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.deny", + "id" : 10, + "runtime_data" : [], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "version"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_forwarding14"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 36, + "column" : 40, + "source_fragment" : "= true; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "ihl"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 37, + "column" : 34, + "source_fragment" : "= true; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "dscp"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type37"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 136, + "column" : 38, + "source_fragment" : "0x0; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit", + "id" : 11, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "ecn"] - }, + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "total_len"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type37"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 44, + "column" : 34, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit_with_internal_vlan", + "id" : 12, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "identification"] + "name" : "vlan_id", + "bitwidth" : 12 }, { - "type" : "field", - "value" : ["ipv4", "flags"] - }, + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "frag_offset"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 49, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "ttl"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type37"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 44, + "column" : 34, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.set_forwarding_type", + "id" : 13, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "protocol"] - }, + "name" : "fwd_type", + "bitwidth" : 3 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "src_addr"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._fwd_type16"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 90, + "column" : 33, + "source_fragment" : "= fwd_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_bridging", + "id" : 14, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "dst_addr"] + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } } ] }, { - "name" : "calc_0", - "id" : 1, - "source_info" : { - "filename" : "include/checksum.p4", - "line" : 57, - "column" : 8, - "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ + "name" : "FabricIngress.forwarding.pop_mpls_and_next", + "id" : 15, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "version"] - }, + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "ihl"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label12"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 66, + "column" : 35, + "source_fragment" : "= 0; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "dscp"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_routing_v4", + "id" : 16, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "ecn"] - }, + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "total_len"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.nop_routing_v4", + "id" : 17, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.pre_next.set_mpls_label", + "id" : 18, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "identification"] - }, + "name" : "label", + "bitwidth" : 20 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "flags"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label12"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 32, + "column" : 35, + "source_fragment" : "= label; ..." + } + } + ] + }, + { + "name" : "FabricIngress.pre_next.set_vlan", + "id" : 19, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "frag_offset"] - }, + "name" : "vlan_id", + "bitwidth" : 12 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "ttl"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 57, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.set_next_id_acl", + "id" : 20, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "protocol"] - }, + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "src_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 32, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.punt_to_cpu", + "id" : 21, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "hexstr", + "value" : "0x00ff" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "standard_metadata.egress_spec = 255" + } }, { - "type" : "field", - "value" : ["ipv4", "dst_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 39, + "column" : 28, + "source_fragment" : "= true; ..." + } } ] - } - ], - "learn_lists" : [], - "actions" : [ - { - "name" : "nop", - "id" : 0, - "runtime_data" : [], - "primitives" : [] }, { - "name" : "nop", - "id" : 1, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 2, - "runtime_data" : [], - "primitives" : [] + "name" : "FabricIngress.acl.set_clone_session_id", + "id" : 22, + "runtime_data" : [ + { + "name" : "clone_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "clone_ingress_pkt_to_egress", + "parameters" : [ + { + "type" : "runtime_data", + "value" : 0 + }, + { + "type" : "hexstr", + "value" : "0x1" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})" + } + } + ] }, { - "name" : "nop", - "id" : 3, + "name" : "FabricIngress.acl.drop", + "id" : 23, "runtime_data" : [], - "primitives" : [] + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 50, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 51, + "column" : 28, + "source_fragment" : "= true; ..." + } + } + ] }, { - "name" : "nop", - "id" : 4, + "name" : "FabricIngress.acl.nop_acl", + "id" : 24, "runtime_data" : [], "primitives" : [] }, { - "name" : "nop", - "id" : 5, - "runtime_data" : [], - "primitives" : [] + "name" : "FabricIngress.next.output_xconnect", + "id" : 25, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] }, { - "name" : "nop", - "id" : 6, - "runtime_data" : [], - "primitives" : [] + "name" : "FabricIngress.next.set_next_id_xconnect", + "id" : 26, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 64, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] }, { - "name" : "nop", - "id" : 7, - "runtime_data" : [], - "primitives" : [] + "name" : "FabricIngress.next.output_hashed", + "id" : 27, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] }, { - "name" : "FabricIngress.process_set_source_sink.int_set_source", - "id" : 8, - "runtime_data" : [], + "name" : "FabricIngress.next.routing_hashed", + "id" : 28, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + }, + { + "name" : "smac", + "bitwidth" : 48 + }, + { + "name" : "dmac", + "bitwidth" : 48 + } + ], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_source17"] + "value" : ["ethernet", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 36, + "column" : 8, + "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ethernet", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "runtime_data", + "value" : 0 } ], "source_info" : { - "filename" : "include/int/int_main.p4", - "line" : 42, - "column" : 40, - "source_fragment" : "= true; ..." + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." } } ] }, { - "name" : "FabricIngress.filtering.deny", - "id" : 9, - "runtime_data" : [], + "name" : "FabricIngress.next.set_mcast_group_id", + "id" : 29, + "runtime_data" : [ + { + "name" : "group_id", + "bitwidth" : 16 + } + ], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_forwarding6"] + "value" : ["standard_metadata", "mcast_grp"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "runtime_data", + "value" : 0 } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 36, - "column" : 40, - "source_fragment" : "= true; ..." + "filename" : "include/control/next.p4", + "line" : 166, + "column" : 8, + "source_fragment" : "standard_metadata.mcast_grp = group_id" } }, { @@ -1565,7 +3502,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["scalars", "userMetadata._is_multicast18"] }, { "type" : "expression", @@ -1583,27 +3520,25 @@ } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 37, - "column" : 34, + "filename" : "include/control/next.p4", + "line" : 167, + "column" : 37, "source_fragment" : "= true; ..." } } ] }, { - "name" : "FabricIngress.filtering.permit", - "id" : 10, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.filtering.permit_with_internal_vlan", - "id" : 11, + "name" : "FabricIngress.slice_tc_classifier.set_slice_id_tc", + "id" : 30, "runtime_data" : [ { - "name" : "vlan_id", - "bitwidth" : 12 + "name" : "slice_id", + "bitwidth" : 4 + }, + { + "name" : "tc", + "bitwidth" : 2 } ], "primitives" : [ @@ -1612,7 +3547,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._slice_id25"] }, { "type" : "runtime_data", @@ -1620,197 +3555,250 @@ } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 47, - "column" : 32, - "source_fragment" : "= vlan_id; ..." + "filename" : "include/control/slicing.p4", + "line" : 35, + "column" : 27, + "source_fragment" : "= slice_id; ..." } - } - ] - }, - { - "name" : "FabricIngress.filtering.set_forwarding_type", - "id" : 12, - "runtime_data" : [ - { - "name" : "fwd_type", - "bitwidth" : 3 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._tc27"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 1 } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 88, - "column" : 33, - "source_fragment" : "= fwd_type; ..." + "filename" : "include/control/slicing.p4", + "line" : 36, + "column" : 21, + "source_fragment" : "= tc; ..." } } ] }, { - "name" : "FabricIngress.forwarding.set_next_id_bridging", - "id" : 13, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], + "name" : "FabricIngress.slice_tc_classifier.trust_dscp", + "id" : 31, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._slice_id25"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x0f" + } + } + } } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/slicing.p4", + "line" : 44, + "column" : 27, + "source_fragment" : "= hdr.ipv4.dscp[4 +2 -1:2]; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 45, + "column" : 21, + "source_fragment" : "= hdr.ipv4.dscp[2 -1:0]; ..." } } ] }, { - "name" : "FabricIngress.forwarding.pop_mpls_and_next", - "id" : 14, + "name" : "FabricIngress.qos.set_queue", + "id" : 32, "runtime_data" : [ { - "name" : "next_id", - "bitwidth" : 32 + "name" : "qid", + "bitwidth" : 5 } ], + "primitives" : [] + }, + { + "name" : "FabricIngress.qos.meter_drop", + "id" : 33, + "runtime_data" : [], "primitives" : [ { - "op" : "assign", + "op" : "mark_to_drop", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] - }, - { - "type" : "hexstr", - "value" : "0x000000" + "type" : "header", + "value" : "standard_metadata" } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 66, - "column" : 35, - "source_fragment" : "= 0; ..." + "filename" : "include/control/slicing.p4", + "line" : 89, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" } - }, + } + ] + }, + { + "name" : "lookup_md_init37", + "id" : 34, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_tcp", "sport"] } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, + "filename" : "include/control/lookup_md_init.p4", + "line" : 37, "column" : 32, - "source_fragment" : "= next_id; ..." + "source_fragment" : "= hdr.inner_tcp.sport; ..." } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id_routing_v4", - "id" : 15, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_tcp", "dport"] } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, + "filename" : "include/control/lookup_md_init.p4", + "line" : 38, "column" : 32, - "source_fragment" : "= next_id; ..." + "source_fragment" : "= hdr.inner_tcp.dport; ..." } } ] }, { - "name" : "FabricIngress.forwarding.nop_routing_v4", - "id" : 16, + "name" : "lookup_md_init40", + "id" : 35, "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.acl.set_next_id_acl", - "id" : 17, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] + }, + { + "type" : "field", + "value" : ["inner_udp", "sport"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_udp", "dport"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 33, + "filename" : "include/control/lookup_md_init.p4", + "line" : 41, "column" : 32, - "source_fragment" : "= next_id; ..." + "source_fragment" : "= hdr.inner_udp.dport; ..." } } ] }, { - "name" : "FabricIngress.acl.punt_to_cpu", - "id" : 18, + "name" : "lookup_md_init43", + "id" : 36, "runtime_data" : [], "primitives" : [ { @@ -1818,18 +3806,18 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "hexstr", - "value" : "0x00ff" + "type" : "field", + "value" : ["inner_icmp", "icmp_type"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 39, - "column" : 8, - "source_fragment" : "standard_metadata.egress_spec = 255" + "filename" : "include/control/lookup_md_init.p4", + "line" : 43, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." } }, { @@ -1837,7 +3825,33 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] + }, + { + "type" : "field", + "value" : ["inner_icmp", "icmp_code"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 44, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_code; ..." + } + } + ] + }, + { + "name" : "lookup_md_init32", + "id" : 37, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] }, { "type" : "expression", @@ -1855,63 +3869,93 @@ } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 40, - "column" : 34, + "filename" : "include/control/lookup_md_init.p4", + "line" : 32, + "column" : 27, "source_fragment" : "= true; ..." } - } - ] - }, - { - "name" : "FabricIngress.acl.set_clone_session_id", - "id" : 19, - "runtime_data" : [ + }, { - "name" : "clone_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 33, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, { - "op" : "clone_ingress_pkt_to_egress", + "op" : "assign", "parameters" : [ { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "hexstr", - "value" : "0x1" + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 46, - "column" : 8, - "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})" + "filename" : "include/control/lookup_md_init.p4", + "line" : 34, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 35, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." } } ] }, { - "name" : "FabricIngress.acl.drop", - "id" : 20, + "name" : "lookup_md_init52", + "id" : 38, "runtime_data" : [], "primitives" : [ { - "op" : "mark_to_drop", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "standard_metadata" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] + }, + { + "type" : "field", + "value" : ["tcp", "sport"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 51, - "column" : 8, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/control/lookup_md_init.p4", + "line" : 52, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." } }, { @@ -1919,197 +3963,163 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["tcp", "dport"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 52, - "column" : 34, - "source_fragment" : "= true; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 53, + "column" : 32, + "source_fragment" : "= hdr.tcp.dport; ..." } } ] }, { - "name" : "FabricIngress.acl.nop_acl", - "id" : 21, + "name" : "lookup_md_init55", + "id" : 39, "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.next.set_vlan", - "id" : 22, - "runtime_data" : [ - { - "name" : "vlan_id", - "bitwidth" : 12 - } - ], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["udp", "sport"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 70, + "filename" : "include/control/lookup_md_init.p4", + "line" : 55, "column" : 32, - "source_fragment" : "= vlan_id; ..." + "source_fragment" : "= hdr.udp.sport; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.output_xconnect", - "id" : 23, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["udp", "dport"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 56, + "column" : 32, + "source_fragment" : "= hdr.udp.dport; ..." } } ] }, { - "name" : "FabricIngress.next.set_next_id_xconnect", - "id" : 24, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], + "name" : "lookup_md_init58", + "id" : 40, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["icmp", "icmp_type"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 115, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 58, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.output_hashed", - "id" : 25, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["icmp", "icmp_code"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 59, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_code; ..." } } ] }, { - "name" : "FabricIngress.next.routing_hashed", - "id" : 26, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - }, + "name" : "lookup_md_init47", + "id" : 41, + "runtime_data" : [], + "primitives" : [ { - "name" : "smac", - "bitwidth" : 48 + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 47, + "column" : 27, + "source_fragment" : "= true; ..." + } }, - { - "name" : "dmac", - "bitwidth" : 48 - } - ], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["ethernet", "src_addr"] + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "field", + "value" : ["ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 48, + "column" : 28, + "source_fragment" : "= hdr.ipv4.src_addr; ..." } }, { @@ -2117,18 +4127,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "dst_addr"] + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "runtime_data", - "value" : 2 + "type" : "field", + "value" : ["ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 49, + "column" : 28, + "source_fragment" : "= hdr.ipv4.dst_addr; ..." } }, { @@ -2136,61 +4146,92 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 50, + "column" : 28, + "source_fragment" : "= hdr.ipv4.protocol; ..." } } ] }, { - "name" : "FabricIngress.next.mpls_routing_hashed", - "id" : 27, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - }, + "name" : "lookup_md_init23", + "id" : 42, + "runtime_data" : [], + "primitives" : [ { - "name" : "smac", - "bitwidth" : 48 + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 23, + "column" : 23, + "source_fragment" : "= false; ..." + } }, { - "name" : "dmac", - "bitwidth" : 48 + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 24, + "column" : 24, + "source_fragment" : "= 0; ..." + } }, - { - "name" : "label", - "bitwidth" : 20 - } - ], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "runtime_data", - "value" : 3 + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 46, - "column" : 35, - "source_fragment" : "= label; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 25, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -2198,18 +4239,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "src_addr"] + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 26, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -2217,18 +4258,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "dst_addr"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "runtime_data", - "value" : 2 + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 27, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -2236,49 +4277,37 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 28, + "column" : 24, + "source_fragment" : "= 0; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.set_mcast_group_id", - "id" : 28, - "runtime_data" : [ - { - "name" : "group_id", - "bitwidth" : 16 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "mcast_grp"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 231, - "column" : 8, - "source_fragment" : "standard_metadata.mcast_grp = group_id" + "filename" : "include/control/lookup_md_init.p4", + "line" : 29, + "column" : 25, + "source_fragment" : "= 0; ..." } }, { @@ -2286,35 +4315,25 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_multicast10"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 232, - "column" : 37, - "source_fragment" : "= true; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 30, + "column" : 25, + "source_fragment" : "= 0; ..." } } ] }, { - "name" : "act", - "id" : 29, + "name" : "packetio25", + "id" : 43, "runtime_data" : [], "primitives" : [ { @@ -2356,7 +4375,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_controller_packet_out11"] + "value" : ["scalars", "userMetadata._is_controller_packet_out19"] }, { "type" : "expression", @@ -2393,8 +4412,8 @@ ] }, { - "name" : "act_0", - "id" : 30, + "name" : "filtering113", + "id" : 44, "runtime_data" : [], "primitives" : [ { @@ -2402,7 +4421,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._vlan_id9"] }, { "type" : "field", @@ -2411,7 +4430,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 111, + "line" : 113, "column" : 36, "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." } @@ -2421,7 +4440,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_pri2"] + "value" : ["scalars", "userMetadata._vlan_pri10"] }, { "type" : "field", @@ -2430,7 +4449,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 112, + "line" : 114, "column" : 37, "source_fragment" : "= hdr.vlan_tag.pri; ..." } @@ -2440,7 +4459,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_cfi3"] + "value" : ["scalars", "userMetadata._vlan_cfi11"] }, { "type" : "field", @@ -2449,7 +4468,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 113, + "line" : 115, "column" : 37, "source_fragment" : "= hdr.vlan_tag.cfi; ..." } @@ -2457,8 +4476,8 @@ ] }, { - "name" : "act_1", - "id" : 31, + "name" : "filtering129", + "id" : 45, "runtime_data" : [], "primitives" : [ { @@ -2466,7 +4485,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl5"] + "value" : ["scalars", "userMetadata._mpls_ttl13"] }, { "type" : "hexstr", @@ -2475,7 +4494,7 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 127, + "line" : 129, "column" : 37, "source_fragment" : "= DEFAULT_MPLS_TTL + 1; ..." } @@ -2483,8 +4502,8 @@ ] }, { - "name" : "act_2", - "id" : 32, + "name" : "port_counter31", + "id" : 46, "runtime_data" : [], "primitives" : [ { @@ -2492,7 +4511,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp"] + "value" : ["scalars", "tmp_8"] }, { "type" : "expression", @@ -2528,7 +4547,7 @@ }, { "type" : "field", - "value" : ["scalars", "tmp"] + "value" : ["scalars", "tmp_8"] } ], "source_info" : { @@ -2541,8 +4560,66 @@ ] }, { - "name" : "act_3", - "id" : 33, + "name" : "port_counter34", + "id" : 47, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 34, + "column" : 39, + "source_fragment" : "(bit<32>)standard_metadata.ingress_port" + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.port_counters_control.ingress_port_counter" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_9"] + } + ], + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 34, + "column" : 12, + "source_fragment" : "ingress_port_counter.count((bit<32>)standard_metadata.ingress_port)" + } + } + ] + }, + { + "name" : "slicing114", + "id" : 48, "runtime_data" : [], "primitives" : [ { @@ -2550,7 +4627,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_3"] + "value" : ["scalars", "tmp_10"] }, { "type" : "expression", @@ -2559,8 +4636,68 @@ "value" : { "op" : "&", "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } }, "right" : { "type" : "hexstr", @@ -2571,66 +4708,152 @@ } ], "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 34, - "column" : 39, - "source_fragment" : "(bit<32>)standard_metadata.ingress_port" + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 37, + "source_fragment" : "(bit<32>) slice_tc" } }, { - "op" : "count", + "op" : "execute_meter", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.port_counters_control.ingress_port_counter" + "type" : "meter_array", + "value" : "FabricIngress.qos.slice_tc_meter" }, { "type" : "field", - "value" : ["scalars", "tmp_3"] + "value" : ["scalars", "tmp_10"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._packet_color26"] } ], "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 34, - "column" : 12, - "source_fragment" : "ingress_port_counter.count((bit<32>)standard_metadata.ingress_port)" + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 8, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) slice_tc, fabric_md.packet_color)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._dscp28"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 110, + "column" : 26, + "source_fragment" : "fabric_md.slice_id++fabric_md.tc; ..." } } ] }, { "name" : "nop", - "id" : 34, + "id" : 49, "runtime_data" : [], "primitives" : [] }, { "name" : "nop", - "id" : 35, + "id" : 50, "runtime_data" : [], "primitives" : [] }, { "name" : "nop", - "id" : 36, + "id" : 51, "runtime_data" : [], "primitives" : [] }, { "name" : "NoAction", - "id" : 37, + "id" : 52, "runtime_data" : [], "primitives" : [] }, { "name" : "NoAction", - "id" : 38, + "id" : 53, "runtime_data" : [], "primitives" : [] }, { "name" : "FabricEgress.process_int_main.process_int_source.int_source_dscp", - "id" : 39, + "id" : 54, "runtime_data" : [ { "name" : "max_hop", @@ -2698,7 +4921,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 165, + "line" : 186, "column" : 36, "source_fragment" : "4; ..." } @@ -2989,7 +5212,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "userMetadata._l4_dport22"] } ], "source_info" : { @@ -3116,7 +5339,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 161, + "line" : 182, "column" : 24, "source_fragment" : "0x1; ..." } @@ -3125,7 +5348,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.init_metadata", - "id" : 40, + "id" : 55, "runtime_data" : [ { "name" : "switch_id", @@ -3138,7 +5361,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_transit18"] + "value" : ["scalars", "userMetadata._int_meta_transit30"] }, { "type" : "expression", @@ -3167,7 +5390,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id20"] + "value" : ["scalars", "userMetadata._int_meta_switch_id32"] }, { "type" : "runtime_data", @@ -3185,13 +5408,13 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i0", - "id" : 41, + "id" : 56, "runtime_data" : [], "primitives" : [] }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i1", - "id" : 42, + "id" : 57, "runtime_data" : [], "primitives" : [ { @@ -3265,7 +5488,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -3279,7 +5502,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -3307,7 +5530,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -3321,7 +5544,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -3348,7 +5571,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i2", - "id" : 43, + "id" : 58, "runtime_data" : [], "primitives" : [ { @@ -3390,7 +5613,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -3404,7 +5627,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -3432,7 +5655,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -3446,7 +5669,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -3473,7 +5696,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i3", - "id" : 44, + "id" : 59, "runtime_data" : [], "primitives" : [ { @@ -3581,7 +5804,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -3595,7 +5818,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -3623,7 +5846,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -3637,7 +5860,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -3664,7 +5887,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i4", - "id" : 45, + "id" : 60, "runtime_data" : [], "primitives" : [ { @@ -3751,7 +5974,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -3765,7 +5988,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -3793,7 +6016,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -3807,7 +6030,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -3834,7 +6057,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i5", - "id" : 46, + "id" : 61, "runtime_data" : [], "primitives" : [ { @@ -3987,7 +6210,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -4001,7 +6224,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -4029,7 +6252,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -4043,7 +6266,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -4070,7 +6293,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i6", - "id" : 47, + "id" : 62, "runtime_data" : [], "primitives" : [ { @@ -4191,7 +6414,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -4205,7 +6428,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -4233,7 +6456,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -4247,7 +6470,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -4274,7 +6497,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i7", - "id" : 48, + "id" : 63, "runtime_data" : [], "primitives" : [ { @@ -4461,7 +6684,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -4475,7 +6698,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -4503,7 +6726,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -4517,7 +6740,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -4544,7 +6767,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i8", - "id" : 49, + "id" : 64, "runtime_data" : [], "primitives" : [ { @@ -4571,7 +6794,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id20"] + "value" : ["scalars", "userMetadata._int_meta_switch_id32"] } ], "source_info" : { @@ -4586,7 +6809,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -4600,7 +6823,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -4628,7 +6851,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -4642,7 +6865,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -4669,7 +6892,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i9", - "id" : 50, + "id" : 65, "runtime_data" : [], "primitives" : [ { @@ -4762,7 +6985,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id20"] + "value" : ["scalars", "userMetadata._int_meta_switch_id32"] } ], "source_info" : { @@ -4777,7 +7000,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -4791,7 +7014,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -4819,7 +7042,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -4833,7 +7056,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -4860,7 +7083,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i10", - "id" : 51, + "id" : 66, "runtime_data" : [], "primitives" : [ { @@ -4921,7 +7144,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id20"] + "value" : ["scalars", "userMetadata._int_meta_switch_id32"] } ], "source_info" : { @@ -4936,7 +7159,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -4950,7 +7173,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -4978,7 +7201,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -4992,7 +7215,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -5019,7 +7242,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i11", - "id" : 52, + "id" : 67, "runtime_data" : [], "primitives" : [ { @@ -5146,7 +7369,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id20"] + "value" : ["scalars", "userMetadata._int_meta_switch_id32"] } ], "source_info" : { @@ -5161,7 +7384,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -5175,7 +7398,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -5203,7 +7426,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -5217,7 +7440,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -5244,7 +7467,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i12", - "id" : 53, + "id" : 68, "runtime_data" : [], "primitives" : [ { @@ -5350,7 +7573,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id20"] + "value" : ["scalars", "userMetadata._int_meta_switch_id32"] } ], "source_info" : { @@ -5365,7 +7588,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -5379,7 +7602,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -5407,7 +7630,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -5421,7 +7644,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -5448,7 +7671,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i13", - "id" : 54, + "id" : 69, "runtime_data" : [], "primitives" : [ { @@ -5620,7 +7843,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id20"] + "value" : ["scalars", "userMetadata._int_meta_switch_id32"] } ], "source_info" : { @@ -5635,7 +7858,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -5649,7 +7872,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -5677,7 +7900,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -5691,7 +7914,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -5718,7 +7941,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i14", - "id" : 55, + "id" : 70, "runtime_data" : [], "primitives" : [ { @@ -5858,7 +8081,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id20"] + "value" : ["scalars", "userMetadata._int_meta_switch_id32"] } ], "source_info" : { @@ -5873,7 +8096,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -5887,7 +8110,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -5915,7 +8138,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -5929,7 +8152,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -5956,7 +8179,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i15", - "id" : 56, + "id" : 71, "runtime_data" : [], "primitives" : [ { @@ -6162,7 +8385,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id20"] + "value" : ["scalars", "userMetadata._int_meta_switch_id32"] } ], "source_info" : { @@ -6177,7 +8400,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -6191,7 +8414,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -6219,7 +8442,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -6233,7 +8456,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -6260,13 +8483,13 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0", - "id" : 57, + "id" : 72, "runtime_data" : [], "primitives" : [] }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1", - "id" : 58, + "id" : 73, "runtime_data" : [], "primitives" : [ { @@ -6308,7 +8531,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -6322,7 +8545,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -6350,7 +8573,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -6364,7 +8587,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -6391,7 +8614,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2", - "id" : 59, + "id" : 74, "runtime_data" : [], "primitives" : [ { @@ -6452,7 +8675,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -6466,7 +8689,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -6494,7 +8717,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -6508,7 +8731,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -6535,7 +8758,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3", - "id" : 60, + "id" : 75, "runtime_data" : [], "primitives" : [ { @@ -6630,7 +8853,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -6644,7 +8867,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -6672,7 +8895,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -6686,7 +8909,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -6713,7 +8936,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4", - "id" : 61, + "id" : 76, "runtime_data" : [], "primitives" : [ { @@ -6778,7 +9001,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -6792,7 +9015,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -6820,7 +9043,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -6834,7 +9057,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -6861,7 +9084,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5", - "id" : 62, + "id" : 77, "runtime_data" : [], "primitives" : [ { @@ -6960,7 +9183,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -6974,7 +9197,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -7002,7 +9225,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -7016,7 +9239,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -7043,7 +9266,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6", - "id" : 63, + "id" : 78, "runtime_data" : [], "primitives" : [ { @@ -7161,7 +9384,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -7175,7 +9398,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -7203,7 +9426,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -7217,7 +9440,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -7244,7 +9467,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7", - "id" : 64, + "id" : 79, "runtime_data" : [], "primitives" : [ { @@ -7396,7 +9619,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -7410,7 +9633,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -7438,7 +9661,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -7452,7 +9675,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -7479,7 +9702,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8", - "id" : 65, + "id" : 80, "runtime_data" : [], "primitives" : [ { @@ -7521,7 +9744,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -7535,7 +9758,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -7563,7 +9786,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -7577,7 +9800,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -7604,7 +9827,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9", - "id" : 66, + "id" : 81, "runtime_data" : [], "primitives" : [ { @@ -7680,7 +9903,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -7694,7 +9917,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -7722,7 +9945,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -7736,7 +9959,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -7763,7 +9986,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10", - "id" : 67, + "id" : 82, "runtime_data" : [], "primitives" : [ { @@ -7858,7 +10081,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -7872,7 +10095,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -7900,7 +10123,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -7914,7 +10137,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -7941,7 +10164,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11", - "id" : 68, + "id" : 83, "runtime_data" : [], "primitives" : [ { @@ -8070,7 +10293,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -8084,7 +10307,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -8112,7 +10335,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -8126,7 +10349,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -8153,7 +10376,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12", - "id" : 69, + "id" : 84, "runtime_data" : [], "primitives" : [ { @@ -8252,7 +10475,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -8266,7 +10489,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -8294,7 +10517,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -8308,7 +10531,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -8335,7 +10558,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13", - "id" : 70, + "id" : 85, "runtime_data" : [], "primitives" : [ { @@ -8468,7 +10691,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -8482,7 +10705,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -8510,7 +10733,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -8524,7 +10747,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -8551,7 +10774,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14", - "id" : 71, + "id" : 86, "runtime_data" : [], "primitives" : [ { @@ -8703,7 +10926,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -8717,7 +10940,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -8745,7 +10968,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -8759,7 +10982,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -8786,7 +11009,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15", - "id" : 72, + "id" : 87, "runtime_data" : [], "primitives" : [ { @@ -8972,7 +11195,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, { "type" : "expression", @@ -8986,7 +11209,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] }, "right" : { "type" : "hexstr", @@ -9014,7 +11237,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, { "type" : "expression", @@ -9028,7 +11251,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] }, "right" : { "type" : "hexstr", @@ -9055,7 +11278,7 @@ }, { "name" : "FabricEgress.egress_next.pop_mpls_if_present", - "id" : 73, + "id" : 88, "runtime_data" : [], "primitives" : [ { @@ -9068,7 +11291,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 270, + "line" : 204, "column" : 8, "source_fragment" : "hdr.mpls.setInvalid()" } @@ -9082,12 +11305,12 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 272, + "line" : 206, "column" : 8, "source_fragment" : "hdr.eth_type.value = fabric_metadata.ip_eth_type; ..." } @@ -9096,7 +11319,7 @@ }, { "name" : "FabricEgress.egress_next.set_mpls", - "id" : 74, + "id" : 89, "runtime_data" : [], "primitives" : [ { @@ -9109,7 +11332,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 277, + "line" : 211, "column" : 8, "source_fragment" : "hdr.mpls.setValid()" } @@ -9123,12 +11346,12 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "value" : ["scalars", "userMetadata._mpls_label12"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 278, + "line" : 212, "column" : 8, "source_fragment" : "hdr.mpls.label = fabric_metadata.mpls_label; ..." } @@ -9147,7 +11370,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 279, + "line" : 213, "column" : 8, "source_fragment" : "hdr.mpls.tc = 3w0" } @@ -9166,7 +11389,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 280, + "line" : 214, "column" : 8, "source_fragment" : "hdr.mpls.bos = 1w1" } @@ -9180,12 +11403,12 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl5"] + "value" : ["scalars", "userMetadata._mpls_ttl13"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 281, + "line" : 215, "column" : 8, "source_fragment" : "hdr.mpls.ttl = fabric_metadata.mpls_ttl; // Decrement after push. ..." } @@ -9204,7 +11427,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 126, + "line" : 147, "column" : 31, "source_fragment" : "0x8847; ..." } @@ -9213,7 +11436,7 @@ }, { "name" : "FabricEgress.egress_next.push_vlan", - "id" : 75, + "id" : 90, "runtime_data" : [], "primitives" : [ { @@ -9226,7 +11449,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 289, + "line" : 223, "column" : 8, "source_fragment" : "hdr.vlan_tag.setValid()" } @@ -9240,12 +11463,12 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_cfi3"] + "value" : ["scalars", "userMetadata._vlan_cfi11"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 290, + "line" : 224, "column" : 8, "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi; ..." } @@ -9259,12 +11482,12 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_pri2"] + "value" : ["scalars", "userMetadata._vlan_pri10"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 291, + "line" : 225, "column" : 8, "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri; ..." } @@ -9283,7 +11506,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 125, + "line" : 146, "column" : 31, "source_fragment" : "0x8100; ..." } @@ -9297,12 +11520,12 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._vlan_id9"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 293, + "line" : 227, "column" : 8, "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id; ..." } @@ -9311,7 +11534,7 @@ }, { "name" : "FabricEgress.egress_next.pop_vlan", - "id" : 76, + "id" : 91, "runtime_data" : [], "primitives" : [ { @@ -9324,7 +11547,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 316, + "line" : 256, "column" : 8, "source_fragment" : "hdr.vlan_tag.setInvalid()" } @@ -9332,8 +11555,62 @@ ] }, { - "name" : "act_4", - "id" : 77, + "name" : "FabricEgress.egress_next.drop", + "id" : 92, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 261, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + } + ] + }, + { + "name" : "FabricEgress.dscp_rewriter.rewrite", + "id" : 93, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.dscp_rewriter.clear", + "id" : 94, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 135, + "column" : 8, + "source_fragment" : "tmp_dscp = 0" + } + } + ] + }, + { + "name" : "packetio41", + "id" : 95, "runtime_data" : [], "primitives" : [ { @@ -9349,8 +11626,8 @@ ] }, { - "name" : "act_5", - "id" : 78, + "name" : "packetio44", + "id" : 96, "runtime_data" : [], "primitives" : [ { @@ -9400,90 +11677,30 @@ ] }, { - "name" : "act_6", - "id" : 79, + "name" : "next283", + "id" : 97, "runtime_data" : [], "primitives" : [ { "op" : "mark_to_drop", - "parameters" : [ - { - "type" : "header", - "value" : "standard_metadata" - } - ], - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 337, - "column" : 12, - "source_fragment" : "mark_to_drop(standard_metadata)" - } - } - ] - }, - { - "name" : "act_7", - "id" : 80, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } - } - ] - } - ] - }, - { - "name" : "act_8", - "id" : 81, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - }, + "parameters" : [ { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } + "type" : "header", + "value" : "standard_metadata" } - ] + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 283, + "column" : 12, + "source_fragment" : "mark_to_drop(standard_metadata)" + } } ] }, { - "name" : "act_9", - "id" : 82, + "name" : "next310", + "id" : 98, "runtime_data" : [], "primitives" : [ { @@ -9496,7 +11713,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 370, + "line" : 310, "column" : 35, "source_fragment" : "mark_to_drop(standard_metadata)" } @@ -9504,8 +11721,8 @@ ] }, { - "name" : "act_10", - "id" : 83, + "name" : "next309", + "id" : 99, "runtime_data" : [], "primitives" : [ { @@ -9545,7 +11762,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 369, + "line" : 309, "column" : 12, "source_fragment" : "hdr.mpls.ttl = hdr.mpls.ttl - 1" } @@ -9553,8 +11770,8 @@ ] }, { - "name" : "act_11", - "id" : 84, + "name" : "next314", + "id" : 100, "runtime_data" : [], "primitives" : [ { @@ -9567,7 +11784,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 374, + "line" : 314, "column" : 39, "source_fragment" : "mark_to_drop(standard_metadata)" } @@ -9575,8 +11792,8 @@ ] }, { - "name" : "act_12", - "id" : 85, + "name" : "next313", + "id" : 101, "runtime_data" : [], "primitives" : [ { @@ -9616,7 +11833,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 373, + "line" : 313, "column" : 16, "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" } @@ -9624,8 +11841,8 @@ ] }, { - "name" : "act_13", - "id" : 86, + "name" : "act", + "id" : 102, "runtime_data" : [], "primitives" : [ { @@ -9654,8 +11871,8 @@ ] }, { - "name" : "act_14", - "id" : 87, + "name" : "int_transit420", + "id" : 103, "runtime_data" : [], "primitives" : [ { @@ -9690,8 +11907,8 @@ ] }, { - "name" : "act_15", - "id" : 88, + "name" : "int_transit428", + "id" : 104, "runtime_data" : [], "primitives" : [ { @@ -9717,7 +11934,7 @@ }, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] } } }, @@ -9739,8 +11956,8 @@ ] }, { - "name" : "act_16", - "id" : 89, + "name" : "int_transit425", + "id" : 105, "runtime_data" : [], "primitives" : [ { @@ -9788,8 +12005,8 @@ ] }, { - "name" : "act_17", - "id" : 90, + "name" : "int_transit431", + "id" : 106, "runtime_data" : [], "primitives" : [ { @@ -9815,7 +12032,7 @@ }, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes22"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes34"] } } }, @@ -9837,8 +12054,8 @@ ] }, { - "name" : "act_18", - "id" : 91, + "name" : "int_transit434", + "id" : 107, "runtime_data" : [], "primitives" : [ { @@ -9864,7 +12081,7 @@ }, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words21"] + "value" : ["scalars", "userMetadata._int_meta_new_words33"] } } }, @@ -9877,30 +12094,343 @@ } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 434, - "column" : 12, - "source_fragment" : "hdr.intl4_shim.len_words = hdr.intl4_shim.len_words + fmeta.int_meta.new_words" + "filename" : "include/int/int_transit.p4", + "line" : 434, + "column" : 12, + "source_fragment" : "hdr.intl4_shim.len_words = hdr.intl4_shim.len_words + fmeta.int_meta.new_words" + } + } + ] + }, + { + "name" : "slicing159", + "id" : 108, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["inner_ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 159, + "column" : 16, + "source_fragment" : "hdr.inner_ipv4.dscp = tmp_dscp" + } + } + ] + }, + { + "name" : "slicing126", + "id" : 109, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._dscp28"] + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 126, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.dscp; ..." + } + } + ] + } + ], + "pipelines" : [ + { + "name" : "ingress", + "id" : 0, + "source_info" : { + "filename" : "fabric.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "FabricIngress" + }, + "init_table" : "tbl_lookup_md_init23", + "tables" : [ + { + "name" : "tbl_lookup_md_init23", + "id" : 0, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 23, + "column" : 23, + "source_fragment" : "= false; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [42], + "actions" : ["lookup_md_init23"], + "base_default_next" : "node_3", + "next_tables" : { + "lookup_md_init23" : "node_3" + }, + "default_entry" : { + "action_id" : 42, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init32", + "id" : 1, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 32, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [37], + "actions" : ["lookup_md_init32"], + "base_default_next" : "node_5", + "next_tables" : { + "lookup_md_init32" : "node_5" + }, + "default_entry" : { + "action_id" : 37, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init37", + "id" : 2, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 37, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [34], + "actions" : ["lookup_md_init37"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init37" : "node_19" + }, + "default_entry" : { + "action_id" : 34, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init40", + "id" : 3, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [35], + "actions" : ["lookup_md_init40"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init40" : "node_19" + }, + "default_entry" : { + "action_id" : 35, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init43", + "id" : 4, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 43, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [36], + "actions" : ["lookup_md_init43"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init43" : "node_19" + }, + "default_entry" : { + "action_id" : 36, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init47", + "id" : 5, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 47, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [41], + "actions" : ["lookup_md_init47"], + "base_default_next" : "node_13", + "next_tables" : { + "lookup_md_init47" : "node_13" + }, + "default_entry" : { + "action_id" : 41, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init52", + "id" : 6, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 52, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [38], + "actions" : ["lookup_md_init52"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init52" : "node_19" + }, + "default_entry" : { + "action_id" : 38, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init55", + "id" : 7, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 55, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [39], + "actions" : ["lookup_md_init55"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init55" : "node_19" + }, + "default_entry" : { + "action_id" : 39, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init58", + "id" : 8, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 58, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [40], + "actions" : ["lookup_md_init58"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init58" : "node_19" + }, + "default_entry" : { + "action_id" : 40, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true } - } - ] - } - ], - "pipelines" : [ - { - "name" : "ingress", - "id" : 0, - "source_info" : { - "filename" : "fabric.p4", - "line" : 46, - "column" : 8, - "source_fragment" : "FabricIngress" - }, - "init_table" : "node_2", - "tables" : [ + }, { - "name" : "tbl_act", - "id" : 0, + "name" : "tbl_packetio25", + "id" : 9, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 25, @@ -9914,25 +12444,92 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [29], - "actions" : ["act"], - "base_default_next" : "node_4", + "action_ids" : [43], + "actions" : ["packetio25"], + "base_default_next" : "FabricIngress.slice_tc_classifier.classifier", "next_tables" : { - "act" : "node_4" + "packetio25" : "FabricIngress.slice_tc_classifier.classifier" }, "default_entry" : { - "action_id" : 29, + "action_id" : 43, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_0", - "id" : 1, + "name" : "FabricIngress.slice_tc_classifier.classifier", + "id" : 10, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 49, + "column" : 10, + "source_fragment" : "classifier" + }, + "key" : [ + { + "match_type" : "ternary", + "name" : "ig_port", + "target" : ["standard_metadata", "ingress_port"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._lkp_ipv4_src1"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._lkp_ipv4_dst2"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._lkp_ip_proto3"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._lkp_l4_sport4"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._lkp_l4_dport5"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 512, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [30, 31], + "actions" : ["FabricIngress.slice_tc_classifier.set_slice_id_tc", "FabricIngress.slice_tc_classifier.trust_dscp"], + "base_default_next" : "node_22", + "next_tables" : { + "FabricIngress.slice_tc_classifier.set_slice_id_tc" : "node_22", + "FabricIngress.slice_tc_classifier.trust_dscp" : "node_22" + }, + "default_entry" : { + "action_id" : 30, + "action_const" : true, + "action_data" : ["0x0", "0x0"], + "action_entry_const" : true + } + }, + { + "name" : "tbl_filtering113", + "id" : 11, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 111, + "line" : 113, "column" : 36, "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." }, @@ -9943,25 +12540,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [30], - "actions" : ["act_0"], - "base_default_next" : "node_6", + "action_ids" : [44], + "actions" : ["filtering113"], + "base_default_next" : "node_24", "next_tables" : { - "act_0" : "node_6" + "filtering113" : "node_24" }, "default_entry" : { - "action_id" : 30, + "action_id" : 44, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_1", - "id" : 2, + "name" : "tbl_filtering129", + "id" : 12, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 127, + "line" : 129, "column" : 37, "source_fragment" : "=" }, @@ -9972,14 +12569,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [31], - "actions" : ["act_1"], + "action_ids" : [45], + "actions" : ["filtering129"], "base_default_next" : "FabricIngress.filtering.ingress_port_vlan", "next_tables" : { - "act_1" : "FabricIngress.filtering.ingress_port_vlan" + "filtering129" : "FabricIngress.filtering.ingress_port_vlan" }, "default_entry" : { - "action_id" : 31, + "action_id" : 45, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -9987,10 +12584,10 @@ }, { "name" : "FabricIngress.filtering.ingress_port_vlan", - "id" : 3, + "id" : 13, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 53, + "line" : 55, "column" : 10, "source_fragment" : "ingress_port_vlan" }, @@ -10020,7 +12617,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [9, 10, 11], + "action_ids" : [10, 11, 12], "actions" : ["FabricIngress.filtering.deny", "FabricIngress.filtering.permit", "FabricIngress.filtering.permit_with_internal_vlan"], "base_default_next" : "FabricIngress.filtering.fwd_classifier", "next_tables" : { @@ -10029,7 +12626,7 @@ "FabricIngress.filtering.permit_with_internal_vlan" : "FabricIngress.filtering.fwd_classifier" }, "default_entry" : { - "action_id" : 9, + "action_id" : 10, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -10037,10 +12634,10 @@ }, { "name" : "FabricIngress.filtering.fwd_classifier", - "id" : 4, + "id" : 14, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 92, + "line" : 94, "column" : 10, "source_fragment" : "fwd_classifier" }, @@ -10066,7 +12663,7 @@ { "match_type" : "exact", "name" : "ip_eth_type", - "target" : ["scalars", "fabric_metadata_t._ip_eth_type0"], + "target" : ["scalars", "userMetadata._ip_eth_type8"], "mask" : null } ], @@ -10076,14 +12673,14 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [12], + "action_ids" : [13], "actions" : ["FabricIngress.filtering.set_forwarding_type"], - "base_default_next" : "node_10", + "base_default_next" : "node_28", "next_tables" : { - "FabricIngress.filtering.set_forwarding_type" : "node_10" + "FabricIngress.filtering.set_forwarding_type" : "node_28" }, "default_entry" : { - "action_id" : 12, + "action_id" : 13, "action_const" : true, "action_data" : ["0x0"], "action_entry_const" : true @@ -10091,7 +12688,7 @@ }, { "name" : "FabricIngress.forwarding.bridging", - "id" : 5, + "id" : 15, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 46, @@ -10102,7 +12699,7 @@ { "match_type" : "exact", "name" : "vlan_id", - "target" : ["scalars", "fabric_metadata_t._vlan_id1"], + "target" : ["scalars", "userMetadata._vlan_id9"], "mask" : null }, { @@ -10118,12 +12715,12 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [13, 1], + "action_ids" : [14, 1], "actions" : ["FabricIngress.forwarding.set_next_id_bridging", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "base_default_next" : "node_35", "next_tables" : { - "FabricIngress.forwarding.set_next_id_bridging" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.set_next_id_bridging" : "node_35", + "nop" : "node_35" }, "default_entry" : { "action_id" : 1, @@ -10134,7 +12731,7 @@ }, { "name" : "FabricIngress.forwarding.mpls", - "id" : 6, + "id" : 16, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 71, @@ -10145,7 +12742,7 @@ { "match_type" : "exact", "name" : "mpls_label", - "target" : ["scalars", "fabric_metadata_t._mpls_label4"], + "target" : ["scalars", "userMetadata._mpls_label12"], "mask" : null } ], @@ -10155,12 +12752,12 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [14, 2], + "action_ids" : [15, 2], "actions" : ["FabricIngress.forwarding.pop_mpls_and_next", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "base_default_next" : "node_35", "next_tables" : { - "FabricIngress.forwarding.pop_mpls_and_next" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.pop_mpls_and_next" : "node_35", + "nop" : "node_35" }, "default_entry" : { "action_id" : 2, @@ -10171,7 +12768,7 @@ }, { "name" : "FabricIngress.forwarding.routing_v4", - "id" : 7, + "id" : 17, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 108, @@ -10182,7 +12779,7 @@ { "match_type" : "lpm", "name" : "ipv4_dst", - "target" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"], + "target" : ["scalars", "userMetadata._ipv4_dst_addr24"], "mask" : null } ], @@ -10192,13 +12789,13 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [15, 16, 3], + "action_ids" : [16, 17, 3], "actions" : ["FabricIngress.forwarding.set_next_id_routing_v4", "FabricIngress.forwarding.nop_routing_v4", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "base_default_next" : "node_35", "next_tables" : { - "FabricIngress.forwarding.set_next_id_routing_v4" : "FabricIngress.acl.acl", - "FabricIngress.forwarding.nop_routing_v4" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.set_next_id_routing_v4" : "node_35", + "FabricIngress.forwarding.nop_routing_v4" : "node_35", + "nop" : "node_35" }, "default_entry" : { "action_id" : 3, @@ -10207,12 +12804,86 @@ "action_entry_const" : false } }, + { + "name" : "FabricIngress.pre_next.next_mpls", + "id" : 18, + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 36, + "column" : 10, + "source_fragment" : "next_mpls" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._next_id17"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [18, 4], + "actions" : ["FabricIngress.pre_next.set_mpls_label", "nop"], + "base_default_next" : "FabricIngress.pre_next.next_vlan", + "next_tables" : { + "FabricIngress.pre_next.set_mpls_label" : "FabricIngress.pre_next.next_vlan", + "nop" : "FabricIngress.pre_next.next_vlan" + }, + "default_entry" : { + "action_id" : 4, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.pre_next.next_vlan", + "id" : 19, + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 73, + "column" : 10, + "source_fragment" : "next_vlan" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._next_id17"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [19, 5], + "actions" : ["FabricIngress.pre_next.set_vlan", "nop"], + "base_default_next" : "FabricIngress.acl.acl", + "next_tables" : { + "FabricIngress.pre_next.set_vlan" : "FabricIngress.acl.acl", + "nop" : "FabricIngress.acl.acl" + }, + "default_entry" : { + "action_id" : 5, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, { "name" : "FabricIngress.acl.acl", - "id" : 8, + "id" : 20, "source_info" : { "filename" : "include/control/acl.p4", - "line" : 60, + "line" : 59, "column" : 10, "source_fragment" : "acl" }, @@ -10223,24 +12894,6 @@ "target" : ["standard_metadata", "ingress_port"], "mask" : null }, - { - "match_type" : "ternary", - "name" : "ip_proto", - "target" : ["scalars", "fabric_metadata_t._ip_proto12"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "l4_sport", - "target" : ["scalars", "fabric_metadata_t._l4_sport13"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "l4_dport", - "target" : ["scalars", "fabric_metadata_t._l4_dport14"], - "mask" : null - }, { "match_type" : "ternary", "name" : "eth_dst", @@ -10268,13 +12921,19 @@ { "match_type" : "ternary", "name" : "ipv4_src", - "target" : ["ipv4", "src_addr"], + "target" : ["scalars", "userMetadata._lkp_ipv4_src1"], "mask" : null }, { "match_type" : "ternary", "name" : "ipv4_dst", - "target" : ["ipv4", "dst_addr"], + "target" : ["scalars", "userMetadata._lkp_ipv4_dst2"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._lkp_ip_proto3"], "mask" : null }, { @@ -10288,6 +12947,24 @@ "name" : "icmp_code", "target" : ["icmp", "icmp_code"], "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._lkp_l4_sport4"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._lkp_l4_dport5"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "port_type", + "target" : ["scalars", "userMetadata._port_type37"], + "mask" : null } ], "match_type" : "ternary", @@ -10296,18 +12973,18 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [17, 18, 19, 20, 21], + "action_ids" : [20, 21, 22, 23, 24], "actions" : ["FabricIngress.acl.set_next_id_acl", "FabricIngress.acl.punt_to_cpu", "FabricIngress.acl.set_clone_session_id", "FabricIngress.acl.drop", "FabricIngress.acl.nop_acl"], - "base_default_next" : "node_18", + "base_default_next" : "node_39", "next_tables" : { - "FabricIngress.acl.set_next_id_acl" : "node_18", - "FabricIngress.acl.punt_to_cpu" : "node_18", - "FabricIngress.acl.set_clone_session_id" : "node_18", - "FabricIngress.acl.drop" : "node_18", - "FabricIngress.acl.nop_acl" : "node_18" + "FabricIngress.acl.set_next_id_acl" : "node_39", + "FabricIngress.acl.punt_to_cpu" : "node_39", + "FabricIngress.acl.set_clone_session_id" : "node_39", + "FabricIngress.acl.drop" : "node_39", + "FabricIngress.acl.nop_acl" : "node_39" }, "default_entry" : { - "action_id" : 21, + "action_id" : 24, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -10315,10 +12992,10 @@ }, { "name" : "FabricIngress.next.xconnect", - "id" : 9, + "id" : 21, "source_info" : { "filename" : "include/control/next.p4", - "line" : 119, + "line" : 68, "column" : 10, "source_fragment" : "xconnect" }, @@ -10332,7 +13009,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id9"], + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], @@ -10342,7 +13019,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [23, 24, 5], + "action_ids" : [25, 26, 6], "actions" : ["FabricIngress.next.output_xconnect", "FabricIngress.next.set_next_id_xconnect", "nop"], "base_default_next" : "FabricIngress.next.hashed", "next_tables" : { @@ -10351,7 +13028,7 @@ "nop" : "FabricIngress.next.hashed" }, "default_entry" : { - "action_id" : 5, + "action_id" : 6, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -10359,89 +13036,51 @@ }, { "name" : "FabricIngress.next.hashed", - "id" : 10, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 202, - "column" : 10, - "source_fragment" : "hashed" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id9"], - "mask" : null - } - ], - "match_type" : "exact", - "type" : "indirect_ws", - "action_profile" : "FabricIngress.next.hashed_selector", - "max_size" : 1024, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [25, 26, 27, 6], - "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "FabricIngress.next.mpls_routing_hashed", "nop"], - "base_default_next" : "FabricIngress.next.multicast", - "next_tables" : { - "FabricIngress.next.output_hashed" : "FabricIngress.next.multicast", - "FabricIngress.next.routing_hashed" : "FabricIngress.next.multicast", - "FabricIngress.next.mpls_routing_hashed" : "FabricIngress.next.multicast", - "nop" : "FabricIngress.next.multicast" - } - }, - { - "name" : "FabricIngress.next.multicast", - "id" : 11, + "id" : 22, "source_info" : { "filename" : "include/control/next.p4", - "line" : 236, + "line" : 138, "column" : 10, - "source_fragment" : "multicast" + "source_fragment" : "hashed" }, "key" : [ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id9"], + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], "match_type" : "exact", - "type" : "simple", + "type" : "indirect_ws", + "action_profile" : "FabricIngress.next.hashed_selector", "max_size" : 1024, "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [28, 7], - "actions" : ["FabricIngress.next.set_mcast_group_id", "nop"], - "base_default_next" : "FabricIngress.next.next_vlan", + "action_ids" : [27, 28, 7], + "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "nop"], + "base_default_next" : "FabricIngress.next.multicast", "next_tables" : { - "FabricIngress.next.set_mcast_group_id" : "FabricIngress.next.next_vlan", - "nop" : "FabricIngress.next.next_vlan" - }, - "default_entry" : { - "action_id" : 7, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true + "FabricIngress.next.output_hashed" : "FabricIngress.next.multicast", + "FabricIngress.next.routing_hashed" : "FabricIngress.next.multicast", + "nop" : "FabricIngress.next.multicast" } }, { - "name" : "FabricIngress.next.next_vlan", - "id" : 12, + "name" : "FabricIngress.next.multicast", + "id" : 23, "source_info" : { "filename" : "include/control/next.p4", - "line" : 86, + "line" : 171, "column" : 10, - "source_fragment" : "next_vlan" + "source_fragment" : "multicast" }, "key" : [ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id9"], + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], @@ -10451,23 +13090,23 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [22, 4], - "actions" : ["FabricIngress.next.set_vlan", "nop"], - "base_default_next" : "node_23", + "action_ids" : [29, 8], + "actions" : ["FabricIngress.next.set_mcast_group_id", "nop"], + "base_default_next" : "node_43", "next_tables" : { - "FabricIngress.next.set_vlan" : "node_23", - "nop" : "node_23" + "FabricIngress.next.set_mcast_group_id" : "node_43", + "nop" : "node_43" }, "default_entry" : { - "action_id" : 4, + "action_id" : 8, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_2", - "id" : 13, + "name" : "tbl_port_counter31", + "id" : 24, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 31, @@ -10481,22 +13120,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [32], - "actions" : ["act_2"], - "base_default_next" : "node_25", + "action_ids" : [46], + "actions" : ["port_counter31"], + "base_default_next" : "node_45", "next_tables" : { - "act_2" : "node_25" + "port_counter31" : "node_45" }, "default_entry" : { - "action_id" : 32, + "action_id" : 46, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_3", - "id" : 14, + "name" : "tbl_port_counter34", + "id" : 25, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 34, @@ -10510,14 +13149,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [33], - "actions" : ["act_3"], + "action_ids" : [47], + "actions" : ["port_counter34"], "base_default_next" : "FabricIngress.process_set_source_sink.tb_set_source", "next_tables" : { - "act_3" : "FabricIngress.process_set_source_sink.tb_set_source" + "port_counter34" : "FabricIngress.process_set_source_sink.tb_set_source" }, "default_entry" : { - "action_id" : 33, + "action_id" : 47, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -10525,7 +13164,7 @@ }, { "name" : "FabricIngress.process_set_source_sink.tb_set_source", - "id" : 15, + "id" : 26, "source_info" : { "filename" : "include/int/int_main.p4", "line" : 46, @@ -10539,70 +13178,332 @@ "target" : ["standard_metadata", "ingress_port"], "mask" : null } - ], - "match_type" : "exact", - "type" : "simple", - "max_size" : 511, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [8, 0], - "actions" : ["FabricIngress.process_set_source_sink.int_set_source", "nop"], - "base_default_next" : null, - "next_tables" : { - "FabricIngress.process_set_source_sink.int_set_source" : null, - "nop" : null + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 511, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [9, 0], + "actions" : ["FabricIngress.process_set_source_sink.int_set_source", "nop"], + "base_default_next" : "tbl_slicing114", + "next_tables" : { + "FabricIngress.process_set_source_sink.int_set_source" : "tbl_slicing114", + "nop" : "tbl_slicing114" + }, + "default_entry" : { + "action_id" : 0, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing114", + "id" : 27, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 8, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) slice_tc, fabric_md.packet_color); ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [48], + "actions" : ["slicing114"], + "base_default_next" : "FabricIngress.qos.queues", + "next_tables" : { + "slicing114" : "FabricIngress.qos.queues" + }, + "default_entry" : { + "action_id" : 48, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.qos.queues", + "id" : 28, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 93, + "column" : 10, + "source_fragment" : "queues" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "slice_id", + "target" : ["scalars", "userMetadata._slice_id25"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "tc", + "target" : ["scalars", "userMetadata._tc27"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "color", + "target" : ["scalars", "userMetadata._packet_color26"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 128, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [32, 33], + "actions" : ["FabricIngress.qos.set_queue", "FabricIngress.qos.meter_drop"], + "base_default_next" : null, + "next_tables" : { + "FabricIngress.qos.set_queue" : null, + "FabricIngress.qos.meter_drop" : null + }, + "default_entry" : { + "action_id" : 32, + "action_const" : true, + "action_data" : ["0x0"], + "action_entry_const" : true + } + } + ], + "action_profiles" : [ + { + "name" : "FabricIngress.next.hashed_selector", + "id" : 0, + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 125, + "column" : 57, + "source_fragment" : "hashed_selector" + }, + "max_size" : 1024, + "selector" : { + "algo" : "crc16", + "input" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + } + ] + } + } + ], + "conditionals" : [ + { + "name" : "node_3", + "id" : 0, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 31, + "column" : 12, + "source_fragment" : "hdr.inner_ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init32", + "false_next" : "node_11" + }, + { + "name" : "node_5", + "id" : 1, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 36, + "column" : 16, + "source_fragment" : "hdr.inner_tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_tcp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init37", + "false_next" : "node_7" + }, + { + "name" : "node_7", + "id" : 2, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 39, + "column" : 23, + "source_fragment" : "hdr.inner_udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_udp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init40", + "false_next" : "node_9" + }, + { + "name" : "node_9", + "id" : 3, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 42, + "column" : 23, + "source_fragment" : "hdr.inner_icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_icmp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init43", + "false_next" : "node_19" + }, + { + "name" : "node_11", + "id" : 4, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 46, + "column" : 19, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init47", + "false_next" : "node_19" + }, + { + "name" : "node_13", + "id" : 5, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 51, + "column" : 16, + "source_fragment" : "hdr.tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["tcp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init52", + "false_next" : "node_15" + }, + { + "name" : "node_15", + "id" : 6, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 54, + "column" : 23, + "source_fragment" : "hdr.udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["udp", "$valid$"] + } + } }, - "default_entry" : { - "action_id" : 0, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - } - ], - "action_profiles" : [ + "true_next" : "tbl_lookup_md_init55", + "false_next" : "node_17" + }, { - "name" : "FabricIngress.next.hashed_selector", - "id" : 0, + "name" : "node_17", + "id" : 7, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 183, - "column" : 57, - "source_fragment" : "hashed_selector" + "filename" : "include/control/lookup_md_init.p4", + "line" : 57, + "column" : 23, + "source_fragment" : "hdr.icmp.isValid()" }, - "max_size" : 1024, - "selector" : { - "algo" : "crc16", - "input" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] - }, - { + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["icmp", "$valid$"] } - ] - } - } - ], - "conditionals" : [ + } + }, + "true_next" : "tbl_lookup_md_init58", + "false_next" : "node_19" + }, { - "name" : "node_2", - "id" : 0, + "name" : "node_19", + "id" : 8, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 24, @@ -10620,15 +13521,15 @@ } } }, - "true_next" : "tbl_act", - "false_next" : "node_4" + "true_next" : "tbl_packetio25", + "false_next" : "FabricIngress.slice_tc_classifier.classifier" }, { - "name" : "node_4", - "id" : 1, + "name" : "node_22", + "id" : 9, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 110, + "line" : 112, "column" : 12, "source_fragment" : "hdr.vlan_tag.isValid()" }, @@ -10643,15 +13544,15 @@ } } }, - "true_next" : "tbl_act_0", - "false_next" : "node_6" + "true_next" : "tbl_filtering113", + "false_next" : "node_24" }, { - "name" : "node_6", - "id" : 2, + "name" : "node_24", + "id" : 10, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 122, + "line" : 124, "column" : 12, "source_fragment" : "!hdr.mpls.isValid()" }, @@ -10673,45 +13574,42 @@ } } }, - "true_next" : "tbl_act_1", + "true_next" : "tbl_filtering129", "false_next" : "FabricIngress.filtering.ingress_port_vlan" }, { - "name" : "node_10", - "id" : 3, + "name" : "node_28", + "id" : 11, "source_info" : { "filename" : "fabric.p4", - "line" : 69, + "line" : 80, "column" : 12, - "source_fragment" : "fabric_metadata.skip_forwarding == false" + "source_fragment" : "fabric_metadata.skip_forwarding" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_forwarding6"] + "value" : ["scalars", "userMetadata._skip_forwarding14"] } } - }, - "right" : { - "type" : "bool", - "value" : false } } }, - "true_next" : "node_11", - "false_next" : "FabricIngress.acl.acl" + "true_next" : "node_29", + "false_next" : "node_35" }, { - "name" : "node_11", - "id" : 4, + "name" : "node_29", + "id" : 12, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 150, @@ -10724,7 +13622,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -10733,11 +13631,11 @@ } }, "true_next" : "FabricIngress.forwarding.bridging", - "false_next" : "node_13" + "false_next" : "node_31" }, { - "name" : "node_13", - "id" : 5, + "name" : "node_31", + "id" : 13, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 151, @@ -10750,7 +13648,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -10759,11 +13657,11 @@ } }, "true_next" : "FabricIngress.forwarding.mpls", - "false_next" : "node_15" + "false_next" : "node_33" }, { - "name" : "node_15", - "id" : 6, + "name" : "node_33", + "id" : 14, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 152, @@ -10776,7 +13674,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -10785,44 +13683,71 @@ } }, "true_next" : "FabricIngress.forwarding.routing_v4", - "false_next" : "FabricIngress.acl.acl" + "false_next" : "node_35" }, { - "name" : "node_18", - "id" : 7, + "name" : "node_35", + "id" : 15, "source_info" : { "filename" : "fabric.p4", - "line" : 73, + "line" : 83, "column" : 12, - "source_fragment" : "fabric_metadata.skip_next == false" + "source_fragment" : "fabric_metadata.skip_next" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["scalars", "userMetadata._skip_next15"] } } - }, + } + } + }, + "true_next" : "FabricIngress.pre_next.next_mpls", + "false_next" : "FabricIngress.acl.acl" + }, + { + "name" : "node_39", + "id" : 16, + "source_info" : { + "filename" : "fabric.p4", + "line" : 87, + "column" : 12, + "source_fragment" : "fabric_metadata.skip_next" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "not", + "left" : null, "right" : { - "type" : "bool", - "value" : false + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + } + } } } }, - "false_next" : null, - "true_next" : "FabricIngress.next.xconnect" + "true_next" : "FabricIngress.next.xconnect", + "false_next" : "tbl_slicing114" }, { - "name" : "node_23", - "id" : 8, + "name" : "node_43", + "id" : 17, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 30, @@ -10843,12 +13768,12 @@ } } }, - "true_next" : "tbl_act_2", - "false_next" : "node_25" + "true_next" : "tbl_port_counter31", + "false_next" : "node_45" }, { - "name" : "node_25", - "id" : 9, + "name" : "node_45", + "id" : 18, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 33, @@ -10869,7 +13794,7 @@ } } }, - "true_next" : "tbl_act_3", + "true_next" : "tbl_port_counter34", "false_next" : "FabricIngress.process_set_source_sink.tb_set_source" } ] @@ -10879,15 +13804,15 @@ "id" : 1, "source_info" : { "filename" : "fabric.p4", - "line" : 91, + "line" : 105, "column" : 8, "source_fragment" : "FabricEgress" }, - "init_table" : "node_30", + "init_table" : "node_52", "tables" : [ { - "name" : "tbl_act_4", - "id" : 16, + "name" : "tbl_packetio41", + "id" : 29, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 41, @@ -10901,22 +13826,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [77], - "actions" : ["act_4"], - "base_default_next" : "node_32", + "action_ids" : [95], + "actions" : ["packetio41"], + "base_default_next" : "node_54", "next_tables" : { - "act_4" : "node_32" + "packetio41" : "node_54" }, "default_entry" : { - "action_id" : 77, + "action_id" : 95, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_5", - "id" : 17, + "name" : "tbl_packetio44", + "id" : 30, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 44, @@ -10930,25 +13855,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [78], - "actions" : ["act_5"], - "base_default_next" : "node_34", + "action_ids" : [96], + "actions" : ["packetio44"], + "base_default_next" : "node_56", "next_tables" : { - "act_5" : "node_34" + "packetio44" : "node_56" }, "default_entry" : { - "action_id" : 78, + "action_id" : 96, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_6", - "id" : 18, + "name" : "tbl_next283", + "id" : 31, "source_info" : { "filename" : "include/control/next.p4", - "line" : 337, + "line" : 283, "column" : 12, "source_fragment" : "mark_to_drop(standard_metadata)" }, @@ -10959,14 +13884,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [79], - "actions" : ["act_6"], - "base_default_next" : "node_36", + "action_ids" : [97], + "actions" : ["next283"], + "base_default_next" : "node_58", "next_tables" : { - "act_6" : "node_36" + "next283" : "node_58" }, "default_entry" : { - "action_id" : 79, + "action_id" : 97, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -10974,10 +13899,10 @@ }, { "name" : "tbl_egress_next_pop_mpls_if_present", - "id" : 19, + "id" : 32, "source_info" : { "filename" : "include/control/next.p4", - "line" : 341, + "line" : 287, "column" : 36, "source_fragment" : "pop_mpls_if_present()" }, @@ -10988,14 +13913,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [73], + "action_ids" : [88], "actions" : ["FabricEgress.egress_next.pop_mpls_if_present"], "base_default_next" : "FabricEgress.egress_next.egress_vlan", "next_tables" : { "FabricEgress.egress_next.pop_mpls_if_present" : "FabricEgress.egress_next.egress_vlan" }, "default_entry" : { - "action_id" : 73, + "action_id" : 88, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -11003,10 +13928,10 @@ }, { "name" : "tbl_egress_next_set_mpls", - "id" : 20, + "id" : 33, "source_info" : { "filename" : "include/control/next.p4", - "line" : 343, + "line" : 289, "column" : 12, "source_fragment" : "set_mpls()" }, @@ -11017,14 +13942,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [74], + "action_ids" : [89], "actions" : ["FabricEgress.egress_next.set_mpls"], "base_default_next" : "FabricEgress.egress_next.egress_vlan", "next_tables" : { "FabricEgress.egress_next.set_mpls" : "FabricEgress.egress_next.egress_vlan" }, "default_entry" : { - "action_id" : 74, + "action_id" : 89, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -11032,10 +13957,10 @@ }, { "name" : "FabricEgress.egress_next.egress_vlan", - "id" : 21, + "id" : 34, "source_info" : { "filename" : "include/control/next.p4", - "line" : 320, + "line" : 265, "column" : 10, "source_fragment" : "egress_vlan" }, @@ -11043,7 +13968,7 @@ { "match_type" : "exact", "name" : "vlan_id", - "target" : ["scalars", "fabric_metadata_t._vlan_id1"], + "target" : ["scalars", "userMetadata._vlan_id9"], "mask" : null }, { @@ -11059,101 +13984,27 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [76, 36], - "actions" : ["FabricEgress.egress_next.pop_vlan", "nop"], - "base_default_next" : null, - "next_tables" : { - "__HIT__" : "tbl_act_7", - "__MISS__" : "tbl_act_8" - }, - "default_entry" : { - "action_id" : 36, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_7", - "id" : 22, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [80], - "actions" : ["act_7"], - "base_default_next" : "node_43", - "next_tables" : { - "act_7" : "node_43" - }, - "default_entry" : { - "action_id" : 80, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_8", - "id" : 23, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [81], - "actions" : ["act_8"], - "base_default_next" : "node_43", - "next_tables" : { - "act_8" : "node_43" - }, - "default_entry" : { - "action_id" : 81, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_egress_next_push_vlan", - "id" : 24, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 360, - "column" : 20, - "source_fragment" : "push_vlan()" - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [75], - "actions" : ["FabricEgress.egress_next.push_vlan"], - "base_default_next" : "node_46", + "action_ids" : [90, 91, 92], + "actions" : ["FabricEgress.egress_next.push_vlan", "FabricEgress.egress_next.pop_vlan", "FabricEgress.egress_next.drop"], + "base_default_next" : "node_63", "next_tables" : { - "FabricEgress.egress_next.push_vlan" : "node_46" + "FabricEgress.egress_next.push_vlan" : "node_63", + "FabricEgress.egress_next.pop_vlan" : "node_63", + "FabricEgress.egress_next.drop" : "node_63" }, "default_entry" : { - "action_id" : 75, + "action_id" : 92, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_9", - "id" : 25, + "name" : "tbl_next309", + "id" : 35, "source_info" : { "filename" : "include/control/next.p4", - "line" : 369, + "line" : 309, "column" : 25, "source_fragment" : "=" }, @@ -11164,25 +14015,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [83], - "actions" : ["act_10"], - "base_default_next" : "node_48", + "action_ids" : [99], + "actions" : ["next309"], + "base_default_next" : "node_65", "next_tables" : { - "act_10" : "node_48" + "next309" : "node_65" }, "default_entry" : { - "action_id" : 83, + "action_id" : 99, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_10", - "id" : 26, + "name" : "tbl_next310", + "id" : 36, "source_info" : { "filename" : "include/control/next.p4", - "line" : 370, + "line" : 310, "column" : 35, "source_fragment" : "mark_to_drop(standard_metadata)" }, @@ -11193,25 +14044,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [82], - "actions" : ["act_9"], - "base_default_next" : "node_54", + "action_ids" : [98], + "actions" : ["next310"], + "base_default_next" : "node_71", "next_tables" : { - "act_9" : "node_54" + "next310" : "node_71" }, "default_entry" : { - "action_id" : 82, + "action_id" : 98, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_11", - "id" : 27, + "name" : "tbl_next313", + "id" : 37, "source_info" : { "filename" : "include/control/next.p4", - "line" : 373, + "line" : 313, "column" : 29, "source_fragment" : "=" }, @@ -11222,25 +14073,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [85], - "actions" : ["act_12"], - "base_default_next" : "node_52", + "action_ids" : [101], + "actions" : ["next313"], + "base_default_next" : "node_69", "next_tables" : { - "act_12" : "node_52" + "next313" : "node_69" }, "default_entry" : { - "action_id" : 85, + "action_id" : 101, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_12", - "id" : 28, + "name" : "tbl_next314", + "id" : 38, "source_info" : { "filename" : "include/control/next.p4", - "line" : 374, + "line" : 314, "column" : 39, "source_fragment" : "mark_to_drop(standard_metadata)" }, @@ -11251,14 +14102,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [84], - "actions" : ["act_11"], - "base_default_next" : "node_54", + "action_ids" : [100], + "actions" : ["next314"], + "base_default_next" : "node_71", "next_tables" : { - "act_11" : "node_54" + "next314" : "node_71" }, "default_entry" : { - "action_id" : 84, + "action_id" : 100, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -11266,7 +14117,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_source.tb_int_source", - "id" : 29, + "id" : 39, "source_info" : { "filename" : "include/int/int_source.p4", "line" : 66, @@ -11289,13 +14140,13 @@ { "match_type" : "ternary", "name" : "l4_sport", - "target" : ["scalars", "fabric_metadata_t._l4_sport13"], + "target" : ["scalars", "userMetadata._l4_sport21"], "mask" : null }, { "match_type" : "ternary", "name" : "l4_dport", - "target" : ["scalars", "fabric_metadata_t._l4_dport14"], + "target" : ["scalars", "userMetadata._l4_dport22"], "mask" : null } ], @@ -11305,23 +14156,23 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [39, 34], + "action_ids" : [54, 49], "actions" : ["FabricEgress.process_int_main.process_int_source.int_source_dscp", "nop"], - "base_default_next" : "node_57", + "base_default_next" : "node_74", "next_tables" : { - "FabricEgress.process_int_main.process_int_source.int_source_dscp" : "node_57", - "nop" : "node_57" + "FabricEgress.process_int_main.process_int_source.int_source_dscp" : "node_74", + "nop" : "node_74" }, "default_entry" : { - "action_id" : 34, + "action_id" : 49, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_13", - "id" : 30, + "name" : "tbl_act", + "id" : 40, "key" : [], "match_type" : "exact", "type" : "simple", @@ -11329,14 +14180,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [86], - "actions" : ["act_13"], + "action_ids" : [102], + "actions" : ["act"], "base_default_next" : "FabricEgress.process_int_main.process_int_transit.tb_int_insert", "next_tables" : { - "act_13" : "FabricEgress.process_int_main.process_int_transit.tb_int_insert" + "act" : "FabricEgress.process_int_main.process_int_transit.tb_int_insert" }, "default_entry" : { - "action_id" : 86, + "action_id" : 102, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -11344,7 +14195,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.tb_int_insert", - "id" : 31, + "id" : 41, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 315, @@ -11365,23 +14216,23 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [40, 35], + "action_ids" : [55, 50], "actions" : ["FabricEgress.process_int_main.process_int_transit.init_metadata", "nop"], - "base_default_next" : "node_60", + "base_default_next" : "node_77", "next_tables" : { - "FabricEgress.process_int_main.process_int_transit.init_metadata" : "node_60", - "nop" : "node_60" + "FabricEgress.process_int_main.process_int_transit.init_metadata" : "node_77", + "nop" : "node_77" }, "default_entry" : { - "action_id" : 35, + "action_id" : 50, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_14", - "id" : 32, + "name" : "tbl_int_transit420", + "id" : 42, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 420, @@ -11395,14 +14246,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [87], - "actions" : ["act_14"], - "base_default_next" : "node_62", + "action_ids" : [103], + "actions" : ["int_transit420"], + "base_default_next" : "node_79", "next_tables" : { - "act_14" : "node_62" + "int_transit420" : "node_79" }, "default_entry" : { - "action_id" : 87, + "action_id" : 103, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -11410,7 +14261,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0003", - "id" : 33, + "id" : 43, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 331, @@ -11431,7 +14282,7 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 37], + "action_ids" : [56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 52], "actions" : ["FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i0", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i1", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i2", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i3", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i4", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i5", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i6", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i7", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i8", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i9", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i10", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i11", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i12", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i13", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i14", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i15", "NoAction"], "base_default_next" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0407", "next_tables" : { @@ -11454,7 +14305,7 @@ "NoAction" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0407" }, "default_entry" : { - "action_id" : 37, + "action_id" : 52, "action_const" : false, "action_data" : [], "action_entry_const" : false @@ -11474,7 +14325,7 @@ } ], "action_entry" : { - "action_id" : 41, + "action_id" : 56, "action_data" : [] }, "priority" : 1 @@ -11493,7 +14344,7 @@ } ], "action_entry" : { - "action_id" : 42, + "action_id" : 57, "action_data" : [] }, "priority" : 2 @@ -11512,7 +14363,7 @@ } ], "action_entry" : { - "action_id" : 43, + "action_id" : 58, "action_data" : [] }, "priority" : 3 @@ -11531,7 +14382,7 @@ } ], "action_entry" : { - "action_id" : 44, + "action_id" : 59, "action_data" : [] }, "priority" : 4 @@ -11550,7 +14401,7 @@ } ], "action_entry" : { - "action_id" : 45, + "action_id" : 60, "action_data" : [] }, "priority" : 5 @@ -11569,7 +14420,7 @@ } ], "action_entry" : { - "action_id" : 46, + "action_id" : 61, "action_data" : [] }, "priority" : 6 @@ -11588,7 +14439,7 @@ } ], "action_entry" : { - "action_id" : 47, + "action_id" : 62, "action_data" : [] }, "priority" : 7 @@ -11607,7 +14458,7 @@ } ], "action_entry" : { - "action_id" : 48, + "action_id" : 63, "action_data" : [] }, "priority" : 8 @@ -11626,7 +14477,7 @@ } ], "action_entry" : { - "action_id" : 49, + "action_id" : 64, "action_data" : [] }, "priority" : 9 @@ -11645,7 +14496,7 @@ } ], "action_entry" : { - "action_id" : 50, + "action_id" : 65, "action_data" : [] }, "priority" : 10 @@ -11664,7 +14515,7 @@ } ], "action_entry" : { - "action_id" : 51, + "action_id" : 66, "action_data" : [] }, "priority" : 11 @@ -11683,7 +14534,7 @@ } ], "action_entry" : { - "action_id" : 52, + "action_id" : 67, "action_data" : [] }, "priority" : 12 @@ -11702,7 +14553,7 @@ } ], "action_entry" : { - "action_id" : 53, + "action_id" : 68, "action_data" : [] }, "priority" : 13 @@ -11721,7 +14572,7 @@ } ], "action_entry" : { - "action_id" : 54, + "action_id" : 69, "action_data" : [] }, "priority" : 14 @@ -11740,7 +14591,7 @@ } ], "action_entry" : { - "action_id" : 55, + "action_id" : 70, "action_data" : [] }, "priority" : 15 @@ -11759,7 +14610,7 @@ } ], "action_entry" : { - "action_id" : 56, + "action_id" : 71, "action_data" : [] }, "priority" : 16 @@ -11768,7 +14619,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0407", - "id" : 34, + "id" : 44, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 375, @@ -11789,30 +14640,30 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 38], + "action_ids" : [72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 53], "actions" : ["FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15", "NoAction"], - "base_default_next" : "tbl_act_15", + "base_default_next" : "tbl_int_transit425", "next_tables" : { - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14" : "tbl_act_15", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15" : "tbl_act_15", - "NoAction" : "tbl_act_15" + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15" : "tbl_int_transit425", + "NoAction" : "tbl_int_transit425" }, "default_entry" : { - "action_id" : 38, + "action_id" : 53, "action_const" : false, "action_data" : [], "action_entry_const" : false @@ -11832,7 +14683,7 @@ } ], "action_entry" : { - "action_id" : 57, + "action_id" : 72, "action_data" : [] }, "priority" : 1 @@ -11851,7 +14702,7 @@ } ], "action_entry" : { - "action_id" : 58, + "action_id" : 73, "action_data" : [] }, "priority" : 2 @@ -11870,7 +14721,7 @@ } ], "action_entry" : { - "action_id" : 59, + "action_id" : 74, "action_data" : [] }, "priority" : 3 @@ -11889,7 +14740,7 @@ } ], "action_entry" : { - "action_id" : 60, + "action_id" : 75, "action_data" : [] }, "priority" : 4 @@ -11908,7 +14759,7 @@ } ], "action_entry" : { - "action_id" : 61, + "action_id" : 76, "action_data" : [] }, "priority" : 5 @@ -11927,7 +14778,7 @@ } ], "action_entry" : { - "action_id" : 62, + "action_id" : 77, "action_data" : [] }, "priority" : 6 @@ -11946,7 +14797,7 @@ } ], "action_entry" : { - "action_id" : 63, + "action_id" : 78, "action_data" : [] }, "priority" : 7 @@ -11965,7 +14816,7 @@ } ], "action_entry" : { - "action_id" : 64, + "action_id" : 79, "action_data" : [] }, "priority" : 8 @@ -11984,7 +14835,7 @@ } ], "action_entry" : { - "action_id" : 65, + "action_id" : 80, "action_data" : [] }, "priority" : 9 @@ -12003,7 +14854,7 @@ } ], "action_entry" : { - "action_id" : 66, + "action_id" : 81, "action_data" : [] }, "priority" : 10 @@ -12022,7 +14873,7 @@ } ], "action_entry" : { - "action_id" : 67, + "action_id" : 82, "action_data" : [] }, "priority" : 11 @@ -12041,7 +14892,7 @@ } ], "action_entry" : { - "action_id" : 68, + "action_id" : 83, "action_data" : [] }, "priority" : 12 @@ -12060,7 +14911,7 @@ } ], "action_entry" : { - "action_id" : 69, + "action_id" : 84, "action_data" : [] }, "priority" : 13 @@ -12079,7 +14930,7 @@ } ], "action_entry" : { - "action_id" : 70, + "action_id" : 85, "action_data" : [] }, "priority" : 14 @@ -12098,7 +14949,7 @@ } ], "action_entry" : { - "action_id" : 71, + "action_id" : 86, "action_data" : [] }, "priority" : 15 @@ -12117,7 +14968,7 @@ } ], "action_entry" : { - "action_id" : 72, + "action_id" : 87, "action_data" : [] }, "priority" : 16 @@ -12125,8 +14976,8 @@ ] }, { - "name" : "tbl_act_15", - "id" : 35, + "name" : "tbl_int_transit425", + "id" : 45, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 425, @@ -12140,22 +14991,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [89], - "actions" : ["act_16"], - "base_default_next" : "node_66", + "action_ids" : [105], + "actions" : ["int_transit425"], + "base_default_next" : "node_83", "next_tables" : { - "act_16" : "node_66" + "int_transit425" : "node_83" }, "default_entry" : { - "action_id" : 89, + "action_id" : 105, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_16", - "id" : 36, + "name" : "tbl_int_transit428", + "id" : 46, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 428, @@ -12169,22 +15020,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [88], - "actions" : ["act_15"], - "base_default_next" : "node_68", + "action_ids" : [104], + "actions" : ["int_transit428"], + "base_default_next" : "node_85", "next_tables" : { - "act_15" : "node_68" + "int_transit428" : "node_85" }, "default_entry" : { - "action_id" : 88, + "action_id" : 104, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_17", - "id" : 37, + "name" : "tbl_int_transit431", + "id" : 47, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 431, @@ -12198,22 +15049,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [90], - "actions" : ["act_17"], - "base_default_next" : "node_70", + "action_ids" : [106], + "actions" : ["int_transit431"], + "base_default_next" : "node_87", "next_tables" : { - "act_17" : "node_70" + "int_transit431" : "node_87" }, "default_entry" : { - "action_id" : 90, + "action_id" : 106, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_18", - "id" : 38, + "name" : "tbl_int_transit434", + "id" : 48, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 434, @@ -12227,14 +15078,109 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [91], - "actions" : ["act_18"], + "action_ids" : [107], + "actions" : ["int_transit434"], + "base_default_next" : "tbl_slicing126", + "next_tables" : { + "int_transit434" : "tbl_slicing126" + }, + "default_entry" : { + "action_id" : 107, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing126", + "id" : 49, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 126, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.dscp;" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [109], + "actions" : ["slicing126"], + "base_default_next" : "FabricEgress.dscp_rewriter.rewriter", + "next_tables" : { + "slicing126" : "FabricEgress.dscp_rewriter.rewriter" + }, + "default_entry" : { + "action_id" : 109, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.dscp_rewriter.rewriter", + "id" : 50, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 138, + "column" : 10, + "source_fragment" : "rewriter" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "eg_port", + "target" : ["standard_metadata", "egress_port"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 512, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [93, 94, 51], + "actions" : ["FabricEgress.dscp_rewriter.rewrite", "FabricEgress.dscp_rewriter.clear", "nop"], + "base_default_next" : null, + "next_tables" : { + "__MISS__" : null, + "__HIT__" : "node_91" + }, + "default_entry" : { + "action_id" : 51, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing159", + "id" : 51, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 159, + "column" : 36, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [108], + "actions" : ["slicing159"], "base_default_next" : null, "next_tables" : { - "act_18" : null + "slicing159" : null }, "default_entry" : { - "action_id" : 91, + "action_id" : 108, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -12244,41 +15190,31 @@ "action_profiles" : [], "conditionals" : [ { - "name" : "node_30", - "id" : 10, + "name" : "node_52", + "id" : 19, "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 39, - "column" : 12, - "source_fragment" : "fabric_metadata.is_controller_packet_out == true" + "filename" : "fabric.p4", + "line" : 118, + "column" : 33, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_controller_packet_out11"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._is_controller_packet_out19"] } } }, - "true_next" : "tbl_act_4", - "false_next" : "node_32" + "true_next" : "tbl_packetio41", + "false_next" : "node_54" }, { - "name" : "node_32", - "id" : 11, + "name" : "node_54", + "id" : 20, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 43, @@ -12299,15 +15235,15 @@ } } }, - "true_next" : "tbl_act_5", - "false_next" : "node_34" + "true_next" : "tbl_packetio44", + "false_next" : "node_56" }, { - "name" : "node_34", - "id" : 12, + "name" : "node_56", + "id" : 21, "source_info" : { "filename" : "include/control/next.p4", - "line" : 335, + "line" : 281, "column" : 12, "source_fragment" : "fabric_metadata.is_multicast == true ..." }, @@ -12318,21 +15254,11 @@ "left" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_multicast10"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._is_multicast18"] } } }, @@ -12352,15 +15278,15 @@ } } }, - "true_next" : "tbl_act_6", - "false_next" : "node_36" + "true_next" : "tbl_next283", + "false_next" : "node_58" }, { - "name" : "node_36", - "id" : 13, + "name" : "node_58", + "id" : 22, "source_info" : { "filename" : "include/control/next.p4", - "line" : 340, + "line" : 286, "column" : 12, "source_fragment" : "fabric_metadata.mpls_label == 0" }, @@ -12370,7 +15296,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "value" : ["scalars", "userMetadata._mpls_label12"] }, "right" : { "type" : "hexstr", @@ -12378,15 +15304,15 @@ } } }, - "true_next" : "node_37", + "true_next" : "node_59", "false_next" : "tbl_egress_next_set_mpls" }, { - "name" : "node_37", - "id" : 14, + "name" : "node_59", + "id" : 23, "source_info" : { "filename" : "include/control/next.p4", - "line" : 341, + "line" : 287, "column" : 16, "source_fragment" : "hdr.mpls.isValid()" }, @@ -12405,67 +15331,11 @@ "false_next" : "FabricEgress.egress_next.egress_vlan" }, { - "name" : "node_43", - "id" : 15, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 357, - "column" : 16, - "source_fragment" : "!egress_vlan.apply().hit" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "not", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - } - } - } - } - }, - "true_next" : "node_44", - "false_next" : "node_46" - }, - { - "name" : "node_44", - "id" : 16, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 359, - "column" : 20, - "source_fragment" : "fabric_metadata.vlan_id != DEFAULT_VLAN_ID" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x0ffe" - } - } - }, - "true_next" : "tbl_egress_next_push_vlan", - "false_next" : "node_46" - }, - { - "name" : "node_46", - "id" : 17, + "name" : "node_63", + "id" : 24, "source_info" : { "filename" : "include/control/next.p4", - "line" : 368, + "line" : 308, "column" : 12, "source_fragment" : "hdr.mpls.isValid()" }, @@ -12480,15 +15350,15 @@ } } }, - "true_next" : "tbl_act_9", - "false_next" : "node_50" + "true_next" : "tbl_next309", + "false_next" : "node_67" }, { - "name" : "node_48", - "id" : 18, + "name" : "node_65", + "id" : 25, "source_info" : { "filename" : "include/control/next.p4", - "line" : 370, + "line" : 310, "column" : 16, "source_fragment" : "hdr.mpls.ttl == 0" }, @@ -12506,15 +15376,15 @@ } } }, - "true_next" : "tbl_act_10", - "false_next" : "node_54" + "true_next" : "tbl_next310", + "false_next" : "node_71" }, { - "name" : "node_50", - "id" : 19, + "name" : "node_67", + "id" : 26, "source_info" : { "filename" : "include/control/next.p4", - "line" : 372, + "line" : 312, "column" : 15, "source_fragment" : "hdr.ipv4.isValid() && fabric_metadata.fwd_type != FWD_BRIDGING" }, @@ -12539,7 +15409,7 @@ "op" : "!=", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -12549,15 +15419,15 @@ } } }, - "true_next" : "tbl_act_11", - "false_next" : "node_54" + "true_next" : "tbl_next313", + "false_next" : "node_71" }, { - "name" : "node_52", - "id" : 20, + "name" : "node_69", + "id" : 27, "source_info" : { "filename" : "include/control/next.p4", - "line" : 374, + "line" : 314, "column" : 20, "source_fragment" : "hdr.ipv4.ttl == 0" }, @@ -12575,12 +15445,12 @@ } } }, - "true_next" : "tbl_act_12", - "false_next" : "node_54" + "true_next" : "tbl_next314", + "false_next" : "node_71" }, { - "name" : "node_54", - "id" : 21, + "name" : "node_71", + "id" : 28, "source_info" : { "filename" : "include/int/int_main.p4", "line" : 102, @@ -12655,45 +15525,35 @@ } } }, - "false_next" : null, - "true_next" : "node_55" + "true_next" : "node_72", + "false_next" : "tbl_slicing126" }, { - "name" : "node_55", - "id" : 22, + "name" : "node_72", + "id" : 29, "source_info" : { - "filename" : "include/int/int_main.p4", - "line" : 106, - "column" : 16, - "source_fragment" : "fabric_metadata.int_meta.source == true" + "filename" : "fabric.p4", + "line" : 127, + "column" : 36, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_source17"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_source29"] } } }, "true_next" : "FabricEgress.process_int_main.process_int_source.tb_int_source", - "false_next" : "node_57" + "false_next" : "node_74" }, { - "name" : "node_57", - "id" : 23, + "name" : "node_74", + "id" : 30, "source_info" : { "filename" : "include/int/int_main.p4", "line" : 110, @@ -12711,45 +15571,42 @@ } } }, - "false_next" : null, - "true_next" : "tbl_act_13" + "true_next" : "tbl_act", + "false_next" : "tbl_slicing126" }, { - "name" : "node_60", - "id" : 24, + "name" : "node_77", + "id" : 31, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 419, "column" : 12, - "source_fragment" : "fmeta.int_meta.transit == false" + "source_fragment" : "fmeta.int_meta.transit" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_transit18"] + "value" : ["scalars", "userMetadata._int_meta_transit30"] } } - }, - "right" : { - "type" : "bool", - "value" : false } } }, - "true_next" : "tbl_act_14", - "false_next" : "node_62" + "true_next" : "tbl_int_transit420", + "false_next" : "node_79" }, { - "name" : "node_62", - "id" : 25, + "name" : "node_79", + "id" : 32, "expression" : { "type" : "expression", "value" : { @@ -12768,12 +15625,12 @@ } } }, - "false_next" : null, - "true_next" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0003" + "true_next" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0003", + "false_next" : "tbl_slicing126" }, { - "name" : "node_66", - "id" : 26, + "name" : "node_83", + "id" : 33, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 427, @@ -12791,12 +15648,12 @@ } } }, - "true_next" : "tbl_act_16", - "false_next" : "node_68" + "true_next" : "tbl_int_transit428", + "false_next" : "node_85" }, { - "name" : "node_68", - "id" : 27, + "name" : "node_85", + "id" : 34, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 430, @@ -12814,12 +15671,12 @@ } } }, - "true_next" : "tbl_act_17", - "false_next" : "node_70" + "true_next" : "tbl_int_transit431", + "false_next" : "node_87" }, { - "name" : "node_70", - "id" : 28, + "name" : "node_87", + "id" : 35, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 433, @@ -12837,8 +15694,31 @@ } } }, + "true_next" : "tbl_int_transit434", + "false_next" : "tbl_slicing126" + }, + { + "name" : "node_91", + "id" : 36, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 158, + "column" : 16, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["ipv4", "$valid$"] + } + } + }, "false_next" : null, - "true_next" : "tbl_act_18" + "true_next" : "tbl_slicing159" } ] } @@ -12924,26 +15804,14 @@ "intrinsic_metadata.egress_global_timestamp", ["standard_metadata", "egress_global_timestamp"] ], - [ - "intrinsic_metadata.lf_field_list", - ["standard_metadata", "lf_field_list"] - ], [ "intrinsic_metadata.mcast_grp", ["standard_metadata", "mcast_grp"] ], - [ - "intrinsic_metadata.resubmit_flag", - ["standard_metadata", "resubmit_flag"] - ], [ "intrinsic_metadata.egress_rid", ["standard_metadata", "egress_rid"] ], - [ - "intrinsic_metadata.recirculate_flag", - ["standard_metadata", "recirculate_flag"] - ], [ "intrinsic_metadata.priority", ["standard_metadata", "priority"] @@ -12951,7 +15819,7 @@ ], "program" : "fabric.p4", "__meta__" : { - "version" : [2, 18], + "version" : [2, 23], "compiler" : "https://github.com/p4lang/p4c" } } \ No newline at end of file diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/p4info.txt b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/p4info.txt index a661e7a371f..8d73a312ef1 100644 --- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/p4info.txt +++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-int/bmv2/default/p4info.txt @@ -3,7 +3,7 @@ pkg_info { } tables { preamble { - id: 33581620 + id: 44526132 name: "FabricIngress.process_set_source_sink.tb_set_source" alias: "tb_set_source" } @@ -14,20 +14,20 @@ tables { match_type: EXACT } action_refs { - id: 16778827 + id: 21235275 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318787614 + const_default_action_id: 28485346 + direct_resource_ids: 318984222 size: 511 } tables { preamble { - id: 33611649 + id: 43310977 name: "FabricIngress.filtering.ingress_port_vlan" alias: "ingress_port_vlan" } @@ -50,21 +50,21 @@ tables { match_type: TERNARY } action_refs { - id: 16836487 + id: 17164167 } action_refs { - id: 16818236 + id: 24158268 } action_refs { - id: 16794911 + id: 24266015 } - const_default_action_id: 16836487 - direct_resource_ids: 318815501 + const_default_action_id: 17164167 + direct_resource_ids: 326221069 size: 1024 } tables { preamble { - id: 33596298 + id: 49718154 name: "FabricIngress.filtering.fwd_classifier" alias: "fwd_classifier" } @@ -93,15 +93,15 @@ tables { match_type: EXACT } action_refs { - id: 16840921 + id: 25032921 } - const_default_action_id: 16840921 - direct_resource_ids: 318827326 + const_default_action_id: 25032921 + direct_resource_ids: 335473470 size: 1024 } tables { preamble { - id: 33596749 + id: 43623757 name: "FabricIngress.forwarding.bridging" alias: "bridging" } @@ -118,20 +118,20 @@ tables { match_type: TERNARY } action_refs { - id: 16811012 + id: 21791748 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318770289 + const_default_action_id: 28485346 + direct_resource_ids: 330959985 size: 1024 } tables { preamble { - id: 33574274 + id: 37768578 name: "FabricIngress.forwarding.mpls" alias: "mpls" } @@ -142,20 +142,20 @@ tables { match_type: EXACT } action_refs { - id: 16827758 + id: 30066030 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318830507 + const_default_action_id: 28485346 + direct_resource_ids: 318961579 size: 1024 } tables { preamble { - id: 33562650 + id: 41754650 name: "FabricIngress.forwarding.routing_v4" alias: "routing_v4" } @@ -166,13 +166,13 @@ tables { match_type: LPM } action_refs { - id: 16777434 + id: 19792090 } action_refs { - id: 16804187 + id: 29124955 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } @@ -180,7 +180,55 @@ tables { } tables { preamble { - id: 33618978 + id: 36626242 + name: "FabricIngress.pre_next.next_mpls" + alias: "next_mpls" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 22765924 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 330020245 + size: 1024 +} +tables { + preamble { + id: 48011802 + name: "FabricIngress.pre_next.next_vlan" + alias: "next_vlan" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 33475378 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 333692067 + size: 1024 +} +tables { + preamble { + id: 44104738 name: "FabricIngress.acl.acl" alias: "acl" } @@ -192,116 +240,98 @@ tables { } match_fields { id: 2 - name: "ip_proto" - bitwidth: 8 + name: "eth_dst" + bitwidth: 48 match_type: TERNARY } match_fields { id: 3 - name: "l4_sport" - bitwidth: 16 + name: "eth_src" + bitwidth: 48 match_type: TERNARY } match_fields { id: 4 - name: "l4_dport" - bitwidth: 16 + name: "vlan_id" + bitwidth: 12 match_type: TERNARY } match_fields { id: 5 - name: "eth_dst" - bitwidth: 48 + name: "eth_type" + bitwidth: 16 match_type: TERNARY } match_fields { id: 6 - name: "eth_src" - bitwidth: 48 + name: "ipv4_src" + bitwidth: 32 match_type: TERNARY } match_fields { id: 7 - name: "vlan_id" - bitwidth: 12 + name: "ipv4_dst" + bitwidth: 32 match_type: TERNARY } match_fields { id: 8 - name: "eth_type" - bitwidth: 16 + name: "ip_proto" + bitwidth: 8 match_type: TERNARY } match_fields { id: 9 - name: "ipv4_src" - bitwidth: 32 + name: "icmp_type" + bitwidth: 8 match_type: TERNARY } match_fields { id: 10 - name: "ipv4_dst" - bitwidth: 32 + name: "icmp_code" + bitwidth: 8 match_type: TERNARY } match_fields { id: 11 - name: "icmp_type" - bitwidth: 8 + name: "l4_sport" + bitwidth: 16 match_type: TERNARY } match_fields { id: 12 - name: "icmp_code" - bitwidth: 8 + name: "l4_dport" + bitwidth: 16 match_type: TERNARY } - action_refs { - id: 16807382 - } - action_refs { - id: 16829684 + match_fields { + id: 13 + name: "port_type" + bitwidth: 2 + match_type: TERNARY } action_refs { - id: 16781601 + id: 23623126 } action_refs { - id: 16820765 + id: 23579892 } action_refs { - id: 16827694 - } - const_default_action_id: 16827694 - direct_resource_ids: 318801025 - size: 1024 -} -tables { - preamble { - id: 33599709 - name: "FabricIngress.next.next_vlan" - alias: "next_vlan" - } - match_fields { - id: 1 - name: "next_id" - bitwidth: 32 - match_type: EXACT + id: 16912673 } action_refs { - id: 16790685 + id: 23570973 } action_refs { - id: 16819938 - annotations: "@defaultonly" - scope: DEFAULT_ONLY + id: 29607214 } - const_default_action_id: 16819938 - direct_resource_ids: 318768144 + const_default_action_id: 29607214 + direct_resource_ids: 319194241 size: 1024 } tables { preamble { - id: 33596977 + id: 48735793 name: "FabricIngress.next.xconnect" alias: "xconnect" } @@ -318,23 +348,23 @@ tables { match_type: EXACT } action_refs { - id: 16842190 + id: 24640974 } action_refs { - id: 16837052 + id: 30599612 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318778156 + const_default_action_id: 28485346 + direct_resource_ids: 321989420 size: 1024 } tables { preamble { - id: 33608588 + id: 47960972 name: "FabricIngress.next.hashed" alias: "hashed" } @@ -345,27 +375,24 @@ tables { match_type: EXACT } action_refs { - id: 16815357 - } - action_refs { - id: 16791402 + id: 27301117 } action_refs { - id: 16779255 + id: 20985706 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - implementation_id: 285217164 - direct_resource_ids: 318800532 + const_default_action_id: 28485346 + implementation_id: 291115404 + direct_resource_ids: 322798228 size: 1024 } tables { preamble { - id: 33606828 + id: 40619180 name: "FabricIngress.next.multicast" alias: "multicast" } @@ -376,20 +403,106 @@ tables { match_type: EXACT } action_refs { - id: 16779917 + id: 21629581 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318801752 + const_default_action_id: 28485346 + direct_resource_ids: 319194968 size: 1024 } tables { preamble { - id: 33612258 + id: 34606298 + name: "FabricIngress.slice_tc_classifier.classifier" + alias: "classifier" + } + match_fields { + id: 1 + name: "ig_port" + bitwidth: 9 + match_type: TERNARY + } + match_fields { + id: 2 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 3 + name: "ipv4_dst" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 4 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 5 + name: "l4_sport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 6 + name: "l4_dport" + bitwidth: 16 + match_type: TERNARY + } + action_refs { + id: 23786376 + } + action_refs { + id: 25983516 + } + const_default_action_id: 23786376 + direct_resource_ids: 334706097 + size: 512 +} +tables { + preamble { + id: 36435258 + name: "FabricIngress.qos.queues" + alias: "queues" + } + match_fields { + id: 1 + name: "slice_id" + bitwidth: 4 + match_type: EXACT + } + match_fields { + id: 2 + name: "tc" + bitwidth: 2 + match_type: EXACT + } + match_fields { + id: 3 + name: "color" + bitwidth: 2 + match_type: TERNARY + } + action_refs { + id: 32116918 + } + action_refs { + id: 28214351 + } + const_default_action_id: 32116918 + direct_resource_ids: 327743278 + size: 128 +} +tables { + preamble { + id: 44818914 name: "FabricEgress.process_int_main.process_int_source.tb_int_source" alias: "tb_int_source" } @@ -418,20 +531,20 @@ tables { match_type: TERNARY } action_refs { - id: 16785857 + id: 20062657 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318800047 + const_default_action_id: 28485346 + direct_resource_ids: 322470063 size: 1024 } tables { preamble { - id: 33599867 + id: 34910587 name: "FabricEgress.process_int_main.process_int_transit.tb_int_insert" alias: "tb_int_insert" } @@ -442,19 +555,19 @@ tables { match_type: EXACT } action_refs { - id: 16780783 + id: 29232623 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 + const_default_action_id: 28485346 size: 1 } tables { preamble { - id: 33599342 + id: 49262446 name: "FabricEgress.egress_next.egress_vlan" alias: "egress_vlan" } @@ -471,48 +584,82 @@ tables { match_type: EXACT } action_refs { - id: 16790030 + id: 30307755 + } + action_refs { + id: 17183246 } action_refs { - id: 16819938 + id: 30812542 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318827144 + const_default_action_id: 30812542 + direct_resource_ids: 318892680 size: 1024 } +tables { + preamble { + id: 49970092 + name: "FabricEgress.dscp_rewriter.rewriter" + alias: "rewriter" + } + match_fields { + id: 1 + name: "eg_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 27951287 + } + action_refs { + id: 24120545 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + size: 512 +} actions { preamble { - id: 16819938 + id: 28485346 name: "nop" alias: "nop" } } actions { preamble { - id: 16778827 + id: 21235275 name: "FabricIngress.process_set_source_sink.int_set_source" alias: "int_set_source" } } actions { preamble { - id: 16836487 + id: 17164167 name: "FabricIngress.filtering.deny" alias: "deny" } } actions { preamble { - id: 16818236 + id: 24158268 name: "FabricIngress.filtering.permit" alias: "permit" } + params { + id: 1 + name: "port_type" + bitwidth: 2 + } } actions { preamble { - id: 16794911 + id: 24266015 name: "FabricIngress.filtering.permit_with_internal_vlan" alias: "permit_with_internal_vlan" } @@ -521,10 +668,15 @@ actions { name: "vlan_id" bitwidth: 12 } + params { + id: 2 + name: "port_type" + bitwidth: 2 + } } actions { preamble { - id: 16840921 + id: 25032921 name: "FabricIngress.filtering.set_forwarding_type" alias: "set_forwarding_type" } @@ -536,7 +688,7 @@ actions { } actions { preamble { - id: 16811012 + id: 21791748 name: "FabricIngress.forwarding.set_next_id_bridging" alias: "set_next_id_bridging" } @@ -548,7 +700,7 @@ actions { } actions { preamble { - id: 16827758 + id: 30066030 name: "FabricIngress.forwarding.pop_mpls_and_next" alias: "pop_mpls_and_next" } @@ -560,7 +712,7 @@ actions { } actions { preamble { - id: 16777434 + id: 19792090 name: "FabricIngress.forwarding.set_next_id_routing_v4" alias: "set_next_id_routing_v4" } @@ -572,14 +724,38 @@ actions { } actions { preamble { - id: 16804187 + id: 29124955 name: "FabricIngress.forwarding.nop_routing_v4" alias: "nop_routing_v4" } } actions { preamble { - id: 16807382 + id: 22765924 + name: "FabricIngress.pre_next.set_mpls_label" + alias: "set_mpls_label" + } + params { + id: 1 + name: "label" + bitwidth: 20 + } +} +actions { + preamble { + id: 33475378 + name: "FabricIngress.pre_next.set_vlan" + alias: "set_vlan" + } + params { + id: 1 + name: "vlan_id" + bitwidth: 12 + } +} +actions { + preamble { + id: 23623126 name: "FabricIngress.acl.set_next_id_acl" alias: "set_next_id_acl" } @@ -591,14 +767,14 @@ actions { } actions { preamble { - id: 16829684 + id: 23579892 name: "FabricIngress.acl.punt_to_cpu" alias: "punt_to_cpu" } } actions { preamble { - id: 16781601 + id: 16912673 name: "FabricIngress.acl.set_clone_session_id" alias: "set_clone_session_id" } @@ -610,33 +786,21 @@ actions { } actions { preamble { - id: 16820765 + id: 23570973 name: "FabricIngress.acl.drop" - alias: "drop" + alias: "acl.drop" } } actions { preamble { - id: 16827694 + id: 29607214 name: "FabricIngress.acl.nop_acl" alias: "nop_acl" } } actions { preamble { - id: 16790685 - name: "FabricIngress.next.set_vlan" - alias: "set_vlan" - } - params { - id: 1 - name: "vlan_id" - bitwidth: 12 - } -} -actions { - preamble { - id: 16842190 + id: 24640974 name: "FabricIngress.next.output_xconnect" alias: "output_xconnect" } @@ -648,7 +812,7 @@ actions { } actions { preamble { - id: 16837052 + id: 30599612 name: "FabricIngress.next.set_next_id_xconnect" alias: "set_next_id_xconnect" } @@ -660,7 +824,7 @@ actions { } actions { preamble { - id: 16815357 + id: 27301117 name: "FabricIngress.next.output_hashed" alias: "output_hashed" } @@ -672,7 +836,7 @@ actions { } actions { preamble { - id: 16791402 + id: 20985706 name: "FabricIngress.next.routing_hashed" alias: "routing_hashed" } @@ -694,53 +858,70 @@ actions { } actions { preamble { - id: 16779255 - name: "FabricIngress.next.mpls_routing_hashed" - alias: "mpls_routing_hashed" + id: 21629581 + name: "FabricIngress.next.set_mcast_group_id" + alias: "set_mcast_group_id" } params { id: 1 - name: "port_num" - bitwidth: 9 + name: "group_id" + bitwidth: 16 } - params { - id: 2 - name: "smac" - bitwidth: 48 +} +actions { + preamble { + id: 23786376 + name: "FabricIngress.slice_tc_classifier.set_slice_id_tc" + alias: "set_slice_id_tc" } params { - id: 3 - name: "dmac" - bitwidth: 48 + id: 1 + name: "slice_id" + bitwidth: 4 } params { - id: 4 - name: "label" - bitwidth: 20 + id: 2 + name: "tc" + bitwidth: 2 } } actions { preamble { - id: 16779917 - name: "FabricIngress.next.set_mcast_group_id" - alias: "set_mcast_group_id" + id: 25983516 + name: "FabricIngress.slice_tc_classifier.trust_dscp" + alias: "trust_dscp" + } +} +actions { + preamble { + id: 32116918 + name: "FabricIngress.qos.set_queue" + alias: "set_queue" } params { id: 1 - name: "group_id" - bitwidth: 16 + name: "qid" + bitwidth: 5 + } +} +actions { + preamble { + id: 28214351 + name: "FabricIngress.qos.meter_drop" + alias: "meter_drop" } } actions { preamble { - id: 16800567 + id: 21257015 name: "NoAction" alias: "NoAction" + annotations: "@noWarn(\"unused\")" } } actions { preamble { - id: 16785857 + id: 20062657 name: "FabricEgress.process_int_main.process_int_source.int_source_dscp" alias: "int_source_dscp" } @@ -767,7 +948,7 @@ actions { } actions { preamble { - id: 16780783 + id: 29232623 name: "FabricEgress.process_int_main.process_int_transit.init_metadata" alias: "init_metadata" } @@ -779,25 +960,53 @@ actions { } actions { preamble { - id: 16790030 + id: 30307755 + name: "FabricEgress.egress_next.push_vlan" + alias: "push_vlan" + } +} +actions { + preamble { + id: 17183246 name: "FabricEgress.egress_next.pop_vlan" alias: "pop_vlan" } } +actions { + preamble { + id: 30812542 + name: "FabricEgress.egress_next.drop" + alias: "egress_next.drop" + } +} +actions { + preamble { + id: 27951287 + name: "FabricEgress.dscp_rewriter.rewrite" + alias: "rewrite" + } +} +actions { + preamble { + id: 24120545 + name: "FabricEgress.dscp_rewriter.clear" + alias: "clear" + } +} action_profiles { preamble { - id: 285217164 + id: 291115404 name: "FabricIngress.next.hashed_selector" alias: "hashed_selector" } - table_ids: 33608588 + table_ids: 47960972 with_selector: true size: 1024 max_group_size: 16 } counters { preamble { - id: 302011205 + id: 314528581 name: "FabricIngress.port_counters_control.egress_port_counter" alias: "egress_port_counter" } @@ -808,7 +1017,7 @@ counters { } counters { preamble { - id: 302002771 + id: 312947283 name: "FabricIngress.port_counters_control.ingress_port_counter" alias: "ingress_port_counter" } @@ -819,139 +1028,183 @@ counters { } direct_counters { preamble { - id: 318787614 + id: 318984222 name: "FabricIngress.process_set_source_sink.counter_set_source" alias: "counter_set_source" } spec { unit: BOTH } - direct_table_id: 33581620 + direct_table_id: 44526132 } direct_counters { preamble { - id: 318815501 + id: 326221069 name: "FabricIngress.filtering.ingress_port_vlan_counter" alias: "ingress_port_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33611649 + direct_table_id: 43310977 } direct_counters { preamble { - id: 318827326 + id: 335473470 name: "FabricIngress.filtering.fwd_classifier_counter" alias: "fwd_classifier_counter" } spec { unit: BOTH } - direct_table_id: 33596298 + direct_table_id: 49718154 } direct_counters { preamble { - id: 318770289 + id: 330959985 name: "FabricIngress.forwarding.bridging_counter" alias: "bridging_counter" } spec { unit: BOTH } - direct_table_id: 33596749 + direct_table_id: 43623757 } direct_counters { preamble { - id: 318830507 + id: 318961579 name: "FabricIngress.forwarding.mpls_counter" alias: "mpls_counter" } spec { unit: BOTH } - direct_table_id: 33574274 + direct_table_id: 37768578 } direct_counters { preamble { - id: 318801025 - name: "FabricIngress.acl.acl_counter" - alias: "acl_counter" + id: 330020245 + name: "FabricIngress.pre_next.next_mpls_counter" + alias: "next_mpls_counter" } spec { unit: BOTH } - direct_table_id: 33618978 + direct_table_id: 36626242 } direct_counters { preamble { - id: 318768144 - name: "FabricIngress.next.next_vlan_counter" + id: 333692067 + name: "FabricIngress.pre_next.next_vlan_counter" alias: "next_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33599709 + direct_table_id: 48011802 } direct_counters { preamble { - id: 318778156 + id: 319194241 + name: "FabricIngress.acl.acl_counter" + alias: "acl_counter" + } + spec { + unit: BOTH + } + direct_table_id: 44104738 +} +direct_counters { + preamble { + id: 321989420 name: "FabricIngress.next.xconnect_counter" alias: "xconnect_counter" } spec { unit: BOTH } - direct_table_id: 33596977 + direct_table_id: 48735793 } direct_counters { preamble { - id: 318800532 + id: 322798228 name: "FabricIngress.next.hashed_counter" alias: "hashed_counter" } spec { unit: BOTH } - direct_table_id: 33608588 + direct_table_id: 47960972 } direct_counters { preamble { - id: 318801752 + id: 319194968 name: "FabricIngress.next.multicast_counter" alias: "multicast_counter" } spec { unit: BOTH } - direct_table_id: 33606828 + direct_table_id: 40619180 +} +direct_counters { + preamble { + id: 334706097 + name: "FabricIngress.slice_tc_classifier.classifier_stats" + alias: "classifier_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 34606298 +} +direct_counters { + preamble { + id: 327743278 + name: "FabricIngress.qos.queues_stats" + alias: "queues_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 36435258 } direct_counters { preamble { - id: 318800047 + id: 322470063 name: "FabricEgress.process_int_main.process_int_source.counter_int_source" alias: "counter_int_source" } spec { unit: BOTH } - direct_table_id: 33612258 + direct_table_id: 44818914 } direct_counters { preamble { - id: 318827144 + id: 318892680 name: "FabricEgress.egress_next.egress_vlan_counter" alias: "egress_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33599342 + direct_table_id: 49262446 +} +meters { + preamble { + id: 348573637 + name: "FabricIngress.qos.slice_tc_meter" + alias: "slice_tc_meter" + } + spec { + unit: BYTES + } + size: 64 } controller_packet_metadata { preamble { - id: 67146229 + id: 81826293 name: "packet_in" alias: "packet_in" annotations: "@controller_header(\"packet_in\")" @@ -969,7 +1222,7 @@ controller_packet_metadata { } controller_packet_metadata { preamble { - id: 67121543 + id: 76689799 name: "packet_out" alias: "packet_out" annotations: "@controller_header(\"packet_out\")" @@ -981,8 +1234,13 @@ controller_packet_metadata { } metadata { id: 2 + name: "do_forwarding" + bitwidth: 1 + } + metadata { + id: 3 name: "_pad" - bitwidth: 7 + bitwidth: 6 } } type_info { diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json index 656ae2204aa..61322cb541e 100644 --- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json +++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/bmv2.json @@ -4,72 +4,110 @@ "name" : "scalars_0", "id" : 0, "fields" : [ + ["tmp_0", 1, false], + ["tmp_2", 3, false], + ["tmp_4", 8, false], ["last_ipv4_dscp_0", 6, false], - ["tmp_0", 16, false], + ["gtpu_ext_len_0", 8, false], ["tmp_1", 16, false], - ["tmp_2", 4, false], - ["tmp", 32, false], - ["tmp_3", 32, false], - ["spgw_ingress_hasReturned", 1, false], - ["egress_next_tmp", 1, false], - ["spgw_egress_hasReturned", 1, false], + ["tmp_3", 16, false], + ["tmp_5", 4, false], + ["tmp_6", 16, false], + ["tmp_7", 64, false], + ["tmp_8", 32, false], + ["tmp_9", 32, false], + ["tmp_10", 32, false], + ["dscp_rewriter_tmp_dscp", 6, false], ["process_int_main_process_int_transit_hasReturned", 1, false], - ["fabric_metadata_t._ip_eth_type0", 16, false], - ["fabric_metadata_t._vlan_id1", 12, false], - ["fabric_metadata_t._vlan_pri2", 3, false], - ["fabric_metadata_t._vlan_cfi3", 1, false], - ["fabric_metadata_t._mpls_label4", 20, false], - ["fabric_metadata_t._mpls_ttl5", 8, false], - ["fabric_metadata_t._skip_forwarding6", 1, false], - ["fabric_metadata_t._skip_next7", 1, false], - ["fabric_metadata_t._fwd_type8", 3, false], - ["fabric_metadata_t._next_id9", 32, false], - ["fabric_metadata_t._is_multicast10", 1, false], - ["fabric_metadata_t._is_controller_packet_out11", 1, false], - ["fabric_metadata_t._ip_proto12", 8, false], - ["fabric_metadata_t._l4_sport13", 16, false], - ["fabric_metadata_t._l4_dport14", 16, false], - ["fabric_metadata_t._ipv4_src_addr15", 32, false], - ["fabric_metadata_t._ipv4_dst_addr16", 32, false], - ["fabric_metadata_t._inner_l4_sport17", 16, false], - ["fabric_metadata_t._inner_l4_dport18", 16, false], - ["fabric_metadata_t._spgw_direction19", 2, false], - ["fabric_metadata_t._spgw_ipv4_len20", 16, false], - ["fabric_metadata_t._spgw_teid21", 32, false], - ["fabric_metadata_t._spgw_tunnel_src_port22", 16, false], - ["fabric_metadata_t._spgw_tunnel_src_addr23", 32, false], - ["fabric_metadata_t._spgw_tunnel_dst_addr24", 32, false], - ["fabric_metadata_t._spgw_ctr_id25", 32, false], - ["fabric_metadata_t._spgw_far_id26", 32, false], - ["fabric_metadata_t._spgw_src_iface27", 8, false], - ["fabric_metadata_t._spgw_skip_spgw28", 1, false], - ["fabric_metadata_t._spgw_pdr_hit29", 1, false], - ["fabric_metadata_t._spgw_far_dropped30", 1, false], - ["fabric_metadata_t._spgw_notify_spgwc31", 1, false], - ["fabric_metadata_t._spgw_needs_gtpu_encap32", 1, false], - ["fabric_metadata_t._spgw_needs_gtpu_decap33", 1, false], - ["fabric_metadata_t._int_meta_source34", 1, false], - ["fabric_metadata_t._int_meta_transit35", 1, false], - ["fabric_metadata_t._int_meta_sink36", 1, false], - ["fabric_metadata_t._int_meta_switch_id37", 32, false], - ["fabric_metadata_t._int_meta_new_words38", 8, false], - ["fabric_metadata_t._int_meta_new_bytes39", 16, false], - ["fabric_metadata_t._int_meta_ig_tstamp40", 32, false], - ["fabric_metadata_t._int_meta_eg_tstamp41", 32, false], - ["_padding_0", 4, false] + ["userMetadata._lkp_is_ipv40", 1, false], + ["userMetadata._lkp_ipv4_src1", 32, false], + ["userMetadata._lkp_ipv4_dst2", 32, false], + ["userMetadata._lkp_ip_proto3", 8, false], + ["userMetadata._lkp_l4_sport4", 16, false], + ["userMetadata._lkp_l4_dport5", 16, false], + ["userMetadata._lkp_icmp_type6", 8, false], + ["userMetadata._lkp_icmp_code7", 8, false], + ["userMetadata._ip_eth_type8", 16, false], + ["userMetadata._vlan_id9", 12, false], + ["userMetadata._vlan_pri10", 3, false], + ["userMetadata._vlan_cfi11", 1, false], + ["userMetadata._mpls_label12", 20, false], + ["userMetadata._mpls_ttl13", 8, false], + ["userMetadata._skip_forwarding14", 1, false], + ["userMetadata._skip_next15", 1, false], + ["userMetadata._fwd_type16", 3, false], + ["userMetadata._next_id17", 32, false], + ["userMetadata._is_multicast18", 1, false], + ["userMetadata._is_controller_packet_out19", 1, false], + ["userMetadata._ip_proto20", 8, false], + ["userMetadata._l4_sport21", 16, false], + ["userMetadata._l4_dport22", 16, false], + ["userMetadata._ipv4_src_addr23", 32, false], + ["userMetadata._ipv4_dst_addr24", 32, false], + ["userMetadata._slice_id25", 4, false], + ["userMetadata._packet_color26", 2, false], + ["userMetadata._tc27", 2, false], + ["userMetadata._dscp28", 6, false], + ["userMetadata._inner_l4_sport29", 16, false], + ["userMetadata._inner_l4_dport30", 16, false], + ["userMetadata._spgw_ipv4_len31", 16, false], + ["userMetadata._spgw_teid32", 32, false], + ["userMetadata._spgw_tunnel_src_port33", 16, false], + ["userMetadata._spgw_tunnel_src_addr34", 32, false], + ["userMetadata._spgw_tunnel_dst_addr35", 32, false], + ["userMetadata._spgw_ctr_id36", 32, false], + ["userMetadata._spgw_far_id37", 32, false], + ["userMetadata._spgw_src_iface38", 8, false], + ["userMetadata._spgw_qfi39", 6, false], + ["userMetadata._spgw_skip_spgw40", 1, false], + ["userMetadata._spgw_notify_spgwc41", 1, false], + ["userMetadata._spgw_needs_gtpu_encap42", 1, false], + ["userMetadata._spgw_needs_gtpu_decap43", 1, false], + ["userMetadata._spgw_skip_egress_pdr_ctr44", 1, false], + ["userMetadata._spgw_needs_qfi_push45", 1, false], + ["userMetadata._int_meta_source46", 1, false], + ["userMetadata._int_meta_transit47", 1, false], + ["userMetadata._int_meta_sink48", 1, false], + ["userMetadata._int_meta_switch_id49", 32, false], + ["userMetadata._int_meta_new_words50", 8, false], + ["userMetadata._int_meta_new_bytes51", 16, false], + ["userMetadata._int_meta_ig_tstamp52", 32, false], + ["userMetadata._int_meta_eg_tstamp53", 32, false], + ["userMetadata._port_type54", 2, false] ] }, { - "name" : "standard_metadata", + "name" : "packet_out_header_t", "id" : 1, + "fields" : [ + ["egress_port", 9, false], + ["do_forwarding", 1, false], + ["_pad", 6, false] + ] + }, + { + "name" : "gtpu_t", + "id" : 2, + "fields" : [ + ["version", 3, false], + ["pt", 1, false], + ["spare", 1, false], + ["ex_flag", 1, false], + ["seq_flag", 1, false], + ["npdu_flag", 1, false], + ["msgtype", 8, false], + ["msglen", 16, false], + ["teid", 32, false] + ] + }, + { + "name" : "standard_metadata", + "id" : 3, "fields" : [ ["ingress_port", 9, false], ["egress_spec", 9, false], ["egress_port", 9, false], - ["clone_spec", 32, false], ["instance_type", 32, false], - ["drop", 1, false], - ["recirculate_port", 16, false], ["packet_length", 32, false], ["enq_timestamp", 32, false], ["enq_qdepth", 19, false], @@ -77,20 +115,17 @@ ["deq_qdepth", 19, false], ["ingress_global_timestamp", 48, false], ["egress_global_timestamp", 48, false], - ["lf_field_list", 32, false], ["mcast_grp", 16, false], - ["resubmit_flag", 32, false], ["egress_rid", 16, false], - ["recirculate_flag", 32, false], ["checksum_error", 1, false], ["parser_error", 32, false], ["priority", 3, false], - ["_padding", 2, false] + ["_padding", 3, false] ] }, { "name" : "ethernet_t", - "id" : 2, + "id" : 4, "fields" : [ ["dst_addr", 48, false], ["src_addr", 48, false] @@ -98,7 +133,7 @@ }, { "name" : "vlan_tag_t", - "id" : 3, + "id" : 5, "fields" : [ ["eth_type", 16, false], ["pri", 3, false], @@ -108,14 +143,14 @@ }, { "name" : "eth_type_t", - "id" : 4, + "id" : 6, "fields" : [ ["value", 16, false] ] }, { "name" : "mpls_t", - "id" : 5, + "id" : 7, "fields" : [ ["label", 20, false], ["tc", 3, false], @@ -125,7 +160,7 @@ }, { "name" : "ipv4_t", - "id" : 6, + "id" : 8, "fields" : [ ["version", 4, false], ["ihl", 4, false], @@ -144,7 +179,7 @@ }, { "name" : "udp_t", - "id" : 7, + "id" : 9, "fields" : [ ["sport", 16, false], ["dport", 16, false], @@ -153,23 +188,30 @@ ] }, { - "name" : "gtpu_t", - "id" : 8, + "name" : "gtpu_options_t", + "id" : 10, "fields" : [ - ["version", 3, false], - ["pt", 1, false], - ["spare", 1, false], - ["ex_flag", 1, false], - ["seq_flag", 1, false], - ["npdu_flag", 1, false], - ["msgtype", 8, false], - ["msglen", 16, false], - ["teid", 32, false] + ["seq_num", 16, false], + ["n_pdu_num", 8, false], + ["next_ext", 8, false] + ] + }, + { + "name" : "gtpu_ext_psc_t", + "id" : 11, + "fields" : [ + ["len", 8, false], + ["type", 4, false], + ["spare0", 4, false], + ["ppp", 1, false], + ["rqi", 1, false], + ["qfi", 6, false], + ["next_ext", 8, false] ] }, { "name" : "tcp_t", - "id" : 9, + "id" : 12, "fields" : [ ["sport", 16, false], ["dport", 16, false], @@ -186,7 +228,7 @@ }, { "name" : "icmp_t", - "id" : 10, + "id" : 13, "fields" : [ ["icmp_type", 8, false], ["icmp_code", 8, false], @@ -196,17 +238,9 @@ ["timestamp", 64, false] ] }, - { - "name" : "packet_out_header_t", - "id" : 11, - "fields" : [ - ["egress_port", 9, false], - ["_pad", 7, false] - ] - }, { "name" : "packet_in_header_t", - "id" : 12, + "id" : 14, "fields" : [ ["ingress_port", 9, false], ["_pad", 7, false] @@ -214,7 +248,7 @@ }, { "name" : "intl4_shim_t", - "id" : 13, + "id" : 15, "fields" : [ ["int_type", 8, false], ["rsvd1", 8, false], @@ -224,7 +258,7 @@ }, { "name" : "int_header_t", - "id" : 14, + "id" : 16, "fields" : [ ["ver", 2, false], ["rep", 2, false], @@ -243,14 +277,14 @@ }, { "name" : "int_switch_id_t", - "id" : 15, + "id" : 17, "fields" : [ ["switch_id", 32, false] ] }, { "name" : "int_port_ids_t", - "id" : 16, + "id" : 18, "fields" : [ ["ingress_port_id", 16, false], ["egress_port_id", 16, false] @@ -258,14 +292,14 @@ }, { "name" : "int_hop_latency_t", - "id" : 17, + "id" : 19, "fields" : [ ["hop_latency", 32, false] ] }, { "name" : "int_q_occupancy_t", - "id" : 18, + "id" : 20, "fields" : [ ["q_id", 8, false], ["q_occupancy", 24, false] @@ -273,21 +307,21 @@ }, { "name" : "int_ingress_tstamp_t", - "id" : 19, + "id" : 21, "fields" : [ ["ingress_tstamp", 32, false] ] }, { "name" : "int_egress_tstamp_t", - "id" : 20, + "id" : 22, "fields" : [ ["egress_tstamp", 32, false] ] }, { "name" : "int_q_congestion_t", - "id" : 21, + "id" : 23, "fields" : [ ["q_id", 8, false], ["q_congestion", 24, false] @@ -295,14 +329,14 @@ }, { "name" : "int_egress_port_tx_util_t", - "id" : 22, + "id" : 24, "fields" : [ ["egress_port_tx_util", 32, false] ] }, { "name" : "intl4_tail_t", - "id" : 23, + "id" : 25, "fields" : [ ["next_proto", 8, false], ["dest_port", 16, false], @@ -313,225 +347,267 @@ ], "headers" : [ { - "name" : "scalars", + "name" : "tmp", "id" : 0, + "header_type" : "packet_out_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_0", + "id" : 1, + "header_type" : "gtpu_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "scalars", + "id" : 2, "header_type" : "scalars_0", "metadata" : true, "pi_omit" : true }, { "name" : "standard_metadata", - "id" : 1, + "id" : 3, "header_type" : "standard_metadata", "metadata" : true, "pi_omit" : true }, { "name" : "ethernet", - "id" : 2, + "id" : 4, "header_type" : "ethernet_t", "metadata" : false, "pi_omit" : true }, { "name" : "vlan_tag", - "id" : 3, + "id" : 5, "header_type" : "vlan_tag_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_vlan_tag", - "id" : 4, + "id" : 6, "header_type" : "vlan_tag_t", "metadata" : false, "pi_omit" : true }, { "name" : "eth_type", - "id" : 5, + "id" : 7, "header_type" : "eth_type_t", "metadata" : false, "pi_omit" : true }, { "name" : "mpls", - "id" : 6, + "id" : 8, "header_type" : "mpls_t", "metadata" : false, "pi_omit" : true }, { "name" : "gtpu_ipv4", - "id" : 7, + "id" : 9, "header_type" : "ipv4_t", "metadata" : false, "pi_omit" : true }, { "name" : "gtpu_udp", - "id" : 8, + "id" : 10, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "outer_gtpu", - "id" : 9, + "id" : 11, "header_type" : "gtpu_t", "metadata" : false, "pi_omit" : true }, + { + "name" : "outer_gtpu_options", + "id" : 12, + "header_type" : "gtpu_options_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "outer_gtpu_ext_psc", + "id" : 13, + "header_type" : "gtpu_ext_psc_t", + "metadata" : false, + "pi_omit" : true + }, { "name" : "gtpu", - "id" : 10, + "id" : 14, "header_type" : "gtpu_t", "metadata" : false, "pi_omit" : true }, + { + "name" : "gtpu_options", + "id" : 15, + "header_type" : "gtpu_options_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_ext_psc", + "id" : 16, + "header_type" : "gtpu_ext_psc_t", + "metadata" : false, + "pi_omit" : true + }, { "name" : "inner_ipv4", - "id" : 11, + "id" : 17, "header_type" : "ipv4_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_udp", - "id" : 12, + "id" : 18, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_tcp", - "id" : 13, + "id" : 19, "header_type" : "tcp_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_icmp", - "id" : 14, + "id" : 20, "header_type" : "icmp_t", "metadata" : false, "pi_omit" : true }, { "name" : "ipv4", - "id" : 15, + "id" : 21, "header_type" : "ipv4_t", "metadata" : false, "pi_omit" : true }, { "name" : "tcp", - "id" : 16, + "id" : 22, "header_type" : "tcp_t", "metadata" : false, "pi_omit" : true }, { "name" : "udp", - "id" : 17, + "id" : 23, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "icmp", - "id" : 18, + "id" : 24, "header_type" : "icmp_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_out", - "id" : 19, + "id" : 25, "header_type" : "packet_out_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_in", - "id" : 20, + "id" : 26, "header_type" : "packet_in_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "intl4_shim", - "id" : 21, + "id" : 27, "header_type" : "intl4_shim_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_header", - "id" : 22, + "id" : 28, "header_type" : "int_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_switch_id", - "id" : 23, + "id" : 29, "header_type" : "int_switch_id_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_port_ids", - "id" : 24, + "id" : 30, "header_type" : "int_port_ids_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_hop_latency", - "id" : 25, + "id" : 31, "header_type" : "int_hop_latency_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_q_occupancy", - "id" : 26, + "id" : 32, "header_type" : "int_q_occupancy_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_ingress_tstamp", - "id" : 27, + "id" : 33, "header_type" : "int_ingress_tstamp_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_egress_tstamp", - "id" : 28, + "id" : 34, "header_type" : "int_egress_tstamp_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_q_congestion", - "id" : 29, + "id" : 35, "header_type" : "int_q_congestion_t", "metadata" : false, "pi_omit" : true }, { "name" : "int_egress_tx_util", - "id" : 30, + "id" : 36, "header_type" : "int_egress_port_tx_util_t", "metadata" : false, "pi_omit" : true }, { "name" : "intl4_tail", - "id" : 31, + "id" : 37, "header_type" : "intl4_tail_t", "metadata" : false, "pi_omit" : true @@ -547,7 +623,7 @@ "name" : "fl", "source_info" : { "filename" : "include/control/acl.p4", - "line" : 46, + "line" : 45, "column" : 40, "source_fragment" : "{standard_metadata.ingress_port}" }, @@ -584,10 +660,11 @@ "type" : "hexstr", "value" : "0x00ff", "mask" : null, - "next_state" : "parse_packet_out" + "next_state" : "check_packet_out" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_ethernet" } @@ -600,50 +677,78 @@ ] }, { - "name" : "parse_packet_out", + "name" : "check_packet_out", "id" : 1, "parser_ops" : [ { "parameters" : [ { - "type" : "regular", - "value" : "packet_out" + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + { + "type" : "lookahead", + "value" : [0, 16] } ], - "op" : "extract" - } - ], - "transitions" : [ - { - "value" : "default", - "mask" : null, - "next_state" : "parse_ethernet" - } - ], - "transition_key" : [] - }, - { - "name" : "parse_ethernet", - "id" : 2, - "parser_ops" : [ + "op" : "set" + }, { "parameters" : [ { - "type" : "regular", - "value" : "ethernet" + "parameters" : [ + { + "type" : "header", + "value" : "tmp" + } + ], + "op" : "add_header" } ], - "op" : "extract" + "op" : "primitive" }, { "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["tmp", "egress_port"] }, { - "type" : "hexstr", - "value" : "0x0ffe" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x7" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } } ], "op" : "set" @@ -652,39 +757,133 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_0"] + "value" : ["tmp", "do_forwarding"] }, { - "type" : "lookahead", - "value" : [0, 16] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x6" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } } ], "op" : "set" - } - ], - "transitions" : [ - { - "type" : "hexstr", - "value" : "0x88a8", - "mask" : null, - "next_state" : "parse_vlan_tag" - }, - { - "type" : "hexstr", - "value" : "0x9100", - "mask" : null, - "next_state" : "parse_vlan_tag" }, { - "type" : "hexstr", - "value" : "0x8100", - "mask" : null, - "next_state" : "parse_vlan_tag" - }, + "parameters" : [ + { + "type" : "field", + "value" : ["tmp", "_pad"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x6" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ { - "value" : "default", + "type" : "hexstr", + "value" : "0x00", "mask" : null, - "next_state" : "parse_eth_type" + "next_state" : "parse_packet_out_and_accept" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "strip_packet_out" } ], "transition_key" : [ @@ -695,18 +894,79 @@ ] }, { - "name" : "parse_vlan_tag", + "name" : "parse_packet_out_and_accept", + "id" : 2, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "packet_out" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "strip_packet_out", "id" : 3, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x00000010" + } + ], + "op" : "advance" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ethernet" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_ethernet", + "id" : 4, "parser_ops" : [ { "parameters" : [ { "type" : "regular", - "value" : "vlan_tag" + "value" : "ethernet" } ], "op" : "extract" }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "op" : "set" + }, { "parameters" : [ { @@ -722,14 +982,27 @@ } ], "transitions" : [ + { + "type" : "hexstr", + "value" : "0x88a8", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "hexstr", + "value" : "0x9100", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, { "type" : "hexstr", "value" : "0x8100", "mask" : null, - "next_state" : "parse_inner_vlan_tag" + "next_state" : "parse_vlan_tag" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -741,9 +1014,57 @@ } ] }, + { + "name" : "parse_vlan_tag", + "id" : 5, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "vlan_tag" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_3"] + }, + { + "type" : "lookahead", + "value" : [0, 16] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x8100", + "mask" : null, + "next_state" : "parse_inner_vlan_tag" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_eth_type" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_3"] + } + ] + }, { "name" : "parse_inner_vlan_tag", - "id" : 4, + "id" : 6, "parser_ops" : [ { "parameters" : [ @@ -757,7 +1078,8 @@ ], "transitions" : [ { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -766,7 +1088,7 @@ }, { "name" : "parse_eth_type", - "id" : 5, + "id" : 7, "parser_ops" : [ { "parameters" : [ @@ -792,7 +1114,8 @@ "next_state" : "parse_ipv4" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -806,7 +1129,7 @@ }, { "name" : "parse_mpls", - "id" : 6, + "id" : 8, "parser_ops" : [ { "parameters" : [ @@ -821,7 +1144,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "value" : ["scalars", "userMetadata._mpls_label12"] }, { "type" : "field", @@ -834,7 +1157,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl5"] + "value" : ["scalars", "userMetadata._mpls_ttl13"] }, { "type" : "field", @@ -847,7 +1170,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_2"] + "value" : ["scalars", "tmp_5"] }, { "type" : "lookahead", @@ -865,7 +1188,8 @@ "next_state" : "parse_ipv4" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_ethernet" } @@ -873,13 +1197,13 @@ "transition_key" : [ { "type" : "field", - "value" : ["scalars", "tmp_2"] + "value" : ["scalars", "tmp_5"] } ] }, { "name" : "parse_ipv4", - "id" : 7, + "id" : 9, "parser_ops" : [ { "parameters" : [ @@ -894,7 +1218,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] + "value" : ["scalars", "userMetadata._ip_proto20"] }, { "type" : "field", @@ -907,7 +1231,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] }, { "type" : "hexstr", @@ -920,7 +1244,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] }, { "type" : "field", @@ -933,7 +1257,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] }, { "type" : "field", @@ -976,7 +1300,8 @@ "next_state" : "parse_icmp" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -990,7 +1315,7 @@ }, { "name" : "parse_tcp", - "id" : 8, + "id" : 10, "parser_ops" : [ { "parameters" : [ @@ -1005,7 +1330,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "field", @@ -1018,7 +1343,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "userMetadata._l4_dport22"] }, { "type" : "field", @@ -1030,7 +1355,8 @@ ], "transitions" : [ { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_int" } @@ -1039,7 +1365,7 @@ }, { "name" : "parse_udp", - "id" : 9, + "id" : 11, "parser_ops" : [ { "parameters" : [ @@ -1054,7 +1380,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "field", @@ -1067,7 +1393,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "userMetadata._l4_dport22"] }, { "type" : "field", @@ -1075,141 +1401,398 @@ } ], "op" : "set" - } - ], - "transitions" : [ - { - "type" : "hexstr", - "value" : "0x0868", - "mask" : null, - "next_state" : "parse_gtpu" }, - { - "value" : "default", - "mask" : null, - "next_state" : "parse_int" - } - ], - "transition_key" : [ - { - "type" : "field", - "value" : ["udp", "dport"] - } - ] - }, - { - "name" : "parse_icmp", - "id" : 10, - "parser_ops" : [ { "parameters" : [ { - "type" : "regular", - "value" : "icmp" + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + { + "type" : "lookahead", + "value" : [0, 64] } ], - "op" : "extract" - } - ], - "transitions" : [ - { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [] - }, - { - "name" : "parse_gtpu", - "id" : 11, - "parser_ops" : [ + "op" : "set" + }, { "parameters" : [ { - "type" : "regular", - "value" : "gtpu" + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_0" + } + ], + "op" : "add_header" } ], - "op" : "extract" + "op" : "primitive" }, { "parameters" : [ { - "type" : "regular", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["gtpu_0", "version"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } } ], - "op" : "extract" + "op" : "set" }, { "parameters" : [ { "type" : "field", - "value" : ["scalars", "last_ipv4_dscp_0"] + "value" : ["gtpu_0", "pt"] }, { - "type" : "field", - "value" : ["inner_ipv4", "dscp"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3c" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } } ], "op" : "set" - } - ], - "transitions" : [ - { - "type" : "hexstr", - "value" : "0x06", - "mask" : null, - "next_state" : "parse_tcp" }, { - "type" : "hexstr", - "value" : "0x11", - "mask" : null, - "next_state" : "parse_inner_udp" + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "spare"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3b" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" }, { - "type" : "hexstr", - "value" : "0x01", - "mask" : null, - "next_state" : "parse_icmp" + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "ex_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3a" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" }, { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [ - { - "type" : "field", - "value" : ["inner_ipv4", "protocol"] - } - ] - }, - { - "name" : "parse_inner_udp", - "id" : 12, - "parser_ops" : [ + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "seq_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x39" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, { "parameters" : [ { - "type" : "regular", - "value" : "inner_udp" + "type" : "field", + "value" : ["gtpu_0", "npdu_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x38" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } } ], - "op" : "extract" + "op" : "set" }, { "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport17"] + "value" : ["gtpu_0", "msgtype"] }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ { "type" : "field", - "value" : ["inner_udp", "sport"] + "value" : ["gtpu_0", "msglen"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x20" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "op" : "set" @@ -1218,67 +1801,183 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport18"] + "value" : ["gtpu_0", "teid"] }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ { "type" : "field", - "value" : ["inner_udp", "dport"] + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } } ], "op" : "set" - } - ], - "transitions" : [ + }, { - "value" : "default", - "mask" : null, - "next_state" : "parse_int" + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" } ], - "transition_key" : [] - }, - { - "name" : "parse_int", - "id" : 13, - "parser_ops" : [], "transitions" : [ { "type" : "hexstr", - "value" : "0x01", - "mask" : "0x01", - "next_state" : "parse_intl4_shim" + "value" : "0x086801ff", + "mask" : null, + "next_state" : "parse_gtpu" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, - "next_state" : null + "next_state" : "parse_int" } ], "transition_key" : [ { "type" : "field", - "value" : ["scalars", "last_ipv4_dscp_0"] + "value" : ["udp", "dport"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_4"] } ] }, { - "name" : "parse_intl4_shim", - "id" : 14, + "name" : "parse_icmp", + "id" : 12, "parser_ops" : [ { "parameters" : [ { "type" : "regular", - "value" : "intl4_shim" + "value" : "icmp" } ], "op" : "extract" - }, + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_gtpu", + "id" : 13, + "parser_ops" : [ { "parameters" : [ { "type" : "regular", - "value" : "int_header" + "value" : "gtpu" } ], "op" : "extract" @@ -1287,45 +1986,301 @@ "transitions" : [ { "type" : "hexstr", - "value" : "0x04", + "value" : "0x000000", "mask" : null, - "next_state" : "parse_intl4_tail" + "next_state" : "parse_inner_ipv4" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, - "next_state" : "parse_int_data" + "next_state" : "parse_gtpu_options" } ], "transition_key" : [ { "type" : "field", - "value" : ["intl4_shim", "len_words"] - } - ] - }, - { - "name" : "parse_int_data", - "id" : 15, - "parser_ops" : [], - "transitions" : [ + "value" : ["gtpu", "ex_flag"] + }, { - "value" : "default", - "mask" : null, - "next_state" : null + "type" : "field", + "value" : ["gtpu", "seq_flag"] + }, + { + "type" : "field", + "value" : ["gtpu", "npdu_flag"] } - ], - "transition_key" : [] + ] }, { - "name" : "parse_intl4_tail", - "id" : 16, + "name" : "parse_gtpu_options", + "id" : 14, "parser_ops" : [ { "parameters" : [ { "type" : "regular", - "value" : "intl4_tail" + "value" : "gtpu_options" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + }, + { + "type" : "lookahead", + "value" : [0, 8] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x8501", + "mask" : null, + "next_state" : "parse_gtpu_ext_psc" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu_options", "next_ext"] + }, + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + } + ] + }, + { + "name" : "parse_gtpu_ext_psc", + "id" : 15, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu_ext_psc" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_qfi39"] + }, + { + "type" : "field", + "value" : ["gtpu_ext_psc", "qfi"] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x00", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu_ext_psc", "next_ext"] + } + ] + }, + { + "name" : "parse_inner_ipv4", + "id" : 16, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_ipv4" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "last_ipv4_dscp_0"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dscp"] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_inner_tcp" + }, + { + "type" : "hexstr", + "value" : "0x11", + "mask" : null, + "next_state" : "parse_inner_udp" + }, + { + "type" : "hexstr", + "value" : "0x01", + "mask" : null, + "next_state" : "parse_inner_icmp" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ] + }, + { + "name" : "parse_inner_udp", + "id" : 17, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_udp" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + }, + { + "type" : "field", + "value" : ["inner_udp", "sport"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + }, + { + "type" : "field", + "value" : ["inner_udp", "dport"] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_int" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_tcp", + "id" : 18, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_tcp" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + }, + { + "type" : "field", + "value" : ["inner_tcp", "sport"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + }, + { + "type" : "field", + "value" : ["inner_tcp", "dport"] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_icmp", + "id" : 19, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_icmp" } ], "op" : "extract" @@ -1333,472 +2288,3855 @@ ], "transitions" : [ { - "value" : "default", - "mask" : null, - "next_state" : null + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_int", + "id" : 20, + "parser_ops" : [], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x01", + "mask" : "0x01", + "next_state" : "parse_intl4_shim" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "last_ipv4_dscp_0"] + } + ] + }, + { + "name" : "parse_intl4_shim", + "id" : 21, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "intl4_shim" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "regular", + "value" : "int_header" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x04", + "mask" : null, + "next_state" : "parse_intl4_tail" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_int_data" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["intl4_shim", "len_words"] + } + ] + }, + { + "name" : "parse_int_data", + "id" : 22, + "parser_ops" : [], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_intl4_tail", + "id" : 23, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "intl4_tail" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + } + ] + } + ], + "parse_vsets" : [], + "deparsers" : [ + { + "name" : "deparser", + "id" : 0, + "source_info" : { + "filename" : "include/parser.p4", + "line" : 308, + "column" : 8, + "source_fragment" : "FabricDeparser" + }, + "order" : ["packet_in", "ethernet", "vlan_tag", "inner_vlan_tag", "eth_type", "mpls", "gtpu_ipv4", "gtpu_udp", "outer_gtpu", "outer_gtpu_options", "outer_gtpu_ext_psc", "ipv4", "tcp", "udp", "icmp", "gtpu", "gtpu_options", "gtpu_ext_psc", "inner_ipv4", "inner_tcp", "inner_udp", "inner_icmp", "intl4_shim", "int_header", "int_switch_id", "int_port_ids", "int_hop_latency", "int_q_occupancy", "int_ingress_tstamp", "int_egress_tstamp", "int_q_congestion", "int_egress_tx_util", "intl4_tail"], + "primitives" : [] + } + ], + "meter_arrays" : [ + { + "name" : "FabricIngress.qos.slice_tc_meter", + "id" : 0, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 78, + "column" : 41, + "source_fragment" : "slice_tc_meter" + }, + "is_direct" : false, + "size" : 64, + "rate_count" : 2, + "type" : "bytes" + } + ], + "counter_arrays" : [ + { + "name" : "FabricIngress.process_set_source_sink.counter_set_source", + "id" : 0, + "is_direct" : true, + "binding" : "FabricIngress.process_set_source_sink.tb_set_source", + "source_info" : { + "filename" : "include/int/int_main.p4", + "line" : 39, + "column" : 50, + "source_fragment" : "counter_set_source" + } + }, + { + "name" : "FabricIngress.filtering.ingress_port_vlan_counter", + "id" : 1, + "is_direct" : true, + "binding" : "FabricIngress.filtering.ingress_port_vlan", + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 31, + "column" : 50, + "source_fragment" : "ingress_port_vlan_counter" + } + }, + { + "name" : "FabricIngress.filtering.fwd_classifier_counter", + "id" : 2, + "is_direct" : true, + "binding" : "FabricIngress.filtering.fwd_classifier", + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 87, + "column" : 50, + "source_fragment" : "fwd_classifier_counter" + } + }, + { + "name" : "FabricIngress.forwarding.bridging_counter", + "id" : 3, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.bridging", + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 36, + "column" : 50, + "source_fragment" : "bridging_counter" + } + }, + { + "name" : "FabricIngress.forwarding.mpls_counter", + "id" : 4, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.mpls", + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 63, + "column" : 50, + "source_fragment" : "mpls_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_mpls_counter", + "id" : 5, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_mpls", + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 29, + "column" : 50, + "source_fragment" : "next_mpls_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_vlan_counter", + "id" : 6, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_vlan", + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 54, + "column" : 50, + "source_fragment" : "next_vlan_counter" + } + }, + { + "name" : "FabricIngress.acl.acl_counter", + "id" : 7, + "is_direct" : true, + "binding" : "FabricIngress.acl.acl", + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 29, + "column" : 50, + "source_fragment" : "acl_counter" + } + }, + { + "name" : "FabricIngress.next.xconnect_counter", + "id" : 8, + "is_direct" : true, + "binding" : "FabricIngress.next.xconnect", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 56, + "column" : 50, + "source_fragment" : "xconnect_counter" + } + }, + { + "name" : "FabricIngress.next.hashed_counter", + "id" : 9, + "is_direct" : true, + "binding" : "FabricIngress.next.hashed", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 126, + "column" : 50, + "source_fragment" : "hashed_counter" + } + }, + { + "name" : "FabricIngress.next.multicast_counter", + "id" : 10, + "is_direct" : true, + "binding" : "FabricIngress.next.multicast", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 163, + "column" : 50, + "source_fragment" : "multicast_counter" + } + }, + { + "name" : "FabricIngress.slice_tc_classifier.classifier_stats", + "id" : 11, + "is_direct" : true, + "binding" : "FabricIngress.slice_tc_classifier.classifier", + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 32, + "column" : 40, + "source_fragment" : "classifier_stats" + } + }, + { + "name" : "FabricIngress.qos.queues_stats", + "id" : 12, + "is_direct" : true, + "binding" : "FabricIngress.qos.queues", + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 80, + "column" : 40, + "source_fragment" : "queues_stats" + } + }, + { + "name" : "FabricIngress.port_counters_control.egress_port_counter", + "id" : 13, + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 26, + "column" : 48, + "source_fragment" : "egress_port_counter" + }, + "size" : 511, + "is_direct" : false + }, + { + "name" : "FabricIngress.port_counters_control.ingress_port_counter", + "id" : 14, + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 27, + "column" : 48, + "source_fragment" : "ingress_port_counter" + }, + "size" : 511, + "is_direct" : false + }, + { + "name" : "FabricIngress.spgw.pdr_counter", + "id" : 15, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 110, + "column" : 53, + "source_fragment" : "pdr_counter" + }, + "size" : 2048, + "is_direct" : false + }, + { + "name" : "FabricEgress.process_int_main.process_int_source.counter_int_source", + "id" : 16, + "is_direct" : true, + "binding" : "FabricEgress.process_int_main.process_int_source.tb_int_source", + "source_info" : { + "filename" : "include/int/int_source.p4", + "line" : 27, + "column" : 50, + "source_fragment" : "counter_int_source" + } + }, + { + "name" : "FabricEgress.egress_next.egress_vlan_counter", + "id" : 17, + "is_direct" : true, + "binding" : "FabricEgress.egress_next.egress_vlan", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 248, + "column" : 50, + "source_fragment" : "egress_vlan_counter" + } + }, + { + "name" : "FabricEgress.spgw.pdr_counter", + "id" : 18, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 307, + "column" : 53, + "source_fragment" : "pdr_counter" + }, + "size" : 2048, + "is_direct" : false + } + ], + "register_arrays" : [], + "calculations" : [ + { + "name" : "calc", + "id" : 0, + "source_info" : { + "filename" : "include/checksum.p4", + "line" : 28, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["ipv4", "version"] + }, + { + "type" : "field", + "value" : ["ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["ipv4", "dst_addr"] + } + ] + }, + { + "name" : "calc_0", + "id" : 1, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 393, + "column" : 8, + "source_fragment" : "update_checksum(gtpu_ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["gtpu_ipv4", "version"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "dst_addr"] + } + ] + }, + { + "name" : "calc_1", + "id" : 2, + "source_info" : { + "filename" : "include/checksum.p4", + "line" : 57, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["ipv4", "version"] + }, + { + "type" : "field", + "value" : ["ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["ipv4", "dst_addr"] + } + ] + } + ], + "learn_lists" : [], + "actions" : [ + { + "name" : "nop", + "id" : 0, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 1, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 2, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 3, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 4, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 5, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 6, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 7, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 8, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "NoAction", + "id" : 9, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "NoAction", + "id" : 10, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.process_set_source_sink.int_set_source", + "id" : 11, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_source46"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_main.p4", + "line" : 42, + "column" : 40, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.deny", + "id" : 12, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_forwarding14"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 36, + "column" : 40, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 37, + "column" : 34, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type54"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 136, + "column" : 38, + "source_fragment" : "0x0; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit", + "id" : 13, + "runtime_data" : [ + { + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type54"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 44, + "column" : 34, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit_with_internal_vlan", + "id" : 14, + "runtime_data" : [ + { + "name" : "vlan_id", + "bitwidth" : 12 + }, + { + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 49, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type54"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 44, + "column" : 34, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.set_forwarding_type", + "id" : 15, + "runtime_data" : [ + { + "name" : "fwd_type", + "bitwidth" : 3 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._fwd_type16"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 90, + "column" : 33, + "source_fragment" : "= fwd_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_bridging", + "id" : 16, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.pop_mpls_and_next", + "id" : 17, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label12"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 66, + "column" : 35, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_routing_v4", + "id" : 18, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.nop_routing_v4", + "id" : 19, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.pre_next.set_mpls_label", + "id" : 20, + "runtime_data" : [ + { + "name" : "label", + "bitwidth" : 20 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label12"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 32, + "column" : 35, + "source_fragment" : "= label; ..." + } + } + ] + }, + { + "name" : "FabricIngress.pre_next.set_vlan", + "id" : 21, + "runtime_data" : [ + { + "name" : "vlan_id", + "bitwidth" : 12 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 57, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.set_next_id_acl", + "id" : 22, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 32, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.punt_to_cpu", + "id" : 23, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "hexstr", + "value" : "0x00ff" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "standard_metadata.egress_spec = 255" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 39, + "column" : 28, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.set_clone_session_id", + "id" : 24, + "runtime_data" : [ + { + "name" : "clone_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "clone_ingress_pkt_to_egress", + "parameters" : [ + { + "type" : "runtime_data", + "value" : 0 + }, + { + "type" : "hexstr", + "value" : "0x1" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})" + } + } + ] + }, + { + "name" : "FabricIngress.acl.drop", + "id" : 25, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 50, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 51, + "column" : 28, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.nop_acl", + "id" : 26, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.next.output_xconnect", + "id" : 27, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.set_next_id_xconnect", + "id" : 28, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 64, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.output_hashed", + "id" : 29, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.routing_hashed", + "id" : 30, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + }, + { + "name" : "smac", + "bitwidth" : 48 + }, + { + "name" : "dmac", + "bitwidth" : 48 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ethernet", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 36, + "column" : 8, + "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ethernet", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.set_mcast_group_id", + "id" : 31, + "runtime_data" : [ + { + "name" : "group_id", + "bitwidth" : 16 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "mcast_grp"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 166, + "column" : 8, + "source_fragment" : "standard_metadata.mcast_grp = group_id" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._is_multicast18"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 167, + "column" : 37, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.slice_tc_classifier.set_slice_id_tc", + "id" : 32, + "runtime_data" : [ + { + "name" : "slice_id", + "bitwidth" : 4 + }, + { + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 35, + "column" : 27, + "source_fragment" : "= slice_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 36, + "column" : 21, + "source_fragment" : "= tc; ..." + } + } + ] + }, + { + "name" : "FabricIngress.slice_tc_classifier.trust_dscp", + "id" : 33, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x0f" + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 44, + "column" : 27, + "source_fragment" : "= hdr.ipv4.dscp[4 +2 -1:2]; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 45, + "column" : 21, + "source_fragment" : "= hdr.ipv4.dscp[2 -1:0]; ..." + } + } + ] + }, + { + "name" : "FabricIngress.qos.set_queue", + "id" : 34, + "runtime_data" : [ + { + "name" : "qid", + "bitwidth" : 5 + } + ], + "primitives" : [] + }, + { + "name" : "FabricIngress.qos.meter_drop", + "id" : 35, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 89, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_tcp", + "id" : 36, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "tcp" + }, + { + "type" : "header", + "value" : "inner_tcp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.tcp = hdr.inner_tcp" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_tcp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 56, + "column" : 8, + "source_fragment" : "hdr.inner_tcp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_udp", + "id" : 37, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + }, + { + "type" : "header", + "value" : "inner_udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.udp = hdr.inner_udp" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 62, + "column" : 8, + "source_fragment" : "hdr.inner_udp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_icmp", + "id" : 38, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 67, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "icmp" + }, + { + "type" : "header", + "value" : "inner_icmp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 68, + "column" : 8, + "source_fragment" : "hdr.icmp = hdr.inner_icmp" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_icmp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 69, + "column" : 8, + "source_fragment" : "hdr.inner_icmp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_unknown", + "id" : 39, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu.decap_inner_tcp", + "id" : 40, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "tcp" + }, + { + "type" : "header", + "value" : "inner_tcp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.tcp = hdr.inner_tcp" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_tcp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 56, + "column" : 8, + "source_fragment" : "hdr.inner_tcp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu.decap_inner_udp", + "id" : 41, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + }, + { + "type" : "header", + "value" : "inner_udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.udp = hdr.inner_udp" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 62, + "column" : 8, + "source_fragment" : "hdr.inner_udp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu.decap_inner_icmp", + "id" : 42, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 67, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "icmp" + }, + { + "type" : "header", + "value" : "inner_icmp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 68, + "column" : 8, + "source_fragment" : "hdr.icmp = hdr.inner_icmp" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_icmp" } ], - "transition_key" : [] + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 69, + "column" : 8, + "source_fragment" : "hdr.inner_icmp.setInvalid()" + } } ] - } - ], - "parse_vsets" : [], - "deparsers" : [ - { - "name" : "deparser", - "id" : 0, - "source_info" : { - "filename" : "include/parser.p4", - "line" : 268, - "column" : 8, - "source_fragment" : "FabricDeparser" - }, - "order" : ["packet_in", "ethernet", "vlan_tag", "inner_vlan_tag", "eth_type", "mpls", "gtpu_ipv4", "gtpu_udp", "outer_gtpu", "ipv4", "tcp", "udp", "icmp", "gtpu", "inner_ipv4", "inner_tcp", "inner_udp", "inner_icmp", "intl4_shim", "int_header", "int_switch_id", "int_port_ids", "int_hop_latency", "int_q_occupancy", "int_ingress_tstamp", "int_egress_tstamp", "int_q_congestion", "int_egress_tx_util", "intl4_tail"] - } - ], - "meter_arrays" : [], - "counter_arrays" : [ - { - "name" : "FabricIngress.process_set_source_sink.counter_set_source", - "id" : 0, - "is_direct" : true, - "binding" : "FabricIngress.process_set_source_sink.tb_set_source", - "source_info" : { - "filename" : "include/int/int_main.p4", - "line" : 39, - "column" : 50, - "source_fragment" : "counter_set_source" - } - }, - { - "name" : "FabricIngress.filtering.ingress_port_vlan_counter", - "id" : 1, - "is_direct" : true, - "binding" : "FabricIngress.filtering.ingress_port_vlan", - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 31, - "column" : 50, - "source_fragment" : "ingress_port_vlan_counter" - } - }, - { - "name" : "FabricIngress.filtering.fwd_classifier_counter", - "id" : 2, - "is_direct" : true, - "binding" : "FabricIngress.filtering.fwd_classifier", - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 85, - "column" : 50, - "source_fragment" : "fwd_classifier_counter" - } - }, - { - "name" : "FabricIngress.forwarding.bridging_counter", - "id" : 3, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.bridging", - "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 36, - "column" : 50, - "source_fragment" : "bridging_counter" - } - }, - { - "name" : "FabricIngress.forwarding.mpls_counter", - "id" : 4, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.mpls", - "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 63, - "column" : 50, - "source_fragment" : "mpls_counter" - } - }, - { - "name" : "FabricIngress.acl.acl_counter", - "id" : 5, - "is_direct" : true, - "binding" : "FabricIngress.acl.acl", - "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 30, - "column" : 50, - "source_fragment" : "acl_counter" - } - }, - { - "name" : "FabricIngress.next.next_vlan_counter", - "id" : 6, - "is_direct" : true, - "binding" : "FabricIngress.next.next_vlan", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 67, - "column" : 50, - "source_fragment" : "next_vlan_counter" - } - }, - { - "name" : "FabricIngress.next.xconnect_counter", - "id" : 7, - "is_direct" : true, - "binding" : "FabricIngress.next.xconnect", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 107, - "column" : 50, - "source_fragment" : "xconnect_counter" - } - }, - { - "name" : "FabricIngress.next.hashed_counter", - "id" : 8, - "is_direct" : true, - "binding" : "FabricIngress.next.hashed", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 184, - "column" : 50, - "source_fragment" : "hashed_counter" - } - }, - { - "name" : "FabricIngress.next.multicast_counter", - "id" : 9, - "is_direct" : true, - "binding" : "FabricIngress.next.multicast", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 228, - "column" : 50, - "source_fragment" : "multicast_counter" - } - }, - { - "name" : "FabricIngress.port_counters_control.egress_port_counter", - "id" : 10, - "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 26, - "column" : 48, - "source_fragment" : "egress_port_counter" - }, - "size" : 511, - "is_direct" : false - }, - { - "name" : "FabricIngress.port_counters_control.ingress_port_counter", - "id" : 11, - "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 27, - "column" : 48, - "source_fragment" : "ingress_port_counter" - }, - "size" : 511, - "is_direct" : false - }, - { - "name" : "FabricIngress.spgw_ingress.pdr_counter", - "id" : 12, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 180, - "column" : 53, - "source_fragment" : "pdr_counter" - }, - "size" : 2048, - "is_direct" : false - }, - { - "name" : "FabricEgress.process_int_main.process_int_source.counter_int_source", - "id" : 13, - "is_direct" : true, - "binding" : "FabricEgress.process_int_main.process_int_source.tb_int_source", - "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 27, - "column" : 50, - "source_fragment" : "counter_int_source" - } - }, - { - "name" : "FabricEgress.egress_next.egress_vlan_counter", - "id" : 14, - "is_direct" : true, - "binding" : "FabricEgress.egress_next.egress_vlan", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 313, - "column" : 50, - "source_fragment" : "egress_vlan_counter" - } }, { - "name" : "FabricEgress.spgw_egress.pdr_counter", - "id" : 15, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 301, - "column" : 53, - "source_fragment" : "pdr_counter" - }, - "size" : 2048, - "is_direct" : false - } - ], - "register_arrays" : [], - "calculations" : [ - { - "name" : "calc", - "id" : 0, - "source_info" : { - "filename" : "include/checksum.p4", - "line" : 28, - "column" : 8, - "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ + "name" : "FabricIngress.spgw.decap_gtpu.decap_inner_unknown", + "id" : 43, + "runtime_data" : [], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "version"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "ihl"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "dscp"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "ecn"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "total_len"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "identification"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "flags"] + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } }, { - "type" : "field", - "value" : ["ipv4", "frag_offset"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "ttl"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "protocol"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "src_addr"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } }, { - "type" : "field", - "value" : ["ipv4", "dst_addr"] + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } } ] }, { - "name" : "calc_0", - "id" : 1, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 362, - "column" : 8, - "source_fragment" : "update_checksum(gtpu_ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ - { - "type" : "field", - "value" : ["gtpu_ipv4", "version"] - }, - { - "type" : "field", - "value" : ["gtpu_ipv4", "ihl"] - }, - { - "type" : "field", - "value" : ["gtpu_ipv4", "dscp"] - }, - { - "type" : "field", - "value" : ["gtpu_ipv4", "ecn"] - }, - { - "type" : "field", - "value" : ["gtpu_ipv4", "total_len"] - }, - { - "type" : "field", - "value" : ["gtpu_ipv4", "identification"] - }, - { - "type" : "field", - "value" : ["gtpu_ipv4", "flags"] - }, + "name" : "FabricIngress.spgw.load_iface", + "id" : 44, + "runtime_data" : [ { - "type" : "field", - "value" : ["gtpu_ipv4", "frag_offset"] + "name" : "src_iface", + "bitwidth" : 8 }, { - "type" : "field", - "value" : ["gtpu_ipv4", "ttl"] - }, + "name" : "slice_id", + "bitwidth" : 4 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["gtpu_ipv4", "protocol"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_src_iface38"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 122, + "column" : 33, + "source_fragment" : "= src_iface; ..." + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "src_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_skip_spgw40"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 123, + "column" : 33, + "source_fragment" : "= false; ..." + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "dst_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 124, + "column" : 27, + "source_fragment" : "= slice_id; ..." + } } ] }, { - "name" : "calc_1", - "id" : 2, - "source_info" : { - "filename" : "include/checksum.p4", - "line" : 57, - "column" : 8, - "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ - { - "type" : "field", - "value" : ["ipv4", "version"] - }, - { - "type" : "field", - "value" : ["ipv4", "ihl"] - }, + "name" : "FabricIngress.spgw.iface_miss", + "id" : 45, + "runtime_data" : [], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "dscp"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_src_iface38"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 127, + "column" : 44, + "source_fragment" : "8w0; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "ecn"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_skip_spgw40"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 128, + "column" : 33, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.spgw.load_pdr", + "id" : 46, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "total_len"] + "name" : "ctr_id", + "bitwidth" : 32 }, { - "type" : "field", - "value" : ["ipv4", "identification"] + "name" : "far_id", + "bitwidth" : 32 }, { - "type" : "field", - "value" : ["ipv4", "flags"] + "name" : "needs_gtpu_decap", + "bitwidth" : 1 }, { - "type" : "field", - "value" : ["ipv4", "frag_offset"] - }, + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "ttl"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ctr_id36"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 153, + "column" : 30, + "source_fragment" : "= ctr_id; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "protocol"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_far_id37"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 154, + "column" : 30, + "source_fragment" : "= far_id; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "src_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap43"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 2 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 155, + "column" : 40, + "source_fragment" : "= (bool)needs_gtpu_decap; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "dst_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 156, + "column" : 21, + "source_fragment" : "= tc; ..." + } } ] - } - ], - "learn_lists" : [], - "actions" : [ - { - "name" : "nop", - "id" : 0, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 1, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 2, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 3, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 4, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 5, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 6, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 7, - "runtime_data" : [], - "primitives" : [] }, { - "name" : "FabricIngress.process_set_source_sink.int_set_source", - "id" : 8, - "runtime_data" : [], + "name" : "FabricIngress.spgw.load_pdr", + "id" : 47, + "runtime_data" : [ + { + "name" : "ctr_id", + "bitwidth" : 32 + }, + { + "name" : "far_id", + "bitwidth" : 32 + }, + { + "name" : "needs_gtpu_decap", + "bitwidth" : 1 + }, + { + "name" : "tc", + "bitwidth" : 2 + } + ], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_source34"] + "value" : ["scalars", "userMetadata._spgw_ctr_id36"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 153, + "column" : 30, + "source_fragment" : "= ctr_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_far_id37"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 154, + "column" : 30, + "source_fragment" : "= far_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap43"] }, { "type" : "expression", @@ -1808,54 +6146,117 @@ "op" : "b2d", "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 2 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } } } } } ], "source_info" : { - "filename" : "include/int/int_main.p4", - "line" : 42, + "filename" : "include/control/spgw.p4", + "line" : 155, "column" : 40, - "source_fragment" : "= true; ..." + "source_fragment" : "= (bool)needs_gtpu_decap; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 156, + "column" : 21, + "source_fragment" : "= tc; ..." } } ] }, { - "name" : "FabricIngress.filtering.deny", - "id" : 9, - "runtime_data" : [], + "name" : "FabricIngress.spgw.load_pdr_qos", + "id" : 48, + "runtime_data" : [ + { + "name" : "ctr_id", + "bitwidth" : 32 + }, + { + "name" : "far_id", + "bitwidth" : 32 + }, + { + "name" : "needs_gtpu_decap", + "bitwidth" : 1 + }, + { + "name" : "needs_qfi_push", + "bitwidth" : 1 + }, + { + "name" : "qfi", + "bitwidth" : 6 + }, + { + "name" : "tc", + "bitwidth" : 2 + } + ], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_forwarding6"] + "value" : ["scalars", "userMetadata._spgw_ctr_id36"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "runtime_data", + "value" : 0 } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 36, - "column" : 40, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 153, + "column" : 30, + "source_fragment" : "= ctr_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_far_id37"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 154, + "column" : 30, + "source_fragment" : "= far_id; ..." } }, { @@ -1863,7 +6264,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap43"] }, { "type" : "expression", @@ -1873,128 +6274,136 @@ "op" : "b2d", "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 2 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } } } } } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 37, - "column" : 34, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 155, + "column" : 40, + "source_fragment" : "= (bool)needs_gtpu_decap; ..." } - } - ] - }, - { - "name" : "FabricIngress.filtering.permit", - "id" : 10, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.filtering.permit_with_internal_vlan", - "id" : 11, - "runtime_data" : [ - { - "name" : "vlan_id", - "bitwidth" : 12 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._tc27"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 5 } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 47, - "column" : 32, - "source_fragment" : "= vlan_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 156, + "column" : 21, + "source_fragment" : "= tc; ..." } - } - ] - }, - { - "name" : "FabricIngress.filtering.set_forwarding_type", - "id" : 12, - "runtime_data" : [ - { - "name" : "fwd_type", - "bitwidth" : 3 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._spgw_qfi39"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 4 } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 88, - "column" : 33, - "source_fragment" : "= fwd_type; ..." + "filename" : "include/control/spgw.p4", + "line" : 167, + "column" : 27, + "source_fragment" : "= qfi; ..." } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id_bridging", - "id" : 13, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._spgw_needs_qfi_push45"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 3 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 168, + "column" : 38, + "source_fragment" : "= (bool)needs_qfi_push; ..." } } ] }, { - "name" : "FabricIngress.forwarding.pop_mpls_and_next", - "id" : 14, + "name" : "FabricIngress.spgw.load_pdr_qos", + "id" : 49, "runtime_data" : [ { - "name" : "next_id", + "name" : "ctr_id", "bitwidth" : 32 + }, + { + "name" : "far_id", + "bitwidth" : 32 + }, + { + "name" : "needs_gtpu_decap", + "bitwidth" : 1 + }, + { + "name" : "needs_qfi_push", + "bitwidth" : 1 + }, + { + "name" : "qfi", + "bitwidth" : 6 + }, + { + "name" : "tc", + "bitwidth" : 2 } ], "primitives" : [ @@ -2003,18 +6412,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "value" : ["scalars", "userMetadata._spgw_ctr_id36"] }, { - "type" : "hexstr", - "value" : "0x000000" + "type" : "runtime_data", + "value" : 0 } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 66, - "column" : 35, - "source_fragment" : "= 0; ..." + "filename" : "include/control/spgw.p4", + "line" : 153, + "column" : 30, + "source_fragment" : "= ctr_id; ..." } }, { @@ -2022,112 +6431,95 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._spgw_far_id37"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 1 } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 154, + "column" : 30, + "source_fragment" : "= far_id; ..." } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id_routing_v4", - "id" : 15, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap43"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 2 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 155, + "column" : 40, + "source_fragment" : "= (bool)needs_gtpu_decap; ..." } - } - ] - }, - { - "name" : "FabricIngress.forwarding.nop_routing_v4", - "id" : 16, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.acl.set_next_id_acl", - "id" : 17, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._tc27"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 5 } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 33, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 156, + "column" : 21, + "source_fragment" : "= tc; ..." } - } - ] - }, - { - "name" : "FabricIngress.acl.punt_to_cpu", - "id" : 18, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._spgw_qfi39"] }, { - "type" : "hexstr", - "value" : "0x00ff" + "type" : "runtime_data", + "value" : 4 } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 39, - "column" : 8, - "source_fragment" : "standard_metadata.egress_spec = 255" + "filename" : "include/control/spgw.p4", + "line" : 167, + "column" : 27, + "source_fragment" : "= qfi; ..." } }, { @@ -2135,7 +6527,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["scalars", "userMetadata._spgw_needs_qfi_push45"] }, { "type" : "expression", @@ -2145,71 +6537,83 @@ "op" : "b2d", "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 3 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } } } } } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 40, - "column" : 34, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 168, + "column" : 38, + "source_fragment" : "= (bool)needs_qfi_push; ..." } } ] }, { - "name" : "FabricIngress.acl.set_clone_session_id", - "id" : 19, + "name" : "FabricIngress.spgw.load_normal_far", + "id" : 50, "runtime_data" : [ { - "name" : "clone_id", - "bitwidth" : 32 + "name" : "drop", + "bitwidth" : 1 + }, + { + "name" : "notify_cp", + "bitwidth" : 1 } ], "primitives" : [ { - "op" : "clone_ingress_pkt_to_egress", + "op" : "assign", "parameters" : [ { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["scalars", "userMetadata._skip_forwarding14"] }, { - "type" : "hexstr", - "value" : "0x1" - } - ], - "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 46, - "column" : 8, - "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})" - } - } - ] - }, - { - "name" : "FabricIngress.acl.drop", - "id" : 20, - "runtime_data" : [], - "primitives" : [ - { - "op" : "mark_to_drop", - "parameters" : [ - { - "type" : "header", - "value" : "standard_metadata" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 51, - "column" : 8, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/control/spgw.p4", + "line" : 207, + "column" : 34, + "source_fragment" : "= (bool)drop; ..." } }, { @@ -2217,7 +6621,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["scalars", "userMetadata._skip_next15"] }, { "type" : "expression", @@ -2227,66 +6631,98 @@ "op" : "b2d", "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } } } } } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 52, - "column" : 34, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 208, + "column" : 28, + "source_fragment" : "= (bool)drop; ..." } - } - ] - }, - { - "name" : "FabricIngress.acl.nop_acl", - "id" : 21, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.next.set_vlan", - "id" : 22, - "runtime_data" : [ - { - "name" : "vlan_id", - "bitwidth" : 12 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._spgw_notify_spgwc41"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 1 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 70, - "column" : 32, - "source_fragment" : "= vlan_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 209, + "column" : 36, + "source_fragment" : "= (bool)notify_cp; ..." } } ] }, { - "name" : "FabricIngress.next.output_xconnect", - "id" : 23, + "name" : "FabricIngress.spgw.load_tunnel_far", + "id" : 51, "runtime_data" : [ { - "name" : "port_num", - "bitwidth" : 9 + "name" : "drop", + "bitwidth" : 1 + }, + { + "name" : "notify_cp", + "bitwidth" : 1 + }, + { + "name" : "tunnel_src_port", + "bitwidth" : 16 + }, + { + "name" : "tunnel_src_addr", + "bitwidth" : 32 + }, + { + "name" : "tunnel_dst_addr", + "bitwidth" : 32 + }, + { + "name" : "teid", + "bitwidth" : 32 } ], "primitives" : [ @@ -2295,119 +6731,145 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._skip_forwarding14"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/spgw.p4", + "line" : 218, + "column" : 34, + "source_fragment" : "= (bool)drop; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.set_next_id_xconnect", - "id" : 24, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._skip_next15"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 115, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 219, + "column" : 28, + "source_fragment" : "= (bool)drop; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.output_hashed", - "id" : 25, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._spgw_notify_spgwc41"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 1 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/spgw.p4", + "line" : 220, + "column" : 36, + "source_fragment" : "= (bool)notify_cp; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.routing_hashed", - "id" : 26, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - }, - { - "name" : "smac", - "bitwidth" : 48 }, - { - "name" : "dmac", - "bitwidth" : 48 - } - ], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["ethernet", "src_addr"] + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_encap42"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + "filename" : "include/control/spgw.p4", + "line" : 222, + "column" : 40, + "source_fragment" : "= true; ..." } }, { @@ -2415,18 +6877,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "dst_addr"] + "value" : ["scalars", "userMetadata._spgw_teid32"] }, { "type" : "runtime_data", - "value" : 2 + "value" : 5 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + "filename" : "include/control/spgw.p4", + "line" : 223, + "column" : 28, + "source_fragment" : "= teid; ..." } }, { @@ -2434,50 +6896,26 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_port33"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 2 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/spgw.p4", + "line" : 224, + "column" : 39, + "source_fragment" : "= tunnel_src_port; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.mpls_routing_hashed", - "id" : 27, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 }, - { - "name" : "smac", - "bitwidth" : 48 - }, - { - "name" : "dmac", - "bitwidth" : 48 - }, - { - "name" : "label", - "bitwidth" : 20 - } - ], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_addr34"] }, { "type" : "runtime_data", @@ -2485,10 +6923,10 @@ } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 46, - "column" : 35, - "source_fragment" : "= label; ..." + "filename" : "include/control/spgw.p4", + "line" : 225, + "column" : 39, + "source_fragment" : "= tunnel_src_addr; ..." } }, { @@ -2496,18 +6934,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "src_addr"] + "value" : ["scalars", "userMetadata._spgw_tunnel_dst_addr35"] }, { "type" : "runtime_data", - "value" : 1 + "value" : 4 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + "filename" : "include/control/spgw.p4", + "line" : 226, + "column" : 39, + "source_fragment" : "= tunnel_dst_addr; ..." } }, { @@ -2515,18 +6953,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "dst_addr"] + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] }, { "type" : "runtime_data", - "value" : 2 + "value" : 3 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + "filename" : "include/control/spgw.p4", + "line" : 228, + "column" : 32, + "source_fragment" : "= tunnel_src_addr; ..." } }, { @@ -2534,49 +6972,37 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 4 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/spgw.p4", + "line" : 229, + "column" : 32, + "source_fragment" : "= tunnel_dst_addr; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.set_mcast_group_id", - "id" : 28, - "runtime_data" : [ - { - "name" : "group_id", - "bitwidth" : 16 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "mcast_grp"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 2 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 231, - "column" : 8, - "source_fragment" : "standard_metadata.mcast_grp = group_id" + "filename" : "include/control/spgw.p4", + "line" : 230, + "column" : 27, + "source_fragment" : "= tunnel_src_port; ..." } }, { @@ -2584,47 +7010,49 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_multicast10"] + "value" : ["scalars", "userMetadata._l4_dport22"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "hexstr", + "value" : "0x0868" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 232, - "column" : 37, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 231, + "column" : 27, + "source_fragment" : "= 2152; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.set_source_iface", - "id" : 29, + "name" : "FabricIngress.spgw.load_dbuf_far", + "id" : 52, "runtime_data" : [ { - "name" : "src_iface", - "bitwidth" : 8 + "name" : "drop", + "bitwidth" : 1 }, { - "name" : "direction", - "bitwidth" : 2 + "name" : "notify_cp", + "bitwidth" : 1 }, { - "name" : "skip_spgw", - "bitwidth" : 1 + "name" : "tunnel_src_port", + "bitwidth" : 16 + }, + { + "name" : "tunnel_src_addr", + "bitwidth" : 32 + }, + { + "name" : "tunnel_dst_addr", + "bitwidth" : 32 + }, + { + "name" : "teid", + "bitwidth" : 32 } ], "primitives" : [ @@ -2633,18 +7061,38 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_src_iface27"] + "value" : ["scalars", "userMetadata._skip_forwarding14"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 50, - "column" : 33, - "source_fragment" : "= src_iface; ..." + "line" : 218, + "column" : 34, + "source_fragment" : "= (bool)drop; ..." } }, { @@ -2652,18 +7100,38 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_direction19"] + "value" : ["scalars", "userMetadata._skip_next15"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 51, - "column" : 33, - "source_fragment" : "= direction; ..." + "line" : 219, + "column" : 28, + "source_fragment" : "= (bool)drop; ..." } }, { @@ -2671,7 +7139,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_skip_spgw28"] + "value" : ["scalars", "userMetadata._spgw_notify_spgwc41"] }, { "type" : "expression", @@ -2686,7 +7154,7 @@ "op" : "!=", "left" : { "type" : "local", - "value" : 2 + "value" : 1 }, "right" : { "type" : "hexstr", @@ -2700,58 +7168,76 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 52, - "column" : 33, - "source_fragment" : "= (bool)skip_spgw; ..." + "line" : 220, + "column" : 36, + "source_fragment" : "= (bool)notify_cp; ..." } - } - ] - }, - { - "name" : "FabricIngress.spgw_ingress.set_pdr_attributes", - "id" : 30, - "runtime_data" : [ - { - "name" : "ctr_id", - "bitwidth" : 32 }, { - "name" : "far_id", - "bitwidth" : 32 + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_encap42"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 222, + "column" : 40, + "source_fragment" : "= true; ..." + } }, { - "name" : "needs_gtpu_decap", - "bitwidth" : 1 - } - ], - "primitives" : [ + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_teid32"] + }, + { + "type" : "runtime_data", + "value" : 5 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 223, + "column" : 28, + "source_fragment" : "= teid; ..." + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_pdr_hit29"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_port33"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "runtime_data", + "value" : 2 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 75, - "column" : 31, - "source_fragment" : "= true; ..." + "line" : 224, + "column" : 39, + "source_fragment" : "= tunnel_src_port; ..." } }, { @@ -2759,18 +7245,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id25"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_addr34"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 3 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 76, - "column" : 30, - "source_fragment" : "= ctr_id; ..." + "line" : 225, + "column" : 39, + "source_fragment" : "= tunnel_src_addr; ..." } }, { @@ -2778,18 +7264,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_id26"] + "value" : ["scalars", "userMetadata._spgw_tunnel_dst_addr35"] }, { "type" : "runtime_data", - "value" : 1 + "value" : 4 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 77, - "column" : 30, - "source_fragment" : "= far_id; ..." + "line" : 226, + "column" : 39, + "source_fragment" : "= tunnel_dst_addr; ..." } }, { @@ -2797,87 +7283,37 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_decap33"] + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "local", - "value" : 2 - }, - "right" : { - "type" : "hexstr", - "value" : "0x00" - } - } - } - } - } + "type" : "runtime_data", + "value" : 3 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 78, - "column" : 40, - "source_fragment" : "= (bool)needs_gtpu_decap; ..." + "line" : 228, + "column" : 32, + "source_fragment" : "= tunnel_src_addr; ..." } - } - ] - }, - { - "name" : "FabricIngress.spgw_ingress.set_pdr_attributes", - "id" : 31, - "runtime_data" : [ - { - "name" : "ctr_id", - "bitwidth" : 32 - }, - { - "name" : "far_id", - "bitwidth" : 32 }, - { - "name" : "needs_gtpu_decap", - "bitwidth" : 1 - } - ], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_pdr_hit29"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "runtime_data", + "value" : 4 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 75, - "column" : 31, - "source_fragment" : "= true; ..." + "line" : 229, + "column" : 32, + "source_fragment" : "= tunnel_dst_addr; ..." } }, { @@ -2885,18 +7321,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id25"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 2 } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 76, - "column" : 30, - "source_fragment" : "= ctr_id; ..." + "line" : 230, + "column" : 27, + "source_fragment" : "= tunnel_src_port; ..." } }, { @@ -2904,18 +7340,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_id26"] + "value" : ["scalars", "userMetadata._l4_dport22"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "hexstr", + "value" : "0x0868" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 77, - "column" : 30, - "source_fragment" : "= far_id; ..." + "line" : 231, + "column" : 27, + "source_fragment" : "= 2152; ..." } }, { @@ -2923,7 +7359,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_decap33"] + "value" : ["scalars", "userMetadata._spgw_skip_egress_pdr_ctr44"] }, { "type" : "expression", @@ -2933,18 +7369,8 @@ "op" : "b2d", "left" : null, "right" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "local", - "value" : 2 - }, - "right" : { - "type" : "hexstr", - "value" : "0x00" - } - } + "type" : "bool", + "value" : true } } } @@ -2952,64 +7378,80 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 78, - "column" : 40, - "source_fragment" : "= (bool)needs_gtpu_decap; ..." + "line" : 242, + "column" : 43, + "source_fragment" : "= true; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.load_normal_far_attributes", - "id" : 32, - "runtime_data" : [ + "name" : "lookup_md_init37", + "id" : 53, + "runtime_data" : [], + "primitives" : [ { - "name" : "drop", - "bitwidth" : 1 + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] + }, + { + "type" : "field", + "value" : ["inner_tcp", "sport"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 37, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." + } }, { - "name" : "notify_cp", - "bitwidth" : 1 + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] + }, + { + "type" : "field", + "value" : ["inner_tcp", "dport"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 38, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.dport; ..." + } } - ], + ] + }, + { + "name" : "lookup_md_init40", + "id" : 54, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_dropped30"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "local", - "value" : 0 - }, - "right" : { - "type" : "hexstr", - "value" : "0x00" - } - } - } - } - } + "type" : "field", + "value" : ["inner_udp", "sport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 138, - "column" : 35, - "source_fragment" : "= (bool)drop; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." } }, { @@ -3017,78 +7459,78 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_notify_spgwc31"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "local", - "value" : 1 - }, - "right" : { - "type" : "hexstr", - "value" : "0x00" - } - } - } - } - } + "type" : "field", + "value" : ["inner_udp", "dport"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.dport; ..." + } + } + ] + }, + { + "name" : "lookup_md_init43", + "id" : 55, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] + }, + { + "type" : "field", + "value" : ["inner_icmp", "icmp_type"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 43, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] + }, + { + "type" : "field", + "value" : ["inner_icmp", "icmp_code"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 139, - "column" : 36, - "source_fragment" : "= (bool)notify_cp; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 44, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_code; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.load_tunnel_far_attributes", - "id" : 33, - "runtime_data" : [ - { - "name" : "drop", - "bitwidth" : 1 - }, - { - "name" : "notify_cp", - "bitwidth" : 1 - }, - { - "name" : "tunnel_src_port", - "bitwidth" : 16 - }, - { - "name" : "tunnel_src_addr", - "bitwidth" : 32 - }, - { - "name" : "tunnel_dst_addr", - "bitwidth" : 32 - }, - { - "name" : "teid", - "bitwidth" : 32 - } - ], + "name" : "lookup_md_init32", + "id" : 56, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_dropped30"] + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] }, { "type" : "expression", @@ -3098,28 +7540,18 @@ "op" : "b2d", "left" : null, "right" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "local", - "value" : 0 - }, - "right" : { - "type" : "hexstr", - "value" : "0x00" - } - } + "type" : "bool", + "value" : true } } } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 148, - "column" : 35, - "source_fragment" : "= (bool)drop; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 32, + "column" : 27, + "source_fragment" : "= true; ..." } }, { @@ -3127,38 +7559,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_notify_spgwc31"] + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "local", - "value" : 1 - }, - "right" : { - "type" : "hexstr", - "value" : "0x00" - } - } - } - } - } + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 149, - "column" : 36, - "source_fragment" : "= (bool)notify_cp; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 33, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." } }, { @@ -3166,28 +7578,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_encap32"] + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 151, - "column" : 40, - "source_fragment" : "= true; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 34, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." } }, { @@ -3195,37 +7597,44 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_teid21"] + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] }, { - "type" : "runtime_data", - "value" : 5 + "type" : "field", + "value" : ["inner_ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 152, + "filename" : "include/control/lookup_md_init.p4", + "line" : 35, "column" : 28, - "source_fragment" : "= teid; ..." + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init52", + "id" : 57, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_port22"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "runtime_data", - "value" : 2 + "type" : "field", + "value" : ["tcp", "sport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 153, - "column" : 39, - "source_fragment" : "= tunnel_src_port; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 52, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." } }, { @@ -3233,37 +7642,44 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_addr23"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "runtime_data", - "value" : 3 + "type" : "field", + "value" : ["tcp", "dport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 154, - "column" : 39, - "source_fragment" : "= tunnel_src_addr; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 53, + "column" : 32, + "source_fragment" : "= hdr.tcp.dport; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init55", + "id" : 58, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_dst_addr24"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "runtime_data", - "value" : 4 + "type" : "field", + "value" : ["udp", "sport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 155, - "column" : 39, - "source_fragment" : "= tunnel_dst_addr; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 55, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." } }, { @@ -3271,37 +7687,44 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "runtime_data", - "value" : 3 + "type" : "field", + "value" : ["udp", "dport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 157, + "filename" : "include/control/lookup_md_init.p4", + "line" : 56, "column" : 32, - "source_fragment" : "= tunnel_src_addr; ..." + "source_fragment" : "= hdr.udp.dport; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init58", + "id" : 59, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "runtime_data", - "value" : 4 + "type" : "field", + "value" : ["icmp", "icmp_type"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 158, - "column" : 32, - "source_fragment" : "= tunnel_dst_addr; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 58, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." } }, { @@ -3309,18 +7732,92 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { - "type" : "runtime_data", - "value" : 2 + "type" : "field", + "value" : ["icmp", "icmp_code"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 159, + "filename" : "include/control/lookup_md_init.p4", + "line" : 59, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_code; ..." + } + } + ] + }, + { + "name" : "lookup_md_init47", + "id" : 60, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 47, "column" : 27, - "source_fragment" : "= tunnel_src_port; ..." + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] + }, + { + "type" : "field", + "value" : ["ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 48, + "column" : 28, + "source_fragment" : "= hdr.ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] + }, + { + "type" : "field", + "value" : ["ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 49, + "column" : 28, + "source_fragment" : "= hdr.ipv4.dst_addr; ..." } }, { @@ -3328,25 +7825,25 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] }, { - "type" : "hexstr", - "value" : "0x0868" + "type" : "field", + "value" : ["ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 160, - "column" : 27, - "source_fragment" : "= 2152; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 50, + "column" : 28, + "source_fragment" : "= hdr.ipv4.protocol; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.decap_inner_tcp", - "id" : 34, + "name" : "lookup_md_init23", + "id" : 61, "runtime_data" : [], "primitives" : [ { @@ -3354,18 +7851,28 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] }, { - "type" : "hexstr", - "value" : "0x0800" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 23, + "column" : 23, + "source_fragment" : "= false; ..." } }, { @@ -3373,18 +7880,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] }, { - "type" : "field", - "value" : ["inner_ipv4", "protocol"] + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 187, - "column" : 27, - "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 24, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -3392,18 +7899,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "field", - "value" : ["inner_ipv4", "src_addr"] + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 188, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 25, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -3411,18 +7918,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] }, { - "type" : "field", - "value" : ["inner_ipv4", "dst_addr"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 189, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 26, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -3430,18 +7937,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport17"] + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 190, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_sport; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 27, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -3449,67 +7956,82 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport18"] + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 191, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_dport; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 28, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "header", - "value" : "inner_ipv4" + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 193, - "column" : 8, - "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + "filename" : "include/control/lookup_md_init.p4", + "line" : 29, + "column" : 25, + "source_fragment" : "= 0; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] + }, + { + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 194, - "column" : 8, - "source_fragment" : "hdr.inner_ipv4.setInvalid()" + "filename" : "include/control/lookup_md_init.p4", + "line" : 30, + "column" : 25, + "source_fragment" : "= 0; ..." } - }, + } + ] + }, + { + "name" : "packetio25", + "id" : 62, + "runtime_data" : [], + "primitives" : [ { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu" + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "field", + "value" : ["packet_out", "egress_port"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 195, - "column" : 8, - "source_fragment" : "hdr.gtpu.setInvalid()" + "filename" : "include/control/packetio.p4", + "line" : 25, + "column" : 12, + "source_fragment" : "standard_metadata.egress_spec = hdr.packet_out.egress_port" } }, { @@ -3517,55 +8039,60 @@ "parameters" : [ { "type" : "header", - "value" : "udp" + "value" : "packet_out" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 199, - "column" : 8, - "source_fragment" : "hdr.udp.setInvalid()" + "filename" : "include/control/packetio.p4", + "line" : 26, + "column" : 12, + "source_fragment" : "hdr.packet_out.setInvalid()" } }, { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "tcp" + "type" : "field", + "value" : ["scalars", "userMetadata._is_controller_packet_out19"] }, { - "type" : "header", - "value" : "inner_tcp" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 200, - "column" : 8, - "source_fragment" : "hdr.tcp = hdr.inner_tcp" + "filename" : "include/control/packetio.p4", + "line" : 27, + "column" : 53, + "source_fragment" : "= true; ..." } }, { - "op" : "remove_header", - "parameters" : [ - { - "type" : "header", - "value" : "inner_tcp" - } - ], + "op" : "exit", + "parameters" : [], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 201, - "column" : 8, - "source_fragment" : "hdr.inner_tcp.setInvalid()" + "filename" : "include/control/packetio.p4", + "line" : 29, + "column" : 12, + "source_fragment" : "exit" } } ] }, { - "name" : "FabricIngress.spgw_ingress.decap_inner_udp", - "id" : 35, + "name" : "filtering113", + "id" : 63, "runtime_data" : [], "primitives" : [ { @@ -3573,18 +8100,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._vlan_id9"] }, { - "type" : "hexstr", - "value" : "0x0800" + "type" : "field", + "value" : ["vlan_tag", "vlan_id"] } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/control/filtering.p4", + "line" : 113, + "column" : 36, + "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." } }, { @@ -3592,18 +8119,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] + "value" : ["scalars", "userMetadata._vlan_pri10"] }, { "type" : "field", - "value" : ["inner_ipv4", "protocol"] + "value" : ["vlan_tag", "pri"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 187, - "column" : 27, - "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + "filename" : "include/control/filtering.p4", + "line" : 114, + "column" : 37, + "source_fragment" : "= hdr.vlan_tag.pri; ..." } }, { @@ -3611,184 +8138,334 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "value" : ["scalars", "userMetadata._vlan_cfi11"] }, { "type" : "field", - "value" : ["inner_ipv4", "src_addr"] + "value" : ["vlan_tag", "cfi"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 188, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + "filename" : "include/control/filtering.p4", + "line" : 115, + "column" : 37, + "source_fragment" : "= hdr.vlan_tag.cfi; ..." } - }, + } + ] + }, + { + "name" : "filtering129", + "id" : 64, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["scalars", "userMetadata._mpls_ttl13"] + }, + { + "type" : "hexstr", + "value" : "0x41" + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 129, + "column" : 37, + "source_fragment" : "= DEFAULT_MPLS_TTL + 1; ..." + } + } + ] + }, + { + "name" : "spgw277", + "id" : 65, + "runtime_data" : [], + "primitives" : [ + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.spgw.pdr_counter" }, { "type" : "field", - "value" : ["inner_ipv4", "dst_addr"] + "value" : ["scalars", "userMetadata._spgw_ctr_id36"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 189, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + "line" : 277, + "column" : 16, + "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" } - }, + } + ] + }, + { + "name" : "spgw294", + "id" : 66, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport17"] + "value" : ["ipv4", "total_len"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 190, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_sport; ..." + "line" : 294, + "column" : 36, + "source_fragment" : "= hdr.ipv4.total_len; ..." } - }, + } + ] + }, + { + "name" : "port_counter31", + "id" : 67, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "tmp_8"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport18"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 191, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_dport; ..." + "filename" : "include/control/port_counter.p4", + "line" : 31, + "column" : 38, + "source_fragment" : "(bit<32>)standard_metadata.egress_spec" } }, { - "op" : "assign_header", + "op" : "count", "parameters" : [ { - "type" : "header", - "value" : "ipv4" + "type" : "counter_array", + "value" : "FabricIngress.port_counters_control.egress_port_counter" }, { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["scalars", "tmp_8"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 193, - "column" : 8, - "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + "filename" : "include/control/port_counter.p4", + "line" : 31, + "column" : 12, + "source_fragment" : "egress_port_counter.count((bit<32>)standard_metadata.egress_spec)" } - }, + } + ] + }, + { + "name" : "port_counter34", + "id" : 68, + "runtime_data" : [], + "primitives" : [ { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 194, - "column" : 8, - "source_fragment" : "hdr.inner_ipv4.setInvalid()" + "filename" : "include/control/port_counter.p4", + "line" : 34, + "column" : 39, + "source_fragment" : "(bit<32>)standard_metadata.ingress_port" } }, { - "op" : "remove_header", + "op" : "count", "parameters" : [ { - "type" : "header", - "value" : "gtpu" + "type" : "counter_array", + "value" : "FabricIngress.port_counters_control.ingress_port_counter" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_9"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 195, - "column" : 8, - "source_fragment" : "hdr.gtpu.setInvalid()" + "filename" : "include/control/port_counter.p4", + "line" : 34, + "column" : 12, + "source_fragment" : "ingress_port_counter.count((bit<32>)standard_metadata.ingress_port)" } - }, + } + ] + }, + { + "name" : "slicing114", + "id" : 69, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "udp" + "type" : "field", + "value" : ["scalars", "tmp_10"] }, { - "type" : "header", - "value" : "inner_udp" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 205, - "column" : 8, - "source_fragment" : "hdr.udp = hdr.inner_udp" + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 37, + "source_fragment" : "(bit<32>) slice_tc" } }, { - "op" : "remove_header", + "op" : "execute_meter", "parameters" : [ { - "type" : "header", - "value" : "inner_udp" - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 206, - "column" : 8, - "source_fragment" : "hdr.inner_udp.setInvalid()" - } - } - ] - }, - { - "name" : "FabricIngress.spgw_ingress.decap_inner_icmp", - "id" : 36, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ + "type" : "meter_array", + "value" : "FabricIngress.qos.slice_tc_meter" + }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "tmp_10"] }, { - "type" : "hexstr", - "value" : "0x0800" + "type" : "field", + "value" : ["scalars", "userMetadata._packet_color26"] } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 8, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) slice_tc, fabric_md.packet_color)" } }, { @@ -3796,56 +8473,150 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] + "value" : ["scalars", "userMetadata._dscp28"] }, { - "type" : "field", - "value" : ["inner_ipv4", "protocol"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 187, - "column" : 27, - "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + "filename" : "include/control/slicing.p4", + "line" : 110, + "column" : 26, + "source_fragment" : "fabric_md.slice_id++fabric_md.tc; ..." } + } + ] + }, + { + "name" : "nop", + "id" : 70, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 71, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 72, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "NoAction", + "id" : 73, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "NoAction", + "id" : 74, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.process_int_main.process_int_source.int_source_dscp", + "id" : 75, + "runtime_data" : [ + { + "name" : "max_hop", + "bitwidth" : 8 + }, + { + "name" : "ins_cnt", + "bitwidth" : 5 + }, + { + "name" : "ins_mask0003", + "bitwidth" : 4 }, { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] - }, - { - "type" : "field", - "value" : ["inner_ipv4", "src_addr"] - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 188, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." - } - }, + "name" : "ins_mask0407", + "bitwidth" : 4 + } + ], + "primitives" : [ { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] - }, - { - "type" : "field", - "value" : ["inner_ipv4", "dst_addr"] + "type" : "header", + "value" : "intl4_shim" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 189, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + "filename" : "include/int/int_source.p4", + "line" : 32, + "column" : 8, + "source_fragment" : "hdr.intl4_shim.setValid()" } }, { @@ -3853,18 +8624,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["intl4_shim", "int_type"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport17"] + "type" : "hexstr", + "value" : "0x01" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 190, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_sport; ..." + "filename" : "include/int/int_source.p4", + "line" : 34, + "column" : 8, + "source_fragment" : "hdr.intl4_shim.int_type = 1" } }, { @@ -3872,142 +8643,90 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport18"] - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 191, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_dport; ..." - } - }, - { - "op" : "assign_header", - "parameters" : [ - { - "type" : "header", - "value" : "ipv4" + "value" : ["intl4_shim", "len_words"] }, { - "type" : "header", - "value" : "inner_ipv4" + "type" : "hexstr", + "value" : "0x04" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 193, - "column" : 8, - "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + "filename" : "include/control/../define.p4", + "line" : 186, + "column" : 36, + "source_fragment" : "4; ..." } }, { - "op" : "remove_header", + "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "inner_ipv4" + "value" : "int_header" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 194, + "filename" : "include/int/int_source.p4", + "line" : 37, "column" : 8, - "source_fragment" : "hdr.inner_ipv4.setInvalid()" + "source_fragment" : "hdr.int_header.setValid()" } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu" - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 195, - "column" : 8, - "source_fragment" : "hdr.gtpu.setInvalid()" - } - }, - { - "op" : "remove_header", - "parameters" : [ + "type" : "field", + "value" : ["int_header", "ver"] + }, { - "type" : "header", - "value" : "udp" + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 210, + "filename" : "include/int/int_source.p4", + "line" : 38, "column" : 8, - "source_fragment" : "hdr.udp.setInvalid()" + "source_fragment" : "hdr.int_header.ver = 0" } }, { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "icmp" + "type" : "field", + "value" : ["int_header", "rep"] }, { - "type" : "header", - "value" : "inner_icmp" + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 211, + "filename" : "include/int/int_source.p4", + "line" : 39, "column" : 8, - "source_fragment" : "hdr.icmp = hdr.inner_icmp" + "source_fragment" : "hdr.int_header.rep = 0" } }, - { - "op" : "remove_header", - "parameters" : [ - { - "type" : "header", - "value" : "inner_icmp" - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 212, - "column" : 8, - "source_fragment" : "hdr.inner_icmp.setInvalid()" - } - } - ] - }, - { - "name" : "FabricIngress.spgw_ingress.decap_inner_unknown", - "id" : 37, - "runtime_data" : [], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["int_header", "c"] }, { "type" : "hexstr", - "value" : "0x0800" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/int/int_source.p4", + "line" : 40, + "column" : 8, + "source_fragment" : "hdr.int_header.c = 0" } }, { @@ -4015,18 +8734,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] + "value" : ["int_header", "e"] }, { - "type" : "field", - "value" : ["inner_ipv4", "protocol"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 187, - "column" : 27, - "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + "filename" : "include/int/int_source.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.int_header.e = 0" } }, { @@ -4034,18 +8753,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "value" : ["int_header", "rsvd1"] }, { - "type" : "field", - "value" : ["inner_ipv4", "src_addr"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 188, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + "filename" : "include/int/int_source.p4", + "line" : 42, + "column" : 8, + "source_fragment" : "hdr.int_header.rsvd1 = 0" } }, { @@ -4053,18 +8772,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["int_header", "ins_cnt"] }, { - "type" : "field", - "value" : ["inner_ipv4", "dst_addr"] + "type" : "runtime_data", + "value" : 1 } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 189, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + "filename" : "include/int/int_source.p4", + "line" : 43, + "column" : 8, + "source_fragment" : "hdr.int_header.ins_cnt = ins_cnt; ..." } }, { @@ -4072,18 +8791,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["int_header", "max_hop_cnt"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport17"] + "type" : "runtime_data", + "value" : 0 } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 190, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_sport; ..." + "filename" : "include/int/int_source.p4", + "line" : 44, + "column" : 8, + "source_fragment" : "hdr.int_header.max_hop_cnt = max_hop; ..." } }, { @@ -4091,123 +8810,109 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["int_header", "total_hop_cnt"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport18"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 191, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_dport; ..." + "filename" : "include/int/int_source.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.int_header.total_hop_cnt = 0" } }, { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "ipv4" + "type" : "field", + "value" : ["int_header", "instruction_mask_0003"] }, { - "type" : "header", - "value" : "inner_ipv4" + "type" : "runtime_data", + "value" : 2 } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 193, + "filename" : "include/int/int_source.p4", + "line" : 46, "column" : 8, - "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + "source_fragment" : "hdr.int_header.instruction_mask_0003 = ins_mask0003; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_ipv4" - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 194, - "column" : 8, - "source_fragment" : "hdr.inner_ipv4.setInvalid()" - } - }, - { - "op" : "remove_header", - "parameters" : [ + "type" : "field", + "value" : ["int_header", "instruction_mask_0407"] + }, { - "type" : "header", - "value" : "gtpu" + "type" : "runtime_data", + "value" : 3 } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 195, + "filename" : "include/int/int_source.p4", + "line" : 47, "column" : 8, - "source_fragment" : "hdr.gtpu.setInvalid()" + "source_fragment" : "hdr.int_header.instruction_mask_0407 = ins_mask0407; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "udp" + "type" : "field", + "value" : ["int_header", "instruction_mask_0811"] + }, + { + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 216, + "filename" : "include/int/int_source.p4", + "line" : 48, "column" : 8, - "source_fragment" : "hdr.udp.setInvalid()" + "source_fragment" : "hdr.int_header.instruction_mask_0811 = 0" } - } - ] - }, - { - "name" : "act", - "id" : 38, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["int_header", "instruction_mask_1215"] }, { - "type" : "field", - "value" : ["packet_out", "egress_port"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 25, - "column" : 12, - "source_fragment" : "standard_metadata.egress_spec = hdr.packet_out.egress_port" + "filename" : "include/int/int_source.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.int_header.instruction_mask_1215 = 0" } }, { - "op" : "remove_header", + "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "packet_out" + "value" : "intl4_tail" } ], "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 26, - "column" : 12, - "source_fragment" : "hdr.packet_out.setInvalid()" + "filename" : "include/int/int_source.p4", + "line" : 51, + "column" : 8, + "source_fragment" : "hdr.intl4_tail.setValid()" } }, { @@ -4215,166 +8920,98 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_controller_packet_out11"] + "value" : ["intl4_tail", "next_proto"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 27, - "column" : 53, - "source_fragment" : "= true; ..." + "filename" : "include/int/int_source.p4", + "line" : 52, + "column" : 8, + "source_fragment" : "hdr.intl4_tail.next_proto = hdr.ipv4.protocol" } }, - { - "op" : "exit", - "parameters" : [], - "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 29, - "column" : 12, - "source_fragment" : "exit" - } - } - ] - }, - { - "name" : "act_0", - "id" : 39, - "runtime_data" : [], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "spgw_ingress_hasReturned"] + "value" : ["intl4_tail", "dest_port"] }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } - } - ] - } - ] - }, - { - "name" : "act_1", - "id" : 40, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ { "type" : "field", - "value" : ["scalars", "spgw_ingress_hasReturned"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "value" : ["scalars", "userMetadata._l4_dport22"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 249, - "column" : 46, - "source_fragment" : "return" + "filename" : "include/int/int_source.p4", + "line" : 53, + "column" : 8, + "source_fragment" : "hdr.intl4_tail.dest_port = fabric_metadata.l4_dport; ..." } - } - ] - }, - { - "name" : "act_2", - "id" : 41, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "count", + "op" : "assign", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.spgw_ingress.pdr_counter" + "type" : "field", + "value" : ["intl4_tail", "dscp"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id25"] + "value" : ["ipv4", "dscp"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 263, + "filename" : "include/int/int_source.p4", + "line" : 54, "column" : 8, - "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" + "source_fragment" : "hdr.intl4_tail.dscp = hdr.ipv4.dscp" } - } - ] - }, - { - "name" : "act_3", - "id" : 42, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_forwarding6"] + "value" : ["ipv4", "total_len"] }, { "type" : "expression", "value" : { "type" : "expression", "value" : { - "op" : "b2d", - "left" : null, + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0010" + } + } + }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0xffff" } } } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 280, - "column" : 38, - "source_fragment" : "= true; ..." + "filename" : "include/int/int_source.p4", + "line" : 56, + "column" : 8, + "source_fragment" : "hdr.ipv4.total_len = hdr.ipv4.total_len + INT_HEADER_LEN_BYTES" } }, { @@ -4382,99 +9019,101 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["udp", "len"] }, { "type" : "expression", "value" : { "type" : "expression", "value" : { - "op" : "b2d", - "left" : null, + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["udp", "len"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0010" + } + } + }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0xffff" } } } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 281, - "column" : 32, - "source_fragment" : "= true; ..." - } - } - ] - }, - { - "name" : "act_4", - "id" : 43, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len20"] - }, - { - "type" : "field", - "value" : ["ipv4", "total_len"] - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 289, - "column" : 32, - "source_fragment" : "= hdr.ipv4.total_len; ..." + "filename" : "include/int/int_source.p4", + "line" : 57, + "column" : 8, + "source_fragment" : "hdr.udp.len = hdr.udp.len + INT_HEADER_LEN_BYTES" } - } - ] - }, - { - "name" : "act_5", - "id" : 44, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["ipv4", "dscp"] }, { - "type" : "field", - "value" : ["vlan_tag", "vlan_id"] + "type" : "hexstr", + "value" : "0x01" } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 111, - "column" : 36, - "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." + "filename" : "include/control/../define.p4", + "line" : 182, + "column" : 24, + "source_fragment" : "0x1; ..." } - }, + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.init_metadata", + "id" : 76, + "runtime_data" : [ + { + "name" : "switch_id", + "bitwidth" : 32 + } + ], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_pri2"] + "value" : ["scalars", "userMetadata._int_meta_transit47"] }, { - "type" : "field", - "value" : ["vlan_tag", "pri"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 112, - "column" : 37, - "source_fragment" : "= hdr.vlan_tag.pri; ..." + "filename" : "include/int/int_transit.p4", + "line" : 26, + "column" : 31, + "source_fragment" : "= true; ..." } }, { @@ -4482,59 +9121,73 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_cfi3"] + "value" : ["scalars", "userMetadata._int_meta_switch_id49"] }, { - "type" : "field", - "value" : ["vlan_tag", "cfi"] + "type" : "runtime_data", + "value" : 0 } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 113, - "column" : 37, - "source_fragment" : "= hdr.vlan_tag.cfi; ..." + "filename" : "include/int/int_transit.p4", + "line" : 31, + "column" : 33, + "source_fragment" : "= switch_id; ..." } } ] }, { - "name" : "act_6", - "id" : 45, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i0", + "id" : 77, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i1", + "id" : 78, "runtime_data" : [], "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_q_occupancy" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 60, + "column" : 8, + "source_fragment" : "hdr.int_q_occupancy.setValid()" + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl5"] + "value" : ["int_q_occupancy", "q_id"] }, { "type" : "hexstr", - "value" : "0x41" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 127, - "column" : 37, - "source_fragment" : "= DEFAULT_MPLS_TTL + 1; ..." + "filename" : "include/int/int_transit.p4", + "line" : 62, + "column" : 8, + "source_fragment" : "hdr.int_q_occupancy.q_id = 8w0" } - } - ] - }, - { - "name" : "act_7", - "id" : 46, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp"] + "value" : ["int_q_occupancy", "q_occupancy"] }, { "type" : "expression", @@ -4544,55 +9197,29 @@ "op" : "&", "left" : { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["standard_metadata", "deq_qdepth"] }, "right" : { "type" : "hexstr", - "value" : "0xffffffff" + "value" : "0xffffff" } } } } ], "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 31, - "column" : 38, - "source_fragment" : "(bit<32>)standard_metadata.egress_spec" + "filename" : "include/int/int_transit.p4", + "line" : 63, + "column" : 8, + "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" } }, - { - "op" : "count", - "parameters" : [ - { - "type" : "counter_array", - "value" : "FabricIngress.port_counters_control.egress_port_counter" - }, - { - "type" : "field", - "value" : ["scalars", "tmp"] - } - ], - "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 31, - "column" : 12, - "source_fragment" : "egress_port_counter.count((bit<32>)standard_metadata.egress_spec)" - } - } - ] - }, - { - "name" : "act_8", - "id" : 47, - "runtime_data" : [], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_3"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -4601,110 +9228,96 @@ "value" : { "op" : "&", "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_words50"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } }, "right" : { "type" : "hexstr", - "value" : "0xffffffff" + "value" : "0xff" } } } } ], "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 34, - "column" : 39, - "source_fragment" : "(bit<32>)standard_metadata.ingress_port" + "filename" : "include/int/int_transit.p4", + "line" : 97, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." } }, { - "op" : "count", + "op" : "assign", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.port_counters_control.ingress_port_counter" + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { - "type" : "field", - "value" : ["scalars", "tmp_3"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0004" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 34, - "column" : 12, - "source_fragment" : "ingress_port_counter.count((bit<32>)standard_metadata.ingress_port)" + "filename" : "include/int/int_transit.p4", + "line" : 98, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." } } - ] - }, - { - "name" : "nop", - "id" : 48, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 49, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 50, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "NoAction", - "id" : 51, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "NoAction", - "id" : 52, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricEgress.process_int_main.process_int_source.int_source_dscp", - "id" : 53, - "runtime_data" : [ - { - "name" : "max_hop", - "bitwidth" : 8 - }, - { - "name" : "ins_cnt", - "bitwidth" : 5 - }, - { - "name" : "ins_mask0003", - "bitwidth" : 4 - }, - { - "name" : "ins_mask0407", - "bitwidth" : 4 - } - ], + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i2", + "id" : 79, + "runtime_data" : [], "primitives" : [ { "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "intl4_shim" + "value" : "int_hop_latency" } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 32, + "filename" : "include/int/int_transit.p4", + "line" : 54, "column" : 8, - "source_fragment" : "hdr.intl4_shim.setValid()" + "source_fragment" : "hdr.int_hop_latency.setValid()" } }, { @@ -4712,18 +9325,18 @@ "parameters" : [ { "type" : "field", - "value" : ["intl4_shim", "int_type"] + "value" : ["int_hop_latency", "hop_latency"] }, { - "type" : "hexstr", - "value" : "0x01" + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 34, + "filename" : "include/int/int_transit.p4", + "line" : 55, "column" : 8, - "source_fragment" : "hdr.intl4_shim.int_type = 1" + "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" } }, { @@ -4731,33 +9344,105 @@ "parameters" : [ { "type" : "field", - "value" : ["intl4_shim", "len_words"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { - "type" : "hexstr", - "value" : "0x04" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_words50"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 165, - "column" : 36, - "source_fragment" : "4; ..." + "filename" : "include/int/int_transit.p4", + "line" : 97, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." } }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0004" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 98, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + } + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i3", + "id" : 80, + "runtime_data" : [], + "primitives" : [ { "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "int_header" + "value" : "int_q_occupancy" } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 37, + "filename" : "include/int/int_transit.p4", + "line" : 60, "column" : 8, - "source_fragment" : "hdr.int_header.setValid()" + "source_fragment" : "hdr.int_q_occupancy.setValid()" } }, { @@ -4765,7 +9450,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_header", "ver"] + "value" : ["int_q_occupancy", "q_id"] }, { "type" : "hexstr", @@ -4773,10 +9458,10 @@ } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 38, + "filename" : "include/int/int_transit.p4", + "line" : 62, "column" : 8, - "source_fragment" : "hdr.int_header.ver = 0" + "source_fragment" : "hdr.int_q_occupancy.q_id = 8w0" } }, { @@ -4784,18 +9469,46 @@ "parameters" : [ { "type" : "field", - "value" : ["int_header", "rep"] + "value" : ["int_q_occupancy", "q_occupancy"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "deq_qdepth"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffff" + } + } + } } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 39, + "filename" : "include/int/int_transit.p4", + "line" : 63, "column" : 8, - "source_fragment" : "hdr.int_header.rep = 0" + "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_hop_latency" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.setValid()" } }, { @@ -4803,18 +9516,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_header", "c"] + "value" : ["int_hop_latency", "hop_latency"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 40, + "filename" : "include/int/int_transit.p4", + "line" : 55, "column" : 8, - "source_fragment" : "hdr.int_header.c = 0" + "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" } }, { @@ -4822,18 +9535,41 @@ "parameters" : [ { "type" : "field", - "value" : ["int_header", "e"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_words50"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x02" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.int_header.e = 0" + "filename" : "include/int/int_transit.p4", + "line" : 103, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -4841,18 +9577,63 @@ "parameters" : [ { "type" : "field", - "value" : ["int_header", "rsvd1"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0008" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 104, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + } + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i4", + "id" : 81, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_port_ids" } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 42, + "filename" : "include/int/int_transit.p4", + "line" : 47, "column" : 8, - "source_fragment" : "hdr.int_header.rsvd1 = 0" + "source_fragment" : "hdr.int_port_ids.setValid()" } }, { @@ -4860,18 +9641,31 @@ "parameters" : [ { "type" : "field", - "value" : ["int_header", "ins_cnt"] + "value" : ["int_port_ids", "ingress_port_id"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 43, + "filename" : "include/int/int_transit.p4", + "line" : 48, "column" : 8, - "source_fragment" : "hdr.int_header.ins_cnt = ins_cnt; ..." + "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" } }, { @@ -4879,18 +9673,31 @@ "parameters" : [ { "type" : "field", - "value" : ["int_header", "max_hop_cnt"] + "value" : ["int_port_ids", "egress_port_id"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 44, + "filename" : "include/int/int_transit.p4", + "line" : 49, "column" : 8, - "source_fragment" : "hdr.int_header.max_hop_cnt = max_hop; ..." + "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" } }, { @@ -4898,18 +9705,41 @@ "parameters" : [ { "type" : "field", - "value" : ["int_header", "total_hop_cnt"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_words50"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 45, - "column" : 8, - "source_fragment" : "hdr.int_header.total_hop_cnt = 0" + "filename" : "include/int/int_transit.p4", + "line" : 97, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." } }, { @@ -4917,37 +9747,63 @@ "parameters" : [ { "type" : "field", - "value" : ["int_header", "instruction_mask_0003"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { - "type" : "runtime_data", - "value" : 2 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0004" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 46, - "column" : 8, - "source_fragment" : "hdr.int_header.instruction_mask_0003 = ins_mask0003; ..." + "filename" : "include/int/int_transit.p4", + "line" : 98, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." } - }, + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i5", + "id" : 82, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["int_header", "instruction_mask_0407"] - }, - { - "type" : "runtime_data", - "value" : 3 + "type" : "header", + "value" : "int_q_occupancy" } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 47, + "filename" : "include/int/int_transit.p4", + "line" : 60, "column" : 8, - "source_fragment" : "hdr.int_header.instruction_mask_0407 = ins_mask0407; ..." + "source_fragment" : "hdr.int_q_occupancy.setValid()" } }, { @@ -4955,7 +9811,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_header", "instruction_mask_0811"] + "value" : ["int_q_occupancy", "q_id"] }, { "type" : "hexstr", @@ -4963,10 +9819,10 @@ } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 48, + "filename" : "include/int/int_transit.p4", + "line" : 62, "column" : 8, - "source_fragment" : "hdr.int_header.instruction_mask_0811 = 0" + "source_fragment" : "hdr.int_q_occupancy.q_id = 8w0" } }, { @@ -4974,18 +9830,31 @@ "parameters" : [ { "type" : "field", - "value" : ["int_header", "instruction_mask_1215"] + "value" : ["int_q_occupancy", "q_occupancy"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "deq_qdepth"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffff" + } + } + } } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 49, + "filename" : "include/int/int_transit.p4", + "line" : 63, "column" : 8, - "source_fragment" : "hdr.int_header.instruction_mask_1215 = 0" + "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" } }, { @@ -4993,33 +9862,14 @@ "parameters" : [ { "type" : "header", - "value" : "intl4_tail" - } - ], - "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 51, - "column" : 8, - "source_fragment" : "hdr.intl4_tail.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["intl4_tail", "next_proto"] - }, - { - "type" : "field", - "value" : ["ipv4", "protocol"] + "value" : "int_port_ids" } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 52, + "filename" : "include/int/int_transit.p4", + "line" : 47, "column" : 8, - "source_fragment" : "hdr.intl4_tail.next_proto = hdr.ipv4.protocol" + "source_fragment" : "hdr.int_port_ids.setValid()" } }, { @@ -5027,18 +9877,31 @@ "parameters" : [ { "type" : "field", - "value" : ["intl4_tail", "dest_port"] + "value" : ["int_port_ids", "ingress_port_id"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 53, + "filename" : "include/int/int_transit.p4", + "line" : 48, "column" : 8, - "source_fragment" : "hdr.intl4_tail.dest_port = fabric_metadata.l4_dport; ..." + "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" } }, { @@ -5046,18 +9909,31 @@ "parameters" : [ { "type" : "field", - "value" : ["intl4_tail", "dscp"] + "value" : ["int_port_ids", "egress_port_id"] }, { - "type" : "field", - "value" : ["ipv4", "dscp"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 54, + "filename" : "include/int/int_transit.p4", + "line" : 49, "column" : 8, - "source_fragment" : "hdr.intl4_tail.dscp = hdr.ipv4.dscp" + "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" } }, { @@ -5065,7 +9941,7 @@ "parameters" : [ { "type" : "field", - "value" : ["ipv4", "total_len"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -5079,27 +9955,27 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["ipv4", "total_len"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x0010" + "value" : "0x02" } } }, "right" : { "type" : "hexstr", - "value" : "0xffff" + "value" : "0xff" } } } } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 56, - "column" : 8, - "source_fragment" : "hdr.ipv4.total_len = hdr.ipv4.total_len + INT_HEADER_LEN_BYTES" + "filename" : "include/int/int_transit.p4", + "line" : 103, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -5107,7 +9983,7 @@ "parameters" : [ { "type" : "field", - "value" : ["udp", "len"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -5121,11 +9997,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["udp", "len"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0010" + "value" : "0x0008" } } }, @@ -5138,70 +10014,32 @@ } ], "source_info" : { - "filename" : "include/int/int_source.p4", - "line" : 57, - "column" : 8, - "source_fragment" : "hdr.udp.len = hdr.udp.len + INT_HEADER_LEN_BYTES" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["ipv4", "dscp"] - }, - { - "type" : "hexstr", - "value" : "0x01" - } - ], - "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 161, - "column" : 24, - "source_fragment" : "0x1; ..." + "filename" : "include/int/int_transit.p4", + "line" : 104, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.init_metadata", - "id" : 54, - "runtime_data" : [ - { - "name" : "switch_id", - "bitwidth" : 32 - } - ], + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i6", + "id" : 83, + "runtime_data" : [], "primitives" : [ { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_transit35"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "header", + "value" : "int_hop_latency" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 26, - "column" : 31, - "source_fragment" : "= true; ..." + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.setValid()" } }, { @@ -5209,46 +10047,33 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id37"] + "value" : ["int_hop_latency", "hop_latency"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 31, - "column" : 33, - "source_fragment" : "= switch_id; ..." + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i0", - "id" : 55, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i1", - "id" : 56, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "int_q_occupancy" + "value" : "int_port_ids" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 60, + "line" : 47, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.setValid()" + "source_fragment" : "hdr.int_port_ids.setValid()" } }, { @@ -5256,18 +10081,31 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_occupancy", "q_id"] + "value" : ["int_port_ids", "ingress_port_id"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 62, + "line" : 48, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.q_id = 8w0" + "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" } }, { @@ -5275,7 +10113,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_occupancy", "q_occupancy"] + "value" : ["int_port_ids", "egress_port_id"] }, { "type" : "expression", @@ -5285,11 +10123,11 @@ "op" : "&", "left" : { "type" : "field", - "value" : ["standard_metadata", "deq_qdepth"] + "value" : ["standard_metadata", "egress_port"] }, "right" : { "type" : "hexstr", - "value" : "0xffffff" + "value" : "0xffff" } } } @@ -5297,9 +10135,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 63, + "line" : 49, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" + "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" } }, { @@ -5307,7 +10145,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -5321,11 +10159,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x01" + "value" : "0x02" } } }, @@ -5339,9 +10177,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 97, + "line" : 103, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -5349,7 +10187,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -5363,11 +10201,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0004" + "value" : "0x0008" } } }, @@ -5381,16 +10219,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 98, + "line" : 104, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i2", - "id" : 57, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i7", + "id" : 84, "runtime_data" : [], "primitives" : [ { @@ -5398,14 +10236,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_hop_latency" + "value" : "int_q_occupancy" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 54, + "line" : 60, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.setValid()" + "source_fragment" : "hdr.int_q_occupancy.setValid()" } }, { @@ -5413,18 +10251,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_hop_latency", "hop_latency"] + "value" : ["int_q_occupancy", "q_id"] }, { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 55, + "line" : 62, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.int_q_occupancy.q_id = 8w0" } }, { @@ -5432,7 +10270,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["int_q_occupancy", "q_occupancy"] }, { "type" : "expression", @@ -5441,22 +10279,12 @@ "value" : { "op" : "&", "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x01" - } - } + "type" : "field", + "value" : ["standard_metadata", "deq_qdepth"] }, "right" : { "type" : "hexstr", - "value" : "0xff" + "value" : "0xffffff" } } } @@ -5464,73 +10292,24 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 97, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." + "line" : 63, + "column" : 8, + "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" } }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x0004" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 98, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." - } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i3", - "id" : 58, - "runtime_data" : [], - "primitives" : [ { "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "int_q_occupancy" + "value" : "int_hop_latency" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 60, + "line" : 54, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.setValid()" + "source_fragment" : "hdr.int_hop_latency.setValid()" } }, { @@ -5538,18 +10317,33 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_occupancy", "q_id"] + "value" : ["int_hop_latency", "hop_latency"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 62, + "line" : 55, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.q_id = 8w0" + "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_port_ids" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.int_port_ids.setValid()" } }, { @@ -5557,7 +10351,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_occupancy", "q_occupancy"] + "value" : ["int_port_ids", "ingress_port_id"] }, { "type" : "expression", @@ -5567,11 +10361,11 @@ "op" : "&", "left" : { "type" : "field", - "value" : ["standard_metadata", "deq_qdepth"] + "value" : ["standard_metadata", "ingress_port"] }, "right" : { "type" : "hexstr", - "value" : "0xffffff" + "value" : "0xffff" } } } @@ -5579,24 +10373,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 63, - "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_hop_latency" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 54, + "line" : 48, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.setValid()" + "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" } }, { @@ -5604,18 +10383,31 @@ "parameters" : [ { "type" : "field", - "value" : ["int_hop_latency", "hop_latency"] + "value" : ["int_port_ids", "egress_port_id"] }, { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 55, + "line" : 49, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" } }, { @@ -5623,7 +10415,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -5637,11 +10429,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x03" } } }, @@ -5655,9 +10447,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 109, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -5665,7 +10457,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -5679,11 +10471,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x000c" } } }, @@ -5697,16 +10489,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i4", - "id" : 59, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i8", + "id" : 85, "runtime_data" : [], "primitives" : [ { @@ -5714,14 +10506,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_port_ids" + "value" : "int_switch_id" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 47, + "line" : 41, "column" : 8, - "source_fragment" : "hdr.int_port_ids.setValid()" + "source_fragment" : "hdr.int_switch_id.setValid()" } }, { @@ -5729,63 +10521,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "ingress_port_id"] + "value" : ["int_switch_id", "switch_id"] }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 48, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" - } - }, - { - "op" : "assign", - "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "egress_port_id"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "egress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "value" : ["scalars", "userMetadata._int_meta_switch_id49"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 49, + "line" : 42, "column" : 8, - "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" + "source_fragment" : "hdr.int_switch_id.switch_id = fmeta.int_meta.switch_id; ..." } }, { @@ -5793,7 +10540,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -5807,7 +10554,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", @@ -5835,7 +10582,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -5849,7 +10596,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", @@ -5875,8 +10622,8 @@ ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i5", - "id" : 60, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i9", + "id" : 86, "runtime_data" : [], "primitives" : [ { @@ -5950,14 +10697,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_port_ids" + "value" : "int_switch_id" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 47, + "line" : 41, "column" : 8, - "source_fragment" : "hdr.int_port_ids.setValid()" + "source_fragment" : "hdr.int_switch_id.setValid()" } }, { @@ -5965,63 +10712,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "ingress_port_id"] + "value" : ["int_switch_id", "switch_id"] }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 48, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" - } - }, - { - "op" : "assign", - "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "egress_port_id"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "egress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "value" : ["scalars", "userMetadata._int_meta_switch_id49"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 49, + "line" : 42, "column" : 8, - "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" + "source_fragment" : "hdr.int_switch_id.switch_id = fmeta.int_meta.switch_id; ..." } }, { @@ -6029,7 +10731,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -6043,7 +10745,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", @@ -6071,7 +10773,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -6085,7 +10787,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", @@ -6111,8 +10813,8 @@ ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i6", - "id" : 61, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i10", + "id" : 87, "runtime_data" : [], "primitives" : [ { @@ -6148,52 +10850,20 @@ "column" : 8, "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_port_ids" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 47, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["int_port_ids", "ingress_port_id"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_switch_id" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 48, + "line" : 41, "column" : 8, - "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" + "source_fragment" : "hdr.int_switch_id.setValid()" } }, { @@ -6201,31 +10871,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "egress_port_id"] + "value" : ["int_switch_id", "switch_id"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "egress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_switch_id49"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 49, + "line" : 42, "column" : 8, - "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" + "source_fragment" : "hdr.int_switch_id.switch_id = fmeta.int_meta.switch_id; ..." } }, { @@ -6233,7 +10890,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -6247,7 +10904,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", @@ -6275,7 +10932,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -6289,7 +10946,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", @@ -6315,8 +10972,8 @@ ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i7", - "id" : 62, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i11", + "id" : 88, "runtime_data" : [], "primitives" : [ { @@ -6424,14 +11081,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_port_ids" + "value" : "int_switch_id" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 47, + "line" : 41, "column" : 8, - "source_fragment" : "hdr.int_port_ids.setValid()" + "source_fragment" : "hdr.int_switch_id.setValid()" } }, { @@ -6439,7 +11096,26 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "ingress_port_id"] + "value" : ["int_switch_id", "switch_id"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_switch_id49"] + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 42, + "column" : 8, + "source_fragment" : "hdr.int_switch_id.switch_id = fmeta.int_meta.switch_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -6448,12 +11124,22 @@ "value" : { "op" : "&", "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_words50"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" + } + } }, "right" : { "type" : "hexstr", - "value" : "0xffff" + "value" : "0xff" } } } @@ -6461,9 +11147,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 48, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" + "line" : 109, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -6471,7 +11157,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "egress_port_id"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -6480,8 +11166,18 @@ "value" : { "op" : "&", "left" : { - "type" : "field", - "value" : ["standard_metadata", "egress_port"] + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x000c" + } + } }, "right" : { "type" : "hexstr", @@ -6493,9 +11189,31 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 49, + "line" : 110, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + } + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i12", + "id" : 89, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_port_ids" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 47, "column" : 8, - "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" + "source_fragment" : "hdr.int_port_ids.setValid()" } }, { @@ -6503,7 +11221,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["int_port_ids", "ingress_port_id"] }, { "type" : "expression", @@ -6512,22 +11230,12 @@ "value" : { "op" : "&", "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x03" - } - } + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] }, "right" : { "type" : "hexstr", - "value" : "0xff" + "value" : "0xffff" } } } @@ -6535,9 +11243,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 109, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" } }, { @@ -6545,7 +11253,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["int_port_ids", "egress_port_id"] }, { "type" : "expression", @@ -6554,18 +11262,8 @@ "value" : { "op" : "&", "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x000c" - } - } + "type" : "field", + "value" : ["standard_metadata", "egress_port"] }, "right" : { "type" : "hexstr", @@ -6577,18 +11275,11 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 110, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i8", - "id" : 63, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "add_header", "parameters" : [ @@ -6613,7 +11304,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id37"] + "value" : ["scalars", "userMetadata._int_meta_switch_id49"] } ], "source_info" : { @@ -6628,7 +11319,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -6642,11 +11333,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x01" + "value" : "0x02" } } }, @@ -6660,9 +11351,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 97, + "line" : 103, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -6670,7 +11361,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -6684,11 +11375,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0004" + "value" : "0x0008" } } }, @@ -6702,16 +11393,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 98, + "line" : 104, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i9", - "id" : 64, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i13", + "id" : 90, "runtime_data" : [], "primitives" : [ { @@ -6743,9 +11434,88 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 62, + "line" : 62, + "column" : 8, + "source_fragment" : "hdr.int_q_occupancy.q_id = 8w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_q_occupancy", "q_occupancy"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "deq_qdepth"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 63, + "column" : 8, + "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_port_ids" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.int_port_ids.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_port_ids", "ingress_port_id"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 48, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.q_id = 8w0" + "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" } }, { @@ -6753,7 +11523,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_occupancy", "q_occupancy"] + "value" : ["int_port_ids", "egress_port_id"] }, { "type" : "expression", @@ -6763,11 +11533,11 @@ "op" : "&", "left" : { "type" : "field", - "value" : ["standard_metadata", "deq_qdepth"] + "value" : ["standard_metadata", "egress_port"] }, "right" : { "type" : "hexstr", - "value" : "0xffffff" + "value" : "0xffff" } } } @@ -6775,9 +11545,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 63, + "line" : 49, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" + "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" } }, { @@ -6804,7 +11574,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id37"] + "value" : ["scalars", "userMetadata._int_meta_switch_id49"] } ], "source_info" : { @@ -6819,7 +11589,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -6833,11 +11603,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x03" } } }, @@ -6851,9 +11621,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 109, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -6861,7 +11631,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -6875,11 +11645,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x000c" } } }, @@ -6893,16 +11663,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i10", - "id" : 65, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i14", + "id" : 91, "runtime_data" : [], "primitives" : [ { @@ -6939,6 +11709,85 @@ "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" } }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_port_ids" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.int_port_ids.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_port_ids", "ingress_port_id"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_port_ids", "egress_port_id"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" + } + }, { "op" : "add_header", "parameters" : [ @@ -6963,7 +11812,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id37"] + "value" : ["scalars", "userMetadata._int_meta_switch_id49"] } ], "source_info" : { @@ -6978,7 +11827,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -6992,11 +11841,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x03" } } }, @@ -7010,9 +11859,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 109, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -7020,7 +11869,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -7034,11 +11883,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x000c" } } }, @@ -7052,16 +11901,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i11", - "id" : 66, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i15", + "id" : 92, "runtime_data" : [], "primitives" : [ { @@ -7157,138 +12006,13 @@ "value" : ["standard_metadata", "deq_timedelta"] } ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 55, - "column" : 8, - "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_switch_id" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.int_switch_id.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["int_switch_id", "switch_id"] - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id37"] - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 42, - "column" : 8, - "source_fragment" : "hdr.int_switch_id.switch_id = fmeta.int_meta.switch_id; ..." - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x03" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 109, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x000c" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 110, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i12", - "id" : 67, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "add_header", "parameters" : [ @@ -7392,7 +12116,7 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id37"] + "value" : ["scalars", "userMetadata._int_meta_switch_id49"] } ], "source_info" : { @@ -7407,7 +12131,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -7421,11 +12145,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x04" } } }, @@ -7439,9 +12163,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 115, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 4; ..." } }, { @@ -7449,7 +12173,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -7463,11 +12187,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x0010" } } }, @@ -7481,16 +12205,22 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 116, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 16; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i13", - "id" : 68, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0", + "id" : 93, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1", + "id" : 94, "runtime_data" : [], "primitives" : [ { @@ -7498,14 +12228,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_q_occupancy" + "value" : "int_egress_tx_util" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 60, + "line" : 88, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.setValid()" + "source_fragment" : "hdr.int_egress_tx_util.setValid()" } }, { @@ -7513,18 +12243,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_occupancy", "q_id"] + "value" : ["int_egress_tx_util", "egress_port_tx_util"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x00000000" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 62, + "line" : 90, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.q_id = 8w0" + "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" } }, { @@ -7532,7 +12262,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_occupancy", "q_occupancy"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -7541,12 +12271,22 @@ "value" : { "op" : "&", "left" : { - "type" : "field", - "value" : ["standard_metadata", "deq_qdepth"] + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_words50"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } }, "right" : { "type" : "hexstr", - "value" : "0xffffff" + "value" : "0xff" } } } @@ -7554,24 +12294,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 63, - "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_port_ids" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 47, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.setValid()" + "line" : 97, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." } }, { @@ -7579,7 +12304,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "ingress_port_id"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -7588,8 +12313,18 @@ "value" : { "op" : "&", "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0004" + } + } }, "right" : { "type" : "hexstr", @@ -7601,56 +12336,50 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 48, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" + "line" : 98, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." } - }, + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2", + "id" : 95, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["int_port_ids", "egress_port_id"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "egress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "header", + "value" : "int_q_congestion" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 49, + "line" : 80, "column" : 8, - "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" + "source_fragment" : "hdr.int_q_congestion.setValid()" } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_switch_id" + "type" : "field", + "value" : ["int_q_congestion", "q_id"] + }, + { + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 41, + "line" : 82, "column" : 8, - "source_fragment" : "hdr.int_switch_id.setValid()" + "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" } }, { @@ -7658,18 +12387,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_switch_id", "switch_id"] + "value" : ["int_q_congestion", "q_congestion"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id37"] + "type" : "hexstr", + "value" : "0x000000" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 42, + "line" : 83, "column" : 8, - "source_fragment" : "hdr.int_switch_id.switch_id = fmeta.int_meta.switch_id; ..." + "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" } }, { @@ -7677,7 +12406,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -7691,11 +12420,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x03" + "value" : "0x01" } } }, @@ -7709,9 +12438,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 109, + "line" : 97, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." } }, { @@ -7719,7 +12448,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -7733,11 +12462,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x000c" + "value" : "0x0004" } } }, @@ -7751,97 +12480,31 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 110, + "line" : 98, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i14", - "id" : 69, - "runtime_data" : [], - "primitives" : [ - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_hop_latency" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 54, - "column" : 8, - "source_fragment" : "hdr.int_hop_latency.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["int_hop_latency", "hop_latency"] - }, - { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 55, - "column" : 8, - "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_port_ids" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 47, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["int_port_ids", "ingress_port_id"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3", + "id" : 96, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tx_util" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 48, + "line" : 88, "column" : 8, - "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" + "source_fragment" : "hdr.int_egress_tx_util.setValid()" } }, { @@ -7849,31 +12512,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "egress_port_id"] + "value" : ["int_egress_tx_util", "egress_port_tx_util"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "egress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 49, + "line" : 90, "column" : 8, - "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" + "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" } }, { @@ -7881,14 +12531,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_switch_id" + "value" : "int_q_congestion" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 41, + "line" : 80, "column" : 8, - "source_fragment" : "hdr.int_switch_id.setValid()" + "source_fragment" : "hdr.int_q_congestion.setValid()" } }, { @@ -7896,18 +12546,37 @@ "parameters" : [ { "type" : "field", - "value" : ["int_switch_id", "switch_id"] + "value" : ["int_q_congestion", "q_id"] }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 82, + "column" : 8, + "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" + } + }, + { + "op" : "assign", + "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id37"] + "value" : ["int_q_congestion", "q_congestion"] + }, + { + "type" : "hexstr", + "value" : "0x000000" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 42, + "line" : 83, "column" : 8, - "source_fragment" : "hdr.int_switch_id.switch_id = fmeta.int_meta.switch_id; ..." + "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" } }, { @@ -7915,7 +12584,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -7929,11 +12598,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x03" + "value" : "0x02" } } }, @@ -7947,9 +12616,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 109, + "line" : 103, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -7957,7 +12626,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -7971,11 +12640,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x000c" + "value" : "0x0008" } } }, @@ -7989,16 +12658,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 110, + "line" : 104, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i15", - "id" : 70, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4", + "id" : 97, "runtime_data" : [], "primitives" : [ { @@ -8006,33 +12675,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_q_occupancy" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 60, - "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["int_q_occupancy", "q_id"] - }, - { - "type" : "hexstr", - "value" : "0x00" + "value" : "int_egress_tstamp" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 62, + "line" : 74, "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.q_id = 8w0" + "source_fragment" : "hdr.int_egress_tstamp.setValid()" } }, { @@ -8040,7 +12690,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_occupancy", "q_occupancy"] + "value" : ["int_egress_tstamp", "egress_tstamp"] }, { "type" : "expression", @@ -8049,12 +12699,22 @@ "value" : { "op" : "&", "left" : { - "type" : "field", - "value" : ["standard_metadata", "deq_qdepth"] + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + } }, "right" : { "type" : "hexstr", - "value" : "0xffffff" + "value" : "0xffffffff" } } } @@ -8062,24 +12722,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 63, - "column" : 8, - "source_fragment" : "hdr.int_q_occupancy.q_occupancy = (bit<24>) smeta.deq_qdepth" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_hop_latency" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 54, + "line" : 75, "column" : 8, - "source_fragment" : "hdr.int_hop_latency.setValid()" + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" } }, { @@ -8087,33 +12732,41 @@ "parameters" : [ { "type" : "field", - "value" : ["int_hop_latency", "hop_latency"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 55, - "column" : 8, - "source_fragment" : "hdr.int_hop_latency.hop_latency = (bit<32>) smeta.deq_timedelta" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_port_ids" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_words50"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 47, - "column" : 8, - "source_fragment" : "hdr.int_port_ids.setValid()" + "line" : 97, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." } }, { @@ -8121,7 +12774,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "ingress_port_id"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -8130,8 +12783,18 @@ "value" : { "op" : "&", "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0004" + } + } }, "right" : { "type" : "hexstr", @@ -8143,9 +12806,31 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 48, + "line" : 98, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + } + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5", + "id" : 98, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tx_util" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 88, "column" : 8, - "source_fragment" : "hdr.int_port_ids.ingress_port_id = (bit<16>) smeta.ingress_port" + "source_fragment" : "hdr.int_egress_tx_util.setValid()" } }, { @@ -8153,31 +12838,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_port_ids", "egress_port_id"] + "value" : ["int_egress_tx_util", "egress_port_tx_util"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "egress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 49, + "line" : 90, "column" : 8, - "source_fragment" : "hdr.int_port_ids.egress_port_id = (bit<16>) smeta.egress_port" + "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" } }, { @@ -8185,14 +12857,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_switch_id" + "value" : "int_egress_tstamp" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 41, + "line" : 74, "column" : 8, - "source_fragment" : "hdr.int_switch_id.setValid()" + "source_fragment" : "hdr.int_egress_tstamp.setValid()" } }, { @@ -8200,18 +12872,41 @@ "parameters" : [ { "type" : "field", - "value" : ["int_switch_id", "switch_id"] + "value" : ["int_egress_tstamp", "egress_tstamp"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_switch_id37"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 42, + "line" : 75, "column" : 8, - "source_fragment" : "hdr.int_switch_id.switch_id = fmeta.int_meta.switch_id; ..." + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" } }, { @@ -8219,7 +12914,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -8233,11 +12928,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x04" + "value" : "0x02" } } }, @@ -8251,9 +12946,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 115, + "line" : 103, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -8261,7 +12956,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -8275,11 +12970,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0010" + "value" : "0x0008" } } }, @@ -8293,22 +12988,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 116, + "line" : 104, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 16; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0", - "id" : 71, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1", - "id" : 72, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6", + "id" : 99, "runtime_data" : [], "primitives" : [ { @@ -8316,14 +13005,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_egress_tx_util" + "value" : "int_q_congestion" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 88, + "line" : 80, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.setValid()" + "source_fragment" : "hdr.int_q_congestion.setValid()" } }, { @@ -8331,18 +13020,94 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tx_util", "egress_port_tx_util"] + "value" : ["int_q_congestion", "q_id"] }, { "type" : "hexstr", - "value" : "0x00000000" + "value" : "0x00" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 90, + "line" : 82, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_q_congestion", "q_congestion"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 83, + "column" : 8, + "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tstamp" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_tstamp", "egress_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 75, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" } }, { @@ -8350,7 +13115,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -8364,11 +13129,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x01" + "value" : "0x02" } } }, @@ -8382,9 +13147,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 97, + "line" : 103, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -8392,7 +13157,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -8406,11 +13171,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0004" + "value" : "0x0008" } } }, @@ -8424,18 +13189,52 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 98, + "line" : 104, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2", - "id" : 73, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7", + "id" : 100, "runtime_data" : [], "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tx_util" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 88, + "column" : 8, + "source_fragment" : "hdr.int_egress_tx_util.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_tx_util", "egress_port_tx_util"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 90, + "column" : 8, + "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + } + }, { "op" : "add_header", "parameters" : [ @@ -8489,12 +13288,69 @@ "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" } }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tstamp" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_tstamp", "egress_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 75, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -8508,11 +13364,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x01" + "value" : "0x03" } } }, @@ -8526,9 +13382,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 97, + "line" : 109, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -8536,7 +13392,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -8550,11 +13406,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0004" + "value" : "0x000c" } } }, @@ -8568,16 +13424,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 98, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3", - "id" : 74, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8", + "id" : 101, "runtime_data" : [], "primitives" : [ { @@ -8585,48 +13441,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_egress_tx_util" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 88, - "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["int_egress_tx_util", "egress_port_tx_util"] - }, - { - "type" : "hexstr", - "value" : "0x00000000" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 90, - "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_q_congestion" + "value" : "int_ingress_tstamp" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 80, + "line" : 68, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.setValid()" + "source_fragment" : "hdr.int_ingress_tstamp.setValid()" } }, { @@ -8634,37 +13456,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_id"] + "value" : ["int_ingress_tstamp", "ingress_tstamp"] }, - { - "type" : "hexstr", - "value" : "0x00" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 82, - "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" - } - }, - { - "op" : "assign", - "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_congestion"] - }, - { - "type" : "hexstr", - "value" : "0x000000" + "value" : ["standard_metadata", "enq_timestamp"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 83, + "line" : 69, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" + "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" } }, { @@ -8672,7 +13475,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -8686,11 +13489,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x01" } } }, @@ -8704,9 +13507,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 97, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." } }, { @@ -8714,7 +13517,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -8728,11 +13531,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x0004" } } }, @@ -8746,16 +13549,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 98, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4", - "id" : 75, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9", + "id" : 102, "runtime_data" : [], "primitives" : [ { @@ -8763,14 +13566,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_egress_tstamp" + "value" : "int_egress_tx_util" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 74, + "line" : 88, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.int_egress_tx_util.setValid()" } }, { @@ -8778,41 +13581,52 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["int_egress_tx_util", "egress_port_tx_util"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] - }, - "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 75, + "line" : 90, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_ingress_tstamp" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 68, + "column" : 8, + "source_fragment" : "hdr.int_ingress_tstamp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_ingress_tstamp", "ingress_tstamp"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 69, + "column" : 8, + "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" } }, { @@ -8820,7 +13634,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -8834,11 +13648,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x01" + "value" : "0x02" } } }, @@ -8852,9 +13666,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 97, + "line" : 103, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -8862,7 +13676,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -8876,11 +13690,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0004" + "value" : "0x0008" } } }, @@ -8894,16 +13708,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 98, + "line" : 104, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5", - "id" : 76, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10", + "id" : 103, "runtime_data" : [], "primitives" : [ { @@ -8911,14 +13725,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_egress_tx_util" + "value" : "int_q_congestion" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 88, + "line" : 80, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.setValid()" + "source_fragment" : "hdr.int_q_congestion.setValid()" } }, { @@ -8926,18 +13740,37 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tx_util", "egress_port_tx_util"] + "value" : ["int_q_congestion", "q_id"] }, { "type" : "hexstr", - "value" : "0x00000000" + "value" : "0x00" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 90, + "line" : 82, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_q_congestion", "q_congestion"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 83, + "column" : 8, + "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" } }, { @@ -8945,14 +13778,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_egress_tstamp" + "value" : "int_ingress_tstamp" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 74, + "line" : 68, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.int_ingress_tstamp.setValid()" } }, { @@ -8960,41 +13793,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["int_ingress_tstamp", "ingress_tstamp"] }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] - }, - "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 75, + "line" : 69, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" } }, { @@ -9002,7 +13812,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -9016,7 +13826,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", @@ -9044,7 +13854,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -9058,7 +13868,7 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", @@ -9084,10 +13894,44 @@ ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6", - "id" : 77, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11", + "id" : 104, "runtime_data" : [], "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tx_util" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 88, + "column" : 8, + "source_fragment" : "hdr.int_egress_tx_util.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_tx_util", "egress_port_tx_util"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 90, + "column" : 8, + "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + } + }, { "op" : "add_header", "parameters" : [ @@ -9146,14 +13990,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_egress_tstamp" + "value" : "int_ingress_tstamp" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 74, + "line" : 68, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.int_ingress_tstamp.setValid()" } }, { @@ -9161,41 +14005,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["int_ingress_tstamp", "ingress_tstamp"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] - }, - "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 75, + "line" : 69, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" } }, { @@ -9203,7 +14024,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -9217,11 +14038,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x03" } } }, @@ -9235,9 +14056,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 109, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -9245,7 +14066,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -9259,11 +14080,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x000c" } } }, @@ -9277,16 +14098,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7", - "id" : 78, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12", + "id" : 105, "runtime_data" : [], "primitives" : [ { @@ -9294,14 +14115,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_egress_tx_util" + "value" : "int_egress_tstamp" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 88, + "line" : 74, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.setValid()" + "source_fragment" : "hdr.int_egress_tstamp.setValid()" } }, { @@ -9309,18 +14130,41 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tx_util", "egress_port_tx_util"] + "value" : ["int_egress_tstamp", "egress_tstamp"] }, { - "type" : "hexstr", - "value" : "0x00000000" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 90, + "line" : 75, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" } }, { @@ -9328,14 +14172,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_q_congestion" + "value" : "int_ingress_tstamp" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 80, + "line" : 68, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.setValid()" + "source_fragment" : "hdr.int_ingress_tstamp.setValid()" } }, { @@ -9343,52 +14187,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_id"] + "value" : ["int_ingress_tstamp", "ingress_tstamp"] }, - { - "type" : "hexstr", - "value" : "0x00" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 82, - "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" - } - }, - { - "op" : "assign", - "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_congestion"] - }, - { - "type" : "hexstr", - "value" : "0x000000" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 83, - "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_egress_tstamp" + "value" : ["standard_metadata", "enq_timestamp"] } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 74, + "line" : 69, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" } }, { @@ -9396,7 +14206,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -9410,17 +14220,17 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] + "type" : "hexstr", + "value" : "0x02" } } }, "right" : { "type" : "hexstr", - "value" : "0xffffffff" + "value" : "0xff" } } } @@ -9428,9 +14238,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 75, - "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "line" : 103, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." } }, { @@ -9438,7 +14248,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -9452,17 +14262,17 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x03" + "value" : "0x0008" } } }, "right" : { "type" : "hexstr", - "value" : "0xff" + "value" : "0xffff" } } } @@ -9470,9 +14280,65 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 109, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "line" : 104, + "column" : 33, + "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + } + } + ] + }, + { + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13", + "id" : 106, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tx_util" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 88, + "column" : 8, + "source_fragment" : "hdr.int_egress_tx_util.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_tx_util", "egress_port_tx_util"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 90, + "column" : 8, + "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tstamp" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.setValid()" } }, { @@ -9480,7 +14346,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["int_egress_tstamp", "egress_tstamp"] }, { "type" : "expression", @@ -9494,17 +14360,17 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["standard_metadata", "enq_timestamp"] }, "right" : { - "type" : "hexstr", - "value" : "0x000c" + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] } } }, "right" : { "type" : "hexstr", - "value" : "0xffff" + "value" : "0xffffffff" } } } @@ -9512,18 +14378,11 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 110, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "line" : 75, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8", - "id" : 79, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "add_header", "parameters" : [ @@ -9563,7 +14422,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -9577,11 +14436,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x01" + "value" : "0x03" } } }, @@ -9595,9 +14454,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 97, + "line" : 109, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 1; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -9605,7 +14464,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -9619,11 +14478,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0004" + "value" : "0x000c" } } }, @@ -9637,16 +14496,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 98, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 4; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9", - "id" : 80, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14", + "id" : 107, "runtime_data" : [], "primitives" : [ { @@ -9654,14 +14513,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_egress_tx_util" + "value" : "int_q_congestion" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 88, + "line" : 80, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.setValid()" + "source_fragment" : "hdr.int_q_congestion.setValid()" } }, { @@ -9669,18 +14528,94 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tx_util", "egress_port_tx_util"] + "value" : ["int_q_congestion", "q_id"] }, { "type" : "hexstr", - "value" : "0x00000000" + "value" : "0x00" } ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 90, + "line" : 82, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_q_congestion", "q_congestion"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 83, + "column" : 8, + "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tstamp" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_tstamp", "egress_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 75, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" } }, { @@ -9722,7 +14657,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -9736,11 +14671,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x03" } } }, @@ -9754,9 +14689,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 109, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." } }, { @@ -9764,7 +14699,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -9778,11 +14713,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x000c" } } }, @@ -9796,18 +14731,52 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 110, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10", - "id" : 81, + "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15", + "id" : 108, "runtime_data" : [], "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tx_util" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 88, + "column" : 8, + "source_fragment" : "hdr.int_egress_tx_util.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_tx_util", "egress_port_tx_util"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 90, + "column" : 8, + "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + } + }, { "op" : "add_header", "parameters" : [ @@ -9861,6 +14830,63 @@ "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" } }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_tstamp" + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_tstamp", "egress_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "enq_timestamp"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "deq_timedelta"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 75, + "column" : 8, + "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + } + }, { "op" : "add_header", "parameters" : [ @@ -9900,7 +14926,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, { "type" : "expression", @@ -9914,11 +14940,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] }, "right" : { "type" : "hexstr", - "value" : "0x02" + "value" : "0x04" } } }, @@ -9932,9 +14958,9 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 103, + "line" : 115, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "source_fragment" : "= fmeta.int_meta.new_words + 4; ..." } }, { @@ -9942,7 +14968,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, { "type" : "expression", @@ -9956,11 +14982,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] }, "right" : { "type" : "hexstr", - "value" : "0x0008" + "value" : "0x0010" } } }, @@ -9974,31 +15000,31 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 104, + "line" : 116, "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "source_fragment" : "= fmeta.int_meta.new_bytes + 16; ..." } } ] }, { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11", - "id" : 82, + "name" : "FabricEgress.egress_next.pop_mpls_if_present", + "id" : 109, "runtime_data" : [], "primitives" : [ { - "op" : "add_header", + "op" : "remove_header", "parameters" : [ { "type" : "header", - "value" : "int_egress_tx_util" + "value" : "mpls" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 88, + "filename" : "include/control/next.p4", + "line" : 204, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.setValid()" + "source_fragment" : "hdr.mpls.setInvalid()" } }, { @@ -10006,33 +15032,40 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tx_util", "egress_port_tx_util"] + "value" : ["eth_type", "value"] }, { - "type" : "hexstr", - "value" : "0x00000000" + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 90, + "filename" : "include/control/next.p4", + "line" : 206, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + "source_fragment" : "hdr.eth_type.value = fabric_metadata.ip_eth_type; ..." } - }, + } + ] + }, + { + "name" : "FabricEgress.egress_next.set_mpls", + "id" : 110, + "runtime_data" : [], + "primitives" : [ { "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "int_q_congestion" + "value" : "mpls" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 80, + "filename" : "include/control/next.p4", + "line" : 211, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.setValid()" + "source_fragment" : "hdr.mpls.setValid()" } }, { @@ -10040,18 +15073,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_id"] + "value" : ["mpls", "label"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label12"] } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 82, + "filename" : "include/control/next.p4", + "line" : 212, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" + "source_fragment" : "hdr.mpls.label = fabric_metadata.mpls_label; ..." } }, { @@ -10059,33 +15092,37 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_congestion"] + "value" : ["mpls", "tc"] }, { "type" : "hexstr", - "value" : "0x000000" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 83, + "filename" : "include/control/next.p4", + "line" : 213, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" + "source_fragment" : "hdr.mpls.tc = 3w0" } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_ingress_tstamp" + "type" : "field", + "value" : ["mpls", "bos"] + }, + { + "type" : "hexstr", + "value" : "0x01" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 68, + "filename" : "include/control/next.p4", + "line" : 214, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.setValid()" + "source_fragment" : "hdr.mpls.bos = 1w1" } }, { @@ -10093,18 +15130,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_ingress_tstamp", "ingress_tstamp"] + "value" : ["mpls", "ttl"] }, { "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] + "value" : ["scalars", "userMetadata._mpls_ttl13"] } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 69, + "filename" : "include/control/next.p4", + "line" : 215, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" + "source_fragment" : "hdr.mpls.ttl = fabric_metadata.mpls_ttl; // Decrement after push. ..." } }, { @@ -10112,41 +15149,40 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["eth_type", "value"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x03" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } + "type" : "hexstr", + "value" : "0x8847" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 109, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "filename" : "include/control/../define.p4", + "line" : 147, + "column" : 31, + "source_fragment" : "0x8847; ..." + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.push_vlan", + "id" : 111, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "vlan_tag" + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 223, + "column" : 8, + "source_fragment" : "hdr.vlan_tag.setValid()" } }, { @@ -10154,63 +15190,37 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["vlan_tag", "cfi"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x000c" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_cfi11"] } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 110, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "filename" : "include/control/next.p4", + "line" : 224, + "column" : 8, + "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi; ..." } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12", - "id" : 83, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_egress_tstamp" + "type" : "field", + "value" : ["vlan_tag", "pri"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_pri10"] } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 74, + "filename" : "include/control/next.p4", + "line" : 225, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri; ..." } }, { @@ -10218,117 +15228,135 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["vlan_tag", "eth_type"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] - }, - "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + "type" : "hexstr", + "value" : "0x8100" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 146, + "column" : 31, + "source_fragment" : "0x8100; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["vlan_tag", "vlan_id"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 227, + "column" : 8, + "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id; ..." + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.pop_vlan", + "id" : 112, + "runtime_data" : [], + "primitives" : [ + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "vlan_tag" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 75, + "filename" : "include/control/next.p4", + "line" : 256, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.vlan_tag.setInvalid()" } - }, + } + ] + }, + { + "name" : "FabricEgress.egress_next.drop", + "id" : 113, + "runtime_data" : [], + "primitives" : [ { - "op" : "add_header", + "op" : "mark_to_drop", "parameters" : [ { "type" : "header", - "value" : "int_ingress_tstamp" + "value" : "standard_metadata" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 68, + "filename" : "include/control/next.p4", + "line" : 261, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.setValid()" + "source_fragment" : "mark_to_drop(standard_metadata)" } - }, + } + ] + }, + { + "name" : "FabricEgress.dscp_rewriter.rewrite", + "id" : 114, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.dscp_rewriter.clear", + "id" : 115, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["int_ingress_tstamp", "ingress_tstamp"] + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] }, { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 69, + "filename" : "include/control/slicing.p4", + "line" : 135, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" + "source_fragment" : "tmp_dscp = 0" } - }, + } + ] + }, + { + "name" : "FabricEgress.spgw.gtpu_encap", + "id" : 116, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x02" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } + "type" : "header", + "value" : "gtpu_ipv4" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 103, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 2; ..." + "filename" : "include/control/spgw.p4", + "line" : 311, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.setValid()" } }, { @@ -10336,63 +15364,37 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["gtpu_ipv4", "version"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x0008" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "hexstr", + "value" : "0x04" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 104, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 8; ..." + "filename" : "include/control/spgw.p4", + "line" : 312, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.version = 4" } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13", - "id" : 84, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_egress_tx_util" + "type" : "field", + "value" : ["gtpu_ipv4", "ihl"] + }, + { + "type" : "hexstr", + "value" : "0x05" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 88, - "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.setValid()" + "filename" : "include/control/../define.p4", + "line" : 164, + "column" : 28, + "source_fragment" : "5; ..." } }, { @@ -10400,33 +15402,37 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tx_util", "egress_port_tx_util"] + "value" : ["gtpu_ipv4", "dscp"] }, { "type" : "hexstr", - "value" : "0x00000000" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 90, + "filename" : "include/control/spgw.p4", + "line" : 314, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + "source_fragment" : "hdr.gtpu_ipv4.dscp = 0" } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_egress_tstamp" + "type" : "field", + "value" : ["gtpu_ipv4", "ecn"] + }, + { + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 74, + "filename" : "include/control/spgw.p4", + "line" : 315, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.gtpu_ipv4.ecn = 0" } }, { @@ -10434,7 +15440,7 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["gtpu_ipv4", "total_len"] }, { "type" : "expression", @@ -10448,42 +15454,27 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] + "value" : ["ipv4", "total_len"] }, "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] + "type" : "hexstr", + "value" : "0x0024" } } }, "right" : { "type" : "hexstr", - "value" : "0xffffffff" + "value" : "0xffff" } } } } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 75, - "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_ingress_tstamp" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 68, + "filename" : "include/control/spgw.p4", + "line" : 316, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.setValid()" + "source_fragment" : "hdr.gtpu_ipv4.total_len = hdr.ipv4.total_len ..." } }, { @@ -10491,18 +15482,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_ingress_tstamp", "ingress_tstamp"] + "value" : ["gtpu_ipv4", "identification"] }, { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] + "type" : "hexstr", + "value" : "0x1513" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 69, + "filename" : "include/control/spgw.p4", + "line" : 318, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" + "source_fragment" : "hdr.gtpu_ipv4.identification = 0x1513" } }, { @@ -10510,41 +15501,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["gtpu_ipv4", "flags"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x03" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 109, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "filename" : "include/control/spgw.p4", + "line" : 319, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.flags = 0" } }, { @@ -10552,63 +15520,37 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["gtpu_ipv4", "frag_offset"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x000c" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 110, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." + "filename" : "include/control/spgw.p4", + "line" : 320, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.frag_offset = 0" } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14", - "id" : 85, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_q_congestion" + "type" : "field", + "value" : ["gtpu_ipv4", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 80, - "column" : 8, - "source_fragment" : "hdr.int_q_congestion.setValid()" + "filename" : "include/control/../define.p4", + "line" : 177, + "column" : 32, + "source_fragment" : "64; ..." } }, { @@ -10616,18 +15558,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_id"] + "value" : ["gtpu_ipv4", "protocol"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x11" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 82, - "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" + "filename" : "include/control/../define.p4", + "line" : 161, + "column" : 25, + "source_fragment" : "17; ..." } }, { @@ -10635,33 +15577,37 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_congestion"] + "value" : ["gtpu_ipv4", "src_addr"] }, { - "type" : "hexstr", - "value" : "0x000000" + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_src_addr34"] } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 83, + "filename" : "include/control/spgw.p4", + "line" : 323, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" + "source_fragment" : "hdr.gtpu_ipv4.src_addr = fabric_md.spgw.tunnel_src_addr; ..." } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_egress_tstamp" + "type" : "field", + "value" : ["gtpu_ipv4", "dst_addr"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_dst_addr35"] } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 74, + "filename" : "include/control/spgw.p4", + "line" : 324, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.gtpu_ipv4.dst_addr = fabric_md.spgw.tunnel_dst_addr; ..." } }, { @@ -10669,41 +15615,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["gtpu_ipv4", "hdr_checksum"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] - }, - "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 75, + "filename" : "include/control/spgw.p4", + "line" : 325, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.gtpu_ipv4.hdr_checksum = 0" } }, { @@ -10711,14 +15634,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_ingress_tstamp" + "value" : "gtpu_udp" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 68, + "filename" : "include/control/spgw.p4", + "line" : 327, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.setValid()" + "source_fragment" : "hdr.gtpu_udp.setValid()" } }, { @@ -10726,18 +15649,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_ingress_tstamp", "ingress_tstamp"] + "value" : ["gtpu_udp", "sport"] }, { "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_port33"] } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 69, + "filename" : "include/control/spgw.p4", + "line" : 328, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" + "source_fragment" : "hdr.gtpu_udp.sport = fabric_md.spgw.tunnel_src_port; ..." } }, { @@ -10745,41 +15668,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["gtpu_udp", "dport"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x03" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } + "type" : "hexstr", + "value" : "0x0868" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 109, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 3; ..." + "filename" : "include/control/spgw.p4", + "line" : 329, + "column" : 8, + "source_fragment" : "hdr.gtpu_udp.dport = 2152" } }, { @@ -10787,7 +15687,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["gtpu_udp", "len"] }, { "type" : "expression", @@ -10801,11 +15701,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] }, "right" : { "type" : "hexstr", - "value" : "0x000c" + "value" : "0x0010" } } }, @@ -10818,32 +15718,10 @@ } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 110, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 12; ..." - } - } - ] - }, - { - "name" : "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15", - "id" : 86, - "runtime_data" : [], - "primitives" : [ - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "int_egress_tx_util" - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 88, + "filename" : "include/control/spgw.p4", + "line" : 330, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.setValid()" + "source_fragment" : "hdr.gtpu_udp.len = fabric_md.spgw.ipv4_len ..." } }, { @@ -10851,18 +15729,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tx_util", "egress_port_tx_util"] + "value" : ["gtpu_udp", "checksum"] }, { "type" : "hexstr", - "value" : "0x00000000" + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 90, + "filename" : "include/control/spgw.p4", + "line" : 332, "column" : 8, - "source_fragment" : "hdr.int_egress_tx_util.egress_port_tx_util = 32w0" + "source_fragment" : "hdr.gtpu_udp.checksum = 0" } }, { @@ -10870,14 +15748,14 @@ "parameters" : [ { "type" : "header", - "value" : "int_q_congestion" + "value" : "outer_gtpu" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 80, + "filename" : "include/control/spgw.p4", + "line" : 334, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.setValid()" + "source_fragment" : "hdr.outer_gtpu.setValid()" } }, { @@ -10885,18 +15763,37 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_id"] + "value" : ["outer_gtpu", "version"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 335, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.version = 0x01" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["outer_gtpu", "pt"] + }, + { + "type" : "hexstr", + "value" : "0x01" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 82, + "filename" : "include/control/spgw.p4", + "line" : 336, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_id = 8w0" + "source_fragment" : "hdr.outer_gtpu.pt = 0x01" } }, { @@ -10904,33 +15801,37 @@ "parameters" : [ { "type" : "field", - "value" : ["int_q_congestion", "q_congestion"] + "value" : ["outer_gtpu", "spare"] }, { "type" : "hexstr", - "value" : "0x000000" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 83, + "filename" : "include/control/spgw.p4", + "line" : 337, "column" : 8, - "source_fragment" : "hdr.int_q_congestion.q_congestion = 24w0" + "source_fragment" : "hdr.outer_gtpu.spare = 0" } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_egress_tstamp" + "type" : "field", + "value" : ["outer_gtpu", "ex_flag"] + }, + { + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 74, + "filename" : "include/control/spgw.p4", + "line" : 338, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.setValid()" + "source_fragment" : "hdr.outer_gtpu.ex_flag = 0" } }, { @@ -10938,56 +15839,37 @@ "parameters" : [ { "type" : "field", - "value" : ["int_egress_tstamp", "egress_tstamp"] + "value" : ["outer_gtpu", "seq_flag"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] - }, - "right" : { - "type" : "field", - "value" : ["standard_metadata", "deq_timedelta"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 75, + "filename" : "include/control/spgw.p4", + "line" : 339, "column" : 8, - "source_fragment" : "hdr.int_egress_tstamp.egress_tstamp = (bit<32>) smeta.enq_timestamp + (bit<32>) smeta.deq_timedelta" + "source_fragment" : "hdr.outer_gtpu.seq_flag = 0" } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "int_ingress_tstamp" + "type" : "field", + "value" : ["outer_gtpu", "npdu_flag"] + }, + { + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 68, + "filename" : "include/control/spgw.p4", + "line" : 340, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.setValid()" + "source_fragment" : "hdr.outer_gtpu.npdu_flag = 0" } }, { @@ -10995,18 +15877,18 @@ "parameters" : [ { "type" : "field", - "value" : ["int_ingress_tstamp", "ingress_tstamp"] + "value" : ["outer_gtpu", "msgtype"] }, { - "type" : "field", - "value" : ["standard_metadata", "enq_timestamp"] + "type" : "hexstr", + "value" : "0xff" } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 69, + "filename" : "include/control/spgw.p4", + "line" : 341, "column" : 8, - "source_fragment" : "hdr.int_ingress_tstamp.ingress_tstamp = (bit<32>) smeta.enq_timestamp" + "source_fragment" : "hdr.outer_gtpu.msgtype = 0xff" } }, { @@ -11014,41 +15896,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] + "value" : ["outer_gtpu", "msglen"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x04" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 115, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_words + 4; ..." + "filename" : "include/control/spgw.p4", + "line" : 342, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.msglen = fabric_md.spgw.ipv4_len; ..." } }, { @@ -11056,63 +15915,40 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["outer_gtpu", "teid"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x0010" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_teid32"] } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 116, - "column" : 33, - "source_fragment" : "= fmeta.int_meta.new_bytes + 16; ..." + "filename" : "include/control/spgw.p4", + "line" : 343, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.teid = fabric_md.spgw.teid; ..." } } ] }, { - "name" : "FabricEgress.egress_next.pop_mpls_if_present", - "id" : 87, + "name" : "FabricEgress.spgw.gtpu_encap_qfi", + "id" : 117, "runtime_data" : [], "primitives" : [ { - "op" : "remove_header", + "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "mpls" + "value" : "gtpu_ipv4" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 270, + "filename" : "include/control/spgw.p4", + "line" : 311, "column" : 8, - "source_fragment" : "hdr.mpls.setInvalid()" + "source_fragment" : "hdr.gtpu_ipv4.setValid()" } }, { @@ -11120,40 +15956,37 @@ "parameters" : [ { "type" : "field", - "value" : ["eth_type", "value"] + "value" : ["gtpu_ipv4", "version"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "type" : "hexstr", + "value" : "0x04" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 272, + "filename" : "include/control/spgw.p4", + "line" : 312, "column" : 8, - "source_fragment" : "hdr.eth_type.value = fabric_metadata.ip_eth_type; ..." + "source_fragment" : "hdr.gtpu_ipv4.version = 4" } - } - ] - }, - { - "name" : "FabricEgress.egress_next.set_mpls", - "id" : 88, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "mpls" + "type" : "field", + "value" : ["gtpu_ipv4", "ihl"] + }, + { + "type" : "hexstr", + "value" : "0x05" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 277, - "column" : 8, - "source_fragment" : "hdr.mpls.setValid()" + "filename" : "include/control/../define.p4", + "line" : 164, + "column" : 28, + "source_fragment" : "5; ..." } }, { @@ -11161,18 +15994,18 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "label"] + "value" : ["gtpu_ipv4", "dscp"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 278, + "filename" : "include/control/spgw.p4", + "line" : 314, "column" : 8, - "source_fragment" : "hdr.mpls.label = fabric_metadata.mpls_label; ..." + "source_fragment" : "hdr.gtpu_ipv4.dscp = 0" } }, { @@ -11180,7 +16013,7 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "tc"] + "value" : ["gtpu_ipv4", "ecn"] }, { "type" : "hexstr", @@ -11188,10 +16021,52 @@ } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 279, + "filename" : "include/control/spgw.p4", + "line" : 315, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.ecn = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_ipv4", "total_len"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0024" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 316, "column" : 8, - "source_fragment" : "hdr.mpls.tc = 3w0" + "source_fragment" : "hdr.gtpu_ipv4.total_len = hdr.ipv4.total_len ..." } }, { @@ -11199,18 +16074,18 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "bos"] + "value" : ["gtpu_ipv4", "identification"] }, { "type" : "hexstr", - "value" : "0x01" + "value" : "0x1513" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 280, + "filename" : "include/control/spgw.p4", + "line" : 318, "column" : 8, - "source_fragment" : "hdr.mpls.bos = 1w1" + "source_fragment" : "hdr.gtpu_ipv4.identification = 0x1513" } }, { @@ -11218,18 +16093,18 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "ttl"] + "value" : ["gtpu_ipv4", "flags"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl5"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 281, + "filename" : "include/control/spgw.p4", + "line" : 319, "column" : 8, - "source_fragment" : "hdr.mpls.ttl = fabric_metadata.mpls_ttl; // Decrement after push. ..." + "source_fragment" : "hdr.gtpu_ipv4.flags = 0" } }, { @@ -11237,40 +16112,18 @@ "parameters" : [ { "type" : "field", - "value" : ["eth_type", "value"] + "value" : ["gtpu_ipv4", "frag_offset"] }, { "type" : "hexstr", - "value" : "0x8847" - } - ], - "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 126, - "column" : 31, - "source_fragment" : "0x8847; ..." - } - } - ] - }, - { - "name" : "FabricEgress.egress_next.push_vlan", - "id" : 89, - "runtime_data" : [], - "primitives" : [ - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "vlan_tag" + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 289, + "filename" : "include/control/spgw.p4", + "line" : 320, "column" : 8, - "source_fragment" : "hdr.vlan_tag.setValid()" + "source_fragment" : "hdr.gtpu_ipv4.frag_offset = 0" } }, { @@ -11278,18 +16131,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "cfi"] + "value" : ["gtpu_ipv4", "ttl"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_cfi3"] + "type" : "hexstr", + "value" : "0x40" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 290, - "column" : 8, - "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi; ..." + "filename" : "include/control/../define.p4", + "line" : 177, + "column" : 32, + "source_fragment" : "64; ..." } }, { @@ -11297,18 +16150,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "pri"] + "value" : ["gtpu_ipv4", "protocol"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_pri2"] + "type" : "hexstr", + "value" : "0x11" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 291, - "column" : 8, - "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri; ..." + "filename" : "include/control/../define.p4", + "line" : 161, + "column" : 25, + "source_fragment" : "17; ..." } }, { @@ -11316,18 +16169,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "eth_type"] + "value" : ["gtpu_ipv4", "src_addr"] }, { - "type" : "hexstr", - "value" : "0x8100" + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_src_addr34"] } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 125, - "column" : 31, - "source_fragment" : "0x8100; ..." + "filename" : "include/control/spgw.p4", + "line" : 323, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.src_addr = fabric_md.spgw.tunnel_src_addr; ..." } }, { @@ -11335,62 +16188,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "vlan_id"] + "value" : ["gtpu_ipv4", "dst_addr"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] - } - ], - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 293, - "column" : 8, - "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id; ..." - } - } - ] - }, - { - "name" : "FabricEgress.egress_next.pop_vlan", - "id" : 90, - "runtime_data" : [], - "primitives" : [ - { - "op" : "remove_header", - "parameters" : [ - { - "type" : "header", - "value" : "vlan_tag" - } - ], - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 316, - "column" : 8, - "source_fragment" : "hdr.vlan_tag.setInvalid()" - } - } - ] - }, - { - "name" : "FabricEgress.spgw_egress.gtpu_encap", - "id" : 91, - "runtime_data" : [], - "primitives" : [ - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "gtpu_ipv4" + "value" : ["scalars", "userMetadata._spgw_tunnel_dst_addr35"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 306, + "line" : 324, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.setValid()" + "source_fragment" : "hdr.gtpu_ipv4.dst_addr = fabric_md.spgw.tunnel_dst_addr; ..." } }, { @@ -11398,37 +16207,33 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "version"] + "value" : ["gtpu_ipv4", "hdr_checksum"] }, { "type" : "hexstr", - "value" : "0x04" + "value" : "0x0000" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 307, + "line" : 325, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.version = 4" + "source_fragment" : "hdr.gtpu_ipv4.hdr_checksum = 0" } }, { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["gtpu_ipv4", "ihl"] - }, - { - "type" : "hexstr", - "value" : "0x05" + "type" : "header", + "value" : "gtpu_udp" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 143, - "column" : 28, - "source_fragment" : "5; ..." + "filename" : "include/control/spgw.p4", + "line" : 327, + "column" : 8, + "source_fragment" : "hdr.gtpu_udp.setValid()" } }, { @@ -11436,18 +16241,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "dscp"] + "value" : ["gtpu_udp", "sport"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_src_port33"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 309, + "line" : 328, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.dscp = 0" + "source_fragment" : "hdr.gtpu_udp.sport = fabric_md.spgw.tunnel_src_port; ..." } }, { @@ -11455,18 +16260,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "ecn"] + "value" : ["gtpu_udp", "dport"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x0868" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 310, + "line" : 329, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.ecn = 0" + "source_fragment" : "hdr.gtpu_udp.dport = 2152" } }, { @@ -11474,7 +16279,7 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "total_len"] + "value" : ["gtpu_udp", "len"] }, { "type" : "expression", @@ -11488,11 +16293,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["ipv4", "total_len"] + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] }, "right" : { "type" : "hexstr", - "value" : "0x0024" + "value" : "0x0010" } } }, @@ -11506,9 +16311,9 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 311, + "line" : 330, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.total_len = hdr.ipv4.total_len ..." + "source_fragment" : "hdr.gtpu_udp.len = fabric_md.spgw.ipv4_len ..." } }, { @@ -11516,37 +16321,33 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "identification"] + "value" : ["gtpu_udp", "checksum"] }, { "type" : "hexstr", - "value" : "0x1513" + "value" : "0x0000" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 313, + "line" : 332, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.identification = 0x1513" + "source_fragment" : "hdr.gtpu_udp.checksum = 0" } }, { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["gtpu_ipv4", "flags"] - }, - { - "type" : "hexstr", - "value" : "0x00" + "type" : "header", + "value" : "outer_gtpu" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 314, + "line" : 334, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.flags = 0" + "source_fragment" : "hdr.outer_gtpu.setValid()" } }, { @@ -11554,18 +16355,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "frag_offset"] + "value" : ["outer_gtpu", "version"] }, { "type" : "hexstr", - "value" : "0x0000" + "value" : "0x01" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 315, + "line" : 335, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.frag_offset = 0" + "source_fragment" : "hdr.outer_gtpu.version = 0x01" } }, { @@ -11573,18 +16374,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "ttl"] + "value" : ["outer_gtpu", "pt"] }, { "type" : "hexstr", - "value" : "0x40" + "value" : "0x01" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 156, - "column" : 32, - "source_fragment" : "64; ..." + "filename" : "include/control/spgw.p4", + "line" : 336, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.pt = 0x01" } }, { @@ -11592,18 +16393,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "protocol"] + "value" : ["outer_gtpu", "spare"] }, { "type" : "hexstr", - "value" : "0x11" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 140, - "column" : 25, - "source_fragment" : "17; ..." + "filename" : "include/control/spgw.p4", + "line" : 337, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.spare = 0" } }, { @@ -11611,18 +16412,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "src_addr"] + "value" : ["outer_gtpu", "ex_flag"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_addr23"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 318, + "line" : 338, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.src_addr = fabric_md.spgw.tunnel_src_addr; ..." + "source_fragment" : "hdr.outer_gtpu.ex_flag = 0" } }, { @@ -11630,18 +16431,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "dst_addr"] + "value" : ["outer_gtpu", "seq_flag"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_dst_addr24"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 319, + "line" : 339, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.dst_addr = fabric_md.spgw.tunnel_dst_addr; ..." + "source_fragment" : "hdr.outer_gtpu.seq_flag = 0" } }, { @@ -11649,33 +16450,37 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "hdr_checksum"] + "value" : ["outer_gtpu", "npdu_flag"] }, { "type" : "hexstr", - "value" : "0x0000" + "value" : "0x00" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 320, + "line" : 340, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.hdr_checksum = 0" + "source_fragment" : "hdr.outer_gtpu.npdu_flag = 0" } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu_udp" + "type" : "field", + "value" : ["outer_gtpu", "msgtype"] + }, + { + "type" : "hexstr", + "value" : "0xff" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 322, + "line" : 341, "column" : 8, - "source_fragment" : "hdr.gtpu_udp.setValid()" + "source_fragment" : "hdr.outer_gtpu.msgtype = 0xff" } }, { @@ -11683,18 +16488,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_udp", "sport"] + "value" : ["outer_gtpu", "msglen"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_port22"] + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 323, + "line" : 342, "column" : 8, - "source_fragment" : "hdr.gtpu_udp.sport = fabric_md.spgw.tunnel_src_port; ..." + "source_fragment" : "hdr.outer_gtpu.msglen = fabric_md.spgw.ipv4_len; ..." } }, { @@ -11702,18 +16507,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_udp", "dport"] + "value" : ["outer_gtpu", "teid"] }, { - "type" : "hexstr", - "value" : "0x0868" + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_teid32"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 324, + "line" : 343, "column" : 8, - "source_fragment" : "hdr.gtpu_udp.dport = 2152" + "source_fragment" : "hdr.outer_gtpu.teid = fabric_md.spgw.teid; ..." } }, { @@ -11721,7 +16526,7 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_udp", "len"] + "value" : ["gtpu_ipv4", "total_len"] }, { "type" : "expression", @@ -11735,11 +16540,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len20"] + "value" : ["ipv4", "total_len"] }, "right" : { "type" : "hexstr", - "value" : "0x0010" + "value" : "0x002c" } } }, @@ -11753,9 +16558,9 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 325, + "line" : 349, "column" : 8, - "source_fragment" : "hdr.gtpu_udp.len = fabric_md.spgw.ipv4_len ..." + "source_fragment" : "hdr.gtpu_ipv4.total_len = hdr.ipv4.total_len ..." } }, { @@ -11763,33 +16568,41 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_udp", "checksum"] + "value" : ["gtpu_udp", "len"] }, { - "type" : "hexstr", - "value" : "0x0000" - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 327, - "column" : 8, - "source_fragment" : "hdr.gtpu_udp.checksum = 0" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "outer_gtpu" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0018" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 330, + "line" : 352, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.setValid()" + "source_fragment" : "hdr.gtpu_udp.len = fabric_md.spgw.ipv4_len ..." } }, { @@ -11797,18 +16610,41 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "version"] + "value" : ["outer_gtpu", "msglen"] }, { - "type" : "hexstr", - "value" : "0x01" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0008" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 331, + "line" : 355, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.version = 0x01" + "source_fragment" : "hdr.outer_gtpu.msglen = fabric_md.spgw.ipv4_len ..." } }, { @@ -11816,7 +16652,7 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "pt"] + "value" : ["outer_gtpu", "ex_flag"] }, { "type" : "hexstr", @@ -11825,28 +16661,24 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 332, + "line" : 357, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.pt = 0x01" + "source_fragment" : "hdr.outer_gtpu.ex_flag = 1" } }, { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["outer_gtpu", "spare"] - }, - { - "type" : "hexstr", - "value" : "0x00" + "type" : "header", + "value" : "outer_gtpu_options" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 333, + "line" : 358, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.spare = 0" + "source_fragment" : "hdr.outer_gtpu_options.setValid()" } }, { @@ -11854,37 +16686,33 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "ex_flag"] + "value" : ["outer_gtpu_options", "next_ext"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x85" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 334, + "line" : 359, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.ex_flag = 0" + "source_fragment" : "hdr.outer_gtpu_options.next_ext = 0x85" } }, { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["outer_gtpu", "seq_flag"] - }, - { - "type" : "hexstr", - "value" : "0x00" + "type" : "header", + "value" : "outer_gtpu_ext_psc" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 335, + "line" : 360, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.seq_flag = 0" + "source_fragment" : "hdr.outer_gtpu_ext_psc.setValid()" } }, { @@ -11892,7 +16720,7 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "npdu_flag"] + "value" : ["outer_gtpu_ext_psc", "type"] }, { "type" : "hexstr", @@ -11900,10 +16728,10 @@ } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 336, - "column" : 8, - "source_fragment" : "hdr.outer_gtpu.npdu_flag = 0" + "filename" : "include/control/../define.p4", + "line" : 88, + "column" : 36, + "source_fragment" : "4w0; // Downlink ..." } }, { @@ -11911,18 +16739,18 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "msgtype"] + "value" : ["outer_gtpu_ext_psc", "len"] }, { "type" : "hexstr", - "value" : "0xff" + "value" : "0x01" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 337, + "line" : 362, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.msgtype = 0xff" + "source_fragment" : "hdr.outer_gtpu_ext_psc.len = 8w1" } }, { @@ -11930,18 +16758,18 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "msglen"] + "value" : ["outer_gtpu_ext_psc", "qfi"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len20"] + "value" : ["scalars", "userMetadata._spgw_qfi39"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 338, + "line" : 363, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.msglen = fabric_md.spgw.ipv4_len; ..." + "source_fragment" : "hdr.outer_gtpu_ext_psc.qfi = fabric_md.spgw.qfi; ..." } }, { @@ -11949,25 +16777,25 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "teid"] + "value" : ["outer_gtpu_ext_psc", "next_ext"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_teid21"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 339, + "line" : 364, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.teid = fabric_md.spgw.teid; ..." + "source_fragment" : "hdr.outer_gtpu_ext_psc.next_ext = 0x0" } } ] }, { - "name" : "act_9", - "id" : 92, + "name" : "packetio41", + "id" : 118, "runtime_data" : [], "primitives" : [ { @@ -11983,8 +16811,8 @@ ] }, { - "name" : "act_10", - "id" : 93, + "name" : "packetio44", + "id" : 119, "runtime_data" : [], "primitives" : [ { @@ -12003,121 +16831,61 @@ } }, { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["packet_in", "ingress_port"] - }, - { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] - } - ], - "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 45, - "column" : 12, - "source_fragment" : "hdr.packet_in.ingress_port = standard_metadata.ingress_port" - } - }, - { - "op" : "exit", - "parameters" : [], - "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 47, - "column" : 12, - "source_fragment" : "exit" - } - } - ] - }, - { - "name" : "act_11", - "id" : 94, - "runtime_data" : [], - "primitives" : [ - { - "op" : "mark_to_drop", - "parameters" : [ - { - "type" : "header", - "value" : "standard_metadata" - } - ], - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 337, - "column" : 12, - "source_fragment" : "mark_to_drop(standard_metadata)" - } - } - ] - }, - { - "name" : "act_12", - "id" : 95, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["packet_in", "ingress_port"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] } - ] + ], + "source_info" : { + "filename" : "include/control/packetio.p4", + "line" : 45, + "column" : 12, + "source_fragment" : "hdr.packet_in.ingress_port = standard_metadata.ingress_port" + } + }, + { + "op" : "exit", + "parameters" : [], + "source_info" : { + "filename" : "include/control/packetio.p4", + "line" : 47, + "column" : 12, + "source_fragment" : "exit" + } } ] }, { - "name" : "act_13", - "id" : 96, + "name" : "next283", + "id" : 120, "runtime_data" : [], "primitives" : [ { - "op" : "assign", + "op" : "mark_to_drop", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } + "type" : "header", + "value" : "standard_metadata" } - ] + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 283, + "column" : 12, + "source_fragment" : "mark_to_drop(standard_metadata)" + } } ] }, { - "name" : "act_14", - "id" : 97, + "name" : "next310", + "id" : 121, "runtime_data" : [], "primitives" : [ { @@ -12130,7 +16898,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 370, + "line" : 310, "column" : 35, "source_fragment" : "mark_to_drop(standard_metadata)" } @@ -12138,8 +16906,8 @@ ] }, { - "name" : "act_15", - "id" : 98, + "name" : "next309", + "id" : 122, "runtime_data" : [], "primitives" : [ { @@ -12179,7 +16947,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 369, + "line" : 309, "column" : 12, "source_fragment" : "hdr.mpls.ttl = hdr.mpls.ttl - 1" } @@ -12187,8 +16955,8 @@ ] }, { - "name" : "act_16", - "id" : 99, + "name" : "next314", + "id" : 123, "runtime_data" : [], "primitives" : [ { @@ -12201,7 +16969,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 374, + "line" : 314, "column" : 39, "source_fragment" : "mark_to_drop(standard_metadata)" } @@ -12209,8 +16977,8 @@ ] }, { - "name" : "act_17", - "id" : 100, + "name" : "next313", + "id" : 124, "runtime_data" : [], "primitives" : [ { @@ -12250,7 +17018,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 373, + "line" : 313, "column" : 16, "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" } @@ -12258,8 +17026,34 @@ ] }, { - "name" : "act_18", - "id" : 101, + "name" : "spgw377", + "id" : 125, + "runtime_data" : [], + "primitives" : [ + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricEgress.spgw.pdr_counter" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ctr_id36"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 377, + "column" : 16, + "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" + } + } + ] + }, + { + "name" : "act", + "id" : 126, "runtime_data" : [], "primitives" : [ { @@ -12267,7 +17061,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "spgw_egress_hasReturned"] + "value" : ["scalars", "process_int_main_process_int_transit_hasReturned"] }, { "type" : "expression", @@ -12278,24 +17072,18 @@ "left" : null, "right" : { "type" : "bool", - "value" : true + "value" : false } } } } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 343, - "column" : 46, - "source_fragment" : "return" - } + ] } ] }, { - "name" : "act_19", - "id" : 102, + "name" : "int_transit420", + "id" : 127, "runtime_data" : [], "primitives" : [ { @@ -12303,7 +17091,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "spgw_egress_hasReturned"] + "value" : ["scalars", "process_int_main_process_int_transit_hasReturned"] }, { "type" : "expression", @@ -12314,44 +17102,73 @@ "left" : null, "right" : { "type" : "bool", - "value" : false + "value" : true } } } } - ] + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 420, + "column" : 12, + "source_fragment" : "return" + } } ] }, { - "name" : "act_20", - "id" : 103, + "name" : "int_transit428", + "id" : 128, "runtime_data" : [], "primitives" : [ { - "op" : "count", + "op" : "assign", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricEgress.spgw_egress.pdr_counter" + "type" : "field", + "value" : ["ipv4", "total_len"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id25"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 344, - "column" : 8, - "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" + "filename" : "include/int/int_transit.p4", + "line" : 428, + "column" : 12, + "source_fragment" : "hdr.ipv4.total_len = hdr.ipv4.total_len + fmeta.int_meta.new_bytes" } } ] }, { - "name" : "act_21", - "id" : 104, + "name" : "int_transit425", + "id" : 129, "runtime_data" : [], "primitives" : [ { @@ -12359,29 +17176,48 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "process_int_main_process_int_transit_hasReturned"] + "value" : ["int_header", "total_hop_cnt"] }, { "type" : "expression", "value" : { "type" : "expression", "value" : { - "op" : "b2d", - "left" : null, + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["int_header", "total_hop_cnt"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + }, "right" : { - "type" : "bool", - "value" : false + "type" : "hexstr", + "value" : "0xff" } } } } - ] + ], + "source_info" : { + "filename" : "include/int/int_transit.p4", + "line" : 425, + "column" : 8, + "source_fragment" : "hdr.int_header.total_hop_cnt = hdr.int_header.total_hop_cnt + 1" + } } ] }, { - "name" : "act_22", - "id" : 105, + "name" : "int_transit431", + "id" : 130, "runtime_data" : [], "primitives" : [ { @@ -12389,18 +17225,31 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "process_int_main_process_int_transit_hasReturned"] + "value" : ["udp", "len"] }, { "type" : "expression", "value" : { "type" : "expression", "value" : { - "op" : "b2d", - "left" : null, + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["udp", "len"] + }, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_new_bytes51"] + } + } + }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0xffff" } } } @@ -12408,16 +17257,16 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 420, + "line" : 431, "column" : 12, - "source_fragment" : "return" + "source_fragment" : "hdr.udp.len = hdr.udp.len + fmeta.int_meta.new_bytes" } } ] }, { - "name" : "act_23", - "id" : 106, + "name" : "int_transit434", + "id" : 131, "runtime_data" : [], "primitives" : [ { @@ -12425,7 +17274,7 @@ "parameters" : [ { "type" : "field", - "value" : ["ipv4", "total_len"] + "value" : ["intl4_shim", "len_words"] }, { "type" : "expression", @@ -12439,17 +17288,17 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["ipv4", "total_len"] + "value" : ["intl4_shim", "len_words"] }, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] + "value" : ["scalars", "userMetadata._int_meta_new_words50"] } } }, "right" : { "type" : "hexstr", - "value" : "0xffff" + "value" : "0xff" } } } @@ -12457,16 +17306,68 @@ ], "source_info" : { "filename" : "include/int/int_transit.p4", - "line" : 428, + "line" : 434, "column" : 12, - "source_fragment" : "hdr.ipv4.total_len = hdr.ipv4.total_len + fmeta.int_meta.new_bytes" + "source_fragment" : "hdr.intl4_shim.len_words = hdr.intl4_shim.len_words + fmeta.int_meta.new_words" + } + } + ] + }, + { + "name" : "slicing155", + "id" : 132, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 155, + "column" : 16, + "source_fragment" : "hdr.ipv4.dscp = tmp_dscp" + } + } + ] + }, + { + "name" : "slicing159", + "id" : 133, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["inner_ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 159, + "column" : 16, + "source_fragment" : "hdr.inner_ipv4.dscp = tmp_dscp" } } ] }, { - "name" : "act_24", - "id" : 107, + "name" : "slicing126", + "id" : 134, "runtime_data" : [], "primitives" : [ { @@ -12474,164 +17375,400 @@ "parameters" : [ { "type" : "field", - "value" : ["int_header", "total_hop_cnt"] + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["int_header", "total_hop_cnt"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x01" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._dscp28"] } ], "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 425, - "column" : 8, - "source_fragment" : "hdr.int_header.total_hop_cnt = hdr.int_header.total_hop_cnt + 1" + "filename" : "include/control/slicing.p4", + "line" : 126, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.dscp; ..." + } + } + ] + } + ], + "pipelines" : [ + { + "name" : "ingress", + "id" : 0, + "source_info" : { + "filename" : "fabric.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "FabricIngress" + }, + "init_table" : "tbl_lookup_md_init23", + "tables" : [ + { + "name" : "tbl_lookup_md_init23", + "id" : 0, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 23, + "column" : 23, + "source_fragment" : "= false; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [61], + "actions" : ["lookup_md_init23"], + "base_default_next" : "node_3", + "next_tables" : { + "lookup_md_init23" : "node_3" + }, + "default_entry" : { + "action_id" : 61, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init32", + "id" : 1, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 32, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [56], + "actions" : ["lookup_md_init32"], + "base_default_next" : "node_5", + "next_tables" : { + "lookup_md_init32" : "node_5" + }, + "default_entry" : { + "action_id" : 56, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init37", + "id" : 2, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 37, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [53], + "actions" : ["lookup_md_init37"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init37" : "node_19" + }, + "default_entry" : { + "action_id" : 53, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init40", + "id" : 3, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [54], + "actions" : ["lookup_md_init40"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init40" : "node_19" + }, + "default_entry" : { + "action_id" : 54, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init43", + "id" : 4, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 43, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [55], + "actions" : ["lookup_md_init43"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init43" : "node_19" + }, + "default_entry" : { + "action_id" : 55, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init47", + "id" : 5, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 47, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [60], + "actions" : ["lookup_md_init47"], + "base_default_next" : "node_13", + "next_tables" : { + "lookup_md_init47" : "node_13" + }, + "default_entry" : { + "action_id" : 60, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init52", + "id" : 6, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 52, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [57], + "actions" : ["lookup_md_init52"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init52" : "node_19" + }, + "default_entry" : { + "action_id" : 57, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init55", + "id" : 7, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 55, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [58], + "actions" : ["lookup_md_init55"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init55" : "node_19" + }, + "default_entry" : { + "action_id" : 58, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init58", + "id" : 8, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 58, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [59], + "actions" : ["lookup_md_init58"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init58" : "node_19" + }, + "default_entry" : { + "action_id" : 59, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_packetio25", + "id" : 9, + "source_info" : { + "filename" : "include/control/packetio.p4", + "line" : 25, + "column" : 42, + "source_fragment" : "= hdr.packet_out.egress_port; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [62], + "actions" : ["packetio25"], + "base_default_next" : "FabricIngress.slice_tc_classifier.classifier", + "next_tables" : { + "packetio25" : "FabricIngress.slice_tc_classifier.classifier" + }, + "default_entry" : { + "action_id" : 62, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true } - } - ] - }, - { - "name" : "act_25", - "id" : 108, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "assign", - "parameters" : [ + "name" : "FabricIngress.slice_tc_classifier.classifier", + "id" : 10, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 49, + "column" : 10, + "source_fragment" : "classifier" + }, + "key" : [ { - "type" : "field", - "value" : ["udp", "len"] + "match_type" : "ternary", + "name" : "ig_port", + "target" : ["standard_metadata", "ingress_port"], + "mask" : null }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["udp", "len"] - }, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_bytes39"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xffff" - } - } - } - } - ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 431, - "column" : 12, - "source_fragment" : "hdr.udp.len = hdr.udp.len + fmeta.int_meta.new_bytes" - } - } - ] - }, - { - "name" : "act_26", - "id" : 109, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._lkp_ipv4_src1"], + "mask" : null + }, { - "type" : "field", - "value" : ["intl4_shim", "len_words"] + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._lkp_ipv4_dst2"], + "mask" : null }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["intl4_shim", "len_words"] - }, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_new_words38"] - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._lkp_ip_proto3"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._lkp_l4_sport4"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._lkp_l4_dport5"], + "mask" : null } ], - "source_info" : { - "filename" : "include/int/int_transit.p4", - "line" : 434, - "column" : 12, - "source_fragment" : "hdr.intl4_shim.len_words = hdr.intl4_shim.len_words + fmeta.int_meta.new_words" + "match_type" : "ternary", + "type" : "simple", + "max_size" : 512, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [32, 33], + "actions" : ["FabricIngress.slice_tc_classifier.set_slice_id_tc", "FabricIngress.slice_tc_classifier.trust_dscp"], + "base_default_next" : "node_22", + "next_tables" : { + "FabricIngress.slice_tc_classifier.set_slice_id_tc" : "node_22", + "FabricIngress.slice_tc_classifier.trust_dscp" : "node_22" + }, + "default_entry" : { + "action_id" : 32, + "action_const" : true, + "action_data" : ["0x0", "0x0"], + "action_entry_const" : true } - } - ] - } - ], - "pipelines" : [ - { - "name" : "ingress", - "id" : 0, - "source_info" : { - "filename" : "fabric.p4", - "line" : 46, - "column" : 8, - "source_fragment" : "FabricIngress" - }, - "init_table" : "node_2", - "tables" : [ + }, { - "name" : "tbl_act", - "id" : 0, + "name" : "tbl_filtering113", + "id" : 11, "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 25, - "column" : 42, - "source_fragment" : "= hdr.packet_out.egress_port; ..." + "filename" : "include/control/filtering.p4", + "line" : 113, + "column" : 36, + "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." }, "key" : [], "match_type" : "exact", @@ -12640,50 +17777,160 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [38], - "actions" : ["act"], - "base_default_next" : "tbl_act_0", + "action_ids" : [63], + "actions" : ["filtering113"], + "base_default_next" : "node_24", "next_tables" : { - "act" : "tbl_act_0" + "filtering113" : "node_24" }, "default_entry" : { - "action_id" : 38, + "action_id" : 63, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_0", - "id" : 1, + "name" : "tbl_filtering129", + "id" : 12, + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 129, + "column" : 37, + "source_fragment" : "=" + }, "key" : [], "match_type" : "exact", "type" : "simple", "max_size" : 1024, - "with_counters" : false, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [64], + "actions" : ["filtering129"], + "base_default_next" : "FabricIngress.filtering.ingress_port_vlan", + "next_tables" : { + "filtering129" : "FabricIngress.filtering.ingress_port_vlan" + }, + "default_entry" : { + "action_id" : 64, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.filtering.ingress_port_vlan", + "id" : 13, + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 55, + "column" : 10, + "source_fragment" : "ingress_port_vlan" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "ig_port", + "target" : ["standard_metadata", "ingress_port"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "vlan_is_valid", + "target" : ["vlan_tag", "$valid$"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "vlan_id", + "target" : ["vlan_tag", "vlan_id"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [12, 13, 14], + "actions" : ["FabricIngress.filtering.deny", "FabricIngress.filtering.permit", "FabricIngress.filtering.permit_with_internal_vlan"], + "base_default_next" : "FabricIngress.filtering.fwd_classifier", + "next_tables" : { + "FabricIngress.filtering.deny" : "FabricIngress.filtering.fwd_classifier", + "FabricIngress.filtering.permit" : "FabricIngress.filtering.fwd_classifier", + "FabricIngress.filtering.permit_with_internal_vlan" : "FabricIngress.filtering.fwd_classifier" + }, + "default_entry" : { + "action_id" : 12, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.filtering.fwd_classifier", + "id" : 14, + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 94, + "column" : 10, + "source_fragment" : "fwd_classifier" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "ig_port", + "target" : ["standard_metadata", "ingress_port"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_dst", + "target" : ["ethernet", "dst_addr"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_type", + "target" : ["eth_type", "value"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "ip_eth_type", + "target" : ["scalars", "userMetadata._ip_eth_type8"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [39], - "actions" : ["act_0"], - "base_default_next" : "FabricIngress.spgw_ingress.interface_lookup", + "action_ids" : [15], + "actions" : ["FabricIngress.filtering.set_forwarding_type"], + "base_default_next" : "node_28", "next_tables" : { - "act_0" : "FabricIngress.spgw_ingress.interface_lookup" + "FabricIngress.filtering.set_forwarding_type" : "node_28" }, "default_entry" : { - "action_id" : 39, + "action_id" : 15, "action_const" : true, - "action_data" : [], + "action_data" : ["0x0"], "action_entry_const" : true } }, { - "name" : "FabricIngress.spgw_ingress.interface_lookup", - "id" : 2, + "name" : "FabricIngress.spgw.interfaces", + "id" : 15, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 55, + "line" : 132, "column" : 10, - "source_fragment" : "interface_lookup" + "source_fragment" : "interfaces" }, "key" : [ { @@ -12705,56 +17952,162 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [29], - "actions" : ["FabricIngress.spgw_ingress.set_source_iface"], - "base_default_next" : "node_6", + "action_ids" : [44, 45], + "actions" : ["FabricIngress.spgw.load_iface", "FabricIngress.spgw.iface_miss"], + "base_default_next" : null, "next_tables" : { - "FabricIngress.spgw_ingress.set_source_iface" : "node_6" + "__HIT__" : "node_30", + "__MISS__" : "node_41" }, "default_entry" : { - "action_id" : 29, + "action_id" : 45, "action_const" : true, - "action_data" : ["0x0", "0x0", "0x1"], + "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_1", - "id" : 3, + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_gtpu", + "id" : 16, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 249, - "column" : 46, - "source_fragment" : "return" + "line" : 77, + "column" : 10, + "source_fragment" : "decap_gtpu" }, - "key" : [], + "key" : [ + { + "match_type" : "exact", + "name" : "hdr.inner_tcp.$valid$", + "target" : ["inner_tcp", "$valid$"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "hdr.inner_udp.$valid$", + "target" : ["inner_udp", "$valid$"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "hdr.inner_icmp.$valid$", + "target" : ["inner_icmp", "$valid$"], + "mask" : null + } + ], "match_type" : "exact", "type" : "simple", "max_size" : 1024, "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [40], - "actions" : ["act_1"], - "base_default_next" : "node_8", + "action_ids" : [36, 37, 38, 39], + "actions" : ["FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_tcp", "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_udp", "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_icmp", "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_unknown"], + "base_default_next" : "node_32", "next_tables" : { - "act_1" : "node_8" + "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_tcp" : "node_32", + "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_udp" : "node_32", + "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_icmp" : "node_32", + "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_unknown" : "node_32" }, "default_entry" : { - "action_id" : 40, + "action_id" : 39, "action_const" : true, "action_data" : [], "action_entry_const" : true - } + }, + "entries" : [ + { + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 91, + "column" : 12, + "source_fragment" : "(true, false, false) : decap_inner_tcp()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + } + ], + "action_entry" : { + "action_id" : 36, + "action_data" : [] + }, + "priority" : 1 + }, + { + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 92, + "column" : 12, + "source_fragment" : "(false, true, false) : decap_inner_udp()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + } + ], + "action_entry" : { + "action_id" : 37, + "action_data" : [] + }, + "priority" : 2 + }, + { + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 93, + "column" : 12, + "source_fragment" : "(false, false, true) : decap_inner_icmp()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x01" + } + ], + "action_entry" : { + "action_id" : 38, + "action_data" : [] + }, + "priority" : 3 + } + ] }, { - "name" : "FabricIngress.spgw_ingress.uplink_pdr_lookup", - "id" : 4, + "name" : "FabricIngress.spgw.uplink_pdrs", + "id" : 17, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 93, + "line" : 184, "column" : 10, - "source_fragment" : "uplink_pdr_lookup" + "source_fragment" : "uplink_pdrs" }, "key" : [ { @@ -12768,6 +18121,18 @@ "name" : "teid", "target" : ["gtpu", "teid"], "mask" : null + }, + { + "match_type" : "exact", + "name" : "has_qfi", + "target" : ["gtpu_ext_psc", "$valid$"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "qfi", + "target" : ["scalars", "userMetadata._spgw_qfi39"], + "mask" : null } ], "match_type" : "exact", @@ -12776,27 +18141,29 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [31], - "actions" : ["FabricIngress.spgw_ingress.set_pdr_attributes"], - "base_default_next" : "tbl_act_2", + "action_ids" : [47, 49, 10], + "actions" : ["FabricIngress.spgw.load_pdr", "FabricIngress.spgw.load_pdr_qos", "NoAction"], + "base_default_next" : "node_35", "next_tables" : { - "FabricIngress.spgw_ingress.set_pdr_attributes" : "tbl_act_2" + "FabricIngress.spgw.load_pdr" : "node_35", + "FabricIngress.spgw.load_pdr_qos" : "node_35", + "NoAction" : "node_35" }, "default_entry" : { - "action_id" : 31, - "action_const" : true, - "action_data" : ["0x0", "0x0", "0x0"], - "action_entry_const" : true + "action_id" : 10, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false } }, { - "name" : "FabricIngress.spgw_ingress.downlink_pdr_lookup", - "id" : 5, + "name" : "FabricIngress.spgw.downlink_pdrs", + "id" : 18, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 82, + "line" : 172, "column" : 10, - "source_fragment" : "downlink_pdr_lookup" + "source_fragment" : "downlink_pdrs" }, "key" : [ { @@ -12812,26 +18179,28 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [30], - "actions" : ["FabricIngress.spgw_ingress.set_pdr_attributes"], - "base_default_next" : "tbl_act_2", + "action_ids" : [46, 48, 9], + "actions" : ["FabricIngress.spgw.load_pdr", "FabricIngress.spgw.load_pdr_qos", "NoAction"], + "base_default_next" : "node_35", "next_tables" : { - "FabricIngress.spgw_ingress.set_pdr_attributes" : "tbl_act_2" + "FabricIngress.spgw.load_pdr" : "node_35", + "FabricIngress.spgw.load_pdr_qos" : "node_35", + "NoAction" : "node_35" }, "default_entry" : { - "action_id" : 30, - "action_const" : true, - "action_data" : ["0x0", "0x0", "0x0"], - "action_entry_const" : true + "action_id" : 9, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false } }, { - "name" : "tbl_act_2", - "id" : 6, + "name" : "tbl_spgw277", + "id" : 19, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 263, - "column" : 8, + "line" : 277, + "column" : 16, "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" }, "key" : [], @@ -12841,25 +18210,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [41], - "actions" : ["act_2"], - "base_default_next" : "node_13", + "action_ids" : [65], + "actions" : ["spgw277"], + "base_default_next" : "node_37", "next_tables" : { - "act_2" : "node_13" + "spgw277" : "node_37" }, "default_entry" : { - "action_id" : 41, + "action_id" : 65, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.spgw_ingress.decap_gtpu", - "id" : 7, + "name" : "FabricIngress.spgw.decap_gtpu.decap_gtpu", + "id" : 20, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 219, + "line" : 77, "column" : 10, "source_fragment" : "decap_gtpu" }, @@ -12889,17 +18258,17 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [34, 35, 36, 37], - "actions" : ["FabricIngress.spgw_ingress.decap_inner_tcp", "FabricIngress.spgw_ingress.decap_inner_udp", "FabricIngress.spgw_ingress.decap_inner_icmp", "FabricIngress.spgw_ingress.decap_inner_unknown"], - "base_default_next" : "FabricIngress.spgw_ingress.far_lookup", + "action_ids" : [40, 41, 42, 43], + "actions" : ["FabricIngress.spgw.decap_gtpu.decap_inner_tcp", "FabricIngress.spgw.decap_gtpu.decap_inner_udp", "FabricIngress.spgw.decap_gtpu.decap_inner_icmp", "FabricIngress.spgw.decap_gtpu.decap_inner_unknown"], + "base_default_next" : "FabricIngress.spgw.fars", "next_tables" : { - "FabricIngress.spgw_ingress.decap_inner_tcp" : "FabricIngress.spgw_ingress.far_lookup", - "FabricIngress.spgw_ingress.decap_inner_udp" : "FabricIngress.spgw_ingress.far_lookup", - "FabricIngress.spgw_ingress.decap_inner_icmp" : "FabricIngress.spgw_ingress.far_lookup", - "FabricIngress.spgw_ingress.decap_inner_unknown" : "FabricIngress.spgw_ingress.far_lookup" + "FabricIngress.spgw.decap_gtpu.decap_inner_tcp" : "FabricIngress.spgw.fars", + "FabricIngress.spgw.decap_gtpu.decap_inner_udp" : "FabricIngress.spgw.fars", + "FabricIngress.spgw.decap_gtpu.decap_inner_icmp" : "FabricIngress.spgw.fars", + "FabricIngress.spgw.decap_gtpu.decap_inner_unknown" : "FabricIngress.spgw.fars" }, "default_entry" : { - "action_id" : 37, + "action_id" : 43, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -12908,7 +18277,7 @@ { "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 233, + "line" : 91, "column" : 12, "source_fragment" : "(true, false, false) : decap_inner_tcp()" }, @@ -12927,7 +18296,7 @@ } ], "action_entry" : { - "action_id" : 34, + "action_id" : 40, "action_data" : [] }, "priority" : 1 @@ -12935,7 +18304,7 @@ { "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 234, + "line" : 92, "column" : 12, "source_fragment" : "(false, true, false) : decap_inner_udp()" }, @@ -12954,7 +18323,7 @@ } ], "action_entry" : { - "action_id" : 35, + "action_id" : 41, "action_data" : [] }, "priority" : 2 @@ -12962,7 +18331,7 @@ { "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 235, + "line" : 93, "column" : 12, "source_fragment" : "(false, false, true) : decap_inner_icmp()" }, @@ -12973,152 +18342,66 @@ }, { "match_type" : "exact", - "key" : "0x00" - }, - { - "match_type" : "exact", - "key" : "0x01" - } - ], - "action_entry" : { - "action_id" : 36, - "action_data" : [] - }, - "priority" : 3 - } - ] - }, - { - "name" : "FabricIngress.spgw_ingress.far_lookup", - "id" : 8, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 163, - "column" : 10, - "source_fragment" : "far_lookup" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "far_id", - "target" : ["scalars", "fabric_metadata_t._spgw_far_id26"], - "mask" : null - } - ], - "match_type" : "exact", - "type" : "simple", - "max_size" : 2048, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [32, 33], - "actions" : ["FabricIngress.spgw_ingress.load_normal_far_attributes", "FabricIngress.spgw_ingress.load_tunnel_far_attributes"], - "base_default_next" : "node_16", - "next_tables" : { - "FabricIngress.spgw_ingress.load_normal_far_attributes" : "node_16", - "FabricIngress.spgw_ingress.load_tunnel_far_attributes" : "node_16" - }, - "default_entry" : { - "action_id" : 32, - "action_const" : true, - "action_data" : ["0x1", "0x1"], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_3", - "id" : 9, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 280, - "column" : 38, - "source_fragment" : "= true; ..." - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [42], - "actions" : ["act_3"], - "base_default_next" : "tbl_act_4", - "next_tables" : { - "act_3" : "tbl_act_4" - }, - "default_entry" : { - "action_id" : 42, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_4", - "id" : 10, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 289, - "column" : 32, - "source_fragment" : "=" - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [43], - "actions" : ["act_4"], - "base_default_next" : "node_19", - "next_tables" : { - "act_4" : "node_19" - }, - "default_entry" : { - "action_id" : 43, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x01" + } + ], + "action_entry" : { + "action_id" : 42, + "action_data" : [] + }, + "priority" : 3 + } + ] }, { - "name" : "tbl_act_5", - "id" : 11, + "name" : "FabricIngress.spgw.fars", + "id" : 21, "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 111, - "column" : 36, - "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 245, + "column" : 10, + "source_fragment" : "fars" }, - "key" : [], + "key" : [ + { + "match_type" : "exact", + "name" : "far_id", + "target" : ["scalars", "userMetadata._spgw_far_id37"], + "mask" : null + } + ], "match_type" : "exact", "type" : "simple", - "max_size" : 1024, + "max_size" : 2048, "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [44], - "actions" : ["act_5"], - "base_default_next" : "node_21", + "action_ids" : [50, 51, 52], + "actions" : ["FabricIngress.spgw.load_normal_far", "FabricIngress.spgw.load_tunnel_far", "FabricIngress.spgw.load_dbuf_far"], + "base_default_next" : "tbl_spgw294", "next_tables" : { - "act_5" : "node_21" + "FabricIngress.spgw.load_normal_far" : "tbl_spgw294", + "FabricIngress.spgw.load_tunnel_far" : "tbl_spgw294", + "FabricIngress.spgw.load_dbuf_far" : "tbl_spgw294" }, "default_entry" : { - "action_id" : 44, + "action_id" : 50, "action_const" : true, - "action_data" : [], + "action_data" : ["0x1", "0x0"], "action_entry_const" : true } }, { - "name" : "tbl_act_6", - "id" : 12, + "name" : "tbl_spgw294", + "id" : 22, "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 127, - "column" : 37, + "filename" : "include/control/spgw.p4", + "line" : 294, + "column" : 36, "source_fragment" : "=" }, "key" : [], @@ -13128,45 +18411,39 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [45], - "actions" : ["act_6"], - "base_default_next" : "FabricIngress.filtering.ingress_port_vlan", + "action_ids" : [66], + "actions" : ["spgw294"], + "base_default_next" : "node_41", "next_tables" : { - "act_6" : "FabricIngress.filtering.ingress_port_vlan" + "spgw294" : "node_41" }, "default_entry" : { - "action_id" : 45, + "action_id" : 66, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.filtering.ingress_port_vlan", - "id" : 13, + "name" : "FabricIngress.forwarding.bridging", + "id" : 23, "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 53, + "filename" : "include/control/forwarding.p4", + "line" : 46, "column" : 10, - "source_fragment" : "ingress_port_vlan" + "source_fragment" : "bridging" }, "key" : [ { "match_type" : "exact", - "name" : "ig_port", - "target" : ["standard_metadata", "ingress_port"], - "mask" : null - }, - { - "match_type" : "exact", - "name" : "vlan_is_valid", - "target" : ["vlan_tag", "$valid$"], + "name" : "vlan_id", + "target" : ["scalars", "userMetadata._vlan_id9"], "mask" : null }, { "match_type" : "ternary", - "name" : "vlan_id", - "target" : ["vlan_tag", "vlan_id"], + "name" : "eth_dst", + "target" : ["ethernet", "dst_addr"], "mask" : null } ], @@ -13176,132 +18453,109 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [9, 10, 11], - "actions" : ["FabricIngress.filtering.deny", "FabricIngress.filtering.permit", "FabricIngress.filtering.permit_with_internal_vlan"], - "base_default_next" : "FabricIngress.filtering.fwd_classifier", + "action_ids" : [16, 1], + "actions" : ["FabricIngress.forwarding.set_next_id_bridging", "nop"], + "base_default_next" : "node_48", "next_tables" : { - "FabricIngress.filtering.deny" : "FabricIngress.filtering.fwd_classifier", - "FabricIngress.filtering.permit" : "FabricIngress.filtering.fwd_classifier", - "FabricIngress.filtering.permit_with_internal_vlan" : "FabricIngress.filtering.fwd_classifier" + "FabricIngress.forwarding.set_next_id_bridging" : "node_48", + "nop" : "node_48" }, "default_entry" : { - "action_id" : 9, + "action_id" : 1, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.filtering.fwd_classifier", - "id" : 14, + "name" : "FabricIngress.forwarding.mpls", + "id" : 24, "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 92, + "filename" : "include/control/forwarding.p4", + "line" : 71, "column" : 10, - "source_fragment" : "fwd_classifier" + "source_fragment" : "mpls" }, "key" : [ { "match_type" : "exact", - "name" : "ig_port", - "target" : ["standard_metadata", "ingress_port"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "eth_dst", - "target" : ["ethernet", "dst_addr"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "eth_type", - "target" : ["eth_type", "value"], - "mask" : null - }, - { - "match_type" : "exact", - "name" : "ip_eth_type", - "target" : ["scalars", "fabric_metadata_t._ip_eth_type0"], + "name" : "mpls_label", + "target" : ["scalars", "userMetadata._mpls_label12"], "mask" : null } ], - "match_type" : "ternary", + "match_type" : "exact", "type" : "simple", "max_size" : 1024, "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [12], - "actions" : ["FabricIngress.filtering.set_forwarding_type"], - "base_default_next" : "node_25", + "action_ids" : [17, 2], + "actions" : ["FabricIngress.forwarding.pop_mpls_and_next", "nop"], + "base_default_next" : "node_48", "next_tables" : { - "FabricIngress.filtering.set_forwarding_type" : "node_25" + "FabricIngress.forwarding.pop_mpls_and_next" : "node_48", + "nop" : "node_48" }, "default_entry" : { - "action_id" : 12, + "action_id" : 2, "action_const" : true, - "action_data" : ["0x0"], + "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.forwarding.bridging", - "id" : 15, + "name" : "FabricIngress.forwarding.routing_v4", + "id" : 25, "source_info" : { "filename" : "include/control/forwarding.p4", - "line" : 46, + "line" : 108, "column" : 10, - "source_fragment" : "bridging" + "source_fragment" : "routing_v4" }, "key" : [ { - "match_type" : "exact", - "name" : "vlan_id", - "target" : ["scalars", "fabric_metadata_t._vlan_id1"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "eth_dst", - "target" : ["ethernet", "dst_addr"], + "match_type" : "lpm", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._ipv4_dst_addr24"], "mask" : null } ], - "match_type" : "ternary", + "match_type" : "lpm", "type" : "simple", "max_size" : 1024, - "with_counters" : true, + "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [13, 1], - "actions" : ["FabricIngress.forwarding.set_next_id_bridging", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "action_ids" : [18, 19, 3], + "actions" : ["FabricIngress.forwarding.set_next_id_routing_v4", "FabricIngress.forwarding.nop_routing_v4", "nop"], + "base_default_next" : "node_48", "next_tables" : { - "FabricIngress.forwarding.set_next_id_bridging" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.set_next_id_routing_v4" : "node_48", + "FabricIngress.forwarding.nop_routing_v4" : "node_48", + "nop" : "node_48" }, "default_entry" : { - "action_id" : 1, - "action_const" : true, + "action_id" : 3, + "action_const" : false, "action_data" : [], - "action_entry_const" : true + "action_entry_const" : false } }, { - "name" : "FabricIngress.forwarding.mpls", - "id" : 16, + "name" : "FabricIngress.pre_next.next_mpls", + "id" : 26, "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 71, + "filename" : "include/control/pre_next.p4", + "line" : 36, "column" : 10, - "source_fragment" : "mpls" + "source_fragment" : "next_mpls" }, "key" : [ { "match_type" : "exact", - "name" : "mpls_label", - "target" : ["scalars", "fabric_metadata_t._mpls_label4"], + "name" : "next_id", + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], @@ -13311,64 +18565,63 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [14, 2], - "actions" : ["FabricIngress.forwarding.pop_mpls_and_next", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "action_ids" : [20, 4], + "actions" : ["FabricIngress.pre_next.set_mpls_label", "nop"], + "base_default_next" : "FabricIngress.pre_next.next_vlan", "next_tables" : { - "FabricIngress.forwarding.pop_mpls_and_next" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.pre_next.set_mpls_label" : "FabricIngress.pre_next.next_vlan", + "nop" : "FabricIngress.pre_next.next_vlan" }, "default_entry" : { - "action_id" : 2, + "action_id" : 4, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.forwarding.routing_v4", - "id" : 17, + "name" : "FabricIngress.pre_next.next_vlan", + "id" : 27, "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 108, + "filename" : "include/control/pre_next.p4", + "line" : 73, "column" : 10, - "source_fragment" : "routing_v4" + "source_fragment" : "next_vlan" }, "key" : [ { - "match_type" : "lpm", - "name" : "ipv4_dst", - "target" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"], + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], - "match_type" : "lpm", + "match_type" : "exact", "type" : "simple", "max_size" : 1024, - "with_counters" : false, + "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [15, 16, 3], - "actions" : ["FabricIngress.forwarding.set_next_id_routing_v4", "FabricIngress.forwarding.nop_routing_v4", "nop"], + "action_ids" : [21, 5], + "actions" : ["FabricIngress.pre_next.set_vlan", "nop"], "base_default_next" : "FabricIngress.acl.acl", "next_tables" : { - "FabricIngress.forwarding.set_next_id_routing_v4" : "FabricIngress.acl.acl", - "FabricIngress.forwarding.nop_routing_v4" : "FabricIngress.acl.acl", + "FabricIngress.pre_next.set_vlan" : "FabricIngress.acl.acl", "nop" : "FabricIngress.acl.acl" }, "default_entry" : { - "action_id" : 3, - "action_const" : false, + "action_id" : 5, + "action_const" : true, "action_data" : [], - "action_entry_const" : false + "action_entry_const" : true } }, { "name" : "FabricIngress.acl.acl", - "id" : 18, + "id" : 28, "source_info" : { "filename" : "include/control/acl.p4", - "line" : 60, + "line" : 59, "column" : 10, "source_fragment" : "acl" }, @@ -13379,24 +18632,6 @@ "target" : ["standard_metadata", "ingress_port"], "mask" : null }, - { - "match_type" : "ternary", - "name" : "ip_proto", - "target" : ["scalars", "fabric_metadata_t._ip_proto12"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "l4_sport", - "target" : ["scalars", "fabric_metadata_t._l4_sport13"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "l4_dport", - "target" : ["scalars", "fabric_metadata_t._l4_dport14"], - "mask" : null - }, { "match_type" : "ternary", "name" : "eth_dst", @@ -13424,13 +18659,19 @@ { "match_type" : "ternary", "name" : "ipv4_src", - "target" : ["ipv4", "src_addr"], + "target" : ["scalars", "userMetadata._lkp_ipv4_src1"], "mask" : null }, { "match_type" : "ternary", "name" : "ipv4_dst", - "target" : ["ipv4", "dst_addr"], + "target" : ["scalars", "userMetadata._lkp_ipv4_dst2"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._lkp_ip_proto3"], "mask" : null }, { @@ -13444,6 +18685,24 @@ "name" : "icmp_code", "target" : ["icmp", "icmp_code"], "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._lkp_l4_sport4"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._lkp_l4_dport5"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "port_type", + "target" : ["scalars", "userMetadata._port_type54"], + "mask" : null } ], "match_type" : "ternary", @@ -13452,18 +18711,18 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [17, 18, 19, 20, 21], + "action_ids" : [22, 23, 24, 25, 26], "actions" : ["FabricIngress.acl.set_next_id_acl", "FabricIngress.acl.punt_to_cpu", "FabricIngress.acl.set_clone_session_id", "FabricIngress.acl.drop", "FabricIngress.acl.nop_acl"], - "base_default_next" : "node_33", + "base_default_next" : "node_52", "next_tables" : { - "FabricIngress.acl.set_next_id_acl" : "node_33", - "FabricIngress.acl.punt_to_cpu" : "node_33", - "FabricIngress.acl.set_clone_session_id" : "node_33", - "FabricIngress.acl.drop" : "node_33", - "FabricIngress.acl.nop_acl" : "node_33" + "FabricIngress.acl.set_next_id_acl" : "node_52", + "FabricIngress.acl.punt_to_cpu" : "node_52", + "FabricIngress.acl.set_clone_session_id" : "node_52", + "FabricIngress.acl.drop" : "node_52", + "FabricIngress.acl.nop_acl" : "node_52" }, "default_entry" : { - "action_id" : 21, + "action_id" : 26, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -13471,10 +18730,10 @@ }, { "name" : "FabricIngress.next.xconnect", - "id" : 19, + "id" : 29, "source_info" : { "filename" : "include/control/next.p4", - "line" : 119, + "line" : 68, "column" : 10, "source_fragment" : "xconnect" }, @@ -13488,7 +18747,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id9"], + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], @@ -13498,7 +18757,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [23, 24, 5], + "action_ids" : [27, 28, 6], "actions" : ["FabricIngress.next.output_xconnect", "FabricIngress.next.set_next_id_xconnect", "nop"], "base_default_next" : "FabricIngress.next.hashed", "next_tables" : { @@ -13507,7 +18766,7 @@ "nop" : "FabricIngress.next.hashed" }, "default_entry" : { - "action_id" : 5, + "action_id" : 6, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -13515,10 +18774,10 @@ }, { "name" : "FabricIngress.next.hashed", - "id" : 20, + "id" : 30, "source_info" : { "filename" : "include/control/next.p4", - "line" : 202, + "line" : 138, "column" : 10, "source_fragment" : "hashed" }, @@ -13526,7 +18785,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id9"], + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], @@ -13537,67 +18796,29 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [25, 26, 27, 6], - "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "FabricIngress.next.mpls_routing_hashed", "nop"], + "action_ids" : [29, 30, 7], + "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "nop"], "base_default_next" : "FabricIngress.next.multicast", "next_tables" : { "FabricIngress.next.output_hashed" : "FabricIngress.next.multicast", - "FabricIngress.next.routing_hashed" : "FabricIngress.next.multicast", - "FabricIngress.next.mpls_routing_hashed" : "FabricIngress.next.multicast", - "nop" : "FabricIngress.next.multicast" - } - }, - { - "name" : "FabricIngress.next.multicast", - "id" : 21, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 236, - "column" : 10, - "source_fragment" : "multicast" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id9"], - "mask" : null - } - ], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [28, 7], - "actions" : ["FabricIngress.next.set_mcast_group_id", "nop"], - "base_default_next" : "FabricIngress.next.next_vlan", - "next_tables" : { - "FabricIngress.next.set_mcast_group_id" : "FabricIngress.next.next_vlan", - "nop" : "FabricIngress.next.next_vlan" - }, - "default_entry" : { - "action_id" : 7, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true + "FabricIngress.next.routing_hashed" : "FabricIngress.next.multicast", + "nop" : "FabricIngress.next.multicast" } }, { - "name" : "FabricIngress.next.next_vlan", - "id" : 22, + "name" : "FabricIngress.next.multicast", + "id" : 31, "source_info" : { "filename" : "include/control/next.p4", - "line" : 86, + "line" : 171, "column" : 10, - "source_fragment" : "next_vlan" + "source_fragment" : "multicast" }, "key" : [ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id9"], + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], @@ -13607,23 +18828,23 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [22, 4], - "actions" : ["FabricIngress.next.set_vlan", "nop"], - "base_default_next" : "node_38", + "action_ids" : [31, 8], + "actions" : ["FabricIngress.next.set_mcast_group_id", "nop"], + "base_default_next" : "node_56", "next_tables" : { - "FabricIngress.next.set_vlan" : "node_38", - "nop" : "node_38" + "FabricIngress.next.set_mcast_group_id" : "node_56", + "nop" : "node_56" }, "default_entry" : { - "action_id" : 4, + "action_id" : 8, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_7", - "id" : 23, + "name" : "tbl_port_counter31", + "id" : 32, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 31, @@ -13637,22 +18858,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [46], - "actions" : ["act_7"], - "base_default_next" : "node_40", + "action_ids" : [67], + "actions" : ["port_counter31"], + "base_default_next" : "node_58", "next_tables" : { - "act_7" : "node_40" + "port_counter31" : "node_58" }, "default_entry" : { - "action_id" : 46, + "action_id" : 67, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_8", - "id" : 24, + "name" : "tbl_port_counter34", + "id" : 33, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 34, @@ -13666,14 +18887,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [47], - "actions" : ["act_8"], + "action_ids" : [68], + "actions" : ["port_counter34"], "base_default_next" : "FabricIngress.process_set_source_sink.tb_set_source", "next_tables" : { - "act_8" : "FabricIngress.process_set_source_sink.tb_set_source" + "port_counter34" : "FabricIngress.process_set_source_sink.tb_set_source" }, "default_entry" : { - "action_id" : 47, + "action_id" : 68, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -13681,7 +18902,7 @@ }, { "name" : "FabricIngress.process_set_source_sink.tb_set_source", - "id" : 25, + "id" : 34, "source_info" : { "filename" : "include/int/int_main.p4", "line" : 46, @@ -13702,12 +18923,12 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [8, 0], + "action_ids" : [11, 0], "actions" : ["FabricIngress.process_set_source_sink.int_set_source", "nop"], - "base_default_next" : null, + "base_default_next" : "tbl_slicing114", "next_tables" : { - "FabricIngress.process_set_source_sink.int_set_source" : null, - "nop" : null + "FabricIngress.process_set_source_sink.int_set_source" : "tbl_slicing114", + "nop" : "tbl_slicing114" }, "default_entry" : { "action_id" : 0, @@ -13715,6 +18936,84 @@ "action_data" : [], "action_entry_const" : true } + }, + { + "name" : "tbl_slicing114", + "id" : 35, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 8, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) slice_tc, fabric_md.packet_color); ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [69], + "actions" : ["slicing114"], + "base_default_next" : "FabricIngress.qos.queues", + "next_tables" : { + "slicing114" : "FabricIngress.qos.queues" + }, + "default_entry" : { + "action_id" : 69, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.qos.queues", + "id" : 36, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 93, + "column" : 10, + "source_fragment" : "queues" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "slice_id", + "target" : ["scalars", "userMetadata._slice_id25"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "tc", + "target" : ["scalars", "userMetadata._tc27"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "color", + "target" : ["scalars", "userMetadata._packet_color26"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 128, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [34, 35], + "actions" : ["FabricIngress.qos.set_queue", "FabricIngress.qos.meter_drop"], + "base_default_next" : null, + "next_tables" : { + "FabricIngress.qos.set_queue" : null, + "FabricIngress.qos.meter_drop" : null + }, + "default_entry" : { + "action_id" : 34, + "action_const" : true, + "action_data" : ["0x0"], + "action_entry_const" : true + } } ], "action_profiles" : [ @@ -13723,7 +19022,7 @@ "id" : 0, "source_info" : { "filename" : "include/control/next.p4", - "line" : 183, + "line" : 125, "column" : 57, "source_fragment" : "hashed_selector" }, @@ -13733,23 +19032,23 @@ "input" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] + "value" : ["scalars", "userMetadata._ip_proto20"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "userMetadata._l4_dport22"] } ] } @@ -13757,8 +19056,192 @@ ], "conditionals" : [ { - "name" : "node_2", + "name" : "node_3", "id" : 0, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 31, + "column" : 12, + "source_fragment" : "hdr.inner_ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init32", + "false_next" : "node_11" + }, + { + "name" : "node_5", + "id" : 1, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 36, + "column" : 16, + "source_fragment" : "hdr.inner_tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_tcp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init37", + "false_next" : "node_7" + }, + { + "name" : "node_7", + "id" : 2, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 39, + "column" : 23, + "source_fragment" : "hdr.inner_udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_udp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init40", + "false_next" : "node_9" + }, + { + "name" : "node_9", + "id" : 3, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 42, + "column" : 23, + "source_fragment" : "hdr.inner_icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_icmp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init43", + "false_next" : "node_19" + }, + { + "name" : "node_11", + "id" : 4, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 46, + "column" : 19, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init47", + "false_next" : "node_19" + }, + { + "name" : "node_13", + "id" : 5, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 51, + "column" : 16, + "source_fragment" : "hdr.tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["tcp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init52", + "false_next" : "node_15" + }, + { + "name" : "node_15", + "id" : 6, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 54, + "column" : 23, + "source_fragment" : "hdr.udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["udp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init55", + "false_next" : "node_17" + }, + { + "name" : "node_17", + "id" : 7, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 57, + "column" : 23, + "source_fragment" : "hdr.icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["icmp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init58", + "false_next" : "node_19" + }, + { + "name" : "node_19", + "id" : 8, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 24, @@ -13776,45 +19259,71 @@ } } }, - "true_next" : "tbl_act", - "false_next" : "tbl_act_0" + "true_next" : "tbl_packetio25", + "false_next" : "FabricIngress.slice_tc_classifier.classifier" }, { - "name" : "node_6", - "id" : 1, + "name" : "node_22", + "id" : 9, "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 249, + "filename" : "include/control/filtering.p4", + "line" : 112, "column" : 12, - "source_fragment" : "fabric_md.spgw.skip_spgw == true" + "source_fragment" : "hdr.vlan_tag.isValid()" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["vlan_tag", "$valid$"] + } + } + }, + "true_next" : "tbl_filtering113", + "false_next" : "node_24" + }, + { + "name" : "node_24", + "id" : 10, + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 124, + "column" : 12, + "source_fragment" : "!hdr.mpls.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_skip_spgw28"] + "value" : ["mpls", "$valid$"] } } - }, - "right" : { - "type" : "bool", - "value" : true } } }, - "true_next" : "tbl_act_1", - "false_next" : "node_8" - }, - { - "name" : "node_8", - "id" : 2, + "true_next" : "tbl_filtering129", + "false_next" : "FabricIngress.filtering.ingress_port_vlan" + }, + { + "name" : "node_28", + "id" : 11, + "source_info" : { + "filename" : "fabric.p4", + "line" : 76, + "column" : 12, + "source_fragment" : "fabric_metadata.skip_forwarding" + }, "expression" : { "type" : "expression", "value" : { @@ -13827,112 +19336,98 @@ "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "spgw_ingress_hasReturned"] + "value" : ["scalars", "userMetadata._skip_forwarding14"] } } } } }, - "true_next" : "node_9", - "false_next" : "node_19" + "true_next" : "FabricIngress.spgw.interfaces", + "false_next" : "node_41" }, { - "name" : "node_9", - "id" : 3, + "name" : "node_30", + "id" : 12, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 253, - "column" : 12, - "source_fragment" : "hdr.gtpu.isValid()" + "line" : 267, + "column" : 16, + "source_fragment" : "fabric_md.spgw.src_iface == SPGW_IFACE_FROM_DBUF" }, "expression" : { "type" : "expression", "value" : { - "op" : "d2b", - "left" : null, - "right" : { + "op" : "==", + "left" : { "type" : "field", - "value" : ["gtpu", "$valid$"] + "value" : ["scalars", "userMetadata._spgw_src_iface38"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" } } }, - "true_next" : "FabricIngress.spgw_ingress.uplink_pdr_lookup", - "false_next" : "FabricIngress.spgw_ingress.downlink_pdr_lookup" + "true_next" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_gtpu", + "false_next" : "node_32" }, { - "name" : "node_13", - "id" : 4, + "name" : "node_32", + "id" : 13, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 266, - "column" : 12, - "source_fragment" : "fabric_md.spgw.needs_gtpu_decap == true" + "line" : 271, + "column" : 16, + "source_fragment" : "hdr.gtpu.isValid()" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_decap33"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["gtpu", "$valid$"] } } }, - "true_next" : "FabricIngress.spgw_ingress.decap_gtpu", - "false_next" : "FabricIngress.spgw_ingress.far_lookup" + "true_next" : "FabricIngress.spgw.uplink_pdrs", + "false_next" : "FabricIngress.spgw.downlink_pdrs" }, { - "name" : "node_16", - "id" : 5, + "name" : "node_35", + "id" : 14, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 277, - "column" : 12, - "source_fragment" : "fabric_md.spgw.far_dropped == true" + "line" : 276, + "column" : 16, + "source_fragment" : "fabric_md.spgw.src_iface != SPGW_IFACE_FROM_DBUF" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", + "op" : "!=", "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_dropped30"] - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_src_iface38"] }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0x03" } } }, - "true_next" : "tbl_act_3", - "false_next" : "tbl_act_4" + "true_next" : "tbl_spgw277", + "false_next" : "node_37" }, { - "name" : "node_19", - "id" : 6, + "name" : "node_37", + "id" : 15, "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 110, - "column" : 12, - "source_fragment" : "hdr.vlan_tag.isValid()" + "filename" : "fabric.p4", + "line" : 77, + "column" : 28, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", @@ -13941,21 +19436,21 @@ "left" : null, "right" : { "type" : "field", - "value" : ["vlan_tag", "$valid$"] + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap43"] } } }, - "true_next" : "tbl_act_5", - "false_next" : "node_21" + "true_next" : "FabricIngress.spgw.decap_gtpu.decap_gtpu", + "false_next" : "FabricIngress.spgw.fars" }, { - "name" : "node_21", - "id" : 7, + "name" : "node_41", + "id" : 16, "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 122, + "filename" : "fabric.p4", + "line" : 80, "column" : 12, - "source_fragment" : "!hdr.mpls.isValid()" + "source_fragment" : "fabric_metadata.skip_forwarding" }, "expression" : { "type" : "expression", @@ -13969,51 +19464,18 @@ "left" : null, "right" : { "type" : "field", - "value" : ["mpls", "$valid$"] - } - } - } - } - }, - "true_next" : "tbl_act_6", - "false_next" : "FabricIngress.filtering.ingress_port_vlan" - }, - { - "name" : "node_25", - "id" : 8, - "source_info" : { - "filename" : "fabric.p4", - "line" : 69, - "column" : 12, - "source_fragment" : "fabric_metadata.skip_forwarding == false" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_forwarding6"] + "value" : ["scalars", "userMetadata._skip_forwarding14"] } } - }, - "right" : { - "type" : "bool", - "value" : false } } }, - "true_next" : "node_26", - "false_next" : "FabricIngress.acl.acl" + "true_next" : "node_42", + "false_next" : "node_48" }, { - "name" : "node_26", - "id" : 9, + "name" : "node_42", + "id" : 17, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 150, @@ -14026,7 +19488,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -14035,11 +19497,11 @@ } }, "true_next" : "FabricIngress.forwarding.bridging", - "false_next" : "node_28" + "false_next" : "node_44" }, { - "name" : "node_28", - "id" : 10, + "name" : "node_44", + "id" : 18, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 151, @@ -14052,7 +19514,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -14061,11 +19523,11 @@ } }, "true_next" : "FabricIngress.forwarding.mpls", - "false_next" : "node_30" + "false_next" : "node_46" }, { - "name" : "node_30", - "id" : 11, + "name" : "node_46", + "id" : 19, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 152, @@ -14078,7 +19540,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -14087,44 +19549,71 @@ } }, "true_next" : "FabricIngress.forwarding.routing_v4", - "false_next" : "FabricIngress.acl.acl" + "false_next" : "node_48" }, { - "name" : "node_33", - "id" : 12, + "name" : "node_48", + "id" : 20, "source_info" : { "filename" : "fabric.p4", - "line" : 73, + "line" : 83, "column" : 12, - "source_fragment" : "fabric_metadata.skip_next == false" + "source_fragment" : "fabric_metadata.skip_next" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["scalars", "userMetadata._skip_next15"] } } - }, + } + } + }, + "true_next" : "FabricIngress.pre_next.next_mpls", + "false_next" : "FabricIngress.acl.acl" + }, + { + "name" : "node_52", + "id" : 21, + "source_info" : { + "filename" : "fabric.p4", + "line" : 87, + "column" : 12, + "source_fragment" : "fabric_metadata.skip_next" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "not", + "left" : null, "right" : { - "type" : "bool", - "value" : false + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + } + } } } }, - "false_next" : null, - "true_next" : "FabricIngress.next.xconnect" + "true_next" : "FabricIngress.next.xconnect", + "false_next" : "tbl_slicing114" }, { - "name" : "node_38", - "id" : 13, + "name" : "node_56", + "id" : 22, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 30, @@ -14145,12 +19634,12 @@ } } }, - "true_next" : "tbl_act_7", - "false_next" : "node_40" + "true_next" : "tbl_port_counter31", + "false_next" : "node_58" }, { - "name" : "node_40", - "id" : 14, + "name" : "node_58", + "id" : 23, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 33, @@ -14171,7 +19660,7 @@ } } }, - "true_next" : "tbl_act_8", + "true_next" : "tbl_port_counter34", "false_next" : "FabricIngress.process_set_source_sink.tb_set_source" } ] @@ -14181,15 +19670,15 @@ "id" : 1, "source_info" : { "filename" : "fabric.p4", - "line" : 91, + "line" : 105, "column" : 8, "source_fragment" : "FabricEgress" }, - "init_table" : "node_45", + "init_table" : "node_65", "tables" : [ { - "name" : "tbl_act_9", - "id" : 26, + "name" : "tbl_packetio41", + "id" : 37, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 41, @@ -14203,22 +19692,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [92], - "actions" : ["act_9"], - "base_default_next" : "node_47", + "action_ids" : [118], + "actions" : ["packetio41"], + "base_default_next" : "node_67", "next_tables" : { - "act_9" : "node_47" + "packetio41" : "node_67" }, "default_entry" : { - "action_id" : 92, + "action_id" : 118, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_10", - "id" : 27, + "name" : "tbl_packetio44", + "id" : 38, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 44, @@ -14232,25 +19721,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [93], - "actions" : ["act_10"], - "base_default_next" : "node_49", + "action_ids" : [119], + "actions" : ["packetio44"], + "base_default_next" : "node_69", "next_tables" : { - "act_10" : "node_49" + "packetio44" : "node_69" }, "default_entry" : { - "action_id" : 93, + "action_id" : 119, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_11", - "id" : 28, + "name" : "tbl_next283", + "id" : 39, "source_info" : { "filename" : "include/control/next.p4", - "line" : 337, + "line" : 283, "column" : 12, "source_fragment" : "mark_to_drop(standard_metadata)" }, @@ -14258,126 +19747,31 @@ "match_type" : "exact", "type" : "simple", "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [94], - "actions" : ["act_11"], - "base_default_next" : "node_51", - "next_tables" : { - "act_11" : "node_51" - }, - "default_entry" : { - "action_id" : 94, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_egress_next_pop_mpls_if_present", - "id" : 29, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 341, - "column" : 36, - "source_fragment" : "pop_mpls_if_present()" - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [87], - "actions" : ["FabricEgress.egress_next.pop_mpls_if_present"], - "base_default_next" : "FabricEgress.egress_next.egress_vlan", - "next_tables" : { - "FabricEgress.egress_next.pop_mpls_if_present" : "FabricEgress.egress_next.egress_vlan" - }, - "default_entry" : { - "action_id" : 87, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_egress_next_set_mpls", - "id" : 30, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 343, - "column" : 12, - "source_fragment" : "set_mpls()" - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [88], - "actions" : ["FabricEgress.egress_next.set_mpls"], - "base_default_next" : "FabricEgress.egress_next.egress_vlan", - "next_tables" : { - "FabricEgress.egress_next.set_mpls" : "FabricEgress.egress_next.egress_vlan" - }, - "default_entry" : { - "action_id" : 88, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "FabricEgress.egress_next.egress_vlan", - "id" : 31, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 320, - "column" : 10, - "source_fragment" : "egress_vlan" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "vlan_id", - "target" : ["scalars", "fabric_metadata_t._vlan_id1"], - "mask" : null - }, - { - "match_type" : "exact", - "name" : "eg_port", - "target" : ["standard_metadata", "egress_port"], - "mask" : null - } - ], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : true, + "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [90, 50], - "actions" : ["FabricEgress.egress_next.pop_vlan", "nop"], - "base_default_next" : null, + "action_ids" : [120], + "actions" : ["next283"], + "base_default_next" : "node_71", "next_tables" : { - "__HIT__" : "tbl_act_12", - "__MISS__" : "tbl_act_13" + "next283" : "node_71" }, "default_entry" : { - "action_id" : 50, + "action_id" : 120, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_12", - "id" : 32, + "name" : "tbl_egress_next_pop_mpls_if_present", + "id" : 40, + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 287, + "column" : 36, + "source_fragment" : "pop_mpls_if_present()" + }, "key" : [], "match_type" : "exact", "type" : "simple", @@ -14385,22 +19779,28 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [95], - "actions" : ["act_12"], - "base_default_next" : "node_58", + "action_ids" : [109], + "actions" : ["FabricEgress.egress_next.pop_mpls_if_present"], + "base_default_next" : "FabricEgress.egress_next.egress_vlan", "next_tables" : { - "act_12" : "node_58" + "FabricEgress.egress_next.pop_mpls_if_present" : "FabricEgress.egress_next.egress_vlan" }, "default_entry" : { - "action_id" : 95, + "action_id" : 109, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_13", - "id" : 33, + "name" : "tbl_egress_next_set_mpls", + "id" : 41, + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 289, + "column" : 12, + "source_fragment" : "set_mpls()" + }, "key" : [], "match_type" : "exact", "type" : "simple", @@ -14408,54 +19808,69 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [96], - "actions" : ["act_13"], - "base_default_next" : "node_58", + "action_ids" : [110], + "actions" : ["FabricEgress.egress_next.set_mpls"], + "base_default_next" : "FabricEgress.egress_next.egress_vlan", "next_tables" : { - "act_13" : "node_58" + "FabricEgress.egress_next.set_mpls" : "FabricEgress.egress_next.egress_vlan" }, "default_entry" : { - "action_id" : 96, + "action_id" : 110, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_egress_next_push_vlan", - "id" : 34, + "name" : "FabricEgress.egress_next.egress_vlan", + "id" : 42, "source_info" : { "filename" : "include/control/next.p4", - "line" : 360, - "column" : 20, - "source_fragment" : "push_vlan()" + "line" : 265, + "column" : 10, + "source_fragment" : "egress_vlan" }, - "key" : [], + "key" : [ + { + "match_type" : "exact", + "name" : "vlan_id", + "target" : ["scalars", "userMetadata._vlan_id9"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "eg_port", + "target" : ["standard_metadata", "egress_port"], + "mask" : null + } + ], "match_type" : "exact", "type" : "simple", "max_size" : 1024, - "with_counters" : false, + "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [89], - "actions" : ["FabricEgress.egress_next.push_vlan"], - "base_default_next" : "node_61", + "action_ids" : [111, 112, 113], + "actions" : ["FabricEgress.egress_next.push_vlan", "FabricEgress.egress_next.pop_vlan", "FabricEgress.egress_next.drop"], + "base_default_next" : "node_76", "next_tables" : { - "FabricEgress.egress_next.push_vlan" : "node_61" + "FabricEgress.egress_next.push_vlan" : "node_76", + "FabricEgress.egress_next.pop_vlan" : "node_76", + "FabricEgress.egress_next.drop" : "node_76" }, "default_entry" : { - "action_id" : 89, + "action_id" : 113, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_14", - "id" : 35, + "name" : "tbl_next309", + "id" : 43, "source_info" : { "filename" : "include/control/next.p4", - "line" : 369, + "line" : 309, "column" : 25, "source_fragment" : "=" }, @@ -14466,25 +19881,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [98], - "actions" : ["act_15"], - "base_default_next" : "node_63", + "action_ids" : [122], + "actions" : ["next309"], + "base_default_next" : "node_78", "next_tables" : { - "act_15" : "node_63" + "next309" : "node_78" }, "default_entry" : { - "action_id" : 98, + "action_id" : 122, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_15", - "id" : 36, + "name" : "tbl_next310", + "id" : 44, "source_info" : { "filename" : "include/control/next.p4", - "line" : 370, + "line" : 310, "column" : 35, "source_fragment" : "mark_to_drop(standard_metadata)" }, @@ -14495,25 +19910,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [97], - "actions" : ["act_14"], - "base_default_next" : "tbl_act_18", + "action_ids" : [121], + "actions" : ["next310"], + "base_default_next" : "node_84", "next_tables" : { - "act_14" : "tbl_act_18" + "next310" : "node_84" }, "default_entry" : { - "action_id" : 97, + "action_id" : 121, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_16", - "id" : 37, + "name" : "tbl_next313", + "id" : 45, "source_info" : { "filename" : "include/control/next.p4", - "line" : 373, + "line" : 313, "column" : 29, "source_fragment" : "=" }, @@ -14524,25 +19939,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [100], - "actions" : ["act_17"], - "base_default_next" : "node_67", + "action_ids" : [124], + "actions" : ["next313"], + "base_default_next" : "node_82", "next_tables" : { - "act_17" : "node_67" + "next313" : "node_82" }, "default_entry" : { - "action_id" : 100, + "action_id" : 124, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_17", - "id" : 38, + "name" : "tbl_next314", + "id" : 46, "source_info" : { "filename" : "include/control/next.p4", - "line" : 374, + "line" : 314, "column" : 39, "source_fragment" : "mark_to_drop(standard_metadata)" }, @@ -14553,50 +19968,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [99], - "actions" : ["act_16"], - "base_default_next" : "tbl_act_18", - "next_tables" : { - "act_16" : "tbl_act_18" - }, - "default_entry" : { - "action_id" : 99, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_18", - "id" : 39, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [102], - "actions" : ["act_19"], - "base_default_next" : "node_70", + "action_ids" : [123], + "actions" : ["next314"], + "base_default_next" : "node_84", "next_tables" : { - "act_19" : "node_70" + "next314" : "node_84" }, "default_entry" : { - "action_id" : 102, + "action_id" : 123, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_19", - "id" : 40, + "name" : "tbl_spgw_gtpu_encap_qfi", + "id" : 47, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 343, - "column" : 46, - "source_fragment" : "return" + "line" : 371, + "column" : 20, + "source_fragment" : "gtpu_encap_qfi()" }, "key" : [], "match_type" : "exact", @@ -14605,27 +19997,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [101], - "actions" : ["act_18"], - "base_default_next" : "node_72", + "action_ids" : [117], + "actions" : ["FabricEgress.spgw.gtpu_encap_qfi"], + "base_default_next" : "node_89", "next_tables" : { - "act_18" : "node_72" + "FabricEgress.spgw.gtpu_encap_qfi" : "node_89" }, "default_entry" : { - "action_id" : 101, + "action_id" : 117, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_20", - "id" : 41, + "name" : "tbl_spgw_gtpu_encap", + "id" : 48, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 344, - "column" : 8, - "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" + "line" : 373, + "column" : 20, + "source_fragment" : "gtpu_encap()" }, "key" : [], "match_type" : "exact", @@ -14634,27 +20026,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [103], - "actions" : ["act_20"], - "base_default_next" : "node_74", + "action_ids" : [116], + "actions" : ["FabricEgress.spgw.gtpu_encap"], + "base_default_next" : "node_89", "next_tables" : { - "act_20" : "node_74" + "FabricEgress.spgw.gtpu_encap" : "node_89" }, "default_entry" : { - "action_id" : 103, + "action_id" : 116, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_spgw_egress_gtpu_encap", - "id" : 42, + "name" : "tbl_spgw377", + "id" : 49, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 347, - "column" : 12, - "source_fragment" : "gtpu_encap()" + "line" : 377, + "column" : 16, + "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" }, "key" : [], "match_type" : "exact", @@ -14663,14 +20055,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [91], - "actions" : ["FabricEgress.spgw_egress.gtpu_encap"], - "base_default_next" : "node_76", + "action_ids" : [125], + "actions" : ["spgw377"], + "base_default_next" : "node_91", "next_tables" : { - "FabricEgress.spgw_egress.gtpu_encap" : "node_76" + "spgw377" : "node_91" }, "default_entry" : { - "action_id" : 91, + "action_id" : 125, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -14678,7 +20070,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_source.tb_int_source", - "id" : 43, + "id" : 50, "source_info" : { "filename" : "include/int/int_source.p4", "line" : 66, @@ -14701,13 +20093,13 @@ { "match_type" : "ternary", "name" : "l4_sport", - "target" : ["scalars", "fabric_metadata_t._l4_sport13"], + "target" : ["scalars", "userMetadata._l4_sport21"], "mask" : null }, { "match_type" : "ternary", "name" : "l4_dport", - "target" : ["scalars", "fabric_metadata_t._l4_dport14"], + "target" : ["scalars", "userMetadata._l4_dport22"], "mask" : null } ], @@ -14717,23 +20109,23 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [53, 48], + "action_ids" : [75, 70], "actions" : ["FabricEgress.process_int_main.process_int_source.int_source_dscp", "nop"], - "base_default_next" : "node_79", + "base_default_next" : "node_94", "next_tables" : { - "FabricEgress.process_int_main.process_int_source.int_source_dscp" : "node_79", - "nop" : "node_79" + "FabricEgress.process_int_main.process_int_source.int_source_dscp" : "node_94", + "nop" : "node_94" }, "default_entry" : { - "action_id" : 48, + "action_id" : 70, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_21", - "id" : 44, + "name" : "tbl_act", + "id" : 51, "key" : [], "match_type" : "exact", "type" : "simple", @@ -14741,14 +20133,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [104], - "actions" : ["act_21"], + "action_ids" : [126], + "actions" : ["act"], "base_default_next" : "FabricEgress.process_int_main.process_int_transit.tb_int_insert", "next_tables" : { - "act_21" : "FabricEgress.process_int_main.process_int_transit.tb_int_insert" + "act" : "FabricEgress.process_int_main.process_int_transit.tb_int_insert" }, "default_entry" : { - "action_id" : 104, + "action_id" : 126, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -14756,7 +20148,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.tb_int_insert", - "id" : 45, + "id" : 52, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 315, @@ -14777,23 +20169,23 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [54, 49], + "action_ids" : [76, 71], "actions" : ["FabricEgress.process_int_main.process_int_transit.init_metadata", "nop"], - "base_default_next" : "node_82", + "base_default_next" : "node_97", "next_tables" : { - "FabricEgress.process_int_main.process_int_transit.init_metadata" : "node_82", - "nop" : "node_82" + "FabricEgress.process_int_main.process_int_transit.init_metadata" : "node_97", + "nop" : "node_97" }, "default_entry" : { - "action_id" : 49, + "action_id" : 71, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_22", - "id" : 46, + "name" : "tbl_int_transit420", + "id" : 53, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 420, @@ -14807,14 +20199,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [105], - "actions" : ["act_22"], - "base_default_next" : "node_84", + "action_ids" : [127], + "actions" : ["int_transit420"], + "base_default_next" : "node_99", "next_tables" : { - "act_22" : "node_84" + "int_transit420" : "node_99" }, "default_entry" : { - "action_id" : 105, + "action_id" : 127, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -14822,7 +20214,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0003", - "id" : 47, + "id" : 54, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 331, @@ -14843,7 +20235,7 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 51], + "action_ids" : [77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 73], "actions" : ["FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i0", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i1", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i2", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i3", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i4", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i5", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i6", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i7", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i8", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i9", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i10", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i11", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i12", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i13", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i14", "FabricEgress.process_int_main.process_int_transit.int_set_header_0003_i15", "NoAction"], "base_default_next" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0407", "next_tables" : { @@ -14866,7 +20258,7 @@ "NoAction" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0407" }, "default_entry" : { - "action_id" : 51, + "action_id" : 73, "action_const" : false, "action_data" : [], "action_entry_const" : false @@ -14886,7 +20278,7 @@ } ], "action_entry" : { - "action_id" : 55, + "action_id" : 77, "action_data" : [] }, "priority" : 1 @@ -14905,7 +20297,7 @@ } ], "action_entry" : { - "action_id" : 56, + "action_id" : 78, "action_data" : [] }, "priority" : 2 @@ -14924,7 +20316,7 @@ } ], "action_entry" : { - "action_id" : 57, + "action_id" : 79, "action_data" : [] }, "priority" : 3 @@ -14943,7 +20335,7 @@ } ], "action_entry" : { - "action_id" : 58, + "action_id" : 80, "action_data" : [] }, "priority" : 4 @@ -14962,7 +20354,7 @@ } ], "action_entry" : { - "action_id" : 59, + "action_id" : 81, "action_data" : [] }, "priority" : 5 @@ -14981,7 +20373,7 @@ } ], "action_entry" : { - "action_id" : 60, + "action_id" : 82, "action_data" : [] }, "priority" : 6 @@ -15000,7 +20392,7 @@ } ], "action_entry" : { - "action_id" : 61, + "action_id" : 83, "action_data" : [] }, "priority" : 7 @@ -15019,7 +20411,7 @@ } ], "action_entry" : { - "action_id" : 62, + "action_id" : 84, "action_data" : [] }, "priority" : 8 @@ -15038,7 +20430,7 @@ } ], "action_entry" : { - "action_id" : 63, + "action_id" : 85, "action_data" : [] }, "priority" : 9 @@ -15057,7 +20449,7 @@ } ], "action_entry" : { - "action_id" : 64, + "action_id" : 86, "action_data" : [] }, "priority" : 10 @@ -15076,7 +20468,7 @@ } ], "action_entry" : { - "action_id" : 65, + "action_id" : 87, "action_data" : [] }, "priority" : 11 @@ -15095,7 +20487,7 @@ } ], "action_entry" : { - "action_id" : 66, + "action_id" : 88, "action_data" : [] }, "priority" : 12 @@ -15114,7 +20506,7 @@ } ], "action_entry" : { - "action_id" : 67, + "action_id" : 89, "action_data" : [] }, "priority" : 13 @@ -15133,7 +20525,7 @@ } ], "action_entry" : { - "action_id" : 68, + "action_id" : 90, "action_data" : [] }, "priority" : 14 @@ -15152,7 +20544,7 @@ } ], "action_entry" : { - "action_id" : 69, + "action_id" : 91, "action_data" : [] }, "priority" : 15 @@ -15171,7 +20563,7 @@ } ], "action_entry" : { - "action_id" : 70, + "action_id" : 92, "action_data" : [] }, "priority" : 16 @@ -15180,7 +20572,7 @@ }, { "name" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0407", - "id" : 48, + "id" : 55, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 375, @@ -15201,30 +20593,30 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 52], + "action_ids" : [93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 74], "actions" : ["FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14", "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15", "NoAction"], - "base_default_next" : "tbl_act_23", + "base_default_next" : "tbl_int_transit425", "next_tables" : { - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14" : "tbl_act_23", - "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15" : "tbl_act_23", - "NoAction" : "tbl_act_23" + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i0" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i1" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i2" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i3" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i4" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i5" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i6" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i7" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i8" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i9" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i10" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i11" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i12" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i13" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i14" : "tbl_int_transit425", + "FabricEgress.process_int_main.process_int_transit.int_set_header_0407_i15" : "tbl_int_transit425", + "NoAction" : "tbl_int_transit425" }, "default_entry" : { - "action_id" : 52, + "action_id" : 74, "action_const" : false, "action_data" : [], "action_entry_const" : false @@ -15244,7 +20636,7 @@ } ], "action_entry" : { - "action_id" : 71, + "action_id" : 93, "action_data" : [] }, "priority" : 1 @@ -15263,7 +20655,7 @@ } ], "action_entry" : { - "action_id" : 72, + "action_id" : 94, "action_data" : [] }, "priority" : 2 @@ -15282,7 +20674,7 @@ } ], "action_entry" : { - "action_id" : 73, + "action_id" : 95, "action_data" : [] }, "priority" : 3 @@ -15301,7 +20693,7 @@ } ], "action_entry" : { - "action_id" : 74, + "action_id" : 96, "action_data" : [] }, "priority" : 4 @@ -15320,7 +20712,7 @@ } ], "action_entry" : { - "action_id" : 75, + "action_id" : 97, "action_data" : [] }, "priority" : 5 @@ -15339,7 +20731,7 @@ } ], "action_entry" : { - "action_id" : 76, + "action_id" : 98, "action_data" : [] }, "priority" : 6 @@ -15358,7 +20750,7 @@ } ], "action_entry" : { - "action_id" : 77, + "action_id" : 99, "action_data" : [] }, "priority" : 7 @@ -15377,7 +20769,7 @@ } ], "action_entry" : { - "action_id" : 78, + "action_id" : 100, "action_data" : [] }, "priority" : 8 @@ -15396,7 +20788,7 @@ } ], "action_entry" : { - "action_id" : 79, + "action_id" : 101, "action_data" : [] }, "priority" : 9 @@ -15415,7 +20807,7 @@ } ], "action_entry" : { - "action_id" : 80, + "action_id" : 102, "action_data" : [] }, "priority" : 10 @@ -15434,7 +20826,7 @@ } ], "action_entry" : { - "action_id" : 81, + "action_id" : 103, "action_data" : [] }, "priority" : 11 @@ -15453,7 +20845,7 @@ } ], "action_entry" : { - "action_id" : 82, + "action_id" : 104, "action_data" : [] }, "priority" : 12 @@ -15472,7 +20864,7 @@ } ], "action_entry" : { - "action_id" : 83, + "action_id" : 105, "action_data" : [] }, "priority" : 13 @@ -15491,7 +20883,7 @@ } ], "action_entry" : { - "action_id" : 84, + "action_id" : 106, "action_data" : [] }, "priority" : 14 @@ -15510,7 +20902,7 @@ } ], "action_entry" : { - "action_id" : 85, + "action_id" : 107, "action_data" : [] }, "priority" : 15 @@ -15529,7 +20921,7 @@ } ], "action_entry" : { - "action_id" : 86, + "action_id" : 108, "action_data" : [] }, "priority" : 16 @@ -15537,8 +20929,8 @@ ] }, { - "name" : "tbl_act_23", - "id" : 49, + "name" : "tbl_int_transit425", + "id" : 56, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 425, @@ -15552,22 +20944,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [107], - "actions" : ["act_24"], - "base_default_next" : "node_88", + "action_ids" : [129], + "actions" : ["int_transit425"], + "base_default_next" : "node_103", "next_tables" : { - "act_24" : "node_88" + "int_transit425" : "node_103" }, "default_entry" : { - "action_id" : 107, + "action_id" : 129, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_24", - "id" : 50, + "name" : "tbl_int_transit428", + "id" : 57, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 428, @@ -15581,22 +20973,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [106], - "actions" : ["act_23"], - "base_default_next" : "node_90", + "action_ids" : [128], + "actions" : ["int_transit428"], + "base_default_next" : "node_105", "next_tables" : { - "act_23" : "node_90" + "int_transit428" : "node_105" }, "default_entry" : { - "action_id" : 106, + "action_id" : 128, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_25", - "id" : 51, + "name" : "tbl_int_transit431", + "id" : 58, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 431, @@ -15610,22 +21002,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [108], - "actions" : ["act_25"], - "base_default_next" : "node_92", + "action_ids" : [130], + "actions" : ["int_transit431"], + "base_default_next" : "node_107", "next_tables" : { - "act_25" : "node_92" + "int_transit431" : "node_107" }, "default_entry" : { - "action_id" : 108, + "action_id" : 130, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_26", - "id" : 52, + "name" : "tbl_int_transit434", + "id" : 59, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 434, @@ -15639,14 +21031,138 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [109], - "actions" : ["act_26"], + "action_ids" : [131], + "actions" : ["int_transit434"], + "base_default_next" : "tbl_slicing126", + "next_tables" : { + "int_transit434" : "tbl_slicing126" + }, + "default_entry" : { + "action_id" : 131, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing126", + "id" : 60, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 126, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.dscp;" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [134], + "actions" : ["slicing126"], + "base_default_next" : "FabricEgress.dscp_rewriter.rewriter", + "next_tables" : { + "slicing126" : "FabricEgress.dscp_rewriter.rewriter" + }, + "default_entry" : { + "action_id" : 134, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.dscp_rewriter.rewriter", + "id" : 61, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 138, + "column" : 10, + "source_fragment" : "rewriter" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "eg_port", + "target" : ["standard_metadata", "egress_port"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 512, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [114, 115, 72], + "actions" : ["FabricEgress.dscp_rewriter.rewrite", "FabricEgress.dscp_rewriter.clear", "nop"], "base_default_next" : null, "next_tables" : { - "act_26" : null + "__MISS__" : null, + "__HIT__" : "node_111" }, "default_entry" : { - "action_id" : 109, + "action_id" : 72, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing155", + "id" : 62, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 155, + "column" : 30, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [132], + "actions" : ["slicing155"], + "base_default_next" : null, + "next_tables" : { + "slicing155" : null + }, + "default_entry" : { + "action_id" : 132, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing159", + "id" : 63, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 159, + "column" : 36, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [133], + "actions" : ["slicing159"], + "base_default_next" : null, + "next_tables" : { + "slicing159" : null + }, + "default_entry" : { + "action_id" : 133, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -15656,41 +21172,31 @@ "action_profiles" : [], "conditionals" : [ { - "name" : "node_45", - "id" : 15, - "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 39, - "column" : 12, - "source_fragment" : "fabric_metadata.is_controller_packet_out == true" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_controller_packet_out11"] - } - } - }, + "name" : "node_65", + "id" : 24, + "source_info" : { + "filename" : "fabric.p4", + "line" : 118, + "column" : 33, + "source_fragment" : "fabric_metadata" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._is_controller_packet_out19"] } } }, - "true_next" : "tbl_act_9", - "false_next" : "node_47" + "true_next" : "tbl_packetio41", + "false_next" : "node_67" }, { - "name" : "node_47", - "id" : 16, + "name" : "node_67", + "id" : 25, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 43, @@ -15711,15 +21217,15 @@ } } }, - "true_next" : "tbl_act_10", - "false_next" : "node_49" + "true_next" : "tbl_packetio44", + "false_next" : "node_69" }, { - "name" : "node_49", - "id" : 17, + "name" : "node_69", + "id" : 26, "source_info" : { "filename" : "include/control/next.p4", - "line" : 335, + "line" : 281, "column" : 12, "source_fragment" : "fabric_metadata.is_multicast == true ..." }, @@ -15730,21 +21236,11 @@ "left" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_multicast10"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._is_multicast18"] } } }, @@ -15764,15 +21260,15 @@ } } }, - "true_next" : "tbl_act_11", - "false_next" : "node_51" + "true_next" : "tbl_next283", + "false_next" : "node_71" }, { - "name" : "node_51", - "id" : 18, + "name" : "node_71", + "id" : 27, "source_info" : { "filename" : "include/control/next.p4", - "line" : 340, + "line" : 286, "column" : 12, "source_fragment" : "fabric_metadata.mpls_label == 0" }, @@ -15782,7 +21278,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "value" : ["scalars", "userMetadata._mpls_label12"] }, "right" : { "type" : "hexstr", @@ -15790,15 +21286,15 @@ } } }, - "true_next" : "node_52", + "true_next" : "node_72", "false_next" : "tbl_egress_next_set_mpls" }, { - "name" : "node_52", - "id" : 19, + "name" : "node_72", + "id" : 28, "source_info" : { "filename" : "include/control/next.p4", - "line" : 341, + "line" : 287, "column" : 16, "source_fragment" : "hdr.mpls.isValid()" }, @@ -15817,67 +21313,11 @@ "false_next" : "FabricEgress.egress_next.egress_vlan" }, { - "name" : "node_58", - "id" : 20, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 357, - "column" : 16, - "source_fragment" : "!egress_vlan.apply().hit" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "not", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - } - } - } - } - }, - "true_next" : "node_59", - "false_next" : "node_61" - }, - { - "name" : "node_59", - "id" : 21, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 359, - "column" : 20, - "source_fragment" : "fabric_metadata.vlan_id != DEFAULT_VLAN_ID" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x0ffe" - } - } - }, - "true_next" : "tbl_egress_next_push_vlan", - "false_next" : "node_61" - }, - { - "name" : "node_61", - "id" : 22, + "name" : "node_76", + "id" : 29, "source_info" : { "filename" : "include/control/next.p4", - "line" : 368, + "line" : 308, "column" : 12, "source_fragment" : "hdr.mpls.isValid()" }, @@ -15892,15 +21332,15 @@ } } }, - "true_next" : "tbl_act_14", - "false_next" : "node_65" + "true_next" : "tbl_next309", + "false_next" : "node_80" }, { - "name" : "node_63", - "id" : 23, + "name" : "node_78", + "id" : 30, "source_info" : { "filename" : "include/control/next.p4", - "line" : 370, + "line" : 310, "column" : 16, "source_fragment" : "hdr.mpls.ttl == 0" }, @@ -15918,15 +21358,15 @@ } } }, - "true_next" : "tbl_act_15", - "false_next" : "tbl_act_18" + "true_next" : "tbl_next310", + "false_next" : "node_84" }, { - "name" : "node_65", - "id" : 24, + "name" : "node_80", + "id" : 31, "source_info" : { "filename" : "include/control/next.p4", - "line" : 372, + "line" : 312, "column" : 15, "source_fragment" : "hdr.ipv4.isValid() && fabric_metadata.fwd_type != FWD_BRIDGING" }, @@ -15951,7 +21391,7 @@ "op" : "!=", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -15961,15 +21401,15 @@ } } }, - "true_next" : "tbl_act_16", - "false_next" : "tbl_act_18" + "true_next" : "tbl_next313", + "false_next" : "node_84" }, { - "name" : "node_67", - "id" : 25, + "name" : "node_82", + "id" : 32, "source_info" : { "filename" : "include/control/next.p4", - "line" : 374, + "line" : 314, "column" : 20, "source_fragment" : "hdr.ipv4.ttl == 0" }, @@ -15987,102 +21427,118 @@ } } }, - "true_next" : "tbl_act_17", - "false_next" : "tbl_act_18" + "true_next" : "tbl_next314", + "false_next" : "node_84" }, { - "name" : "node_70", - "id" : 26, + "name" : "node_84", + "id" : 33, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 343, + "line" : 368, "column" : 12, - "source_fragment" : "fabric_md.spgw.skip_spgw == true" + "source_fragment" : "fabric_md.spgw.skip_spgw" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_skip_spgw28"] + "value" : ["scalars", "userMetadata._spgw_skip_spgw40"] } } - }, + } + } + }, + "true_next" : "node_85", + "false_next" : "node_91" + }, + { + "name" : "node_85", + "id" : 34, + "source_info" : { + "filename" : "fabric.p4", + "line" : 121, + "column" : 24, + "source_fragment" : "fabric_metadata" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_encap42"] } } }, - "true_next" : "tbl_act_19", - "false_next" : "node_72" + "true_next" : "node_86", + "false_next" : "node_89" }, { - "name" : "node_72", - "id" : 27, + "name" : "node_86", + "id" : 35, + "source_info" : { + "filename" : "fabric.p4", + "line" : 121, + "column" : 24, + "source_fragment" : "fabric_metadata" + }, "expression" : { "type" : "expression", "value" : { - "op" : "not", + "op" : "d2b", "left" : null, "right" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "spgw_egress_hasReturned"] - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_qfi_push45"] } } }, - "true_next" : "tbl_act_20", - "false_next" : "node_76" + "true_next" : "tbl_spgw_gtpu_encap_qfi", + "false_next" : "tbl_spgw_gtpu_encap" }, { - "name" : "node_74", - "id" : 28, + "name" : "node_89", + "id" : 36, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 346, - "column" : 12, - "source_fragment" : "fabric_md.spgw.needs_gtpu_encap == true" + "line" : 376, + "column" : 16, + "source_fragment" : "fabric_md.spgw.skip_egress_pdr_ctr" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_encap32"] + "value" : ["scalars", "userMetadata._spgw_skip_egress_pdr_ctr44"] } } - }, - "right" : { - "type" : "bool", - "value" : true } } }, - "true_next" : "tbl_spgw_egress_gtpu_encap", - "false_next" : "node_76" + "true_next" : "tbl_spgw377", + "false_next" : "node_91" }, { - "name" : "node_76", - "id" : 29, + "name" : "node_91", + "id" : 37, "source_info" : { "filename" : "include/int/int_main.p4", "line" : 102, @@ -16157,45 +21613,35 @@ } } }, - "false_next" : null, - "true_next" : "node_77" + "true_next" : "node_92", + "false_next" : "tbl_slicing126" }, { - "name" : "node_77", - "id" : 30, + "name" : "node_92", + "id" : 38, "source_info" : { - "filename" : "include/int/int_main.p4", - "line" : 106, - "column" : 16, - "source_fragment" : "fabric_metadata.int_meta.source == true" + "filename" : "fabric.p4", + "line" : 127, + "column" : 36, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_source34"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._int_meta_source46"] } } }, "true_next" : "FabricEgress.process_int_main.process_int_source.tb_int_source", - "false_next" : "node_79" + "false_next" : "node_94" }, { - "name" : "node_79", - "id" : 31, + "name" : "node_94", + "id" : 39, "source_info" : { "filename" : "include/int/int_main.p4", "line" : 110, @@ -16213,45 +21659,42 @@ } } }, - "false_next" : null, - "true_next" : "tbl_act_21" + "true_next" : "tbl_act", + "false_next" : "tbl_slicing126" }, { - "name" : "node_82", - "id" : 32, + "name" : "node_97", + "id" : 40, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 419, "column" : 12, - "source_fragment" : "fmeta.int_meta.transit == false" + "source_fragment" : "fmeta.int_meta.transit" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._int_meta_transit35"] + "value" : ["scalars", "userMetadata._int_meta_transit47"] } } - }, - "right" : { - "type" : "bool", - "value" : false } } }, - "true_next" : "tbl_act_22", - "false_next" : "node_84" + "true_next" : "tbl_int_transit420", + "false_next" : "node_99" }, { - "name" : "node_84", - "id" : 33, + "name" : "node_99", + "id" : 41, "expression" : { "type" : "expression", "value" : { @@ -16270,12 +21713,12 @@ } } }, - "false_next" : null, - "true_next" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0003" + "true_next" : "FabricEgress.process_int_main.process_int_transit.tb_int_inst_0003", + "false_next" : "tbl_slicing126" }, { - "name" : "node_88", - "id" : 34, + "name" : "node_103", + "id" : 42, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 427, @@ -16293,12 +21736,12 @@ } } }, - "true_next" : "tbl_act_24", - "false_next" : "node_90" + "true_next" : "tbl_int_transit428", + "false_next" : "node_105" }, { - "name" : "node_90", - "id" : 35, + "name" : "node_105", + "id" : 43, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 430, @@ -16316,12 +21759,12 @@ } } }, - "true_next" : "tbl_act_25", - "false_next" : "node_92" + "true_next" : "tbl_int_transit431", + "false_next" : "node_107" }, { - "name" : "node_92", - "id" : 36, + "name" : "node_107", + "id" : 44, "source_info" : { "filename" : "include/int/int_transit.p4", "line" : 433, @@ -16339,8 +21782,54 @@ } } }, + "true_next" : "tbl_int_transit434", + "false_next" : "tbl_slicing126" + }, + { + "name" : "node_111", + "id" : 45, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 154, + "column" : 16, + "source_fragment" : "hdr.gtpu_ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["gtpu_ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_slicing155", + "false_next" : "node_113" + }, + { + "name" : "node_113", + "id" : 46, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 158, + "column" : 16, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["ipv4", "$valid$"] + } + } + }, "false_next" : null, - "true_next" : "tbl_act_26" + "true_next" : "tbl_slicing159" } ] } @@ -16377,7 +21866,7 @@ "id" : 1, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 362, + "line" : 393, "column" : 8, "source_fragment" : "update_checksum(gtpu_ipv4.isValid(), ..." }, @@ -16452,26 +21941,14 @@ "intrinsic_metadata.egress_global_timestamp", ["standard_metadata", "egress_global_timestamp"] ], - [ - "intrinsic_metadata.lf_field_list", - ["standard_metadata", "lf_field_list"] - ], [ "intrinsic_metadata.mcast_grp", ["standard_metadata", "mcast_grp"] ], - [ - "intrinsic_metadata.resubmit_flag", - ["standard_metadata", "resubmit_flag"] - ], [ "intrinsic_metadata.egress_rid", ["standard_metadata", "egress_rid"] ], - [ - "intrinsic_metadata.recirculate_flag", - ["standard_metadata", "recirculate_flag"] - ], [ "intrinsic_metadata.priority", ["standard_metadata", "priority"] @@ -16479,7 +21956,7 @@ ], "program" : "fabric.p4", "__meta__" : { - "version" : [2, 18], + "version" : [2, 23], "compiler" : "https://github.com/p4lang/p4c" } } \ No newline at end of file diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/p4info.txt b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/p4info.txt index bb771144719..c758d1b11bb 100644 --- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/p4info.txt +++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw-int/bmv2/default/p4info.txt @@ -3,7 +3,7 @@ pkg_info { } tables { preamble { - id: 33581620 + id: 44526132 name: "FabricIngress.process_set_source_sink.tb_set_source" alias: "tb_set_source" } @@ -14,20 +14,20 @@ tables { match_type: EXACT } action_refs { - id: 16778827 + id: 21235275 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318787614 + const_default_action_id: 28485346 + direct_resource_ids: 318984222 size: 511 } tables { preamble { - id: 33611649 + id: 43310977 name: "FabricIngress.filtering.ingress_port_vlan" alias: "ingress_port_vlan" } @@ -50,21 +50,21 @@ tables { match_type: TERNARY } action_refs { - id: 16836487 + id: 17164167 } action_refs { - id: 16818236 + id: 24158268 } action_refs { - id: 16794911 + id: 24266015 } - const_default_action_id: 16836487 - direct_resource_ids: 318815501 + const_default_action_id: 17164167 + direct_resource_ids: 326221069 size: 1024 } tables { preamble { - id: 33596298 + id: 49718154 name: "FabricIngress.filtering.fwd_classifier" alias: "fwd_classifier" } @@ -93,15 +93,15 @@ tables { match_type: EXACT } action_refs { - id: 16840921 + id: 25032921 } - const_default_action_id: 16840921 - direct_resource_ids: 318827326 + const_default_action_id: 25032921 + direct_resource_ids: 335473470 size: 1024 } tables { preamble { - id: 33596749 + id: 43623757 name: "FabricIngress.forwarding.bridging" alias: "bridging" } @@ -118,20 +118,20 @@ tables { match_type: TERNARY } action_refs { - id: 16811012 + id: 21791748 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318770289 + const_default_action_id: 28485346 + direct_resource_ids: 330959985 size: 1024 } tables { preamble { - id: 33574274 + id: 37768578 name: "FabricIngress.forwarding.mpls" alias: "mpls" } @@ -142,20 +142,20 @@ tables { match_type: EXACT } action_refs { - id: 16827758 + id: 30066030 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318830507 + const_default_action_id: 28485346 + direct_resource_ids: 318961579 size: 1024 } tables { preamble { - id: 33562650 + id: 41754650 name: "FabricIngress.forwarding.routing_v4" alias: "routing_v4" } @@ -166,13 +166,13 @@ tables { match_type: LPM } action_refs { - id: 16777434 + id: 19792090 } action_refs { - id: 16804187 + id: 29124955 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } @@ -180,7 +180,55 @@ tables { } tables { preamble { - id: 33618978 + id: 36626242 + name: "FabricIngress.pre_next.next_mpls" + alias: "next_mpls" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 22765924 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 330020245 + size: 1024 +} +tables { + preamble { + id: 48011802 + name: "FabricIngress.pre_next.next_vlan" + alias: "next_vlan" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 33475378 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 333692067 + size: 1024 +} +tables { + preamble { + id: 44104738 name: "FabricIngress.acl.acl" alias: "acl" } @@ -192,116 +240,98 @@ tables { } match_fields { id: 2 - name: "ip_proto" - bitwidth: 8 + name: "eth_dst" + bitwidth: 48 match_type: TERNARY } match_fields { id: 3 - name: "l4_sport" - bitwidth: 16 + name: "eth_src" + bitwidth: 48 match_type: TERNARY } match_fields { id: 4 - name: "l4_dport" - bitwidth: 16 + name: "vlan_id" + bitwidth: 12 match_type: TERNARY } match_fields { id: 5 - name: "eth_dst" - bitwidth: 48 + name: "eth_type" + bitwidth: 16 match_type: TERNARY } match_fields { id: 6 - name: "eth_src" - bitwidth: 48 + name: "ipv4_src" + bitwidth: 32 match_type: TERNARY } match_fields { id: 7 - name: "vlan_id" - bitwidth: 12 + name: "ipv4_dst" + bitwidth: 32 match_type: TERNARY } match_fields { id: 8 - name: "eth_type" - bitwidth: 16 + name: "ip_proto" + bitwidth: 8 match_type: TERNARY } match_fields { id: 9 - name: "ipv4_src" - bitwidth: 32 + name: "icmp_type" + bitwidth: 8 match_type: TERNARY } match_fields { id: 10 - name: "ipv4_dst" - bitwidth: 32 + name: "icmp_code" + bitwidth: 8 match_type: TERNARY } match_fields { id: 11 - name: "icmp_type" - bitwidth: 8 + name: "l4_sport" + bitwidth: 16 match_type: TERNARY } match_fields { id: 12 - name: "icmp_code" - bitwidth: 8 + name: "l4_dport" + bitwidth: 16 match_type: TERNARY } - action_refs { - id: 16807382 - } - action_refs { - id: 16829684 + match_fields { + id: 13 + name: "port_type" + bitwidth: 2 + match_type: TERNARY } action_refs { - id: 16781601 + id: 23623126 } action_refs { - id: 16820765 + id: 23579892 } action_refs { - id: 16827694 - } - const_default_action_id: 16827694 - direct_resource_ids: 318801025 - size: 1024 -} -tables { - preamble { - id: 33599709 - name: "FabricIngress.next.next_vlan" - alias: "next_vlan" - } - match_fields { - id: 1 - name: "next_id" - bitwidth: 32 - match_type: EXACT + id: 16912673 } action_refs { - id: 16790685 + id: 23570973 } action_refs { - id: 16819938 - annotations: "@defaultonly" - scope: DEFAULT_ONLY + id: 29607214 } - const_default_action_id: 16819938 - direct_resource_ids: 318768144 + const_default_action_id: 29607214 + direct_resource_ids: 319194241 size: 1024 } tables { preamble { - id: 33596977 + id: 48735793 name: "FabricIngress.next.xconnect" alias: "xconnect" } @@ -318,23 +348,23 @@ tables { match_type: EXACT } action_refs { - id: 16842190 + id: 24640974 } action_refs { - id: 16837052 + id: 30599612 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318778156 + const_default_action_id: 28485346 + direct_resource_ids: 321989420 size: 1024 } tables { preamble { - id: 33608588 + id: 47960972 name: "FabricIngress.next.hashed" alias: "hashed" } @@ -345,27 +375,24 @@ tables { match_type: EXACT } action_refs { - id: 16815357 + id: 27301117 } action_refs { - id: 16791402 + id: 20985706 } action_refs { - id: 16779255 - } - action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - implementation_id: 285217164 - direct_resource_ids: 318800532 + const_default_action_id: 28485346 + implementation_id: 291115404 + direct_resource_ids: 322798228 size: 1024 } tables { preamble { - id: 33606828 + id: 40619180 name: "FabricIngress.next.multicast" alias: "multicast" } @@ -376,22 +403,108 @@ tables { match_type: EXACT } action_refs { - id: 16779917 + id: 21629581 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318801752 + const_default_action_id: 28485346 + direct_resource_ids: 319194968 size: 1024 } tables { preamble { - id: 33584493 - name: "FabricIngress.spgw_ingress.interface_lookup" - alias: "interface_lookup" + id: 34606298 + name: "FabricIngress.slice_tc_classifier.classifier" + alias: "classifier" + } + match_fields { + id: 1 + name: "ig_port" + bitwidth: 9 + match_type: TERNARY + } + match_fields { + id: 2 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 3 + name: "ipv4_dst" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 4 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 5 + name: "l4_sport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 6 + name: "l4_dport" + bitwidth: 16 + match_type: TERNARY + } + action_refs { + id: 23786376 + } + action_refs { + id: 25983516 + } + const_default_action_id: 23786376 + direct_resource_ids: 334706097 + size: 512 +} +tables { + preamble { + id: 36435258 + name: "FabricIngress.qos.queues" + alias: "queues" + } + match_fields { + id: 1 + name: "slice_id" + bitwidth: 4 + match_type: EXACT + } + match_fields { + id: 2 + name: "tc" + bitwidth: 2 + match_type: EXACT + } + match_fields { + id: 3 + name: "color" + bitwidth: 2 + match_type: TERNARY + } + action_refs { + id: 32116918 + } + action_refs { + id: 28214351 + } + const_default_action_id: 32116918 + direct_resource_ids: 327743278 + size: 128 +} +tables { + preamble { + id: 36113154 + name: "FabricIngress.spgw.interfaces" + alias: "interfaces" } match_fields { id: 1 @@ -406,16 +519,21 @@ tables { match_type: EXACT } action_refs { - id: 16797935 + id: 18186268 + } + action_refs { + id: 29103810 + annotations: "@defaultonly" + scope: DEFAULT_ONLY } - const_default_action_id: 16797935 + const_default_action_id: 29103810 size: 128 } tables { preamble { - id: 33586958 - name: "FabricIngress.spgw_ingress.downlink_pdr_lookup" - alias: "downlink_pdr_lookup" + id: 47394697 + name: "FabricIngress.spgw.downlink_pdrs" + alias: "downlink_pdrs" } match_fields { id: 1 @@ -424,16 +542,23 @@ tables { match_type: EXACT } action_refs { - id: 16799934 + id: 18504550 + } + action_refs { + id: 25764352 + } + action_refs { + id: 21257015 + annotations: "@defaultonly" + scope: DEFAULT_ONLY } - const_default_action_id: 16799934 size: 1024 } tables { preamble { - id: 33587070 - name: "FabricIngress.spgw_ingress.uplink_pdr_lookup" - alias: "uplink_pdr_lookup" + id: 46648074 + name: "FabricIngress.spgw.uplink_pdrs" + alias: "uplink_pdrs" } match_fields { id: 1 @@ -447,17 +572,36 @@ tables { bitwidth: 32 match_type: EXACT } + match_fields { + id: 3 + name: "has_qfi" + bitwidth: 1 + match_type: EXACT + } + match_fields { + id: 4 + name: "qfi" + bitwidth: 6 + match_type: EXACT + } action_refs { - id: 16799934 + id: 18504550 + } + action_refs { + id: 25764352 + } + action_refs { + id: 21257015 + annotations: "@defaultonly" + scope: DEFAULT_ONLY } - const_default_action_id: 16799934 size: 1024 } tables { preamble { - id: 33613200 - name: "FabricIngress.spgw_ingress.far_lookup" - alias: "far_lookup" + id: 47558728 + name: "FabricIngress.spgw.fars" + alias: "fars" } match_fields { id: 1 @@ -466,17 +610,20 @@ tables { match_type: EXACT } action_refs { - id: 16834935 + id: 24881235 } action_refs { - id: 16787606 + id: 29659841 } - const_default_action_id: 16834935 + action_refs { + id: 30642777 + } + const_default_action_id: 24881235 size: 2048 } tables { preamble { - id: 33612258 + id: 44818914 name: "FabricEgress.process_int_main.process_int_source.tb_int_source" alias: "tb_int_source" } @@ -505,20 +652,20 @@ tables { match_type: TERNARY } action_refs { - id: 16785857 + id: 20062657 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318800047 + const_default_action_id: 28485346 + direct_resource_ids: 322470063 size: 1024 } tables { preamble { - id: 33599867 + id: 34910587 name: "FabricEgress.process_int_main.process_int_transit.tb_int_insert" alias: "tb_int_insert" } @@ -529,19 +676,19 @@ tables { match_type: EXACT } action_refs { - id: 16780783 + id: 29232623 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 + const_default_action_id: 28485346 size: 1 } tables { preamble { - id: 33599342 + id: 49262446 name: "FabricEgress.egress_next.egress_vlan" alias: "egress_vlan" } @@ -558,48 +705,90 @@ tables { match_type: EXACT } action_refs { - id: 16790030 + id: 30307755 + } + action_refs { + id: 17183246 } action_refs { - id: 16819938 + id: 30812542 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318827144 + const_default_action_id: 30812542 + direct_resource_ids: 318892680 size: 1024 } +tables { + preamble { + id: 49970092 + name: "FabricEgress.dscp_rewriter.rewriter" + alias: "rewriter" + } + match_fields { + id: 1 + name: "eg_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 27951287 + } + action_refs { + id: 24120545 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + size: 512 +} actions { preamble { - id: 16819938 + id: 28485346 name: "nop" alias: "nop" } } actions { preamble { - id: 16778827 + id: 21257015 + name: "NoAction" + alias: "NoAction" + annotations: "@noWarn(\"unused\")" + } +} +actions { + preamble { + id: 21235275 name: "FabricIngress.process_set_source_sink.int_set_source" alias: "int_set_source" } } actions { preamble { - id: 16836487 + id: 17164167 name: "FabricIngress.filtering.deny" alias: "deny" } } actions { preamble { - id: 16818236 + id: 24158268 name: "FabricIngress.filtering.permit" alias: "permit" } + params { + id: 1 + name: "port_type" + bitwidth: 2 + } } actions { preamble { - id: 16794911 + id: 24266015 name: "FabricIngress.filtering.permit_with_internal_vlan" alias: "permit_with_internal_vlan" } @@ -608,10 +797,15 @@ actions { name: "vlan_id" bitwidth: 12 } + params { + id: 2 + name: "port_type" + bitwidth: 2 + } } actions { preamble { - id: 16840921 + id: 25032921 name: "FabricIngress.filtering.set_forwarding_type" alias: "set_forwarding_type" } @@ -623,7 +817,7 @@ actions { } actions { preamble { - id: 16811012 + id: 21791748 name: "FabricIngress.forwarding.set_next_id_bridging" alias: "set_next_id_bridging" } @@ -635,7 +829,7 @@ actions { } actions { preamble { - id: 16827758 + id: 30066030 name: "FabricIngress.forwarding.pop_mpls_and_next" alias: "pop_mpls_and_next" } @@ -647,7 +841,7 @@ actions { } actions { preamble { - id: 16777434 + id: 19792090 name: "FabricIngress.forwarding.set_next_id_routing_v4" alias: "set_next_id_routing_v4" } @@ -659,14 +853,38 @@ actions { } actions { preamble { - id: 16804187 + id: 29124955 name: "FabricIngress.forwarding.nop_routing_v4" alias: "nop_routing_v4" } } actions { preamble { - id: 16807382 + id: 22765924 + name: "FabricIngress.pre_next.set_mpls_label" + alias: "set_mpls_label" + } + params { + id: 1 + name: "label" + bitwidth: 20 + } +} +actions { + preamble { + id: 33475378 + name: "FabricIngress.pre_next.set_vlan" + alias: "set_vlan" + } + params { + id: 1 + name: "vlan_id" + bitwidth: 12 + } +} +actions { + preamble { + id: 23623126 name: "FabricIngress.acl.set_next_id_acl" alias: "set_next_id_acl" } @@ -678,14 +896,14 @@ actions { } actions { preamble { - id: 16829684 + id: 23579892 name: "FabricIngress.acl.punt_to_cpu" alias: "punt_to_cpu" } } actions { preamble { - id: 16781601 + id: 16912673 name: "FabricIngress.acl.set_clone_session_id" alias: "set_clone_session_id" } @@ -697,33 +915,21 @@ actions { } actions { preamble { - id: 16820765 + id: 23570973 name: "FabricIngress.acl.drop" - alias: "drop" + alias: "acl.drop" } } actions { preamble { - id: 16827694 + id: 29607214 name: "FabricIngress.acl.nop_acl" alias: "nop_acl" } } actions { preamble { - id: 16790685 - name: "FabricIngress.next.set_vlan" - alias: "set_vlan" - } - params { - id: 1 - name: "vlan_id" - bitwidth: 12 - } -} -actions { - preamble { - id: 16842190 + id: 24640974 name: "FabricIngress.next.output_xconnect" alias: "output_xconnect" } @@ -735,7 +941,7 @@ actions { } actions { preamble { - id: 16837052 + id: 30599612 name: "FabricIngress.next.set_next_id_xconnect" alias: "set_next_id_xconnect" } @@ -747,7 +953,7 @@ actions { } actions { preamble { - id: 16815357 + id: 27301117 name: "FabricIngress.next.output_hashed" alias: "output_hashed" } @@ -759,7 +965,7 @@ actions { } actions { preamble { - id: 16791402 + id: 20985706 name: "FabricIngress.next.routing_hashed" alias: "routing_hashed" } @@ -781,48 +987,64 @@ actions { } actions { preamble { - id: 16779255 - name: "FabricIngress.next.mpls_routing_hashed" - alias: "mpls_routing_hashed" + id: 21629581 + name: "FabricIngress.next.set_mcast_group_id" + alias: "set_mcast_group_id" } params { id: 1 - name: "port_num" - bitwidth: 9 + name: "group_id" + bitwidth: 16 } - params { - id: 2 - name: "smac" - bitwidth: 48 +} +actions { + preamble { + id: 23786376 + name: "FabricIngress.slice_tc_classifier.set_slice_id_tc" + alias: "set_slice_id_tc" } params { - id: 3 - name: "dmac" - bitwidth: 48 + id: 1 + name: "slice_id" + bitwidth: 4 } params { - id: 4 - name: "label" - bitwidth: 20 + id: 2 + name: "tc" + bitwidth: 2 } } actions { preamble { - id: 16779917 - name: "FabricIngress.next.set_mcast_group_id" - alias: "set_mcast_group_id" + id: 25983516 + name: "FabricIngress.slice_tc_classifier.trust_dscp" + alias: "trust_dscp" + } +} +actions { + preamble { + id: 32116918 + name: "FabricIngress.qos.set_queue" + alias: "set_queue" } params { id: 1 - name: "group_id" - bitwidth: 16 + name: "qid" + bitwidth: 5 } } actions { preamble { - id: 16797935 - name: "FabricIngress.spgw_ingress.set_source_iface" - alias: "set_source_iface" + id: 28214351 + name: "FabricIngress.qos.meter_drop" + alias: "meter_drop" + } +} +actions { + preamble { + id: 18186268 + name: "FabricIngress.spgw.load_iface" + alias: "load_iface" } params { id: 1 @@ -831,20 +1053,49 @@ actions { } params { id: 2 - name: "direction" - bitwidth: 2 + name: "slice_id" + bitwidth: 4 + } +} +actions { + preamble { + id: 29103810 + name: "FabricIngress.spgw.iface_miss" + alias: "iface_miss" + } +} +actions { + preamble { + id: 18504550 + name: "FabricIngress.spgw.load_pdr" + alias: "load_pdr" + } + params { + id: 1 + name: "ctr_id" + bitwidth: 32 + } + params { + id: 2 + name: "far_id" + bitwidth: 32 } params { id: 3 - name: "skip_spgw" + name: "needs_gtpu_decap" bitwidth: 1 } + params { + id: 4 + name: "tc" + bitwidth: 2 + } } actions { preamble { - id: 16799934 - name: "FabricIngress.spgw_ingress.set_pdr_attributes" - alias: "set_pdr_attributes" + id: 25764352 + name: "FabricIngress.spgw.load_pdr_qos" + alias: "load_pdr_qos" } params { id: 1 @@ -861,12 +1112,27 @@ actions { name: "needs_gtpu_decap" bitwidth: 1 } + params { + id: 4 + name: "needs_qfi_push" + bitwidth: 1 + } + params { + id: 5 + name: "qfi" + bitwidth: 6 + } + params { + id: 6 + name: "tc" + bitwidth: 2 + } } actions { preamble { - id: 16834935 - name: "FabricIngress.spgw_ingress.load_normal_far_attributes" - alias: "load_normal_far_attributes" + id: 24881235 + name: "FabricIngress.spgw.load_normal_far" + alias: "load_normal_far" } params { id: 1 @@ -881,9 +1147,9 @@ actions { } actions { preamble { - id: 16787606 - name: "FabricIngress.spgw_ingress.load_tunnel_far_attributes" - alias: "load_tunnel_far_attributes" + id: 29659841 + name: "FabricIngress.spgw.load_tunnel_far" + alias: "load_tunnel_far" } params { id: 1 @@ -918,42 +1184,44 @@ actions { } actions { preamble { - id: 16829280 - name: "FabricIngress.spgw_ingress.decap_inner_tcp" - alias: "decap_inner_tcp" + id: 30642777 + name: "FabricIngress.spgw.load_dbuf_far" + alias: "load_dbuf_far" } -} -actions { - preamble { - id: 16815878 - name: "FabricIngress.spgw_ingress.decap_inner_udp" - alias: "decap_inner_udp" + params { + id: 1 + name: "drop" + bitwidth: 1 } -} -actions { - preamble { - id: 16801274 - name: "FabricIngress.spgw_ingress.decap_inner_icmp" - alias: "decap_inner_icmp" + params { + id: 2 + name: "notify_cp" + bitwidth: 1 } -} -actions { - preamble { - id: 16830582 - name: "FabricIngress.spgw_ingress.decap_inner_unknown" - alias: "decap_inner_unknown" + params { + id: 3 + name: "tunnel_src_port" + bitwidth: 16 } -} -actions { - preamble { - id: 16800567 - name: "NoAction" - alias: "NoAction" + params { + id: 4 + name: "tunnel_src_addr" + bitwidth: 32 + } + params { + id: 5 + name: "tunnel_dst_addr" + bitwidth: 32 + } + params { + id: 6 + name: "teid" + bitwidth: 32 } } actions { preamble { - id: 16785857 + id: 20062657 name: "FabricEgress.process_int_main.process_int_source.int_source_dscp" alias: "int_source_dscp" } @@ -980,7 +1248,7 @@ actions { } actions { preamble { - id: 16780783 + id: 29232623 name: "FabricEgress.process_int_main.process_int_transit.init_metadata" alias: "init_metadata" } @@ -992,25 +1260,53 @@ actions { } actions { preamble { - id: 16790030 + id: 30307755 + name: "FabricEgress.egress_next.push_vlan" + alias: "push_vlan" + } +} +actions { + preamble { + id: 17183246 name: "FabricEgress.egress_next.pop_vlan" alias: "pop_vlan" } } +actions { + preamble { + id: 30812542 + name: "FabricEgress.egress_next.drop" + alias: "egress_next.drop" + } +} +actions { + preamble { + id: 27951287 + name: "FabricEgress.dscp_rewriter.rewrite" + alias: "rewrite" + } +} +actions { + preamble { + id: 24120545 + name: "FabricEgress.dscp_rewriter.clear" + alias: "clear" + } +} action_profiles { preamble { - id: 285217164 + id: 291115404 name: "FabricIngress.next.hashed_selector" alias: "hashed_selector" } - table_ids: 33608588 + table_ids: 47960972 with_selector: true size: 1024 max_group_size: 16 } counters { preamble { - id: 302011205 + id: 314528581 name: "FabricIngress.port_counters_control.egress_port_counter" alias: "egress_port_counter" } @@ -1021,7 +1317,7 @@ counters { } counters { preamble { - id: 302002771 + id: 312947283 name: "FabricIngress.port_counters_control.ingress_port_counter" alias: "ingress_port_counter" } @@ -1032,9 +1328,9 @@ counters { } counters { preamble { - id: 302029884 - name: "FabricIngress.spgw_ingress.pdr_counter" - alias: "spgw_ingress.pdr_counter" + id: 308925232 + name: "FabricIngress.spgw.pdr_counter" + alias: "FabricIngress.spgw.pdr_counter" } spec { unit: BOTH @@ -1043,9 +1339,9 @@ counters { } counters { preamble { - id: 302012289 - name: "FabricEgress.spgw_egress.pdr_counter" - alias: "spgw_egress.pdr_counter" + id: 302049491 + name: "FabricEgress.spgw.pdr_counter" + alias: "FabricEgress.spgw.pdr_counter" } spec { unit: BOTH @@ -1054,139 +1350,183 @@ counters { } direct_counters { preamble { - id: 318787614 + id: 318984222 name: "FabricIngress.process_set_source_sink.counter_set_source" alias: "counter_set_source" } spec { unit: BOTH } - direct_table_id: 33581620 + direct_table_id: 44526132 } direct_counters { preamble { - id: 318815501 + id: 326221069 name: "FabricIngress.filtering.ingress_port_vlan_counter" alias: "ingress_port_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33611649 + direct_table_id: 43310977 } direct_counters { preamble { - id: 318827326 + id: 335473470 name: "FabricIngress.filtering.fwd_classifier_counter" alias: "fwd_classifier_counter" } spec { unit: BOTH } - direct_table_id: 33596298 + direct_table_id: 49718154 } direct_counters { preamble { - id: 318770289 + id: 330959985 name: "FabricIngress.forwarding.bridging_counter" alias: "bridging_counter" } spec { unit: BOTH } - direct_table_id: 33596749 + direct_table_id: 43623757 } direct_counters { preamble { - id: 318830507 + id: 318961579 name: "FabricIngress.forwarding.mpls_counter" alias: "mpls_counter" } spec { unit: BOTH } - direct_table_id: 33574274 + direct_table_id: 37768578 } direct_counters { preamble { - id: 318801025 - name: "FabricIngress.acl.acl_counter" - alias: "acl_counter" + id: 330020245 + name: "FabricIngress.pre_next.next_mpls_counter" + alias: "next_mpls_counter" } spec { unit: BOTH } - direct_table_id: 33618978 + direct_table_id: 36626242 } direct_counters { preamble { - id: 318768144 - name: "FabricIngress.next.next_vlan_counter" + id: 333692067 + name: "FabricIngress.pre_next.next_vlan_counter" alias: "next_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33599709 + direct_table_id: 48011802 +} +direct_counters { + preamble { + id: 319194241 + name: "FabricIngress.acl.acl_counter" + alias: "acl_counter" + } + spec { + unit: BOTH + } + direct_table_id: 44104738 } direct_counters { preamble { - id: 318778156 + id: 321989420 name: "FabricIngress.next.xconnect_counter" alias: "xconnect_counter" } spec { unit: BOTH } - direct_table_id: 33596977 + direct_table_id: 48735793 } direct_counters { preamble { - id: 318800532 + id: 322798228 name: "FabricIngress.next.hashed_counter" alias: "hashed_counter" } spec { unit: BOTH } - direct_table_id: 33608588 + direct_table_id: 47960972 } direct_counters { preamble { - id: 318801752 + id: 319194968 name: "FabricIngress.next.multicast_counter" alias: "multicast_counter" } spec { unit: BOTH } - direct_table_id: 33606828 + direct_table_id: 40619180 +} +direct_counters { + preamble { + id: 334706097 + name: "FabricIngress.slice_tc_classifier.classifier_stats" + alias: "classifier_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 34606298 +} +direct_counters { + preamble { + id: 327743278 + name: "FabricIngress.qos.queues_stats" + alias: "queues_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 36435258 } direct_counters { preamble { - id: 318800047 + id: 322470063 name: "FabricEgress.process_int_main.process_int_source.counter_int_source" alias: "counter_int_source" } spec { unit: BOTH } - direct_table_id: 33612258 + direct_table_id: 44818914 } direct_counters { preamble { - id: 318827144 + id: 318892680 name: "FabricEgress.egress_next.egress_vlan_counter" alias: "egress_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33599342 + direct_table_id: 49262446 +} +meters { + preamble { + id: 348573637 + name: "FabricIngress.qos.slice_tc_meter" + alias: "slice_tc_meter" + } + spec { + unit: BYTES + } + size: 64 } controller_packet_metadata { preamble { - id: 67146229 + id: 81826293 name: "packet_in" alias: "packet_in" annotations: "@controller_header(\"packet_in\")" @@ -1204,7 +1544,7 @@ controller_packet_metadata { } controller_packet_metadata { preamble { - id: 67121543 + id: 76689799 name: "packet_out" alias: "packet_out" annotations: "@controller_header(\"packet_out\")" @@ -1216,8 +1556,13 @@ controller_packet_metadata { } metadata { id: 2 + name: "do_forwarding" + bitwidth: 1 + } + metadata { + id: 3 name: "_pad" - bitwidth: 7 + bitwidth: 6 } } type_info { diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json index 18163deda99..bfb06d66244 100644 --- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json +++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/bmv2.json @@ -4,62 +4,101 @@ "name" : "scalars_0", "id" : 0, "fields" : [ - ["tmp_0", 16, false], + ["tmp_0", 1, false], + ["tmp_2", 3, false], + ["tmp_4", 8, false], + ["gtpu_ext_len_0", 8, false], ["tmp_1", 16, false], - ["tmp_2", 4, false], - ["tmp", 32, false], - ["tmp_3", 32, false], - ["spgw_ingress_hasReturned", 1, false], - ["egress_next_tmp", 1, false], - ["spgw_egress_hasReturned", 1, false], - ["fabric_metadata_t._ip_eth_type0", 16, false], - ["fabric_metadata_t._vlan_id1", 12, false], - ["fabric_metadata_t._vlan_pri2", 3, false], - ["fabric_metadata_t._vlan_cfi3", 1, false], - ["fabric_metadata_t._mpls_label4", 20, false], - ["fabric_metadata_t._mpls_ttl5", 8, false], - ["fabric_metadata_t._skip_forwarding6", 1, false], - ["fabric_metadata_t._skip_next7", 1, false], - ["fabric_metadata_t._fwd_type8", 3, false], - ["fabric_metadata_t._next_id9", 32, false], - ["fabric_metadata_t._is_multicast10", 1, false], - ["fabric_metadata_t._is_controller_packet_out11", 1, false], - ["fabric_metadata_t._ip_proto12", 8, false], - ["fabric_metadata_t._l4_sport13", 16, false], - ["fabric_metadata_t._l4_dport14", 16, false], - ["fabric_metadata_t._ipv4_src_addr15", 32, false], - ["fabric_metadata_t._ipv4_dst_addr16", 32, false], - ["fabric_metadata_t._inner_l4_sport17", 16, false], - ["fabric_metadata_t._inner_l4_dport18", 16, false], - ["fabric_metadata_t._spgw_direction19", 2, false], - ["fabric_metadata_t._spgw_ipv4_len20", 16, false], - ["fabric_metadata_t._spgw_teid21", 32, false], - ["fabric_metadata_t._spgw_tunnel_src_port22", 16, false], - ["fabric_metadata_t._spgw_tunnel_src_addr23", 32, false], - ["fabric_metadata_t._spgw_tunnel_dst_addr24", 32, false], - ["fabric_metadata_t._spgw_ctr_id25", 32, false], - ["fabric_metadata_t._spgw_far_id26", 32, false], - ["fabric_metadata_t._spgw_src_iface27", 8, false], - ["fabric_metadata_t._spgw_skip_spgw28", 1, false], - ["fabric_metadata_t._spgw_pdr_hit29", 1, false], - ["fabric_metadata_t._spgw_far_dropped30", 1, false], - ["fabric_metadata_t._spgw_notify_spgwc31", 1, false], - ["fabric_metadata_t._spgw_needs_gtpu_encap32", 1, false], - ["fabric_metadata_t._spgw_needs_gtpu_decap33", 1, false], - ["_padding_0", 6, false] + ["tmp_3", 16, false], + ["tmp_5", 4, false], + ["tmp_6", 16, false], + ["tmp_7", 64, false], + ["tmp_8", 32, false], + ["tmp_9", 32, false], + ["tmp_10", 32, false], + ["dscp_rewriter_tmp_dscp", 6, false], + ["userMetadata._lkp_is_ipv40", 1, false], + ["userMetadata._lkp_ipv4_src1", 32, false], + ["userMetadata._lkp_ipv4_dst2", 32, false], + ["userMetadata._lkp_ip_proto3", 8, false], + ["userMetadata._lkp_l4_sport4", 16, false], + ["userMetadata._lkp_l4_dport5", 16, false], + ["userMetadata._lkp_icmp_type6", 8, false], + ["userMetadata._lkp_icmp_code7", 8, false], + ["userMetadata._ip_eth_type8", 16, false], + ["userMetadata._vlan_id9", 12, false], + ["userMetadata._vlan_pri10", 3, false], + ["userMetadata._vlan_cfi11", 1, false], + ["userMetadata._mpls_label12", 20, false], + ["userMetadata._mpls_ttl13", 8, false], + ["userMetadata._skip_forwarding14", 1, false], + ["userMetadata._skip_next15", 1, false], + ["userMetadata._fwd_type16", 3, false], + ["userMetadata._next_id17", 32, false], + ["userMetadata._is_multicast18", 1, false], + ["userMetadata._is_controller_packet_out19", 1, false], + ["userMetadata._ip_proto20", 8, false], + ["userMetadata._l4_sport21", 16, false], + ["userMetadata._l4_dport22", 16, false], + ["userMetadata._ipv4_src_addr23", 32, false], + ["userMetadata._ipv4_dst_addr24", 32, false], + ["userMetadata._slice_id25", 4, false], + ["userMetadata._packet_color26", 2, false], + ["userMetadata._tc27", 2, false], + ["userMetadata._dscp28", 6, false], + ["userMetadata._inner_l4_sport29", 16, false], + ["userMetadata._inner_l4_dport30", 16, false], + ["userMetadata._spgw_ipv4_len31", 16, false], + ["userMetadata._spgw_teid32", 32, false], + ["userMetadata._spgw_tunnel_src_port33", 16, false], + ["userMetadata._spgw_tunnel_src_addr34", 32, false], + ["userMetadata._spgw_tunnel_dst_addr35", 32, false], + ["userMetadata._spgw_ctr_id36", 32, false], + ["userMetadata._spgw_far_id37", 32, false], + ["userMetadata._spgw_src_iface38", 8, false], + ["userMetadata._spgw_qfi39", 6, false], + ["userMetadata._spgw_skip_spgw40", 1, false], + ["userMetadata._spgw_notify_spgwc41", 1, false], + ["userMetadata._spgw_needs_gtpu_encap42", 1, false], + ["userMetadata._spgw_needs_gtpu_decap43", 1, false], + ["userMetadata._spgw_skip_egress_pdr_ctr44", 1, false], + ["userMetadata._spgw_needs_qfi_push45", 1, false], + ["userMetadata._port_type46", 2, false], + ["_padding_0", 2, false] ] }, { - "name" : "standard_metadata", + "name" : "packet_out_header_t", "id" : 1, + "fields" : [ + ["egress_port", 9, false], + ["do_forwarding", 1, false], + ["_pad", 6, false] + ] + }, + { + "name" : "gtpu_t", + "id" : 2, + "fields" : [ + ["version", 3, false], + ["pt", 1, false], + ["spare", 1, false], + ["ex_flag", 1, false], + ["seq_flag", 1, false], + ["npdu_flag", 1, false], + ["msgtype", 8, false], + ["msglen", 16, false], + ["teid", 32, false] + ] + }, + { + "name" : "standard_metadata", + "id" : 3, "fields" : [ ["ingress_port", 9, false], ["egress_spec", 9, false], ["egress_port", 9, false], - ["clone_spec", 32, false], ["instance_type", 32, false], - ["drop", 1, false], - ["recirculate_port", 16, false], ["packet_length", 32, false], ["enq_timestamp", 32, false], ["enq_qdepth", 19, false], @@ -67,20 +106,17 @@ ["deq_qdepth", 19, false], ["ingress_global_timestamp", 48, false], ["egress_global_timestamp", 48, false], - ["lf_field_list", 32, false], ["mcast_grp", 16, false], - ["resubmit_flag", 32, false], ["egress_rid", 16, false], - ["recirculate_flag", 32, false], ["checksum_error", 1, false], ["parser_error", 32, false], ["priority", 3, false], - ["_padding", 2, false] + ["_padding", 3, false] ] }, { "name" : "ethernet_t", - "id" : 2, + "id" : 4, "fields" : [ ["dst_addr", 48, false], ["src_addr", 48, false] @@ -88,7 +124,7 @@ }, { "name" : "vlan_tag_t", - "id" : 3, + "id" : 5, "fields" : [ ["eth_type", 16, false], ["pri", 3, false], @@ -98,14 +134,14 @@ }, { "name" : "eth_type_t", - "id" : 4, + "id" : 6, "fields" : [ ["value", 16, false] ] }, { "name" : "mpls_t", - "id" : 5, + "id" : 7, "fields" : [ ["label", 20, false], ["tc", 3, false], @@ -115,7 +151,7 @@ }, { "name" : "ipv4_t", - "id" : 6, + "id" : 8, "fields" : [ ["version", 4, false], ["ihl", 4, false], @@ -134,7 +170,7 @@ }, { "name" : "udp_t", - "id" : 7, + "id" : 9, "fields" : [ ["sport", 16, false], ["dport", 16, false], @@ -143,23 +179,30 @@ ] }, { - "name" : "gtpu_t", - "id" : 8, + "name" : "gtpu_options_t", + "id" : 10, "fields" : [ - ["version", 3, false], - ["pt", 1, false], - ["spare", 1, false], - ["ex_flag", 1, false], - ["seq_flag", 1, false], - ["npdu_flag", 1, false], - ["msgtype", 8, false], - ["msglen", 16, false], - ["teid", 32, false] + ["seq_num", 16, false], + ["n_pdu_num", 8, false], + ["next_ext", 8, false] + ] + }, + { + "name" : "gtpu_ext_psc_t", + "id" : 11, + "fields" : [ + ["len", 8, false], + ["type", 4, false], + ["spare0", 4, false], + ["ppp", 1, false], + ["rqi", 1, false], + ["qfi", 6, false], + ["next_ext", 8, false] ] }, { "name" : "tcp_t", - "id" : 9, + "id" : 12, "fields" : [ ["sport", 16, false], ["dport", 16, false], @@ -176,7 +219,7 @@ }, { "name" : "icmp_t", - "id" : 10, + "id" : 13, "fields" : [ ["icmp_type", 8, false], ["icmp_code", 8, false], @@ -186,17 +229,9 @@ ["timestamp", 64, false] ] }, - { - "name" : "packet_out_header_t", - "id" : 11, - "fields" : [ - ["egress_port", 9, false], - ["_pad", 7, false] - ] - }, { "name" : "packet_in_header_t", - "id" : 12, + "id" : 14, "fields" : [ ["ingress_port", 9, false], ["_pad", 7, false] @@ -205,148 +240,190 @@ ], "headers" : [ { - "name" : "scalars", + "name" : "tmp", "id" : 0, + "header_type" : "packet_out_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_0", + "id" : 1, + "header_type" : "gtpu_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "scalars", + "id" : 2, "header_type" : "scalars_0", "metadata" : true, "pi_omit" : true }, { "name" : "standard_metadata", - "id" : 1, + "id" : 3, "header_type" : "standard_metadata", "metadata" : true, "pi_omit" : true }, { "name" : "ethernet", - "id" : 2, + "id" : 4, "header_type" : "ethernet_t", "metadata" : false, "pi_omit" : true }, { "name" : "vlan_tag", - "id" : 3, + "id" : 5, "header_type" : "vlan_tag_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_vlan_tag", - "id" : 4, + "id" : 6, "header_type" : "vlan_tag_t", "metadata" : false, "pi_omit" : true }, { "name" : "eth_type", - "id" : 5, + "id" : 7, "header_type" : "eth_type_t", "metadata" : false, "pi_omit" : true }, { "name" : "mpls", - "id" : 6, + "id" : 8, "header_type" : "mpls_t", "metadata" : false, "pi_omit" : true }, { "name" : "gtpu_ipv4", - "id" : 7, + "id" : 9, "header_type" : "ipv4_t", "metadata" : false, "pi_omit" : true }, { "name" : "gtpu_udp", - "id" : 8, + "id" : 10, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "outer_gtpu", - "id" : 9, + "id" : 11, "header_type" : "gtpu_t", "metadata" : false, "pi_omit" : true }, + { + "name" : "outer_gtpu_options", + "id" : 12, + "header_type" : "gtpu_options_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "outer_gtpu_ext_psc", + "id" : 13, + "header_type" : "gtpu_ext_psc_t", + "metadata" : false, + "pi_omit" : true + }, { "name" : "gtpu", - "id" : 10, + "id" : 14, "header_type" : "gtpu_t", "metadata" : false, "pi_omit" : true }, + { + "name" : "gtpu_options", + "id" : 15, + "header_type" : "gtpu_options_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_ext_psc", + "id" : 16, + "header_type" : "gtpu_ext_psc_t", + "metadata" : false, + "pi_omit" : true + }, { "name" : "inner_ipv4", - "id" : 11, + "id" : 17, "header_type" : "ipv4_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_udp", - "id" : 12, + "id" : 18, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_tcp", - "id" : 13, + "id" : 19, "header_type" : "tcp_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_icmp", - "id" : 14, + "id" : 20, "header_type" : "icmp_t", "metadata" : false, "pi_omit" : true }, { "name" : "ipv4", - "id" : 15, + "id" : 21, "header_type" : "ipv4_t", "metadata" : false, "pi_omit" : true }, { "name" : "tcp", - "id" : 16, + "id" : 22, "header_type" : "tcp_t", "metadata" : false, "pi_omit" : true }, { "name" : "udp", - "id" : 17, + "id" : 23, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "icmp", - "id" : 18, + "id" : 24, "header_type" : "icmp_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_out", - "id" : 19, + "id" : 25, "header_type" : "packet_out_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_in", - "id" : 20, + "id" : 26, "header_type" : "packet_in_header_t", "metadata" : false, "pi_omit" : true @@ -362,7 +439,7 @@ "name" : "fl", "source_info" : { "filename" : "include/control/acl.p4", - "line" : 46, + "line" : 45, "column" : 40, "source_fragment" : "{standard_metadata.ingress_port}" }, @@ -399,10 +476,11 @@ "type" : "hexstr", "value" : "0x00ff", "mask" : null, - "next_state" : "parse_packet_out" + "next_state" : "check_packet_out" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_ethernet" } @@ -415,50 +493,150 @@ ] }, { - "name" : "parse_packet_out", + "name" : "check_packet_out", "id" : 1, "parser_ops" : [ { "parameters" : [ { - "type" : "regular", - "value" : "packet_out" + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + { + "type" : "lookahead", + "value" : [0, 16] } ], - "op" : "extract" - } - ], - "transitions" : [ + "op" : "set" + }, { - "value" : "default", - "mask" : null, - "next_state" : "parse_ethernet" - } - ], - "transition_key" : [] - }, - { - "name" : "parse_ethernet", - "id" : 2, - "parser_ops" : [ + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "tmp" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, { "parameters" : [ { - "type" : "regular", - "value" : "ethernet" + "type" : "field", + "value" : ["tmp", "egress_port"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x7" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } } ], - "op" : "extract" + "op" : "set" }, { "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["tmp", "do_forwarding"] }, { - "type" : "hexstr", - "value" : "0x0ffe" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x6" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp", "_pad"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + } } ], "op" : "set" @@ -470,8 +648,41 @@ "value" : ["scalars", "tmp_0"] }, { - "type" : "lookahead", - "value" : [0, 16] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x6" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } } ], "op" : "set" @@ -480,26 +691,15 @@ "transitions" : [ { "type" : "hexstr", - "value" : "0x88a8", - "mask" : null, - "next_state" : "parse_vlan_tag" - }, - { - "type" : "hexstr", - "value" : "0x9100", - "mask" : null, - "next_state" : "parse_vlan_tag" - }, - { - "type" : "hexstr", - "value" : "0x8100", + "value" : "0x00", "mask" : null, - "next_state" : "parse_vlan_tag" + "next_state" : "parse_packet_out_and_accept" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, - "next_state" : "parse_eth_type" + "next_state" : "strip_packet_out" } ], "transition_key" : [ @@ -510,23 +710,144 @@ ] }, { - "name" : "parse_vlan_tag", - "id" : 3, + "name" : "parse_packet_out_and_accept", + "id" : 2, "parser_ops" : [ { "parameters" : [ { "type" : "regular", - "value" : "vlan_tag" + "value" : "packet_out" } ], "op" : "extract" - }, + } + ], + "transitions" : [ { - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "tmp_1"] + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "strip_packet_out", + "id" : 3, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x00000010" + } + ], + "op" : "advance" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ethernet" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_ethernet", + "id" : 4, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "ethernet" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_1"] + }, + { + "type" : "lookahead", + "value" : [0, 16] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x88a8", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "hexstr", + "value" : "0x9100", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "hexstr", + "value" : "0x8100", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_eth_type" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_1"] + } + ] + }, + { + "name" : "parse_vlan_tag", + "id" : 5, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "vlan_tag" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_3"] }, { "type" : "lookahead", @@ -544,7 +865,8 @@ "next_state" : "parse_inner_vlan_tag" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -552,13 +874,13 @@ "transition_key" : [ { "type" : "field", - "value" : ["scalars", "tmp_1"] + "value" : ["scalars", "tmp_3"] } ] }, { "name" : "parse_inner_vlan_tag", - "id" : 4, + "id" : 6, "parser_ops" : [ { "parameters" : [ @@ -572,7 +894,8 @@ ], "transitions" : [ { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -581,7 +904,7 @@ }, { "name" : "parse_eth_type", - "id" : 5, + "id" : 7, "parser_ops" : [ { "parameters" : [ @@ -607,7 +930,8 @@ "next_state" : "parse_ipv4" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -621,7 +945,7 @@ }, { "name" : "parse_mpls", - "id" : 6, + "id" : 8, "parser_ops" : [ { "parameters" : [ @@ -636,7 +960,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "value" : ["scalars", "userMetadata._mpls_label12"] }, { "type" : "field", @@ -649,7 +973,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl5"] + "value" : ["scalars", "userMetadata._mpls_ttl13"] }, { "type" : "field", @@ -662,7 +986,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_2"] + "value" : ["scalars", "tmp_5"] }, { "type" : "lookahead", @@ -680,7 +1004,8 @@ "next_state" : "parse_ipv4" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_ethernet" } @@ -688,13 +1013,13 @@ "transition_key" : [ { "type" : "field", - "value" : ["scalars", "tmp_2"] + "value" : ["scalars", "tmp_5"] } ] }, { "name" : "parse_ipv4", - "id" : 7, + "id" : 9, "parser_ops" : [ { "parameters" : [ @@ -709,7 +1034,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] + "value" : ["scalars", "userMetadata._ip_proto20"] }, { "type" : "field", @@ -722,7 +1047,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] }, { "type" : "hexstr", @@ -735,7 +1060,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] }, { "type" : "field", @@ -748,7 +1073,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] }, { "type" : "field", @@ -778,7 +1103,8 @@ "next_state" : "parse_icmp" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -792,7 +1118,7 @@ }, { "name" : "parse_tcp", - "id" : 8, + "id" : 10, "parser_ops" : [ { "parameters" : [ @@ -807,7 +1133,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "field", @@ -820,7 +1146,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "userMetadata._l4_dport22"] }, { "type" : "field", @@ -832,7 +1158,8 @@ ], "transitions" : [ { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -841,7 +1168,7 @@ }, { "name" : "parse_udp", - "id" : 9, + "id" : 11, "parser_ops" : [ { "parameters" : [ @@ -856,7 +1183,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "field", @@ -869,7 +1196,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "userMetadata._l4_dport22"] }, { "type" : "field", @@ -877,128 +1204,122 @@ } ], "op" : "set" - } - ], - "transitions" : [ - { - "type" : "hexstr", - "value" : "0x0868", - "mask" : null, - "next_state" : "parse_gtpu" }, - { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [ - { - "type" : "field", - "value" : ["udp", "dport"] - } - ] - }, - { - "name" : "parse_icmp", - "id" : 10, - "parser_ops" : [ { "parameters" : [ { - "type" : "regular", - "value" : "icmp" - } - ], - "op" : "extract" - } - ], - "transitions" : [ - { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [] - }, - { - "name" : "parse_gtpu", - "id" : 11, - "parser_ops" : [ - { - "parameters" : [ + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, { - "type" : "regular", - "value" : "gtpu" + "type" : "lookahead", + "value" : [0, 64] } ], - "op" : "extract" + "op" : "set" }, { "parameters" : [ { - "type" : "regular", - "value" : "inner_ipv4" + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_0" + } + ], + "op" : "add_header" } ], - "op" : "extract" - } - ], - "transitions" : [ - { - "type" : "hexstr", - "value" : "0x06", - "mask" : null, - "next_state" : "parse_tcp" - }, - { - "type" : "hexstr", - "value" : "0x11", - "mask" : null, - "next_state" : "parse_inner_udp" - }, - { - "type" : "hexstr", - "value" : "0x01", - "mask" : null, - "next_state" : "parse_icmp" + "op" : "primitive" }, - { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [ - { - "type" : "field", - "value" : ["inner_ipv4", "protocol"] - } - ] - }, - { - "name" : "parse_inner_udp", - "id" : 12, - "parser_ops" : [ { "parameters" : [ { - "type" : "regular", - "value" : "inner_udp" + "type" : "field", + "value" : ["gtpu_0", "version"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } } ], - "op" : "extract" + "op" : "set" }, { "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport17"] + "value" : ["gtpu_0", "pt"] }, { - "type" : "field", - "value" : ["inner_udp", "sport"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3c" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } } ], "op" : "set" @@ -1007,454 +1328,5027 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport18"] + "value" : ["gtpu_0", "spare"] }, { - "type" : "field", - "value" : ["inner_udp", "dport"] - } - ], - "op" : "set" - } - ], - "transitions" : [ - { - "value" : "default", - "mask" : null, + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3b" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "ex_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3a" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "seq_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x39" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "npdu_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x38" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msgtype"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msglen"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x20" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "teid"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x086801ff", + "mask" : null, + "next_state" : "parse_gtpu" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["udp", "dport"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + } + ] + }, + { + "name" : "parse_icmp", + "id" : 12, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "icmp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, "next_state" : null } ], - "transition_key" : [] + "transition_key" : [] + }, + { + "name" : "parse_gtpu", + "id" : 13, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x000000", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_gtpu_options" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu", "ex_flag"] + }, + { + "type" : "field", + "value" : ["gtpu", "seq_flag"] + }, + { + "type" : "field", + "value" : ["gtpu", "npdu_flag"] + } + ] + }, + { + "name" : "parse_gtpu_options", + "id" : 14, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu_options" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + }, + { + "type" : "lookahead", + "value" : [0, 8] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x8501", + "mask" : null, + "next_state" : "parse_gtpu_ext_psc" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu_options", "next_ext"] + }, + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + } + ] + }, + { + "name" : "parse_gtpu_ext_psc", + "id" : 15, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu_ext_psc" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_qfi39"] + }, + { + "type" : "field", + "value" : ["gtpu_ext_psc", "qfi"] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x00", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu_ext_psc", "next_ext"] + } + ] + }, + { + "name" : "parse_inner_ipv4", + "id" : 16, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_ipv4" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_inner_tcp" + }, + { + "type" : "hexstr", + "value" : "0x11", + "mask" : null, + "next_state" : "parse_inner_udp" + }, + { + "type" : "hexstr", + "value" : "0x01", + "mask" : null, + "next_state" : "parse_inner_icmp" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ] + }, + { + "name" : "parse_inner_udp", + "id" : 17, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_udp" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + }, + { + "type" : "field", + "value" : ["inner_udp", "sport"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + }, + { + "type" : "field", + "value" : ["inner_udp", "dport"] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_tcp", + "id" : 18, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_tcp" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + }, + { + "type" : "field", + "value" : ["inner_tcp", "sport"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + }, + { + "type" : "field", + "value" : ["inner_tcp", "dport"] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_icmp", + "id" : 19, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_icmp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + } + ] + } + ], + "parse_vsets" : [], + "deparsers" : [ + { + "name" : "deparser", + "id" : 0, + "source_info" : { + "filename" : "include/parser.p4", + "line" : 308, + "column" : 8, + "source_fragment" : "FabricDeparser" + }, + "order" : ["packet_in", "ethernet", "vlan_tag", "inner_vlan_tag", "eth_type", "mpls", "gtpu_ipv4", "gtpu_udp", "outer_gtpu", "outer_gtpu_options", "outer_gtpu_ext_psc", "ipv4", "tcp", "udp", "icmp", "gtpu", "gtpu_options", "gtpu_ext_psc", "inner_ipv4", "inner_tcp", "inner_udp", "inner_icmp"], + "primitives" : [] + } + ], + "meter_arrays" : [ + { + "name" : "FabricIngress.qos.slice_tc_meter", + "id" : 0, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 78, + "column" : 41, + "source_fragment" : "slice_tc_meter" + }, + "is_direct" : false, + "size" : 64, + "rate_count" : 2, + "type" : "bytes" + } + ], + "counter_arrays" : [ + { + "name" : "FabricIngress.filtering.ingress_port_vlan_counter", + "id" : 0, + "is_direct" : true, + "binding" : "FabricIngress.filtering.ingress_port_vlan", + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 31, + "column" : 50, + "source_fragment" : "ingress_port_vlan_counter" + } + }, + { + "name" : "FabricIngress.filtering.fwd_classifier_counter", + "id" : 1, + "is_direct" : true, + "binding" : "FabricIngress.filtering.fwd_classifier", + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 87, + "column" : 50, + "source_fragment" : "fwd_classifier_counter" + } + }, + { + "name" : "FabricIngress.forwarding.bridging_counter", + "id" : 2, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.bridging", + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 36, + "column" : 50, + "source_fragment" : "bridging_counter" + } + }, + { + "name" : "FabricIngress.forwarding.mpls_counter", + "id" : 3, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.mpls", + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 63, + "column" : 50, + "source_fragment" : "mpls_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_mpls_counter", + "id" : 4, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_mpls", + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 29, + "column" : 50, + "source_fragment" : "next_mpls_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_vlan_counter", + "id" : 5, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_vlan", + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 54, + "column" : 50, + "source_fragment" : "next_vlan_counter" + } + }, + { + "name" : "FabricIngress.acl.acl_counter", + "id" : 6, + "is_direct" : true, + "binding" : "FabricIngress.acl.acl", + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 29, + "column" : 50, + "source_fragment" : "acl_counter" + } + }, + { + "name" : "FabricIngress.next.xconnect_counter", + "id" : 7, + "is_direct" : true, + "binding" : "FabricIngress.next.xconnect", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 56, + "column" : 50, + "source_fragment" : "xconnect_counter" + } + }, + { + "name" : "FabricIngress.next.hashed_counter", + "id" : 8, + "is_direct" : true, + "binding" : "FabricIngress.next.hashed", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 126, + "column" : 50, + "source_fragment" : "hashed_counter" + } + }, + { + "name" : "FabricIngress.next.multicast_counter", + "id" : 9, + "is_direct" : true, + "binding" : "FabricIngress.next.multicast", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 163, + "column" : 50, + "source_fragment" : "multicast_counter" + } + }, + { + "name" : "FabricIngress.slice_tc_classifier.classifier_stats", + "id" : 10, + "is_direct" : true, + "binding" : "FabricIngress.slice_tc_classifier.classifier", + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 32, + "column" : 40, + "source_fragment" : "classifier_stats" + } + }, + { + "name" : "FabricIngress.qos.queues_stats", + "id" : 11, + "is_direct" : true, + "binding" : "FabricIngress.qos.queues", + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 80, + "column" : 40, + "source_fragment" : "queues_stats" + } + }, + { + "name" : "FabricIngress.port_counters_control.egress_port_counter", + "id" : 12, + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 26, + "column" : 48, + "source_fragment" : "egress_port_counter" + }, + "size" : 511, + "is_direct" : false + }, + { + "name" : "FabricIngress.port_counters_control.ingress_port_counter", + "id" : 13, + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 27, + "column" : 48, + "source_fragment" : "ingress_port_counter" + }, + "size" : 511, + "is_direct" : false + }, + { + "name" : "FabricIngress.spgw.pdr_counter", + "id" : 14, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 110, + "column" : 53, + "source_fragment" : "pdr_counter" + }, + "size" : 2048, + "is_direct" : false + }, + { + "name" : "FabricEgress.egress_next.egress_vlan_counter", + "id" : 15, + "is_direct" : true, + "binding" : "FabricEgress.egress_next.egress_vlan", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 248, + "column" : 50, + "source_fragment" : "egress_vlan_counter" + } + }, + { + "name" : "FabricEgress.spgw.pdr_counter", + "id" : 16, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 307, + "column" : 53, + "source_fragment" : "pdr_counter" + }, + "size" : 2048, + "is_direct" : false + } + ], + "register_arrays" : [], + "calculations" : [ + { + "name" : "calc", + "id" : 0, + "source_info" : { + "filename" : "include/checksum.p4", + "line" : 28, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["ipv4", "version"] + }, + { + "type" : "field", + "value" : ["ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["ipv4", "dst_addr"] + } + ] + }, + { + "name" : "calc_0", + "id" : 1, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 393, + "column" : 8, + "source_fragment" : "update_checksum(gtpu_ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["gtpu_ipv4", "version"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["gtpu_ipv4", "dst_addr"] + } + ] + }, + { + "name" : "calc_1", + "id" : 2, + "source_info" : { + "filename" : "include/checksum.p4", + "line" : 57, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["ipv4", "version"] + }, + { + "type" : "field", + "value" : ["ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["ipv4", "dst_addr"] + } + ] + } + ], + "learn_lists" : [], + "actions" : [ + { + "name" : "nop", + "id" : 0, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 1, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 2, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 3, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 4, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 5, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 6, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 7, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "NoAction", + "id" : 8, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "NoAction", + "id" : 9, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.filtering.deny", + "id" : 10, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_forwarding14"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 36, + "column" : 40, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 37, + "column" : 34, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type46"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 136, + "column" : 38, + "source_fragment" : "0x0; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit", + "id" : 11, + "runtime_data" : [ + { + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type46"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 44, + "column" : 34, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit_with_internal_vlan", + "id" : 12, + "runtime_data" : [ + { + "name" : "vlan_id", + "bitwidth" : 12 + }, + { + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 49, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type46"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 44, + "column" : 34, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.set_forwarding_type", + "id" : 13, + "runtime_data" : [ + { + "name" : "fwd_type", + "bitwidth" : 3 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._fwd_type16"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 90, + "column" : 33, + "source_fragment" : "= fwd_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_bridging", + "id" : 14, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.pop_mpls_and_next", + "id" : 15, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label12"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 66, + "column" : 35, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_routing_v4", + "id" : 16, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.nop_routing_v4", + "id" : 17, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.pre_next.set_mpls_label", + "id" : 18, + "runtime_data" : [ + { + "name" : "label", + "bitwidth" : 20 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label12"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 32, + "column" : 35, + "source_fragment" : "= label; ..." + } + } + ] + }, + { + "name" : "FabricIngress.pre_next.set_vlan", + "id" : 19, + "runtime_data" : [ + { + "name" : "vlan_id", + "bitwidth" : 12 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 57, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.set_next_id_acl", + "id" : 20, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 32, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.punt_to_cpu", + "id" : 21, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "hexstr", + "value" : "0x00ff" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "standard_metadata.egress_spec = 255" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 39, + "column" : 28, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.set_clone_session_id", + "id" : 22, + "runtime_data" : [ + { + "name" : "clone_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "clone_ingress_pkt_to_egress", + "parameters" : [ + { + "type" : "runtime_data", + "value" : 0 + }, + { + "type" : "hexstr", + "value" : "0x1" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})" + } + } + ] + }, + { + "name" : "FabricIngress.acl.drop", + "id" : 23, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 50, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 51, + "column" : 28, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.nop_acl", + "id" : 24, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.next.output_xconnect", + "id" : 25, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.set_next_id_xconnect", + "id" : 26, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 64, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.output_hashed", + "id" : 27, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.routing_hashed", + "id" : 28, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + }, + { + "name" : "smac", + "bitwidth" : 48 + }, + { + "name" : "dmac", + "bitwidth" : 48 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ethernet", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 36, + "column" : 8, + "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ethernet", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.set_mcast_group_id", + "id" : 29, + "runtime_data" : [ + { + "name" : "group_id", + "bitwidth" : 16 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "mcast_grp"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 166, + "column" : 8, + "source_fragment" : "standard_metadata.mcast_grp = group_id" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._is_multicast18"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 167, + "column" : 37, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.slice_tc_classifier.set_slice_id_tc", + "id" : 30, + "runtime_data" : [ + { + "name" : "slice_id", + "bitwidth" : 4 + }, + { + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 35, + "column" : 27, + "source_fragment" : "= slice_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 36, + "column" : 21, + "source_fragment" : "= tc; ..." + } + } + ] + }, + { + "name" : "FabricIngress.slice_tc_classifier.trust_dscp", + "id" : 31, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x0f" + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 44, + "column" : 27, + "source_fragment" : "= hdr.ipv4.dscp[4 +2 -1:2]; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 45, + "column" : 21, + "source_fragment" : "= hdr.ipv4.dscp[2 -1:0]; ..." + } + } + ] + }, + { + "name" : "FabricIngress.qos.set_queue", + "id" : 32, + "runtime_data" : [ + { + "name" : "qid", + "bitwidth" : 5 + } + ], + "primitives" : [] + }, + { + "name" : "FabricIngress.qos.meter_drop", + "id" : 33, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 89, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_tcp", + "id" : 34, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "tcp" + }, + { + "type" : "header", + "value" : "inner_tcp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.tcp = hdr.inner_tcp" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_tcp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 56, + "column" : 8, + "source_fragment" : "hdr.inner_tcp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_udp", + "id" : 35, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + }, + { + "type" : "header", + "value" : "inner_udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.udp = hdr.inner_udp" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 62, + "column" : 8, + "source_fragment" : "hdr.inner_udp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_icmp", + "id" : 36, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 67, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "icmp" + }, + { + "type" : "header", + "value" : "inner_icmp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 68, + "column" : 8, + "source_fragment" : "hdr.icmp = hdr.inner_icmp" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_icmp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 69, + "column" : 8, + "source_fragment" : "hdr.inner_icmp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_unknown", + "id" : 37, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu.decap_inner_tcp", + "id" : 38, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "tcp" + }, + { + "type" : "header", + "value" : "inner_tcp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "hdr.tcp = hdr.inner_tcp" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_tcp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 56, + "column" : 8, + "source_fragment" : "hdr.inner_tcp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu.decap_inner_udp", + "id" : 39, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + }, + { + "type" : "header", + "value" : "inner_udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.udp = hdr.inner_udp" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 62, + "column" : 8, + "source_fragment" : "hdr.inner_udp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu.decap_inner_icmp", + "id" : 40, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 67, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "icmp" + }, + { + "type" : "header", + "value" : "inner_icmp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 68, + "column" : 8, + "source_fragment" : "hdr.icmp = hdr.inner_icmp" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_icmp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 69, + "column" : 8, + "source_fragment" : "hdr.inner_icmp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.decap_gtpu.decap_inner_unknown", + "id" : 41, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 149, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ip_proto20"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 39, + "column" : 27, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_sport21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_sport29"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 42, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._inner_l4_dport30"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 43, + "column" : 27, + "source_fragment" : "= fabric_md.inner_l4_dport; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "ipv4" + }, + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "inner_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 46, + "column" : 8, + "source_fragment" : "hdr.inner_ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 47, + "column" : 8, + "source_fragment" : "hdr.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_options" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 48, + "column" : 8, + "source_fragment" : "hdr.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ext_psc" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "hdr.gtpu_ext_psc.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "udp" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "hdr.udp.setInvalid()" + } + } + ] + }, + { + "name" : "FabricIngress.spgw.load_iface", + "id" : 42, + "runtime_data" : [ + { + "name" : "src_iface", + "bitwidth" : 8 + }, + { + "name" : "slice_id", + "bitwidth" : 4 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_src_iface38"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 122, + "column" : 33, + "source_fragment" : "= src_iface; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_skip_spgw40"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 123, + "column" : 33, + "source_fragment" : "= false; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 124, + "column" : 27, + "source_fragment" : "= slice_id; ..." + } } ] - } - ], - "parse_vsets" : [], - "deparsers" : [ - { - "name" : "deparser", - "id" : 0, - "source_info" : { - "filename" : "include/parser.p4", - "line" : 268, - "column" : 8, - "source_fragment" : "FabricDeparser" - }, - "order" : ["packet_in", "ethernet", "vlan_tag", "inner_vlan_tag", "eth_type", "mpls", "gtpu_ipv4", "gtpu_udp", "outer_gtpu", "ipv4", "tcp", "udp", "icmp", "gtpu", "inner_ipv4", "inner_tcp", "inner_udp", "inner_icmp"] - } - ], - "meter_arrays" : [], - "counter_arrays" : [ - { - "name" : "FabricIngress.filtering.ingress_port_vlan_counter", - "id" : 0, - "is_direct" : true, - "binding" : "FabricIngress.filtering.ingress_port_vlan", - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 31, - "column" : 50, - "source_fragment" : "ingress_port_vlan_counter" - } - }, - { - "name" : "FabricIngress.filtering.fwd_classifier_counter", - "id" : 1, - "is_direct" : true, - "binding" : "FabricIngress.filtering.fwd_classifier", - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 85, - "column" : 50, - "source_fragment" : "fwd_classifier_counter" - } - }, - { - "name" : "FabricIngress.forwarding.bridging_counter", - "id" : 2, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.bridging", - "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 36, - "column" : 50, - "source_fragment" : "bridging_counter" - } - }, - { - "name" : "FabricIngress.forwarding.mpls_counter", - "id" : 3, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.mpls", - "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 63, - "column" : 50, - "source_fragment" : "mpls_counter" - } - }, - { - "name" : "FabricIngress.acl.acl_counter", - "id" : 4, - "is_direct" : true, - "binding" : "FabricIngress.acl.acl", - "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 30, - "column" : 50, - "source_fragment" : "acl_counter" - } - }, - { - "name" : "FabricIngress.next.next_vlan_counter", - "id" : 5, - "is_direct" : true, - "binding" : "FabricIngress.next.next_vlan", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 67, - "column" : 50, - "source_fragment" : "next_vlan_counter" - } - }, - { - "name" : "FabricIngress.next.xconnect_counter", - "id" : 6, - "is_direct" : true, - "binding" : "FabricIngress.next.xconnect", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 107, - "column" : 50, - "source_fragment" : "xconnect_counter" - } - }, - { - "name" : "FabricIngress.next.hashed_counter", - "id" : 7, - "is_direct" : true, - "binding" : "FabricIngress.next.hashed", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 184, - "column" : 50, - "source_fragment" : "hashed_counter" - } - }, - { - "name" : "FabricIngress.next.multicast_counter", - "id" : 8, - "is_direct" : true, - "binding" : "FabricIngress.next.multicast", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 228, - "column" : 50, - "source_fragment" : "multicast_counter" - } - }, - { - "name" : "FabricIngress.port_counters_control.egress_port_counter", - "id" : 9, - "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 26, - "column" : 48, - "source_fragment" : "egress_port_counter" - }, - "size" : 511, - "is_direct" : false - }, - { - "name" : "FabricIngress.port_counters_control.ingress_port_counter", - "id" : 10, - "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 27, - "column" : 48, - "source_fragment" : "ingress_port_counter" - }, - "size" : 511, - "is_direct" : false }, { - "name" : "FabricIngress.spgw_ingress.pdr_counter", - "id" : 11, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 180, - "column" : 53, - "source_fragment" : "pdr_counter" - }, - "size" : 2048, - "is_direct" : false + "name" : "FabricIngress.spgw.iface_miss", + "id" : 43, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_src_iface38"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 127, + "column" : 44, + "source_fragment" : "8w0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_skip_spgw40"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 128, + "column" : 33, + "source_fragment" : "= true; ..." + } + } + ] }, { - "name" : "FabricEgress.egress_next.egress_vlan_counter", - "id" : 12, - "is_direct" : true, - "binding" : "FabricEgress.egress_next.egress_vlan", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 313, - "column" : 50, - "source_fragment" : "egress_vlan_counter" - } + "name" : "FabricIngress.spgw.load_pdr", + "id" : 44, + "runtime_data" : [ + { + "name" : "ctr_id", + "bitwidth" : 32 + }, + { + "name" : "far_id", + "bitwidth" : 32 + }, + { + "name" : "needs_gtpu_decap", + "bitwidth" : 1 + }, + { + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ctr_id36"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 153, + "column" : 30, + "source_fragment" : "= ctr_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_far_id37"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 154, + "column" : 30, + "source_fragment" : "= far_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap43"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 2 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 155, + "column" : 40, + "source_fragment" : "= (bool)needs_gtpu_decap; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 156, + "column" : 21, + "source_fragment" : "= tc; ..." + } + } + ] }, { - "name" : "FabricEgress.spgw_egress.pdr_counter", - "id" : 13, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 301, - "column" : 53, - "source_fragment" : "pdr_counter" - }, - "size" : 2048, - "is_direct" : false - } - ], - "register_arrays" : [], - "calculations" : [ - { - "name" : "calc", - "id" : 0, - "source_info" : { - "filename" : "include/checksum.p4", - "line" : 28, - "column" : 8, - "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ + "name" : "FabricIngress.spgw.load_pdr", + "id" : 45, + "runtime_data" : [ + { + "name" : "ctr_id", + "bitwidth" : 32 + }, + { + "name" : "far_id", + "bitwidth" : 32 + }, + { + "name" : "needs_gtpu_decap", + "bitwidth" : 1 + }, + { + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ctr_id36"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 153, + "column" : 30, + "source_fragment" : "= ctr_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_far_id37"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 154, + "column" : 30, + "source_fragment" : "= far_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap43"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 2 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 155, + "column" : 40, + "source_fragment" : "= (bool)needs_gtpu_decap; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 156, + "column" : 21, + "source_fragment" : "= tc; ..." + } + } + ] + }, + { + "name" : "FabricIngress.spgw.load_pdr_qos", + "id" : 46, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "version"] + "name" : "ctr_id", + "bitwidth" : 32 }, { - "type" : "field", - "value" : ["ipv4", "ihl"] + "name" : "far_id", + "bitwidth" : 32 }, { - "type" : "field", - "value" : ["ipv4", "dscp"] + "name" : "needs_gtpu_decap", + "bitwidth" : 1 }, { - "type" : "field", - "value" : ["ipv4", "ecn"] + "name" : "needs_qfi_push", + "bitwidth" : 1 }, { - "type" : "field", - "value" : ["ipv4", "total_len"] + "name" : "qfi", + "bitwidth" : 6 }, { - "type" : "field", - "value" : ["ipv4", "identification"] - }, + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "flags"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ctr_id36"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 153, + "column" : 30, + "source_fragment" : "= ctr_id; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "frag_offset"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_far_id37"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 154, + "column" : 30, + "source_fragment" : "= far_id; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "ttl"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap43"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 2 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 155, + "column" : 40, + "source_fragment" : "= (bool)needs_gtpu_decap; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "protocol"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + { + "type" : "runtime_data", + "value" : 5 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 156, + "column" : 21, + "source_fragment" : "= tc; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "src_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_qfi39"] + }, + { + "type" : "runtime_data", + "value" : 4 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 167, + "column" : 27, + "source_fragment" : "= qfi; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "dst_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_qfi_push45"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 3 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 168, + "column" : 38, + "source_fragment" : "= (bool)needs_qfi_push; ..." + } } ] }, { - "name" : "calc_0", - "id" : 1, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 362, - "column" : 8, - "source_fragment" : "update_checksum(gtpu_ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ + "name" : "FabricIngress.spgw.load_pdr_qos", + "id" : 47, + "runtime_data" : [ { - "type" : "field", - "value" : ["gtpu_ipv4", "version"] + "name" : "ctr_id", + "bitwidth" : 32 }, { - "type" : "field", - "value" : ["gtpu_ipv4", "ihl"] + "name" : "far_id", + "bitwidth" : 32 }, { - "type" : "field", - "value" : ["gtpu_ipv4", "dscp"] + "name" : "needs_gtpu_decap", + "bitwidth" : 1 }, { - "type" : "field", - "value" : ["gtpu_ipv4", "ecn"] + "name" : "needs_qfi_push", + "bitwidth" : 1 }, { - "type" : "field", - "value" : ["gtpu_ipv4", "total_len"] + "name" : "qfi", + "bitwidth" : 6 }, { - "type" : "field", - "value" : ["gtpu_ipv4", "identification"] - }, + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["gtpu_ipv4", "flags"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ctr_id36"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 153, + "column" : 30, + "source_fragment" : "= ctr_id; ..." + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "frag_offset"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_far_id37"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 154, + "column" : 30, + "source_fragment" : "= far_id; ..." + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "ttl"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap43"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 2 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 155, + "column" : 40, + "source_fragment" : "= (bool)needs_gtpu_decap; ..." + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "protocol"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + { + "type" : "runtime_data", + "value" : 5 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 156, + "column" : 21, + "source_fragment" : "= tc; ..." + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "src_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_qfi39"] + }, + { + "type" : "runtime_data", + "value" : 4 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 167, + "column" : 27, + "source_fragment" : "= qfi; ..." + } }, { - "type" : "field", - "value" : ["gtpu_ipv4", "dst_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_qfi_push45"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 3 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 168, + "column" : 38, + "source_fragment" : "= (bool)needs_qfi_push; ..." + } } ] }, { - "name" : "calc_1", - "id" : 2, - "source_info" : { - "filename" : "include/checksum.p4", - "line" : 57, - "column" : 8, - "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ - { - "type" : "field", - "value" : ["ipv4", "version"] - }, + "name" : "FabricIngress.spgw.load_normal_far", + "id" : 48, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "ihl"] + "name" : "drop", + "bitwidth" : 1 }, { - "type" : "field", - "value" : ["ipv4", "dscp"] - }, + "name" : "notify_cp", + "bitwidth" : 1 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "ecn"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_forwarding14"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 207, + "column" : 34, + "source_fragment" : "= (bool)drop; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "total_len"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 208, + "column" : 28, + "source_fragment" : "= (bool)drop; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "identification"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_notify_spgwc41"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 1 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 209, + "column" : 36, + "source_fragment" : "= (bool)notify_cp; ..." + } + } + ] + }, + { + "name" : "FabricIngress.spgw.load_tunnel_far", + "id" : 49, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "flags"] + "name" : "drop", + "bitwidth" : 1 }, { - "type" : "field", - "value" : ["ipv4", "frag_offset"] + "name" : "notify_cp", + "bitwidth" : 1 }, { - "type" : "field", - "value" : ["ipv4", "ttl"] + "name" : "tunnel_src_port", + "bitwidth" : 16 }, { - "type" : "field", - "value" : ["ipv4", "protocol"] + "name" : "tunnel_src_addr", + "bitwidth" : 32 }, { - "type" : "field", - "value" : ["ipv4", "src_addr"] + "name" : "tunnel_dst_addr", + "bitwidth" : 32 }, { - "type" : "field", - "value" : ["ipv4", "dst_addr"] + "name" : "teid", + "bitwidth" : 32 } - ] - } - ], - "learn_lists" : [], - "actions" : [ - { - "name" : "nop", - "id" : 0, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 1, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 2, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 3, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 4, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 5, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 6, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.filtering.deny", - "id" : 7, - "runtime_data" : [], + ], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_forwarding6"] + "value" : ["scalars", "userMetadata._skip_forwarding14"] }, { "type" : "expression", @@ -1464,18 +6358,28 @@ "op" : "b2d", "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } } } } } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 36, - "column" : 40, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 218, + "column" : 34, + "source_fragment" : "= (bool)drop; ..." } }, { @@ -1483,7 +6387,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["scalars", "userMetadata._skip_next15"] }, { "type" : "expression", @@ -1493,148 +6397,134 @@ "op" : "b2d", "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } } } } } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 37, - "column" : 34, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 219, + "column" : 28, + "source_fragment" : "= (bool)drop; ..." } - } - ] - }, - { - "name" : "FabricIngress.filtering.permit", - "id" : 8, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.filtering.permit_with_internal_vlan", - "id" : 9, - "runtime_data" : [ - { - "name" : "vlan_id", - "bitwidth" : 12 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["scalars", "userMetadata._spgw_notify_spgwc41"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 1 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 47, - "column" : 32, - "source_fragment" : "= vlan_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 220, + "column" : 36, + "source_fragment" : "= (bool)notify_cp; ..." } - } - ] - }, - { - "name" : "FabricIngress.filtering.set_forwarding_type", - "id" : 10, - "runtime_data" : [ - { - "name" : "fwd_type", - "bitwidth" : 3 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_encap42"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 88, - "column" : 33, - "source_fragment" : "= fwd_type; ..." + "filename" : "include/control/spgw.p4", + "line" : 222, + "column" : 40, + "source_fragment" : "= true; ..." } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id_bridging", - "id" : 11, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._spgw_teid32"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 5 } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 223, + "column" : 28, + "source_fragment" : "= teid; ..." } - } - ] - }, - { - "name" : "FabricIngress.forwarding.pop_mpls_and_next", - "id" : 12, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_port33"] }, { - "type" : "hexstr", - "value" : "0x000000" + "type" : "runtime_data", + "value" : 2 } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 66, - "column" : 35, - "source_fragment" : "= 0; ..." + "filename" : "include/control/spgw.p4", + "line" : 224, + "column" : 39, + "source_fragment" : "= tunnel_src_port; ..." } }, { @@ -1642,112 +6532,75 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_addr34"] }, { "type" : "runtime_data", - "value" : 0 - } - ], - "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 32, - "source_fragment" : "= next_id; ..." - } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id_routing_v4", - "id" : 13, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + "value" : 3 + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 225, + "column" : 39, + "source_fragment" : "= tunnel_src_addr; ..." + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._spgw_tunnel_dst_addr35"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 4 } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 226, + "column" : 39, + "source_fragment" : "= tunnel_dst_addr; ..." } - } - ] - }, - { - "name" : "FabricIngress.forwarding.nop_routing_v4", - "id" : 14, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.acl.set_next_id_acl", - "id" : 15, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 3 } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 33, + "filename" : "include/control/spgw.p4", + "line" : 228, "column" : 32, - "source_fragment" : "= next_id; ..." + "source_fragment" : "= tunnel_src_addr; ..." } - } - ] - }, - { - "name" : "FabricIngress.acl.punt_to_cpu", - "id" : 16, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] }, { - "type" : "hexstr", - "value" : "0x00ff" + "type" : "runtime_data", + "value" : 4 } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 39, - "column" : 8, - "source_fragment" : "standard_metadata.egress_spec = 255" + "filename" : "include/control/spgw.p4", + "line" : 229, + "column" : 32, + "source_fragment" : "= tunnel_dst_addr; ..." } }, { @@ -1755,89 +6608,77 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "runtime_data", + "value" : 2 } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 40, - "column" : 34, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 230, + "column" : 27, + "source_fragment" : "= tunnel_src_port; ..." } - } - ] - }, - { - "name" : "FabricIngress.acl.set_clone_session_id", - "id" : 17, - "runtime_data" : [ - { - "name" : "clone_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { - "op" : "clone_ingress_pkt_to_egress", + "op" : "assign", "parameters" : [ { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["scalars", "userMetadata._l4_dport22"] }, { "type" : "hexstr", - "value" : "0x1" + "value" : "0x0868" } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 46, - "column" : 8, - "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})" + "filename" : "include/control/spgw.p4", + "line" : 231, + "column" : 27, + "source_fragment" : "= 2152; ..." } } ] }, { - "name" : "FabricIngress.acl.drop", - "id" : 18, - "runtime_data" : [], - "primitives" : [ + "name" : "FabricIngress.spgw.load_dbuf_far", + "id" : 50, + "runtime_data" : [ { - "op" : "mark_to_drop", - "parameters" : [ - { - "type" : "header", - "value" : "standard_metadata" - } - ], - "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 51, - "column" : 8, - "source_fragment" : "mark_to_drop(standard_metadata)" - } + "name" : "drop", + "bitwidth" : 1 + }, + { + "name" : "notify_cp", + "bitwidth" : 1 + }, + { + "name" : "tunnel_src_port", + "bitwidth" : 16 + }, + { + "name" : "tunnel_src_addr", + "bitwidth" : 32 + }, + { + "name" : "tunnel_dst_addr", + "bitwidth" : 32 }, + { + "name" : "teid", + "bitwidth" : 32 + } + ], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["scalars", "userMetadata._skip_forwarding14"] }, { "type" : "expression", @@ -1847,187 +6688,154 @@ "op" : "b2d", "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } } } } } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 52, + "filename" : "include/control/spgw.p4", + "line" : 218, "column" : 34, - "source_fragment" : "= true; ..." - } - } - ] - }, - { - "name" : "FabricIngress.acl.nop_acl", - "id" : 19, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.next.set_vlan", - "id" : 20, - "runtime_data" : [ - { - "name" : "vlan_id", - "bitwidth" : 12 - } - ], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] - }, - { - "type" : "runtime_data", - "value" : 0 - } - ], - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 70, - "column" : 32, - "source_fragment" : "= vlan_id; ..." + "source_fragment" : "= (bool)drop; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.output_xconnect", - "id" : 21, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._skip_next15"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/spgw.p4", + "line" : 219, + "column" : 28, + "source_fragment" : "= (bool)drop; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.set_next_id_xconnect", - "id" : 22, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._next_id9"] + "value" : ["scalars", "userMetadata._spgw_notify_spgwc41"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "local", + "value" : 1 + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 115, - "column" : 32, - "source_fragment" : "= next_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 220, + "column" : 36, + "source_fragment" : "= (bool)notify_cp; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.output_hashed", - "id" : 23, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_encap42"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/spgw.p4", + "line" : 222, + "column" : 40, + "source_fragment" : "= true; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.routing_hashed", - "id" : 24, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - }, - { - "name" : "smac", - "bitwidth" : 48 }, - { - "name" : "dmac", - "bitwidth" : 48 - } - ], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["ethernet", "src_addr"] + "value" : ["scalars", "userMetadata._spgw_teid32"] }, { "type" : "runtime_data", - "value" : 1 + "value" : 5 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + "filename" : "include/control/spgw.p4", + "line" : 223, + "column" : 28, + "source_fragment" : "= teid; ..." } }, { @@ -2035,7 +6843,7 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "dst_addr"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_port33"] }, { "type" : "runtime_data", @@ -2043,10 +6851,10 @@ } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + "filename" : "include/control/spgw.p4", + "line" : 224, + "column" : 39, + "source_fragment" : "= tunnel_src_port; ..." } }, { @@ -2054,61 +6862,37 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_addr34"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 3 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/spgw.p4", + "line" : 225, + "column" : 39, + "source_fragment" : "= tunnel_src_addr; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.mpls_routing_hashed", - "id" : 25, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - }, - { - "name" : "smac", - "bitwidth" : 48 - }, - { - "name" : "dmac", - "bitwidth" : 48 }, - { - "name" : "label", - "bitwidth" : 20 - } - ], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "value" : ["scalars", "userMetadata._spgw_tunnel_dst_addr35"] }, { "type" : "runtime_data", - "value" : 3 + "value" : 4 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 46, - "column" : 35, - "source_fragment" : "= label; ..." + "filename" : "include/control/spgw.p4", + "line" : 226, + "column" : 39, + "source_fragment" : "= tunnel_dst_addr; ..." } }, { @@ -2116,18 +6900,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "src_addr"] + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] }, { "type" : "runtime_data", - "value" : 1 + "value" : 3 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + "filename" : "include/control/spgw.p4", + "line" : 228, + "column" : 32, + "source_fragment" : "= tunnel_src_addr; ..." } }, { @@ -2135,18 +6919,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "dst_addr"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] }, { "type" : "runtime_data", - "value" : 2 + "value" : 4 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + "filename" : "include/control/spgw.p4", + "line" : 229, + "column" : 32, + "source_fragment" : "= tunnel_dst_addr; ..." } }, { @@ -2154,49 +6938,37 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "runtime_data", - "value" : 0 + "value" : 2 } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/spgw.p4", + "line" : 230, + "column" : 27, + "source_fragment" : "= tunnel_src_port; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.set_mcast_group_id", - "id" : 26, - "runtime_data" : [ - { - "name" : "group_id", - "bitwidth" : 16 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "mcast_grp"] + "value" : ["scalars", "userMetadata._l4_dport22"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "hexstr", + "value" : "0x0868" } ], "source_info" : { - "filename" : "include/control/next.p4", + "filename" : "include/control/spgw.p4", "line" : 231, - "column" : 8, - "source_fragment" : "standard_metadata.mcast_grp = group_id" + "column" : 27, + "source_fragment" : "= 2152; ..." } }, { @@ -2204,7 +6976,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_multicast10"] + "value" : ["scalars", "userMetadata._spgw_skip_egress_pdr_ctr44"] }, { "type" : "expression", @@ -2222,68 +6994,36 @@ } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 232, - "column" : 37, + "filename" : "include/control/spgw.p4", + "line" : 242, + "column" : 43, "source_fragment" : "= true; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.set_source_iface", - "id" : 27, - "runtime_data" : [ - { - "name" : "src_iface", - "bitwidth" : 8 - }, - { - "name" : "direction", - "bitwidth" : 2 - }, - { - "name" : "skip_spgw", - "bitwidth" : 1 - } - ], + "name" : "lookup_md_init37", + "id" : 51, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_src_iface27"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, - { - "type" : "runtime_data", - "value" : 0 - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 50, - "column" : 33, - "source_fragment" : "= src_iface; ..." - } - }, - { - "op" : "assign", - "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_direction19"] - }, - { - "type" : "runtime_data", - "value" : 1 + "value" : ["inner_tcp", "sport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 51, - "column" : 33, - "source_fragment" : "= direction; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 37, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." } }, { @@ -2291,87 +7031,44 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_skip_spgw28"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "local", - "value" : 2 - }, - "right" : { - "type" : "hexstr", - "value" : "0x00" - } - } - } - } - } + "type" : "field", + "value" : ["inner_tcp", "dport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 52, - "column" : 33, - "source_fragment" : "= (bool)skip_spgw; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 38, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.dport; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.set_pdr_attributes", - "id" : 28, - "runtime_data" : [ - { - "name" : "ctr_id", - "bitwidth" : 32 - }, - { - "name" : "far_id", - "bitwidth" : 32 - }, - { - "name" : "needs_gtpu_decap", - "bitwidth" : 1 - } - ], + "name" : "lookup_md_init40", + "id" : 52, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_pdr_hit29"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["inner_udp", "sport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 75, - "column" : 31, - "source_fragment" : "= true; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." } }, { @@ -2379,37 +7076,44 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id25"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_udp", "dport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 76, - "column" : 30, - "source_fragment" : "= ctr_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.dport; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init43", + "id" : 53, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_id26"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "field", + "value" : ["inner_icmp", "icmp_type"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 77, - "column" : 30, - "source_fragment" : "= far_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 43, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." } }, { @@ -2417,66 +7121,33 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_decap33"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "local", - "value" : 2 - }, - "right" : { - "type" : "hexstr", - "value" : "0x00" - } - } - } - } - } + "type" : "field", + "value" : ["inner_icmp", "icmp_code"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 78, - "column" : 40, - "source_fragment" : "= (bool)needs_gtpu_decap; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 44, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_code; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.set_pdr_attributes", - "id" : 29, - "runtime_data" : [ - { - "name" : "ctr_id", - "bitwidth" : 32 - }, - { - "name" : "far_id", - "bitwidth" : 32 - }, - { - "name" : "needs_gtpu_decap", - "bitwidth" : 1 - } - ], + "name" : "lookup_md_init32", + "id" : 54, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_pdr_hit29"] + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] }, { "type" : "expression", @@ -2494,9 +7165,9 @@ } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 75, - "column" : 31, + "filename" : "include/control/lookup_md_init.p4", + "line" : 32, + "column" : 27, "source_fragment" : "= true; ..." } }, @@ -2505,18 +7176,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id25"] + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 76, - "column" : 30, - "source_fragment" : "= ctr_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 33, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." } }, { @@ -2524,18 +7195,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_id26"] + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 77, - "column" : 30, - "source_fragment" : "= far_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 34, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." } }, { @@ -2543,93 +7214,89 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_decap33"] + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "local", - "value" : 2 - }, - "right" : { - "type" : "hexstr", - "value" : "0x00" - } - } - } - } - } + "type" : "field", + "value" : ["inner_ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 78, - "column" : 40, - "source_fragment" : "= (bool)needs_gtpu_decap; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 35, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.load_normal_far_attributes", - "id" : 30, - "runtime_data" : [ + "name" : "lookup_md_init52", + "id" : 55, + "runtime_data" : [], + "primitives" : [ { - "name" : "drop", - "bitwidth" : 1 + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] + }, + { + "type" : "field", + "value" : ["tcp", "sport"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 52, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." + } }, { - "name" : "notify_cp", - "bitwidth" : 1 + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] + }, + { + "type" : "field", + "value" : ["tcp", "dport"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 53, + "column" : 32, + "source_fragment" : "= hdr.tcp.dport; ..." + } } - ], + ] + }, + { + "name" : "lookup_md_init55", + "id" : 56, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_dropped30"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "local", - "value" : 0 - }, - "right" : { - "type" : "hexstr", - "value" : "0x00" - } - } - } - } - } + { + "type" : "field", + "value" : ["udp", "sport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 138, - "column" : 35, - "source_fragment" : "= (bool)drop; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 55, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." } }, { @@ -2637,109 +7304,44 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_notify_spgwc31"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "local", - "value" : 1 - }, - "right" : { - "type" : "hexstr", - "value" : "0x00" - } - } - } - } - } + "type" : "field", + "value" : ["udp", "dport"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 139, - "column" : 36, - "source_fragment" : "= (bool)notify_cp; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 56, + "column" : 32, + "source_fragment" : "= hdr.udp.dport; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.load_tunnel_far_attributes", - "id" : 31, - "runtime_data" : [ - { - "name" : "drop", - "bitwidth" : 1 - }, - { - "name" : "notify_cp", - "bitwidth" : 1 - }, - { - "name" : "tunnel_src_port", - "bitwidth" : 16 - }, - { - "name" : "tunnel_src_addr", - "bitwidth" : 32 - }, - { - "name" : "tunnel_dst_addr", - "bitwidth" : 32 - }, - { - "name" : "teid", - "bitwidth" : 32 - } - ], + "name" : "lookup_md_init58", + "id" : 57, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_dropped30"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "local", - "value" : 0 - }, - "right" : { - "type" : "hexstr", - "value" : "0x00" - } - } - } - } - } + "type" : "field", + "value" : ["icmp", "icmp_type"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 148, - "column" : 35, - "source_fragment" : "= (bool)drop; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 58, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." } }, { @@ -2747,46 +7349,33 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_notify_spgwc31"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "local", - "value" : 1 - }, - "right" : { - "type" : "hexstr", - "value" : "0x00" - } - } - } - } - } + "type" : "field", + "value" : ["icmp", "icmp_code"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 149, - "column" : 36, - "source_fragment" : "= (bool)notify_cp; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 59, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_code; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init47", + "id" : 58, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_encap32"] + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] }, { "type" : "expression", @@ -2804,9 +7393,9 @@ } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 151, - "column" : 40, + "filename" : "include/control/lookup_md_init.p4", + "line" : 47, + "column" : 27, "source_fragment" : "= true; ..." } }, @@ -2815,18 +7404,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_teid21"] + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] }, { - "type" : "runtime_data", - "value" : 5 + "type" : "field", + "value" : ["ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 152, + "filename" : "include/control/lookup_md_init.p4", + "line" : 48, "column" : 28, - "source_fragment" : "= teid; ..." + "source_fragment" : "= hdr.ipv4.src_addr; ..." } }, { @@ -2834,37 +7423,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_port22"] + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, - { - "type" : "runtime_data", - "value" : 2 - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 153, - "column" : 39, - "source_fragment" : "= tunnel_src_port; ..." - } - }, - { - "op" : "assign", - "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_addr23"] - }, - { - "type" : "runtime_data", - "value" : 3 + "value" : ["ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 154, - "column" : 39, - "source_fragment" : "= tunnel_src_addr; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 49, + "column" : 28, + "source_fragment" : "= hdr.ipv4.dst_addr; ..." } }, { @@ -2872,37 +7442,54 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_dst_addr24"] + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] }, { - "type" : "runtime_data", - "value" : 4 + "type" : "field", + "value" : ["ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 155, - "column" : 39, - "source_fragment" : "= tunnel_dst_addr; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 50, + "column" : 28, + "source_fragment" : "= hdr.ipv4.protocol; ..." } - }, + } + ] + }, + { + "name" : "lookup_md_init23", + "id" : 59, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] }, { - "type" : "runtime_data", - "value" : 3 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 157, - "column" : 32, - "source_fragment" : "= tunnel_src_addr; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 23, + "column" : 23, + "source_fragment" : "= false; ..." } }, { @@ -2910,18 +7497,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] }, { - "type" : "runtime_data", - "value" : 4 + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 158, - "column" : 32, - "source_fragment" : "= tunnel_dst_addr; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 24, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -2929,18 +7516,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "runtime_data", - "value" : 2 + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 159, - "column" : 27, - "source_fragment" : "= tunnel_src_port; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 25, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -2948,44 +7535,37 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] }, { "type" : "hexstr", - "value" : "0x0868" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 160, - "column" : 27, - "source_fragment" : "= 2152; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 26, + "column" : 24, + "source_fragment" : "= 0; ..." } - } - ] - }, - { - "name" : "FabricIngress.spgw_ingress.decap_inner_tcp", - "id" : 32, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { "type" : "hexstr", - "value" : "0x0800" + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 27, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -2993,18 +7573,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "field", - "value" : ["inner_ipv4", "protocol"] + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 187, - "column" : 27, - "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 28, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -3012,18 +7592,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "field", - "value" : ["inner_ipv4", "src_addr"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 188, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 29, + "column" : 25, + "source_fragment" : "= 0; ..." } }, { @@ -3031,161 +7611,221 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { - "type" : "field", - "value" : ["inner_ipv4", "dst_addr"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 189, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 30, + "column" : 25, + "source_fragment" : "= 0; ..." } - }, + } + ] + }, + { + "name" : "packetio25", + "id" : 60, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["standard_metadata", "egress_spec"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport17"] + "value" : ["packet_out", "egress_port"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 190, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_sport; ..." + "filename" : "include/control/packetio.p4", + "line" : 25, + "column" : 12, + "source_fragment" : "standard_metadata.egress_spec = hdr.packet_out.egress_port" } }, { - "op" : "assign", + "op" : "remove_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] - }, - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport18"] + "type" : "header", + "value" : "packet_out" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 191, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_dport; ..." + "filename" : "include/control/packetio.p4", + "line" : 26, + "column" : 12, + "source_fragment" : "hdr.packet_out.setInvalid()" } }, { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._is_controller_packet_out19"] }, { - "type" : "header", - "value" : "inner_ipv4" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 193, - "column" : 8, - "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + "filename" : "include/control/packetio.p4", + "line" : 27, + "column" : 53, + "source_fragment" : "= true; ..." } }, { - "op" : "remove_header", + "op" : "exit", + "parameters" : [], + "source_info" : { + "filename" : "include/control/packetio.p4", + "line" : 29, + "column" : 12, + "source_fragment" : "exit" + } + } + ] + }, + { + "name" : "filtering113", + "id" : 61, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "field", + "value" : ["vlan_tag", "vlan_id"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 194, - "column" : 8, - "source_fragment" : "hdr.inner_ipv4.setInvalid()" + "filename" : "include/control/filtering.p4", + "line" : 113, + "column" : 36, + "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu" + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_pri10"] + }, + { + "type" : "field", + "value" : ["vlan_tag", "pri"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 195, - "column" : 8, - "source_fragment" : "hdr.gtpu.setInvalid()" + "filename" : "include/control/filtering.p4", + "line" : 114, + "column" : 37, + "source_fragment" : "= hdr.vlan_tag.pri; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "udp" + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_cfi11"] + }, + { + "type" : "field", + "value" : ["vlan_tag", "cfi"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 199, - "column" : 8, - "source_fragment" : "hdr.udp.setInvalid()" + "filename" : "include/control/filtering.p4", + "line" : 115, + "column" : 37, + "source_fragment" : "= hdr.vlan_tag.cfi; ..." } - }, + } + ] + }, + { + "name" : "filtering129", + "id" : 62, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "tcp" + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_ttl13"] }, { - "type" : "header", - "value" : "inner_tcp" + "type" : "hexstr", + "value" : "0x41" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 200, - "column" : 8, - "source_fragment" : "hdr.tcp = hdr.inner_tcp" + "filename" : "include/control/filtering.p4", + "line" : 129, + "column" : 37, + "source_fragment" : "= DEFAULT_MPLS_TTL + 1; ..." } - }, + } + ] + }, + { + "name" : "spgw277", + "id" : 63, + "runtime_data" : [], + "primitives" : [ { - "op" : "remove_header", + "op" : "count", "parameters" : [ { - "type" : "header", - "value" : "inner_tcp" + "type" : "counter_array", + "value" : "FabricIngress.spgw.pdr_counter" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ctr_id36"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 201, - "column" : 8, - "source_fragment" : "hdr.inner_tcp.setInvalid()" + "line" : 277, + "column" : 16, + "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" } } ] }, { - "name" : "FabricIngress.spgw_ingress.decap_inner_udp", - "id" : 33, + "name" : "spgw294", + "id" : 64, "runtime_data" : [], "primitives" : [ { @@ -3193,222 +7833,407 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] }, { - "type" : "hexstr", - "value" : "0x0800" + "type" : "field", + "value" : ["ipv4", "total_len"] } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/control/spgw.p4", + "line" : 294, + "column" : 36, + "source_fragment" : "= hdr.ipv4.total_len; ..." } - }, + } + ] + }, + { + "name" : "port_counter31", + "id" : 65, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] + "value" : ["scalars", "tmp_8"] }, { - "type" : "field", - "value" : ["inner_ipv4", "protocol"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 187, - "column" : 27, - "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + "filename" : "include/control/port_counter.p4", + "line" : 31, + "column" : 38, + "source_fragment" : "(bit<32>)standard_metadata.egress_spec" } }, { - "op" : "assign", + "op" : "count", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "type" : "counter_array", + "value" : "FabricIngress.port_counters_control.egress_port_counter" }, { "type" : "field", - "value" : ["inner_ipv4", "src_addr"] + "value" : ["scalars", "tmp_8"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 188, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + "filename" : "include/control/port_counter.p4", + "line" : 31, + "column" : 12, + "source_fragment" : "egress_port_counter.count((bit<32>)standard_metadata.egress_spec)" } - }, + } + ] + }, + { + "name" : "port_counter34", + "id" : 66, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["scalars", "tmp_9"] }, { - "type" : "field", - "value" : ["inner_ipv4", "dst_addr"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 189, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + "filename" : "include/control/port_counter.p4", + "line" : 34, + "column" : 39, + "source_fragment" : "(bit<32>)standard_metadata.ingress_port" } }, { - "op" : "assign", + "op" : "count", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "type" : "counter_array", + "value" : "FabricIngress.port_counters_control.ingress_port_counter" }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport17"] + "value" : ["scalars", "tmp_9"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 190, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_sport; ..." + "filename" : "include/control/port_counter.p4", + "line" : 34, + "column" : 12, + "source_fragment" : "ingress_port_counter.count((bit<32>)standard_metadata.ingress_port)" } - }, + } + ] + }, + { + "name" : "slicing114", + "id" : 67, + "runtime_data" : [], + "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "tmp_10"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport18"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 191, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_dport; ..." + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 37, + "source_fragment" : "(bit<32>) slice_tc" } }, { - "op" : "assign_header", + "op" : "execute_meter", "parameters" : [ { - "type" : "header", - "value" : "ipv4" + "type" : "meter_array", + "value" : "FabricIngress.qos.slice_tc_meter" }, { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["scalars", "tmp_10"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._packet_color26"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 193, + "filename" : "include/control/slicing.p4", + "line" : 114, "column" : 8, - "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) slice_tc, fabric_md.packet_color)" } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._dscp28"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 194, - "column" : 8, - "source_fragment" : "hdr.inner_ipv4.setInvalid()" + "filename" : "include/control/slicing.p4", + "line" : 110, + "column" : 26, + "source_fragment" : "fabric_md.slice_id++fabric_md.tc; ..." } - }, + } + ] + }, + { + "name" : "nop", + "id" : 68, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.egress_next.pop_mpls_if_present", + "id" : 69, + "runtime_data" : [], + "primitives" : [ { "op" : "remove_header", "parameters" : [ { "type" : "header", - "value" : "gtpu" + "value" : "mpls" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 195, + "filename" : "include/control/next.p4", + "line" : 204, "column" : 8, - "source_fragment" : "hdr.gtpu.setInvalid()" + "source_fragment" : "hdr.mpls.setInvalid()" } }, { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "udp" + "type" : "field", + "value" : ["eth_type", "value"] }, { - "type" : "header", - "value" : "inner_udp" - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 205, - "column" : 8, - "source_fragment" : "hdr.udp = hdr.inner_udp" - } - }, - { - "op" : "remove_header", - "parameters" : [ - { - "type" : "header", - "value" : "inner_udp" + "type" : "field", + "value" : ["scalars", "userMetadata._ip_eth_type8"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", + "filename" : "include/control/next.p4", "line" : 206, "column" : 8, - "source_fragment" : "hdr.inner_udp.setInvalid()" + "source_fragment" : "hdr.eth_type.value = fabric_metadata.ip_eth_type; ..." } } ] }, { - "name" : "FabricIngress.spgw_ingress.decap_inner_icmp", - "id" : 34, + "name" : "FabricEgress.egress_next.set_mpls", + "id" : 70, "runtime_data" : [], "primitives" : [ { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] - }, - { - "type" : "hexstr", - "value" : "0x0800" + "type" : "header", + "value" : "mpls" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/control/next.p4", + "line" : 211, + "column" : 8, + "source_fragment" : "hdr.mpls.setValid()" } }, { @@ -3416,18 +8241,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] + "value" : ["mpls", "label"] }, { "type" : "field", - "value" : ["inner_ipv4", "protocol"] + "value" : ["scalars", "userMetadata._mpls_label12"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 187, - "column" : 27, - "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + "filename" : "include/control/next.p4", + "line" : 212, + "column" : 8, + "source_fragment" : "hdr.mpls.label = fabric_metadata.mpls_label; ..." } }, { @@ -3435,18 +8260,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "value" : ["mpls", "tc"] }, { - "type" : "field", - "value" : ["inner_ipv4", "src_addr"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 188, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + "filename" : "include/control/next.p4", + "line" : 213, + "column" : 8, + "source_fragment" : "hdr.mpls.tc = 3w0" } }, { @@ -3454,18 +8279,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["mpls", "bos"] }, { - "type" : "field", - "value" : ["inner_ipv4", "dst_addr"] + "type" : "hexstr", + "value" : "0x01" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 189, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + "filename" : "include/control/next.p4", + "line" : 214, + "column" : 8, + "source_fragment" : "hdr.mpls.bos = 1w1" } }, { @@ -3473,18 +8298,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["mpls", "ttl"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport17"] + "value" : ["scalars", "userMetadata._mpls_ttl13"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 190, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_sport; ..." + "filename" : "include/control/next.p4", + "line" : 215, + "column" : 8, + "source_fragment" : "hdr.mpls.ttl = fabric_metadata.mpls_ttl; // Decrement after push. ..." } }, { @@ -3492,123 +8317,173 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["eth_type", "value"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport18"] + "type" : "hexstr", + "value" : "0x8847" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 191, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_dport; ..." + "filename" : "include/control/../define.p4", + "line" : 147, + "column" : 31, + "source_fragment" : "0x8847; ..." } - }, + } + ] + }, + { + "name" : "FabricEgress.egress_next.push_vlan", + "id" : 71, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign_header", + "op" : "add_header", "parameters" : [ { "type" : "header", - "value" : "ipv4" + "value" : "vlan_tag" + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 223, + "column" : 8, + "source_fragment" : "hdr.vlan_tag.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["vlan_tag", "cfi"] }, { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_cfi11"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 193, + "filename" : "include/control/next.p4", + "line" : 224, "column" : 8, - "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["vlan_tag", "pri"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_pri10"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 194, + "filename" : "include/control/next.p4", + "line" : 225, "column" : 8, - "source_fragment" : "hdr.inner_ipv4.setInvalid()" + "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu" + "type" : "field", + "value" : ["vlan_tag", "eth_type"] + }, + { + "type" : "hexstr", + "value" : "0x8100" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 195, - "column" : 8, - "source_fragment" : "hdr.gtpu.setInvalid()" + "filename" : "include/control/../define.p4", + "line" : 146, + "column" : 31, + "source_fragment" : "0x8100; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "udp" + "type" : "field", + "value" : ["vlan_tag", "vlan_id"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 210, + "filename" : "include/control/next.p4", + "line" : 227, "column" : 8, - "source_fragment" : "hdr.udp.setInvalid()" + "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id; ..." } - }, + } + ] + }, + { + "name" : "FabricEgress.egress_next.pop_vlan", + "id" : 72, + "runtime_data" : [], + "primitives" : [ { - "op" : "assign_header", + "op" : "remove_header", "parameters" : [ { "type" : "header", - "value" : "icmp" - }, - { - "type" : "header", - "value" : "inner_icmp" + "value" : "vlan_tag" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 211, + "filename" : "include/control/next.p4", + "line" : 256, "column" : 8, - "source_fragment" : "hdr.icmp = hdr.inner_icmp" + "source_fragment" : "hdr.vlan_tag.setInvalid()" } - }, + } + ] + }, + { + "name" : "FabricEgress.egress_next.drop", + "id" : 73, + "runtime_data" : [], + "primitives" : [ { - "op" : "remove_header", + "op" : "mark_to_drop", "parameters" : [ { "type" : "header", - "value" : "inner_icmp" + "value" : "standard_metadata" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 212, + "filename" : "include/control/next.p4", + "line" : 261, "column" : 8, - "source_fragment" : "hdr.inner_icmp.setInvalid()" + "source_fragment" : "mark_to_drop(standard_metadata)" } } ] }, { - "name" : "FabricIngress.spgw_ingress.decap_inner_unknown", - "id" : 35, + "name" : "FabricEgress.dscp_rewriter.rewrite", + "id" : 74, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.dscp_rewriter.clear", + "id" : 75, "runtime_data" : [], "primitives" : [ { @@ -3616,18 +8491,40 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] }, { "type" : "hexstr", - "value" : "0x0800" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 128, - "column" : 31, - "source_fragment" : "0x0800; ..." + "filename" : "include/control/slicing.p4", + "line" : 135, + "column" : 8, + "source_fragment" : "tmp_dscp = 0" + } + } + ] + }, + { + "name" : "FabricEgress.spgw.gtpu_encap", + "id" : 76, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_ipv4" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 311, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.setValid()" } }, { @@ -3635,18 +8532,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] + "value" : ["gtpu_ipv4", "version"] }, { - "type" : "field", - "value" : ["inner_ipv4", "protocol"] + "type" : "hexstr", + "value" : "0x04" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 187, - "column" : 27, - "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + "line" : 312, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.version = 4" } }, { @@ -3654,18 +8551,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "value" : ["gtpu_ipv4", "ihl"] }, { - "type" : "field", - "value" : ["inner_ipv4", "src_addr"] + "type" : "hexstr", + "value" : "0x05" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 188, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + "filename" : "include/control/../define.p4", + "line" : 164, + "column" : 28, + "source_fragment" : "5; ..." } }, { @@ -3673,18 +8570,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["gtpu_ipv4", "dscp"] }, { - "type" : "field", - "value" : ["inner_ipv4", "dst_addr"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 189, - "column" : 32, - "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + "line" : 314, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.dscp = 0" } }, { @@ -3692,18 +8589,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["gtpu_ipv4", "ecn"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_sport17"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 190, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_sport; ..." + "line" : 315, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.ecn = 0" } }, { @@ -3711,123 +8608,155 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["gtpu_ipv4", "total_len"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._inner_l4_dport18"] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0024" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 191, - "column" : 27, - "source_fragment" : "= fabric_md.inner_l4_dport; ..." + "line" : 316, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.total_len = hdr.ipv4.total_len ..." } }, { - "op" : "assign_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "ipv4" + "type" : "field", + "value" : ["gtpu_ipv4", "identification"] }, { - "type" : "header", - "value" : "inner_ipv4" + "type" : "hexstr", + "value" : "0x1513" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 193, + "line" : 318, "column" : 8, - "source_fragment" : "hdr.ipv4 = hdr.inner_ipv4" + "source_fragment" : "hdr.gtpu_ipv4.identification = 0x1513" } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "inner_ipv4" + "type" : "field", + "value" : ["gtpu_ipv4", "flags"] + }, + { + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 194, + "line" : 319, "column" : 8, - "source_fragment" : "hdr.inner_ipv4.setInvalid()" + "source_fragment" : "hdr.gtpu_ipv4.flags = 0" } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu" + "type" : "field", + "value" : ["gtpu_ipv4", "frag_offset"] + }, + { + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 195, + "line" : 320, "column" : 8, - "source_fragment" : "hdr.gtpu.setInvalid()" + "source_fragment" : "hdr.gtpu_ipv4.frag_offset = 0" } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "udp" + "type" : "field", + "value" : ["gtpu_ipv4", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 216, - "column" : 8, - "source_fragment" : "hdr.udp.setInvalid()" + "filename" : "include/control/../define.p4", + "line" : 177, + "column" : 32, + "source_fragment" : "64; ..." } - } - ] - }, - { - "name" : "act", - "id" : 36, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["gtpu_ipv4", "protocol"] }, { - "type" : "field", - "value" : ["packet_out", "egress_port"] + "type" : "hexstr", + "value" : "0x11" } ], "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 25, - "column" : 12, - "source_fragment" : "standard_metadata.egress_spec = hdr.packet_out.egress_port" + "filename" : "include/control/../define.p4", + "line" : 161, + "column" : 25, + "source_fragment" : "17; ..." } }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "packet_out" + "type" : "field", + "value" : ["gtpu_ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_src_addr34"] } ], "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 26, - "column" : 12, - "source_fragment" : "hdr.packet_out.setInvalid()" + "filename" : "include/control/spgw.p4", + "line" : 323, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.src_addr = fabric_md.spgw.tunnel_src_addr; ..." } }, { @@ -3835,166 +8764,90 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_controller_packet_out11"] + "value" : ["gtpu_ipv4", "dst_addr"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_dst_addr35"] } ], "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 27, - "column" : 53, - "source_fragment" : "= true; ..." + "filename" : "include/control/spgw.p4", + "line" : 324, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.dst_addr = fabric_md.spgw.tunnel_dst_addr; ..." } }, - { - "op" : "exit", - "parameters" : [], - "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 29, - "column" : 12, - "source_fragment" : "exit" - } - } - ] - }, - { - "name" : "act_0", - "id" : 37, - "runtime_data" : [], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "spgw_ingress_hasReturned"] + "value" : ["gtpu_ipv4", "hdr_checksum"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } + "type" : "hexstr", + "value" : "0x0000" } - ] - } - ] - }, - { - "name" : "act_1", - "id" : 38, - "runtime_data" : [], - "primitives" : [ + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 325, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.hdr_checksum = 0" + } + }, { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "spgw_ingress_hasReturned"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "header", + "value" : "gtpu_udp" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 249, - "column" : 46, - "source_fragment" : "return" + "line" : 327, + "column" : 8, + "source_fragment" : "hdr.gtpu_udp.setValid()" } - } - ] - }, - { - "name" : "act_2", - "id" : 39, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "count", + "op" : "assign", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.spgw_ingress.pdr_counter" + "type" : "field", + "value" : ["gtpu_udp", "sport"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id25"] + "value" : ["scalars", "userMetadata._spgw_tunnel_src_port33"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 263, + "line" : 328, "column" : 8, - "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" + "source_fragment" : "hdr.gtpu_udp.sport = fabric_md.spgw.tunnel_src_port; ..." } - } - ] - }, - { - "name" : "act_3", - "id" : 40, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_forwarding6"] + "value" : ["gtpu_udp", "dport"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "hexstr", + "value" : "0x0868" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 280, - "column" : 38, - "source_fragment" : "= true; ..." + "line" : 329, + "column" : 8, + "source_fragment" : "hdr.gtpu_udp.dport = 2152" } }, { @@ -4002,18 +8855,31 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["gtpu_udp", "len"] }, { "type" : "expression", "value" : { "type" : "expression", "value" : { - "op" : "b2d", - "left" : null, + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0010" + } + } + }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0xffff" } } } @@ -4021,61 +8887,62 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 281, - "column" : 32, - "source_fragment" : "= true; ..." + "line" : 330, + "column" : 8, + "source_fragment" : "hdr.gtpu_udp.len = fabric_md.spgw.ipv4_len ..." } - } - ] - }, - { - "name" : "act_4", - "id" : 41, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len20"] + "value" : ["gtpu_udp", "checksum"] }, { - "type" : "field", - "value" : ["ipv4", "total_len"] + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 289, - "column" : 32, - "source_fragment" : "= hdr.ipv4.total_len; ..." + "line" : 332, + "column" : 8, + "source_fragment" : "hdr.gtpu_udp.checksum = 0" } - } - ] - }, - { - "name" : "act_5", - "id" : 42, - "runtime_data" : [], - "primitives" : [ + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "outer_gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 334, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.setValid()" + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "value" : ["outer_gtpu", "version"] }, { - "type" : "field", - "value" : ["vlan_tag", "vlan_id"] + "type" : "hexstr", + "value" : "0x01" } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 111, - "column" : 36, - "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." + "filename" : "include/control/spgw.p4", + "line" : 335, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.version = 0x01" } }, { @@ -4083,18 +8950,18 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_pri2"] + "value" : ["outer_gtpu", "pt"] }, { - "type" : "field", - "value" : ["vlan_tag", "pri"] + "type" : "hexstr", + "value" : "0x01" } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 112, - "column" : 37, - "source_fragment" : "= hdr.vlan_tag.pri; ..." + "filename" : "include/control/spgw.p4", + "line" : 336, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.pt = 0x01" } }, { @@ -4102,188 +8969,113 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_cfi3"] + "value" : ["outer_gtpu", "spare"] }, { - "type" : "field", - "value" : ["vlan_tag", "cfi"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 113, - "column" : 37, - "source_fragment" : "= hdr.vlan_tag.cfi; ..." - } - } - ] - }, - { - "name" : "act_6", - "id" : 43, - "runtime_data" : [], - "primitives" : [ + "filename" : "include/control/spgw.p4", + "line" : 337, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.spare = 0" + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl5"] + "value" : ["outer_gtpu", "ex_flag"] }, { "type" : "hexstr", - "value" : "0x41" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 127, - "column" : 37, - "source_fragment" : "= DEFAULT_MPLS_TTL + 1; ..." + "filename" : "include/control/spgw.p4", + "line" : 338, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.ex_flag = 0" } - } - ] - }, - { - "name" : "act_7", - "id" : 44, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp"] + "value" : ["outer_gtpu", "seq_flag"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "egress_spec"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 31, - "column" : 38, - "source_fragment" : "(bit<32>)standard_metadata.egress_spec" + "filename" : "include/control/spgw.p4", + "line" : 339, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.seq_flag = 0" } }, { - "op" : "count", + "op" : "assign", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.port_counters_control.egress_port_counter" + "type" : "field", + "value" : ["outer_gtpu", "npdu_flag"] }, { - "type" : "field", - "value" : ["scalars", "tmp"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 31, - "column" : 12, - "source_fragment" : "egress_port_counter.count((bit<32>)standard_metadata.egress_spec)" + "filename" : "include/control/spgw.p4", + "line" : 340, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.npdu_flag = 0" } - } - ] - }, - { - "name" : "act_8", - "id" : 45, - "runtime_data" : [], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_3"] + "value" : ["outer_gtpu", "msgtype"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "field", - "value" : ["standard_metadata", "ingress_port"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xffffffff" - } - } - } + "type" : "hexstr", + "value" : "0xff" } ], "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 34, - "column" : 39, - "source_fragment" : "(bit<32>)standard_metadata.ingress_port" + "filename" : "include/control/spgw.p4", + "line" : 341, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.msgtype = 0xff" } }, { - "op" : "count", + "op" : "assign", "parameters" : [ { - "type" : "counter_array", - "value" : "FabricIngress.port_counters_control.ingress_port_counter" + "type" : "field", + "value" : ["outer_gtpu", "msglen"] }, { "type" : "field", - "value" : ["scalars", "tmp_3"] - } - ], - "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 34, - "column" : 12, - "source_fragment" : "ingress_port_counter.count((bit<32>)standard_metadata.ingress_port)" - } - } - ] - }, - { - "name" : "nop", - "id" : 46, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricEgress.egress_next.pop_mpls_if_present", - "id" : 47, - "runtime_data" : [], - "primitives" : [ - { - "op" : "remove_header", - "parameters" : [ - { - "type" : "header", - "value" : "mpls" + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 270, + "filename" : "include/control/spgw.p4", + "line" : 342, "column" : 8, - "source_fragment" : "hdr.mpls.setInvalid()" + "source_fragment" : "hdr.outer_gtpu.msglen = fabric_md.spgw.ipv4_len; ..." } }, { @@ -4291,25 +9083,25 @@ "parameters" : [ { "type" : "field", - "value" : ["eth_type", "value"] + "value" : ["outer_gtpu", "teid"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_eth_type0"] + "value" : ["scalars", "userMetadata._spgw_teid32"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 272, + "filename" : "include/control/spgw.p4", + "line" : 343, "column" : 8, - "source_fragment" : "hdr.eth_type.value = fabric_metadata.ip_eth_type; ..." + "source_fragment" : "hdr.outer_gtpu.teid = fabric_md.spgw.teid; ..." } } ] }, { - "name" : "FabricEgress.egress_next.set_mpls", - "id" : 48, + "name" : "FabricEgress.spgw.gtpu_encap_qfi", + "id" : 77, "runtime_data" : [], "primitives" : [ { @@ -4317,14 +9109,14 @@ "parameters" : [ { "type" : "header", - "value" : "mpls" + "value" : "gtpu_ipv4" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 277, + "filename" : "include/control/spgw.p4", + "line" : 311, "column" : 8, - "source_fragment" : "hdr.mpls.setValid()" + "source_fragment" : "hdr.gtpu_ipv4.setValid()" } }, { @@ -4332,18 +9124,18 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "label"] + "value" : ["gtpu_ipv4", "version"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "type" : "hexstr", + "value" : "0x04" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 278, + "filename" : "include/control/spgw.p4", + "line" : 312, "column" : 8, - "source_fragment" : "hdr.mpls.label = fabric_metadata.mpls_label; ..." + "source_fragment" : "hdr.gtpu_ipv4.version = 4" } }, { @@ -4351,18 +9143,18 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "tc"] + "value" : ["gtpu_ipv4", "ihl"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x05" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 279, - "column" : 8, - "source_fragment" : "hdr.mpls.tc = 3w0" + "filename" : "include/control/../define.p4", + "line" : 164, + "column" : 28, + "source_fragment" : "5; ..." } }, { @@ -4370,18 +9162,18 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "bos"] + "value" : ["gtpu_ipv4", "dscp"] }, { "type" : "hexstr", - "value" : "0x01" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 280, + "filename" : "include/control/spgw.p4", + "line" : 314, "column" : 8, - "source_fragment" : "hdr.mpls.bos = 1w1" + "source_fragment" : "hdr.gtpu_ipv4.dscp = 0" } }, { @@ -4389,18 +9181,18 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "ttl"] + "value" : ["gtpu_ipv4", "ecn"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_ttl5"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 281, + "filename" : "include/control/spgw.p4", + "line" : 315, "column" : 8, - "source_fragment" : "hdr.mpls.ttl = fabric_metadata.mpls_ttl; // Decrement after push. ..." + "source_fragment" : "hdr.gtpu_ipv4.ecn = 0" } }, { @@ -4408,40 +9200,60 @@ "parameters" : [ { "type" : "field", - "value" : ["eth_type", "value"] + "value" : ["gtpu_ipv4", "total_len"] }, { - "type" : "hexstr", - "value" : "0x8847" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0024" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 126, - "column" : 31, - "source_fragment" : "0x8847; ..." + "filename" : "include/control/spgw.p4", + "line" : 316, + "column" : 8, + "source_fragment" : "hdr.gtpu_ipv4.total_len = hdr.ipv4.total_len ..." } - } - ] - }, - { - "name" : "FabricEgress.egress_next.push_vlan", - "id" : 49, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "vlan_tag" + "type" : "field", + "value" : ["gtpu_ipv4", "identification"] + }, + { + "type" : "hexstr", + "value" : "0x1513" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 289, + "filename" : "include/control/spgw.p4", + "line" : 318, "column" : 8, - "source_fragment" : "hdr.vlan_tag.setValid()" + "source_fragment" : "hdr.gtpu_ipv4.identification = 0x1513" } }, { @@ -4449,18 +9261,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "cfi"] + "value" : ["gtpu_ipv4", "flags"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_cfi3"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 290, + "filename" : "include/control/spgw.p4", + "line" : 319, "column" : 8, - "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi; ..." + "source_fragment" : "hdr.gtpu_ipv4.flags = 0" } }, { @@ -4468,18 +9280,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "pri"] + "value" : ["gtpu_ipv4", "frag_offset"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_pri2"] + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 291, + "filename" : "include/control/spgw.p4", + "line" : 320, "column" : 8, - "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri; ..." + "source_fragment" : "hdr.gtpu_ipv4.frag_offset = 0" } }, { @@ -4487,18 +9299,18 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "eth_type"] + "value" : ["gtpu_ipv4", "ttl"] }, { "type" : "hexstr", - "value" : "0x8100" + "value" : "0x40" } ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 125, - "column" : 31, - "source_fragment" : "0x8100; ..." + "line" : 177, + "column" : 32, + "source_fragment" : "64; ..." } }, { @@ -4506,62 +9318,56 @@ "parameters" : [ { "type" : "field", - "value" : ["vlan_tag", "vlan_id"] + "value" : ["gtpu_ipv4", "protocol"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] + "type" : "hexstr", + "value" : "0x11" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 293, - "column" : 8, - "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id; ..." + "filename" : "include/control/../define.p4", + "line" : 161, + "column" : 25, + "source_fragment" : "17; ..." } - } - ] - }, - { - "name" : "FabricEgress.egress_next.pop_vlan", - "id" : 50, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "remove_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "vlan_tag" + "type" : "field", + "value" : ["gtpu_ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_src_addr34"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 316, + "filename" : "include/control/spgw.p4", + "line" : 323, "column" : 8, - "source_fragment" : "hdr.vlan_tag.setInvalid()" + "source_fragment" : "hdr.gtpu_ipv4.src_addr = fabric_md.spgw.tunnel_src_addr; ..." } - } - ] - }, - { - "name" : "FabricEgress.spgw_egress.gtpu_encap", - "id" : 51, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu_ipv4" + "type" : "field", + "value" : ["gtpu_ipv4", "dst_addr"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_dst_addr35"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 306, + "line" : 324, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.setValid()" + "source_fragment" : "hdr.gtpu_ipv4.dst_addr = fabric_md.spgw.tunnel_dst_addr; ..." } }, { @@ -4569,37 +9375,33 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "version"] + "value" : ["gtpu_ipv4", "hdr_checksum"] }, { "type" : "hexstr", - "value" : "0x04" + "value" : "0x0000" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 307, + "line" : 325, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.version = 4" + "source_fragment" : "hdr.gtpu_ipv4.hdr_checksum = 0" } }, { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["gtpu_ipv4", "ihl"] - }, - { - "type" : "hexstr", - "value" : "0x05" + "type" : "header", + "value" : "gtpu_udp" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 143, - "column" : 28, - "source_fragment" : "5; ..." + "filename" : "include/control/spgw.p4", + "line" : 327, + "column" : 8, + "source_fragment" : "hdr.gtpu_udp.setValid()" } }, { @@ -4607,18 +9409,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "dscp"] + "value" : ["gtpu_udp", "sport"] }, { - "type" : "hexstr", - "value" : "0x00" + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_tunnel_src_port33"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 309, + "line" : 328, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.dscp = 0" + "source_fragment" : "hdr.gtpu_udp.sport = fabric_md.spgw.tunnel_src_port; ..." } }, { @@ -4626,18 +9428,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "ecn"] + "value" : ["gtpu_udp", "dport"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x0868" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 310, + "line" : 329, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.ecn = 0" + "source_fragment" : "hdr.gtpu_udp.dport = 2152" } }, { @@ -4645,7 +9447,7 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "total_len"] + "value" : ["gtpu_udp", "len"] }, { "type" : "expression", @@ -4659,11 +9461,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["ipv4", "total_len"] + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] }, "right" : { "type" : "hexstr", - "value" : "0x0024" + "value" : "0x0010" } } }, @@ -4677,9 +9479,9 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 311, + "line" : 330, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.total_len = hdr.ipv4.total_len ..." + "source_fragment" : "hdr.gtpu_udp.len = fabric_md.spgw.ipv4_len ..." } }, { @@ -4687,18 +9489,33 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "identification"] + "value" : ["gtpu_udp", "checksum"] }, { "type" : "hexstr", - "value" : "0x1513" + "value" : "0x0000" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 313, + "line" : 332, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.identification = 0x1513" + "source_fragment" : "hdr.gtpu_udp.checksum = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "outer_gtpu" + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 334, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.setValid()" } }, { @@ -4706,18 +9523,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "flags"] + "value" : ["outer_gtpu", "version"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x01" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 314, + "line" : 335, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.flags = 0" + "source_fragment" : "hdr.outer_gtpu.version = 0x01" } }, { @@ -4725,18 +9542,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "frag_offset"] + "value" : ["outer_gtpu", "pt"] }, { "type" : "hexstr", - "value" : "0x0000" + "value" : "0x01" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 315, + "line" : 336, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.frag_offset = 0" + "source_fragment" : "hdr.outer_gtpu.pt = 0x01" } }, { @@ -4744,18 +9561,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "ttl"] + "value" : ["outer_gtpu", "spare"] }, { "type" : "hexstr", - "value" : "0x40" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 156, - "column" : 32, - "source_fragment" : "64; ..." + "filename" : "include/control/spgw.p4", + "line" : 337, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.spare = 0" } }, { @@ -4763,18 +9580,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "protocol"] + "value" : ["outer_gtpu", "ex_flag"] }, { "type" : "hexstr", - "value" : "0x11" + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/../define.p4", - "line" : 140, - "column" : 25, - "source_fragment" : "17; ..." + "filename" : "include/control/spgw.p4", + "line" : 338, + "column" : 8, + "source_fragment" : "hdr.outer_gtpu.ex_flag = 0" } }, { @@ -4782,18 +9599,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "src_addr"] + "value" : ["outer_gtpu", "seq_flag"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_addr23"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 318, + "line" : 339, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.src_addr = fabric_md.spgw.tunnel_src_addr; ..." + "source_fragment" : "hdr.outer_gtpu.seq_flag = 0" } }, { @@ -4801,18 +9618,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "dst_addr"] + "value" : ["outer_gtpu", "npdu_flag"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_dst_addr24"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 319, + "line" : 340, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.dst_addr = fabric_md.spgw.tunnel_dst_addr; ..." + "source_fragment" : "hdr.outer_gtpu.npdu_flag = 0" } }, { @@ -4820,33 +9637,37 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_ipv4", "hdr_checksum"] + "value" : ["outer_gtpu", "msgtype"] }, { "type" : "hexstr", - "value" : "0x0000" + "value" : "0xff" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 320, + "line" : 341, "column" : 8, - "source_fragment" : "hdr.gtpu_ipv4.hdr_checksum = 0" + "source_fragment" : "hdr.outer_gtpu.msgtype = 0xff" } }, { - "op" : "add_header", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "gtpu_udp" + "type" : "field", + "value" : ["outer_gtpu", "msglen"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 322, + "line" : 342, "column" : 8, - "source_fragment" : "hdr.gtpu_udp.setValid()" + "source_fragment" : "hdr.outer_gtpu.msglen = fabric_md.spgw.ipv4_len; ..." } }, { @@ -4854,18 +9675,18 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_udp", "sport"] + "value" : ["outer_gtpu", "teid"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_tunnel_src_port22"] + "value" : ["scalars", "userMetadata._spgw_teid32"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 323, + "line" : 343, "column" : 8, - "source_fragment" : "hdr.gtpu_udp.sport = fabric_md.spgw.tunnel_src_port; ..." + "source_fragment" : "hdr.outer_gtpu.teid = fabric_md.spgw.teid; ..." } }, { @@ -4873,18 +9694,41 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_udp", "dport"] + "value" : ["gtpu_ipv4", "total_len"] }, { - "type" : "hexstr", - "value" : "0x0868" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x002c" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 324, + "line" : 349, "column" : 8, - "source_fragment" : "hdr.gtpu_udp.dport = 2152" + "source_fragment" : "hdr.gtpu_ipv4.total_len = hdr.ipv4.total_len ..." } }, { @@ -4906,11 +9750,11 @@ "op" : "+", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len20"] + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] }, "right" : { "type" : "hexstr", - "value" : "0x0010" + "value" : "0x0018" } } }, @@ -4924,7 +9768,7 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 325, + "line" : 352, "column" : 8, "source_fragment" : "hdr.gtpu_udp.len = fabric_md.spgw.ipv4_len ..." } @@ -4934,52 +9778,41 @@ "parameters" : [ { "type" : "field", - "value" : ["gtpu_udp", "checksum"] - }, - { - "type" : "hexstr", - "value" : "0x0000" - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 327, - "column" : 8, - "source_fragment" : "hdr.gtpu_udp.checksum = 0" - } - }, - { - "op" : "add_header", - "parameters" : [ - { - "type" : "header", - "value" : "outer_gtpu" - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 330, - "column" : 8, - "source_fragment" : "hdr.outer_gtpu.setValid()" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["outer_gtpu", "version"] + "value" : ["outer_gtpu", "msglen"] }, { - "type" : "hexstr", - "value" : "0x01" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ipv4_len31"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0008" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 331, + "line" : 355, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.version = 0x01" + "source_fragment" : "hdr.outer_gtpu.msglen = fabric_md.spgw.ipv4_len ..." } }, { @@ -4987,7 +9820,7 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "pt"] + "value" : ["outer_gtpu", "ex_flag"] }, { "type" : "hexstr", @@ -4996,28 +9829,24 @@ ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 332, + "line" : 357, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.pt = 0x01" + "source_fragment" : "hdr.outer_gtpu.ex_flag = 1" } }, { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["outer_gtpu", "spare"] - }, - { - "type" : "hexstr", - "value" : "0x00" + "type" : "header", + "value" : "outer_gtpu_options" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 333, + "line" : 358, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.spare = 0" + "source_fragment" : "hdr.outer_gtpu_options.setValid()" } }, { @@ -5025,37 +9854,33 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "ex_flag"] + "value" : ["outer_gtpu_options", "next_ext"] }, { "type" : "hexstr", - "value" : "0x00" + "value" : "0x85" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 334, + "line" : 359, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.ex_flag = 0" + "source_fragment" : "hdr.outer_gtpu_options.next_ext = 0x85" } }, { - "op" : "assign", + "op" : "add_header", "parameters" : [ { - "type" : "field", - "value" : ["outer_gtpu", "seq_flag"] - }, - { - "type" : "hexstr", - "value" : "0x00" + "type" : "header", + "value" : "outer_gtpu_ext_psc" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 335, + "line" : 360, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.seq_flag = 0" + "source_fragment" : "hdr.outer_gtpu_ext_psc.setValid()" } }, { @@ -5063,7 +9888,7 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "npdu_flag"] + "value" : ["outer_gtpu_ext_psc", "type"] }, { "type" : "hexstr", @@ -5071,10 +9896,10 @@ } ], "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 336, - "column" : 8, - "source_fragment" : "hdr.outer_gtpu.npdu_flag = 0" + "filename" : "include/control/../define.p4", + "line" : 88, + "column" : 36, + "source_fragment" : "4w0; // Downlink ..." } }, { @@ -5082,18 +9907,18 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "msgtype"] + "value" : ["outer_gtpu_ext_psc", "len"] }, { "type" : "hexstr", - "value" : "0xff" + "value" : "0x01" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 337, + "line" : 362, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.msgtype = 0xff" + "source_fragment" : "hdr.outer_gtpu_ext_psc.len = 8w1" } }, { @@ -5101,18 +9926,18 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "msglen"] + "value" : ["outer_gtpu_ext_psc", "qfi"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ipv4_len20"] + "value" : ["scalars", "userMetadata._spgw_qfi39"] } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 338, + "line" : 363, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.msglen = fabric_md.spgw.ipv4_len; ..." + "source_fragment" : "hdr.outer_gtpu_ext_psc.qfi = fabric_md.spgw.qfi; ..." } }, { @@ -5120,25 +9945,25 @@ "parameters" : [ { "type" : "field", - "value" : ["outer_gtpu", "teid"] + "value" : ["outer_gtpu_ext_psc", "next_ext"] }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_teid21"] + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 339, + "line" : 364, "column" : 8, - "source_fragment" : "hdr.outer_gtpu.teid = fabric_md.spgw.teid; ..." + "source_fragment" : "hdr.outer_gtpu_ext_psc.next_ext = 0x0" } } ] }, { - "name" : "act_9", - "id" : 52, + "name" : "packetio41", + "id" : 78, "runtime_data" : [], "primitives" : [ { @@ -5154,8 +9979,8 @@ ] }, { - "name" : "act_10", - "id" : 53, + "name" : "packetio44", + "id" : 79, "runtime_data" : [], "primitives" : [ { @@ -5205,8 +10030,8 @@ ] }, { - "name" : "act_11", - "id" : 54, + "name" : "next283", + "id" : 80, "runtime_data" : [], "primitives" : [ { @@ -5219,7 +10044,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 337, + "line" : 283, "column" : 12, "source_fragment" : "mark_to_drop(standard_metadata)" } @@ -5227,8 +10052,30 @@ ] }, { - "name" : "act_12", - "id" : 55, + "name" : "next310", + "id" : 81, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 310, + "column" : 35, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + } + ] + }, + { + "name" : "next309", + "id" : 82, "runtime_data" : [], "primitives" : [ { @@ -5236,29 +10083,145 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "egress_next_tmp"] + "value" : ["mpls", "ttl"] }, { "type" : "expression", "value" : { "type" : "expression", "value" : { - "op" : "b2d", - "left" : null, + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["mpls", "ttl"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 309, + "column" : 12, + "source_fragment" : "hdr.mpls.ttl = hdr.mpls.ttl - 1" + } + } + ] + }, + { + "name" : "next314", + "id" : 83, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 314, + "column" : 39, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + } + ] + }, + { + "name" : "next313", + "id" : 84, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" } } } } - ] + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 313, + "column" : 16, + "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" + } + } + ] + }, + { + "name" : "spgw377", + "id" : 85, + "runtime_data" : [], + "primitives" : [ + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricEgress.spgw.pdr_counter" + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_ctr_id36"] + } + ], + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 377, + "column" : 16, + "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" + } } ] }, { - "name" : "act_13", - "id" : 56, + "name" : "slicing155", + "id" : 86, "runtime_data" : [], "primitives" : [ { @@ -5266,51 +10229,51 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "egress_next_tmp"] + "value" : ["ipv4", "dscp"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] } - ] + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 155, + "column" : 16, + "source_fragment" : "hdr.ipv4.dscp = tmp_dscp" + } } ] }, { - "name" : "act_14", - "id" : 57, + "name" : "slicing159", + "id" : 87, "runtime_data" : [], "primitives" : [ { - "op" : "mark_to_drop", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "standard_metadata" + "type" : "field", + "value" : ["inner_ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 370, - "column" : 35, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/control/slicing.p4", + "line" : 159, + "column" : 16, + "source_fragment" : "hdr.inner_ipv4.dscp = tmp_dscp" } } ] }, { - "name" : "act_15", - "id" : 58, + "name" : "slicing126", + "id" : 88, "runtime_data" : [], "primitives" : [ { @@ -5318,229 +10281,400 @@ "parameters" : [ { "type" : "field", - "value" : ["mpls", "ttl"] + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["mpls", "ttl"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._dscp28"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 369, - "column" : 12, - "source_fragment" : "hdr.mpls.ttl = hdr.mpls.ttl - 1" + "filename" : "include/control/slicing.p4", + "line" : 126, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.dscp; ..." + } + } + ] + } + ], + "pipelines" : [ + { + "name" : "ingress", + "id" : 0, + "source_info" : { + "filename" : "fabric.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "FabricIngress" + }, + "init_table" : "tbl_lookup_md_init23", + "tables" : [ + { + "name" : "tbl_lookup_md_init23", + "id" : 0, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 23, + "column" : 23, + "source_fragment" : "= false; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [59], + "actions" : ["lookup_md_init23"], + "base_default_next" : "node_3", + "next_tables" : { + "lookup_md_init23" : "node_3" + }, + "default_entry" : { + "action_id" : 59, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init32", + "id" : 1, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 32, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [54], + "actions" : ["lookup_md_init32"], + "base_default_next" : "node_5", + "next_tables" : { + "lookup_md_init32" : "node_5" + }, + "default_entry" : { + "action_id" : 54, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init37", + "id" : 2, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 37, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [51], + "actions" : ["lookup_md_init37"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init37" : "node_19" + }, + "default_entry" : { + "action_id" : 51, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init40", + "id" : 3, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [52], + "actions" : ["lookup_md_init40"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init40" : "node_19" + }, + "default_entry" : { + "action_id" : 52, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init43", + "id" : 4, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 43, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [53], + "actions" : ["lookup_md_init43"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init43" : "node_19" + }, + "default_entry" : { + "action_id" : 53, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init47", + "id" : 5, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 47, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [58], + "actions" : ["lookup_md_init47"], + "base_default_next" : "node_13", + "next_tables" : { + "lookup_md_init47" : "node_13" + }, + "default_entry" : { + "action_id" : 58, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init52", + "id" : 6, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 52, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [55], + "actions" : ["lookup_md_init52"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init52" : "node_19" + }, + "default_entry" : { + "action_id" : 55, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init55", + "id" : 7, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 55, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [56], + "actions" : ["lookup_md_init55"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init55" : "node_19" + }, + "default_entry" : { + "action_id" : 56, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true } - } - ] - }, - { - "name" : "act_16", - "id" : 59, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "mark_to_drop", - "parameters" : [ - { - "type" : "header", - "value" : "standard_metadata" - } - ], + "name" : "tbl_lookup_md_init58", + "id" : 8, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 374, - "column" : 39, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/control/lookup_md_init.p4", + "line" : 58, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [57], + "actions" : ["lookup_md_init58"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init58" : "node_19" + }, + "default_entry" : { + "action_id" : 57, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true } - } - ] - }, - { - "name" : "act_17", - "id" : 60, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["ipv4", "ttl"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "&", - "left" : { - "type" : "expression", - "value" : { - "op" : "+", - "left" : { - "type" : "field", - "value" : ["ipv4", "ttl"] - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - }, - "right" : { - "type" : "hexstr", - "value" : "0xff" - } - } - } - } - ], + "name" : "tbl_packetio25", + "id" : 9, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 373, - "column" : 16, - "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" + "filename" : "include/control/packetio.p4", + "line" : 25, + "column" : 42, + "source_fragment" : "= hdr.packet_out.egress_port; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [60], + "actions" : ["packetio25"], + "base_default_next" : "FabricIngress.slice_tc_classifier.classifier", + "next_tables" : { + "packetio25" : "FabricIngress.slice_tc_classifier.classifier" + }, + "default_entry" : { + "action_id" : 60, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true } - } - ] - }, - { - "name" : "act_18", - "id" : 61, - "runtime_data" : [], - "primitives" : [ + }, { - "op" : "assign", - "parameters" : [ + "name" : "FabricIngress.slice_tc_classifier.classifier", + "id" : 10, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 49, + "column" : 10, + "source_fragment" : "classifier" + }, + "key" : [ { - "type" : "field", - "value" : ["scalars", "spgw_egress_hasReturned"] + "match_type" : "ternary", + "name" : "ig_port", + "target" : ["standard_metadata", "ingress_port"], + "mask" : null }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } - } - ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 343, - "column" : 46, - "source_fragment" : "return" - } - } - ] - }, - { - "name" : "act_19", - "id" : 62, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._lkp_ipv4_src1"], + "mask" : null + }, { - "type" : "field", - "value" : ["scalars", "spgw_egress_hasReturned"] + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._lkp_ipv4_dst2"], + "mask" : null }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } - } - ] - } - ] - }, - { - "name" : "act_20", - "id" : 63, - "runtime_data" : [], - "primitives" : [ - { - "op" : "count", - "parameters" : [ + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._lkp_ip_proto3"], + "mask" : null + }, { - "type" : "counter_array", - "value" : "FabricEgress.spgw_egress.pdr_counter" + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._lkp_l4_sport4"], + "mask" : null }, { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_ctr_id25"] + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._lkp_l4_dport5"], + "mask" : null } ], - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 344, - "column" : 8, - "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" + "match_type" : "ternary", + "type" : "simple", + "max_size" : 512, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [30, 31], + "actions" : ["FabricIngress.slice_tc_classifier.set_slice_id_tc", "FabricIngress.slice_tc_classifier.trust_dscp"], + "base_default_next" : "node_22", + "next_tables" : { + "FabricIngress.slice_tc_classifier.set_slice_id_tc" : "node_22", + "FabricIngress.slice_tc_classifier.trust_dscp" : "node_22" + }, + "default_entry" : { + "action_id" : 30, + "action_const" : true, + "action_data" : ["0x0", "0x0"], + "action_entry_const" : true } - } - ] - } - ], - "pipelines" : [ - { - "name" : "ingress", - "id" : 0, - "source_info" : { - "filename" : "fabric.p4", - "line" : 46, - "column" : 8, - "source_fragment" : "FabricIngress" - }, - "init_table" : "node_2", - "tables" : [ + }, { - "name" : "tbl_act", - "id" : 0, + "name" : "tbl_filtering113", + "id" : 11, "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 25, - "column" : 42, - "source_fragment" : "= hdr.packet_out.egress_port; ..." + "filename" : "include/control/filtering.p4", + "line" : 113, + "column" : 36, + "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." }, "key" : [], "match_type" : "exact", @@ -5549,22 +10683,28 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [36], - "actions" : ["act"], - "base_default_next" : "tbl_act_0", + "action_ids" : [61], + "actions" : ["filtering113"], + "base_default_next" : "node_24", "next_tables" : { - "act" : "tbl_act_0" + "filtering113" : "node_24" }, "default_entry" : { - "action_id" : 36, + "action_id" : 61, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_0", - "id" : 1, + "name" : "tbl_filtering129", + "id" : 12, + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 129, + "column" : 37, + "source_fragment" : "=" + }, "key" : [], "match_type" : "exact", "type" : "simple", @@ -5572,27 +10712,131 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [37], - "actions" : ["act_0"], - "base_default_next" : "FabricIngress.spgw_ingress.interface_lookup", + "action_ids" : [62], + "actions" : ["filtering129"], + "base_default_next" : "FabricIngress.filtering.ingress_port_vlan", "next_tables" : { - "act_0" : "FabricIngress.spgw_ingress.interface_lookup" + "filtering129" : "FabricIngress.filtering.ingress_port_vlan" }, "default_entry" : { - "action_id" : 37, + "action_id" : 62, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.spgw_ingress.interface_lookup", - "id" : 2, + "name" : "FabricIngress.filtering.ingress_port_vlan", + "id" : 13, "source_info" : { - "filename" : "include/control/spgw.p4", + "filename" : "include/control/filtering.p4", "line" : 55, "column" : 10, - "source_fragment" : "interface_lookup" + "source_fragment" : "ingress_port_vlan" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "ig_port", + "target" : ["standard_metadata", "ingress_port"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "vlan_is_valid", + "target" : ["vlan_tag", "$valid$"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "vlan_id", + "target" : ["vlan_tag", "vlan_id"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [10, 11, 12], + "actions" : ["FabricIngress.filtering.deny", "FabricIngress.filtering.permit", "FabricIngress.filtering.permit_with_internal_vlan"], + "base_default_next" : "FabricIngress.filtering.fwd_classifier", + "next_tables" : { + "FabricIngress.filtering.deny" : "FabricIngress.filtering.fwd_classifier", + "FabricIngress.filtering.permit" : "FabricIngress.filtering.fwd_classifier", + "FabricIngress.filtering.permit_with_internal_vlan" : "FabricIngress.filtering.fwd_classifier" + }, + "default_entry" : { + "action_id" : 10, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.filtering.fwd_classifier", + "id" : 14, + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 94, + "column" : 10, + "source_fragment" : "fwd_classifier" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "ig_port", + "target" : ["standard_metadata", "ingress_port"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_dst", + "target" : ["ethernet", "dst_addr"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_type", + "target" : ["eth_type", "value"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "ip_eth_type", + "target" : ["scalars", "userMetadata._ip_eth_type8"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [13], + "actions" : ["FabricIngress.filtering.set_forwarding_type"], + "base_default_next" : "node_28", + "next_tables" : { + "FabricIngress.filtering.set_forwarding_type" : "node_28" + }, + "default_entry" : { + "action_id" : 13, + "action_const" : true, + "action_data" : ["0x0"], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.spgw.interfaces", + "id" : 15, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 132, + "column" : 10, + "source_fragment" : "interfaces" }, "key" : [ { @@ -5614,56 +10858,162 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [27], - "actions" : ["FabricIngress.spgw_ingress.set_source_iface"], - "base_default_next" : "node_6", + "action_ids" : [42, 43], + "actions" : ["FabricIngress.spgw.load_iface", "FabricIngress.spgw.iface_miss"], + "base_default_next" : null, "next_tables" : { - "FabricIngress.spgw_ingress.set_source_iface" : "node_6" + "__HIT__" : "node_30", + "__MISS__" : "node_41" }, "default_entry" : { - "action_id" : 27, + "action_id" : 43, "action_const" : true, - "action_data" : ["0x0", "0x0", "0x1"], + "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_1", - "id" : 3, + "name" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_gtpu", + "id" : 16, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 249, - "column" : 46, - "source_fragment" : "return" + "line" : 77, + "column" : 10, + "source_fragment" : "decap_gtpu" }, - "key" : [], + "key" : [ + { + "match_type" : "exact", + "name" : "hdr.inner_tcp.$valid$", + "target" : ["inner_tcp", "$valid$"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "hdr.inner_udp.$valid$", + "target" : ["inner_udp", "$valid$"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "hdr.inner_icmp.$valid$", + "target" : ["inner_icmp", "$valid$"], + "mask" : null + } + ], "match_type" : "exact", "type" : "simple", "max_size" : 1024, "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [38], - "actions" : ["act_1"], - "base_default_next" : "node_8", + "action_ids" : [34, 35, 36, 37], + "actions" : ["FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_tcp", "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_udp", "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_icmp", "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_unknown"], + "base_default_next" : "node_32", "next_tables" : { - "act_1" : "node_8" + "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_tcp" : "node_32", + "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_udp" : "node_32", + "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_icmp" : "node_32", + "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_inner_unknown" : "node_32" }, "default_entry" : { - "action_id" : 38, + "action_id" : 37, "action_const" : true, "action_data" : [], "action_entry_const" : true - } + }, + "entries" : [ + { + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 91, + "column" : 12, + "source_fragment" : "(true, false, false) : decap_inner_tcp()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + } + ], + "action_entry" : { + "action_id" : 34, + "action_data" : [] + }, + "priority" : 1 + }, + { + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 92, + "column" : 12, + "source_fragment" : "(false, true, false) : decap_inner_udp()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + } + ], + "action_entry" : { + "action_id" : 35, + "action_data" : [] + }, + "priority" : 2 + }, + { + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 93, + "column" : 12, + "source_fragment" : "(false, false, true) : decap_inner_icmp()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x01" + } + ], + "action_entry" : { + "action_id" : 36, + "action_data" : [] + }, + "priority" : 3 + } + ] }, { - "name" : "FabricIngress.spgw_ingress.uplink_pdr_lookup", - "id" : 4, + "name" : "FabricIngress.spgw.uplink_pdrs", + "id" : 17, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 93, + "line" : 184, "column" : 10, - "source_fragment" : "uplink_pdr_lookup" + "source_fragment" : "uplink_pdrs" }, "key" : [ { @@ -5677,6 +11027,18 @@ "name" : "teid", "target" : ["gtpu", "teid"], "mask" : null + }, + { + "match_type" : "exact", + "name" : "has_qfi", + "target" : ["gtpu_ext_psc", "$valid$"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "qfi", + "target" : ["scalars", "userMetadata._spgw_qfi39"], + "mask" : null } ], "match_type" : "exact", @@ -5685,27 +11047,29 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [29], - "actions" : ["FabricIngress.spgw_ingress.set_pdr_attributes"], - "base_default_next" : "tbl_act_2", + "action_ids" : [45, 47, 9], + "actions" : ["FabricIngress.spgw.load_pdr", "FabricIngress.spgw.load_pdr_qos", "NoAction"], + "base_default_next" : "node_35", "next_tables" : { - "FabricIngress.spgw_ingress.set_pdr_attributes" : "tbl_act_2" + "FabricIngress.spgw.load_pdr" : "node_35", + "FabricIngress.spgw.load_pdr_qos" : "node_35", + "NoAction" : "node_35" }, "default_entry" : { - "action_id" : 29, - "action_const" : true, - "action_data" : ["0x0", "0x0", "0x0"], - "action_entry_const" : true + "action_id" : 9, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false } }, { - "name" : "FabricIngress.spgw_ingress.downlink_pdr_lookup", - "id" : 5, + "name" : "FabricIngress.spgw.downlink_pdrs", + "id" : 18, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 82, + "line" : 172, "column" : 10, - "source_fragment" : "downlink_pdr_lookup" + "source_fragment" : "downlink_pdrs" }, "key" : [ { @@ -5721,26 +11085,28 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [28], - "actions" : ["FabricIngress.spgw_ingress.set_pdr_attributes"], - "base_default_next" : "tbl_act_2", + "action_ids" : [44, 46, 8], + "actions" : ["FabricIngress.spgw.load_pdr", "FabricIngress.spgw.load_pdr_qos", "NoAction"], + "base_default_next" : "node_35", "next_tables" : { - "FabricIngress.spgw_ingress.set_pdr_attributes" : "tbl_act_2" + "FabricIngress.spgw.load_pdr" : "node_35", + "FabricIngress.spgw.load_pdr_qos" : "node_35", + "NoAction" : "node_35" }, "default_entry" : { - "action_id" : 28, - "action_const" : true, - "action_data" : ["0x0", "0x0", "0x0"], - "action_entry_const" : true + "action_id" : 8, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false } }, { - "name" : "tbl_act_2", - "id" : 6, + "name" : "tbl_spgw277", + "id" : 19, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 263, - "column" : 8, + "line" : 277, + "column" : 16, "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" }, "key" : [], @@ -5750,25 +11116,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [39], - "actions" : ["act_2"], - "base_default_next" : "node_13", + "action_ids" : [63], + "actions" : ["spgw277"], + "base_default_next" : "node_37", "next_tables" : { - "act_2" : "node_13" + "spgw277" : "node_37" }, "default_entry" : { - "action_id" : 39, + "action_id" : 63, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.spgw_ingress.decap_gtpu", - "id" : 7, + "name" : "FabricIngress.spgw.decap_gtpu.decap_gtpu", + "id" : 20, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 219, + "line" : 77, "column" : 10, "source_fragment" : "decap_gtpu" }, @@ -5798,17 +11164,17 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [32, 33, 34, 35], - "actions" : ["FabricIngress.spgw_ingress.decap_inner_tcp", "FabricIngress.spgw_ingress.decap_inner_udp", "FabricIngress.spgw_ingress.decap_inner_icmp", "FabricIngress.spgw_ingress.decap_inner_unknown"], - "base_default_next" : "FabricIngress.spgw_ingress.far_lookup", + "action_ids" : [38, 39, 40, 41], + "actions" : ["FabricIngress.spgw.decap_gtpu.decap_inner_tcp", "FabricIngress.spgw.decap_gtpu.decap_inner_udp", "FabricIngress.spgw.decap_gtpu.decap_inner_icmp", "FabricIngress.spgw.decap_gtpu.decap_inner_unknown"], + "base_default_next" : "FabricIngress.spgw.fars", "next_tables" : { - "FabricIngress.spgw_ingress.decap_inner_tcp" : "FabricIngress.spgw_ingress.far_lookup", - "FabricIngress.spgw_ingress.decap_inner_udp" : "FabricIngress.spgw_ingress.far_lookup", - "FabricIngress.spgw_ingress.decap_inner_icmp" : "FabricIngress.spgw_ingress.far_lookup", - "FabricIngress.spgw_ingress.decap_inner_unknown" : "FabricIngress.spgw_ingress.far_lookup" + "FabricIngress.spgw.decap_gtpu.decap_inner_tcp" : "FabricIngress.spgw.fars", + "FabricIngress.spgw.decap_gtpu.decap_inner_udp" : "FabricIngress.spgw.fars", + "FabricIngress.spgw.decap_gtpu.decap_inner_icmp" : "FabricIngress.spgw.fars", + "FabricIngress.spgw.decap_gtpu.decap_inner_unknown" : "FabricIngress.spgw.fars" }, "default_entry" : { - "action_id" : 35, + "action_id" : 41, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5817,7 +11183,7 @@ { "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 233, + "line" : 91, "column" : 12, "source_fragment" : "(true, false, false) : decap_inner_tcp()" }, @@ -5836,7 +11202,7 @@ } ], "action_entry" : { - "action_id" : 32, + "action_id" : 38, "action_data" : [] }, "priority" : 1 @@ -5844,7 +11210,7 @@ { "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 234, + "line" : 92, "column" : 12, "source_fragment" : "(false, true, false) : decap_inner_udp()" }, @@ -5863,7 +11229,7 @@ } ], "action_entry" : { - "action_id" : 33, + "action_id" : 39, "action_data" : [] }, "priority" : 2 @@ -5871,7 +11237,7 @@ { "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 235, + "line" : 93, "column" : 12, "source_fragment" : "(false, false, true) : decap_inner_icmp()" }, @@ -5890,7 +11256,7 @@ } ], "action_entry" : { - "action_id" : 34, + "action_id" : 40, "action_data" : [] }, "priority" : 3 @@ -5898,19 +11264,19 @@ ] }, { - "name" : "FabricIngress.spgw_ingress.far_lookup", - "id" : 8, + "name" : "FabricIngress.spgw.fars", + "id" : 21, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 163, + "line" : 245, "column" : 10, - "source_fragment" : "far_lookup" + "source_fragment" : "fars" }, "key" : [ { "match_type" : "exact", "name" : "far_id", - "target" : ["scalars", "fabric_metadata_t._spgw_far_id26"], + "target" : ["scalars", "userMetadata._spgw_far_id37"], "mask" : null } ], @@ -5920,114 +11286,28 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [30, 31], - "actions" : ["FabricIngress.spgw_ingress.load_normal_far_attributes", "FabricIngress.spgw_ingress.load_tunnel_far_attributes"], - "base_default_next" : "node_16", - "next_tables" : { - "FabricIngress.spgw_ingress.load_normal_far_attributes" : "node_16", - "FabricIngress.spgw_ingress.load_tunnel_far_attributes" : "node_16" - }, - "default_entry" : { - "action_id" : 30, - "action_const" : true, - "action_data" : ["0x1", "0x1"], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_3", - "id" : 9, - "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 280, - "column" : 38, - "source_fragment" : "= true; ..." - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [40], - "actions" : ["act_3"], - "base_default_next" : "tbl_act_4", + "action_ids" : [48, 49, 50], + "actions" : ["FabricIngress.spgw.load_normal_far", "FabricIngress.spgw.load_tunnel_far", "FabricIngress.spgw.load_dbuf_far"], + "base_default_next" : "tbl_spgw294", "next_tables" : { - "act_3" : "tbl_act_4" + "FabricIngress.spgw.load_normal_far" : "tbl_spgw294", + "FabricIngress.spgw.load_tunnel_far" : "tbl_spgw294", + "FabricIngress.spgw.load_dbuf_far" : "tbl_spgw294" }, "default_entry" : { - "action_id" : 40, + "action_id" : 48, "action_const" : true, - "action_data" : [], + "action_data" : ["0x1", "0x0"], "action_entry_const" : true } }, { - "name" : "tbl_act_4", - "id" : 10, + "name" : "tbl_spgw294", + "id" : 22, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 289, - "column" : 32, - "source_fragment" : "=" - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [41], - "actions" : ["act_4"], - "base_default_next" : "node_19", - "next_tables" : { - "act_4" : "node_19" - }, - "default_entry" : { - "action_id" : 41, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_5", - "id" : 11, - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 111, + "line" : 294, "column" : 36, - "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." - }, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [42], - "actions" : ["act_5"], - "base_default_next" : "node_21", - "next_tables" : { - "act_5" : "node_21" - }, - "default_entry" : { - "action_id" : 42, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_6", - "id" : 12, - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 127, - "column" : 37, "source_fragment" : "=" }, "key" : [], @@ -6037,45 +11317,39 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [43], - "actions" : ["act_6"], - "base_default_next" : "FabricIngress.filtering.ingress_port_vlan", + "action_ids" : [64], + "actions" : ["spgw294"], + "base_default_next" : "node_41", "next_tables" : { - "act_6" : "FabricIngress.filtering.ingress_port_vlan" + "spgw294" : "node_41" }, "default_entry" : { - "action_id" : 43, + "action_id" : 64, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.filtering.ingress_port_vlan", - "id" : 13, + "name" : "FabricIngress.forwarding.bridging", + "id" : 23, "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 53, + "filename" : "include/control/forwarding.p4", + "line" : 46, "column" : 10, - "source_fragment" : "ingress_port_vlan" + "source_fragment" : "bridging" }, "key" : [ { "match_type" : "exact", - "name" : "ig_port", - "target" : ["standard_metadata", "ingress_port"], - "mask" : null - }, - { - "match_type" : "exact", - "name" : "vlan_is_valid", - "target" : ["vlan_tag", "$valid$"], + "name" : "vlan_id", + "target" : ["scalars", "userMetadata._vlan_id9"], "mask" : null }, { "match_type" : "ternary", - "name" : "vlan_id", - "target" : ["vlan_tag", "vlan_id"], + "name" : "eth_dst", + "target" : ["ethernet", "dst_addr"], "mask" : null } ], @@ -6085,132 +11359,109 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [7, 8, 9], - "actions" : ["FabricIngress.filtering.deny", "FabricIngress.filtering.permit", "FabricIngress.filtering.permit_with_internal_vlan"], - "base_default_next" : "FabricIngress.filtering.fwd_classifier", + "action_ids" : [14, 0], + "actions" : ["FabricIngress.forwarding.set_next_id_bridging", "nop"], + "base_default_next" : "node_48", "next_tables" : { - "FabricIngress.filtering.deny" : "FabricIngress.filtering.fwd_classifier", - "FabricIngress.filtering.permit" : "FabricIngress.filtering.fwd_classifier", - "FabricIngress.filtering.permit_with_internal_vlan" : "FabricIngress.filtering.fwd_classifier" + "FabricIngress.forwarding.set_next_id_bridging" : "node_48", + "nop" : "node_48" }, "default_entry" : { - "action_id" : 7, + "action_id" : 0, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.filtering.fwd_classifier", - "id" : 14, + "name" : "FabricIngress.forwarding.mpls", + "id" : 24, "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 92, + "filename" : "include/control/forwarding.p4", + "line" : 71, "column" : 10, - "source_fragment" : "fwd_classifier" + "source_fragment" : "mpls" }, "key" : [ { "match_type" : "exact", - "name" : "ig_port", - "target" : ["standard_metadata", "ingress_port"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "eth_dst", - "target" : ["ethernet", "dst_addr"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "eth_type", - "target" : ["eth_type", "value"], - "mask" : null - }, - { - "match_type" : "exact", - "name" : "ip_eth_type", - "target" : ["scalars", "fabric_metadata_t._ip_eth_type0"], + "name" : "mpls_label", + "target" : ["scalars", "userMetadata._mpls_label12"], "mask" : null } ], - "match_type" : "ternary", + "match_type" : "exact", "type" : "simple", "max_size" : 1024, "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [10], - "actions" : ["FabricIngress.filtering.set_forwarding_type"], - "base_default_next" : "node_25", + "action_ids" : [15, 1], + "actions" : ["FabricIngress.forwarding.pop_mpls_and_next", "nop"], + "base_default_next" : "node_48", "next_tables" : { - "FabricIngress.filtering.set_forwarding_type" : "node_25" + "FabricIngress.forwarding.pop_mpls_and_next" : "node_48", + "nop" : "node_48" }, "default_entry" : { - "action_id" : 10, + "action_id" : 1, "action_const" : true, - "action_data" : ["0x0"], + "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.forwarding.bridging", - "id" : 15, + "name" : "FabricIngress.forwarding.routing_v4", + "id" : 25, "source_info" : { "filename" : "include/control/forwarding.p4", - "line" : 46, + "line" : 108, "column" : 10, - "source_fragment" : "bridging" + "source_fragment" : "routing_v4" }, "key" : [ { - "match_type" : "exact", - "name" : "vlan_id", - "target" : ["scalars", "fabric_metadata_t._vlan_id1"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "eth_dst", - "target" : ["ethernet", "dst_addr"], + "match_type" : "lpm", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._ipv4_dst_addr24"], "mask" : null } ], - "match_type" : "ternary", + "match_type" : "lpm", "type" : "simple", "max_size" : 1024, - "with_counters" : true, + "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [11, 0], - "actions" : ["FabricIngress.forwarding.set_next_id_bridging", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "action_ids" : [16, 17, 2], + "actions" : ["FabricIngress.forwarding.set_next_id_routing_v4", "FabricIngress.forwarding.nop_routing_v4", "nop"], + "base_default_next" : "node_48", "next_tables" : { - "FabricIngress.forwarding.set_next_id_bridging" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.set_next_id_routing_v4" : "node_48", + "FabricIngress.forwarding.nop_routing_v4" : "node_48", + "nop" : "node_48" }, "default_entry" : { - "action_id" : 0, - "action_const" : true, + "action_id" : 2, + "action_const" : false, "action_data" : [], - "action_entry_const" : true + "action_entry_const" : false } }, { - "name" : "FabricIngress.forwarding.mpls", - "id" : 16, + "name" : "FabricIngress.pre_next.next_mpls", + "id" : 26, "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 71, + "filename" : "include/control/pre_next.p4", + "line" : 36, "column" : 10, - "source_fragment" : "mpls" + "source_fragment" : "next_mpls" }, "key" : [ { "match_type" : "exact", - "name" : "mpls_label", - "target" : ["scalars", "fabric_metadata_t._mpls_label4"], + "name" : "next_id", + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], @@ -6220,64 +11471,63 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [12, 1], - "actions" : ["FabricIngress.forwarding.pop_mpls_and_next", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "action_ids" : [18, 3], + "actions" : ["FabricIngress.pre_next.set_mpls_label", "nop"], + "base_default_next" : "FabricIngress.pre_next.next_vlan", "next_tables" : { - "FabricIngress.forwarding.pop_mpls_and_next" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.pre_next.set_mpls_label" : "FabricIngress.pre_next.next_vlan", + "nop" : "FabricIngress.pre_next.next_vlan" }, "default_entry" : { - "action_id" : 1, + "action_id" : 3, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.forwarding.routing_v4", - "id" : 17, + "name" : "FabricIngress.pre_next.next_vlan", + "id" : 27, "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 108, + "filename" : "include/control/pre_next.p4", + "line" : 73, "column" : 10, - "source_fragment" : "routing_v4" + "source_fragment" : "next_vlan" }, "key" : [ { - "match_type" : "lpm", - "name" : "ipv4_dst", - "target" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"], + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], - "match_type" : "lpm", + "match_type" : "exact", "type" : "simple", "max_size" : 1024, - "with_counters" : false, + "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [13, 14, 2], - "actions" : ["FabricIngress.forwarding.set_next_id_routing_v4", "FabricIngress.forwarding.nop_routing_v4", "nop"], + "action_ids" : [19, 4], + "actions" : ["FabricIngress.pre_next.set_vlan", "nop"], "base_default_next" : "FabricIngress.acl.acl", "next_tables" : { - "FabricIngress.forwarding.set_next_id_routing_v4" : "FabricIngress.acl.acl", - "FabricIngress.forwarding.nop_routing_v4" : "FabricIngress.acl.acl", + "FabricIngress.pre_next.set_vlan" : "FabricIngress.acl.acl", "nop" : "FabricIngress.acl.acl" }, "default_entry" : { - "action_id" : 2, - "action_const" : false, + "action_id" : 4, + "action_const" : true, "action_data" : [], - "action_entry_const" : false + "action_entry_const" : true } }, { "name" : "FabricIngress.acl.acl", - "id" : 18, + "id" : 28, "source_info" : { "filename" : "include/control/acl.p4", - "line" : 60, + "line" : 59, "column" : 10, "source_fragment" : "acl" }, @@ -6290,68 +11540,74 @@ }, { "match_type" : "ternary", - "name" : "ip_proto", - "target" : ["scalars", "fabric_metadata_t._ip_proto12"], + "name" : "eth_dst", + "target" : ["ethernet", "dst_addr"], "mask" : null }, { "match_type" : "ternary", - "name" : "l4_sport", - "target" : ["scalars", "fabric_metadata_t._l4_sport13"], + "name" : "eth_src", + "target" : ["ethernet", "src_addr"], "mask" : null }, { "match_type" : "ternary", - "name" : "l4_dport", - "target" : ["scalars", "fabric_metadata_t._l4_dport14"], + "name" : "vlan_id", + "target" : ["vlan_tag", "vlan_id"], "mask" : null }, { "match_type" : "ternary", - "name" : "eth_dst", - "target" : ["ethernet", "dst_addr"], + "name" : "eth_type", + "target" : ["eth_type", "value"], "mask" : null }, { "match_type" : "ternary", - "name" : "eth_src", - "target" : ["ethernet", "src_addr"], + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._lkp_ipv4_src1"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._lkp_ipv4_dst2"], "mask" : null }, { "match_type" : "ternary", - "name" : "vlan_id", - "target" : ["vlan_tag", "vlan_id"], + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._lkp_ip_proto3"], "mask" : null }, { "match_type" : "ternary", - "name" : "eth_type", - "target" : ["eth_type", "value"], + "name" : "icmp_type", + "target" : ["icmp", "icmp_type"], "mask" : null }, { "match_type" : "ternary", - "name" : "ipv4_src", - "target" : ["ipv4", "src_addr"], + "name" : "icmp_code", + "target" : ["icmp", "icmp_code"], "mask" : null }, { "match_type" : "ternary", - "name" : "ipv4_dst", - "target" : ["ipv4", "dst_addr"], + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._lkp_l4_sport4"], "mask" : null }, { "match_type" : "ternary", - "name" : "icmp_type", - "target" : ["icmp", "icmp_type"], + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._lkp_l4_dport5"], "mask" : null }, { "match_type" : "ternary", - "name" : "icmp_code", - "target" : ["icmp", "icmp_code"], + "name" : "port_type", + "target" : ["scalars", "userMetadata._port_type46"], "mask" : null } ], @@ -6361,18 +11617,18 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [15, 16, 17, 18, 19], + "action_ids" : [20, 21, 22, 23, 24], "actions" : ["FabricIngress.acl.set_next_id_acl", "FabricIngress.acl.punt_to_cpu", "FabricIngress.acl.set_clone_session_id", "FabricIngress.acl.drop", "FabricIngress.acl.nop_acl"], - "base_default_next" : "node_33", + "base_default_next" : "node_52", "next_tables" : { - "FabricIngress.acl.set_next_id_acl" : "node_33", - "FabricIngress.acl.punt_to_cpu" : "node_33", - "FabricIngress.acl.set_clone_session_id" : "node_33", - "FabricIngress.acl.drop" : "node_33", - "FabricIngress.acl.nop_acl" : "node_33" + "FabricIngress.acl.set_next_id_acl" : "node_52", + "FabricIngress.acl.punt_to_cpu" : "node_52", + "FabricIngress.acl.set_clone_session_id" : "node_52", + "FabricIngress.acl.drop" : "node_52", + "FabricIngress.acl.nop_acl" : "node_52" }, "default_entry" : { - "action_id" : 19, + "action_id" : 24, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -6380,10 +11636,10 @@ }, { "name" : "FabricIngress.next.xconnect", - "id" : 19, + "id" : 29, "source_info" : { "filename" : "include/control/next.p4", - "line" : 119, + "line" : 68, "column" : 10, "source_fragment" : "xconnect" }, @@ -6397,7 +11653,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id9"], + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], @@ -6407,7 +11663,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [21, 22, 4], + "action_ids" : [25, 26, 5], "actions" : ["FabricIngress.next.output_xconnect", "FabricIngress.next.set_next_id_xconnect", "nop"], "base_default_next" : "FabricIngress.next.hashed", "next_tables" : { @@ -6416,7 +11672,7 @@ "nop" : "FabricIngress.next.hashed" }, "default_entry" : { - "action_id" : 4, + "action_id" : 5, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -6424,10 +11680,10 @@ }, { "name" : "FabricIngress.next.hashed", - "id" : 20, + "id" : 30, "source_info" : { "filename" : "include/control/next.p4", - "line" : 202, + "line" : 138, "column" : 10, "source_fragment" : "hashed" }, @@ -6435,7 +11691,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id9"], + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], @@ -6446,22 +11702,21 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [23, 24, 25, 5], - "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "FabricIngress.next.mpls_routing_hashed", "nop"], + "action_ids" : [27, 28, 6], + "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "nop"], "base_default_next" : "FabricIngress.next.multicast", "next_tables" : { "FabricIngress.next.output_hashed" : "FabricIngress.next.multicast", "FabricIngress.next.routing_hashed" : "FabricIngress.next.multicast", - "FabricIngress.next.mpls_routing_hashed" : "FabricIngress.next.multicast", "nop" : "FabricIngress.next.multicast" } }, { "name" : "FabricIngress.next.multicast", - "id" : 21, + "id" : 31, "source_info" : { "filename" : "include/control/next.p4", - "line" : 236, + "line" : 171, "column" : 10, "source_fragment" : "multicast" }, @@ -6469,7 +11724,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id9"], + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], @@ -6479,65 +11734,57 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [26, 6], + "action_ids" : [29, 7], "actions" : ["FabricIngress.next.set_mcast_group_id", "nop"], - "base_default_next" : "FabricIngress.next.next_vlan", + "base_default_next" : "node_56", "next_tables" : { - "FabricIngress.next.set_mcast_group_id" : "FabricIngress.next.next_vlan", - "nop" : "FabricIngress.next.next_vlan" + "FabricIngress.next.set_mcast_group_id" : "node_56", + "nop" : "node_56" }, "default_entry" : { - "action_id" : 6, + "action_id" : 7, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.next.next_vlan", - "id" : 22, + "name" : "tbl_port_counter31", + "id" : 32, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 86, - "column" : 10, - "source_fragment" : "next_vlan" + "filename" : "include/control/port_counter.p4", + "line" : 31, + "column" : 12, + "source_fragment" : "egress_port_counter.count((bit<32>)standard_metadata.egress_spec)" }, - "key" : [ - { - "match_type" : "exact", - "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t._next_id9"], - "mask" : null - } - ], + "key" : [], "match_type" : "exact", "type" : "simple", "max_size" : 1024, - "with_counters" : true, + "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [20, 3], - "actions" : ["FabricIngress.next.set_vlan", "nop"], - "base_default_next" : "node_38", + "action_ids" : [65], + "actions" : ["port_counter31"], + "base_default_next" : "node_58", "next_tables" : { - "FabricIngress.next.set_vlan" : "node_38", - "nop" : "node_38" + "port_counter31" : "node_58" }, "default_entry" : { - "action_id" : 3, + "action_id" : 65, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_7", - "id" : 23, + "name" : "tbl_port_counter34", + "id" : 33, "source_info" : { "filename" : "include/control/port_counter.p4", - "line" : 31, + "line" : 34, "column" : 12, - "source_fragment" : "egress_port_counter.count((bit<32>)standard_metadata.egress_spec)" + "source_fragment" : "ingress_port_counter.count((bit<32>)standard_metadata.ingress_port)" }, "key" : [], "match_type" : "exact", @@ -6546,27 +11793,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [44], - "actions" : ["act_7"], - "base_default_next" : "node_40", + "action_ids" : [66], + "actions" : ["port_counter34"], + "base_default_next" : "tbl_slicing114", "next_tables" : { - "act_7" : "node_40" + "port_counter34" : "tbl_slicing114" }, "default_entry" : { - "action_id" : 44, + "action_id" : 66, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_8", - "id" : 24, + "name" : "tbl_slicing114", + "id" : 34, "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 34, - "column" : 12, - "source_fragment" : "ingress_port_counter.count((bit<32>)standard_metadata.ingress_port)" + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 8, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) slice_tc, fabric_md.packet_color); ..." }, "key" : [], "match_type" : "exact", @@ -6575,18 +11822,67 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [45], - "actions" : ["act_8"], - "base_default_next" : null, + "action_ids" : [67], + "actions" : ["slicing114"], + "base_default_next" : "FabricIngress.qos.queues", "next_tables" : { - "act_8" : null + "slicing114" : "FabricIngress.qos.queues" }, "default_entry" : { - "action_id" : 45, + "action_id" : 67, "action_const" : true, "action_data" : [], "action_entry_const" : true } + }, + { + "name" : "FabricIngress.qos.queues", + "id" : 35, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 93, + "column" : 10, + "source_fragment" : "queues" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "slice_id", + "target" : ["scalars", "userMetadata._slice_id25"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "tc", + "target" : ["scalars", "userMetadata._tc27"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "color", + "target" : ["scalars", "userMetadata._packet_color26"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 128, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [32, 33], + "actions" : ["FabricIngress.qos.set_queue", "FabricIngress.qos.meter_drop"], + "base_default_next" : null, + "next_tables" : { + "FabricIngress.qos.set_queue" : null, + "FabricIngress.qos.meter_drop" : null + }, + "default_entry" : { + "action_id" : 32, + "action_const" : true, + "action_data" : ["0x0"], + "action_entry_const" : true + } } ], "action_profiles" : [ @@ -6595,7 +11891,7 @@ "id" : 0, "source_info" : { "filename" : "include/control/next.p4", - "line" : 183, + "line" : 125, "column" : 57, "source_fragment" : "hashed_selector" }, @@ -6605,23 +11901,23 @@ "input" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_src_addr15"] + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ipv4_dst_addr16"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._ip_proto12"] + "value" : ["scalars", "userMetadata._ip_proto20"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_sport13"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._l4_dport14"] + "value" : ["scalars", "userMetadata._l4_dport22"] } ] } @@ -6629,8 +11925,192 @@ ], "conditionals" : [ { - "name" : "node_2", + "name" : "node_3", "id" : 0, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 31, + "column" : 12, + "source_fragment" : "hdr.inner_ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init32", + "false_next" : "node_11" + }, + { + "name" : "node_5", + "id" : 1, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 36, + "column" : 16, + "source_fragment" : "hdr.inner_tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_tcp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init37", + "false_next" : "node_7" + }, + { + "name" : "node_7", + "id" : 2, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 39, + "column" : 23, + "source_fragment" : "hdr.inner_udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_udp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init40", + "false_next" : "node_9" + }, + { + "name" : "node_9", + "id" : 3, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 42, + "column" : 23, + "source_fragment" : "hdr.inner_icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_icmp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init43", + "false_next" : "node_19" + }, + { + "name" : "node_11", + "id" : 4, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 46, + "column" : 19, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init47", + "false_next" : "node_19" + }, + { + "name" : "node_13", + "id" : 5, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 51, + "column" : 16, + "source_fragment" : "hdr.tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["tcp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init52", + "false_next" : "node_15" + }, + { + "name" : "node_15", + "id" : 6, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 54, + "column" : 23, + "source_fragment" : "hdr.udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["udp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init55", + "false_next" : "node_17" + }, + { + "name" : "node_17", + "id" : 7, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 57, + "column" : 23, + "source_fragment" : "hdr.icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["icmp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init58", + "false_next" : "node_19" + }, + { + "name" : "node_19", + "id" : 8, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 24, @@ -6648,45 +12128,71 @@ } } }, - "true_next" : "tbl_act", - "false_next" : "tbl_act_0" + "true_next" : "tbl_packetio25", + "false_next" : "FabricIngress.slice_tc_classifier.classifier" }, { - "name" : "node_6", - "id" : 1, + "name" : "node_22", + "id" : 9, "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 249, + "filename" : "include/control/filtering.p4", + "line" : 112, + "column" : 12, + "source_fragment" : "hdr.vlan_tag.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["vlan_tag", "$valid$"] + } + } + }, + "true_next" : "tbl_filtering113", + "false_next" : "node_24" + }, + { + "name" : "node_24", + "id" : 10, + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 124, "column" : 12, - "source_fragment" : "fabric_md.spgw.skip_spgw == true" + "source_fragment" : "!hdr.mpls.isValid()" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_skip_spgw28"] + "value" : ["mpls", "$valid$"] } } - }, - "right" : { - "type" : "bool", - "value" : true } } }, - "true_next" : "tbl_act_1", - "false_next" : "node_8" + "true_next" : "tbl_filtering129", + "false_next" : "FabricIngress.filtering.ingress_port_vlan" }, { - "name" : "node_8", - "id" : 2, + "name" : "node_28", + "id" : 11, + "source_info" : { + "filename" : "fabric.p4", + "line" : 76, + "column" : 12, + "source_fragment" : "fabric_metadata.skip_forwarding" + }, "expression" : { "type" : "expression", "value" : { @@ -6699,112 +12205,98 @@ "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "spgw_ingress_hasReturned"] + "value" : ["scalars", "userMetadata._skip_forwarding14"] } } } } }, - "true_next" : "node_9", - "false_next" : "node_19" + "true_next" : "FabricIngress.spgw.interfaces", + "false_next" : "node_41" }, { - "name" : "node_9", - "id" : 3, + "name" : "node_30", + "id" : 12, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 253, - "column" : 12, - "source_fragment" : "hdr.gtpu.isValid()" + "line" : 267, + "column" : 16, + "source_fragment" : "fabric_md.spgw.src_iface == SPGW_IFACE_FROM_DBUF" }, "expression" : { "type" : "expression", "value" : { - "op" : "d2b", - "left" : null, - "right" : { + "op" : "==", + "left" : { "type" : "field", - "value" : ["gtpu", "$valid$"] + "value" : ["scalars", "userMetadata._spgw_src_iface38"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" } } }, - "true_next" : "FabricIngress.spgw_ingress.uplink_pdr_lookup", - "false_next" : "FabricIngress.spgw_ingress.downlink_pdr_lookup" + "true_next" : "FabricIngress.spgw.decap_gtpu_from_dbuf.decap_gtpu", + "false_next" : "node_32" }, { - "name" : "node_13", - "id" : 4, + "name" : "node_32", + "id" : 13, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 266, - "column" : 12, - "source_fragment" : "fabric_md.spgw.needs_gtpu_decap == true" + "line" : 271, + "column" : 16, + "source_fragment" : "hdr.gtpu.isValid()" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_decap33"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["gtpu", "$valid$"] } } }, - "true_next" : "FabricIngress.spgw_ingress.decap_gtpu", - "false_next" : "FabricIngress.spgw_ingress.far_lookup" + "true_next" : "FabricIngress.spgw.uplink_pdrs", + "false_next" : "FabricIngress.spgw.downlink_pdrs" }, { - "name" : "node_16", - "id" : 5, + "name" : "node_35", + "id" : 14, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 277, - "column" : 12, - "source_fragment" : "fabric_md.spgw.far_dropped == true" + "line" : 276, + "column" : 16, + "source_fragment" : "fabric_md.spgw.src_iface != SPGW_IFACE_FROM_DBUF" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", + "op" : "!=", "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_far_dropped30"] - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_src_iface38"] }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0x03" } } }, - "true_next" : "tbl_act_3", - "false_next" : "tbl_act_4" + "true_next" : "tbl_spgw277", + "false_next" : "node_37" }, { - "name" : "node_19", - "id" : 6, + "name" : "node_37", + "id" : 15, "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 110, - "column" : 12, - "source_fragment" : "hdr.vlan_tag.isValid()" + "filename" : "fabric.p4", + "line" : 77, + "column" : 28, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", @@ -6813,21 +12305,21 @@ "left" : null, "right" : { "type" : "field", - "value" : ["vlan_tag", "$valid$"] + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_decap43"] } } }, - "true_next" : "tbl_act_5", - "false_next" : "node_21" + "true_next" : "FabricIngress.spgw.decap_gtpu.decap_gtpu", + "false_next" : "FabricIngress.spgw.fars" }, { - "name" : "node_21", - "id" : 7, + "name" : "node_41", + "id" : 16, "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 122, + "filename" : "fabric.p4", + "line" : 80, "column" : 12, - "source_fragment" : "!hdr.mpls.isValid()" + "source_fragment" : "fabric_metadata.skip_forwarding" }, "expression" : { "type" : "expression", @@ -6841,51 +12333,18 @@ "left" : null, "right" : { "type" : "field", - "value" : ["mpls", "$valid$"] - } - } - } - } - }, - "true_next" : "tbl_act_6", - "false_next" : "FabricIngress.filtering.ingress_port_vlan" - }, - { - "name" : "node_25", - "id" : 8, - "source_info" : { - "filename" : "fabric.p4", - "line" : 69, - "column" : 12, - "source_fragment" : "fabric_metadata.skip_forwarding == false" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_forwarding6"] + "value" : ["scalars", "userMetadata._skip_forwarding14"] } } - }, - "right" : { - "type" : "bool", - "value" : false } } }, - "true_next" : "node_26", - "false_next" : "FabricIngress.acl.acl" + "true_next" : "node_42", + "false_next" : "node_48" }, { - "name" : "node_26", - "id" : 9, + "name" : "node_42", + "id" : 17, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 150, @@ -6898,7 +12357,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -6907,11 +12366,11 @@ } }, "true_next" : "FabricIngress.forwarding.bridging", - "false_next" : "node_28" + "false_next" : "node_44" }, { - "name" : "node_28", - "id" : 10, + "name" : "node_44", + "id" : 18, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 151, @@ -6924,7 +12383,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -6933,11 +12392,11 @@ } }, "true_next" : "FabricIngress.forwarding.mpls", - "false_next" : "node_30" + "false_next" : "node_46" }, { - "name" : "node_30", - "id" : 11, + "name" : "node_46", + "id" : 19, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 152, @@ -6950,7 +12409,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -6959,44 +12418,71 @@ } }, "true_next" : "FabricIngress.forwarding.routing_v4", - "false_next" : "FabricIngress.acl.acl" + "false_next" : "node_48" }, { - "name" : "node_33", - "id" : 12, + "name" : "node_48", + "id" : 20, "source_info" : { "filename" : "fabric.p4", - "line" : 73, + "line" : 83, "column" : 12, - "source_fragment" : "fabric_metadata.skip_next == false" + "source_fragment" : "fabric_metadata.skip_next" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._skip_next7"] + "value" : ["scalars", "userMetadata._skip_next15"] } } - }, + } + } + }, + "true_next" : "FabricIngress.pre_next.next_mpls", + "false_next" : "FabricIngress.acl.acl" + }, + { + "name" : "node_52", + "id" : 21, + "source_info" : { + "filename" : "fabric.p4", + "line" : 87, + "column" : 12, + "source_fragment" : "fabric_metadata.skip_next" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "not", + "left" : null, "right" : { - "type" : "bool", - "value" : false + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + } + } } } }, - "false_next" : null, - "true_next" : "FabricIngress.next.xconnect" + "true_next" : "FabricIngress.next.xconnect", + "false_next" : "tbl_slicing114" }, { - "name" : "node_38", - "id" : 13, + "name" : "node_56", + "id" : 22, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 30, @@ -7017,12 +12503,12 @@ } } }, - "true_next" : "tbl_act_7", - "false_next" : "node_40" + "true_next" : "tbl_port_counter31", + "false_next" : "node_58" }, { - "name" : "node_40", - "id" : 14, + "name" : "node_58", + "id" : 23, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 33, @@ -7043,8 +12529,8 @@ } } }, - "false_next" : null, - "true_next" : "tbl_act_8" + "true_next" : "tbl_port_counter34", + "false_next" : "tbl_slicing114" } ] }, @@ -7053,15 +12539,15 @@ "id" : 1, "source_info" : { "filename" : "fabric.p4", - "line" : 91, + "line" : 105, "column" : 8, "source_fragment" : "FabricEgress" }, - "init_table" : "node_44", + "init_table" : "node_64", "tables" : [ { - "name" : "tbl_act_9", - "id" : 25, + "name" : "tbl_packetio41", + "id" : 36, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 41, @@ -7075,22 +12561,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [52], - "actions" : ["act_9"], - "base_default_next" : "node_46", + "action_ids" : [78], + "actions" : ["packetio41"], + "base_default_next" : "node_66", "next_tables" : { - "act_9" : "node_46" + "packetio41" : "node_66" }, "default_entry" : { - "action_id" : 52, + "action_id" : 78, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_10", - "id" : 26, + "name" : "tbl_packetio44", + "id" : 37, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 44, @@ -7104,25 +12590,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [53], - "actions" : ["act_10"], - "base_default_next" : "node_48", + "action_ids" : [79], + "actions" : ["packetio44"], + "base_default_next" : "node_68", "next_tables" : { - "act_10" : "node_48" + "packetio44" : "node_68" }, "default_entry" : { - "action_id" : 53, + "action_id" : 79, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_11", - "id" : 27, + "name" : "tbl_next283", + "id" : 38, "source_info" : { "filename" : "include/control/next.p4", - "line" : 337, + "line" : 283, "column" : 12, "source_fragment" : "mark_to_drop(standard_metadata)" }, @@ -7133,14 +12619,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [54], - "actions" : ["act_11"], - "base_default_next" : "node_50", + "action_ids" : [80], + "actions" : ["next283"], + "base_default_next" : "node_70", "next_tables" : { - "act_11" : "node_50" + "next283" : "node_70" }, "default_entry" : { - "action_id" : 54, + "action_id" : 80, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -7148,10 +12634,10 @@ }, { "name" : "tbl_egress_next_pop_mpls_if_present", - "id" : 28, + "id" : 39, "source_info" : { "filename" : "include/control/next.p4", - "line" : 341, + "line" : 287, "column" : 36, "source_fragment" : "pop_mpls_if_present()" }, @@ -7162,14 +12648,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [47], + "action_ids" : [69], "actions" : ["FabricEgress.egress_next.pop_mpls_if_present"], "base_default_next" : "FabricEgress.egress_next.egress_vlan", "next_tables" : { "FabricEgress.egress_next.pop_mpls_if_present" : "FabricEgress.egress_next.egress_vlan" }, "default_entry" : { - "action_id" : 47, + "action_id" : 69, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -7177,10 +12663,10 @@ }, { "name" : "tbl_egress_next_set_mpls", - "id" : 29, + "id" : 40, "source_info" : { "filename" : "include/control/next.p4", - "line" : 343, + "line" : 289, "column" : 12, "source_fragment" : "set_mpls()" }, @@ -7191,14 +12677,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [48], + "action_ids" : [70], "actions" : ["FabricEgress.egress_next.set_mpls"], "base_default_next" : "FabricEgress.egress_next.egress_vlan", "next_tables" : { "FabricEgress.egress_next.set_mpls" : "FabricEgress.egress_next.egress_vlan" }, "default_entry" : { - "action_id" : 48, + "action_id" : 70, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -7206,10 +12692,10 @@ }, { "name" : "FabricEgress.egress_next.egress_vlan", - "id" : 30, + "id" : 41, "source_info" : { "filename" : "include/control/next.p4", - "line" : 320, + "line" : 265, "column" : 10, "source_fragment" : "egress_vlan" }, @@ -7217,7 +12703,7 @@ { "match_type" : "exact", "name" : "vlan_id", - "target" : ["scalars", "fabric_metadata_t._vlan_id1"], + "target" : ["scalars", "userMetadata._vlan_id9"], "mask" : null }, { @@ -7233,23 +12719,30 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [50, 46], - "actions" : ["FabricEgress.egress_next.pop_vlan", "nop"], - "base_default_next" : null, + "action_ids" : [71, 72, 73], + "actions" : ["FabricEgress.egress_next.push_vlan", "FabricEgress.egress_next.pop_vlan", "FabricEgress.egress_next.drop"], + "base_default_next" : "node_75", "next_tables" : { - "__HIT__" : "tbl_act_12", - "__MISS__" : "tbl_act_13" + "FabricEgress.egress_next.push_vlan" : "node_75", + "FabricEgress.egress_next.pop_vlan" : "node_75", + "FabricEgress.egress_next.drop" : "node_75" }, "default_entry" : { - "action_id" : 46, + "action_id" : 73, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_12", - "id" : 31, + "name" : "tbl_next309", + "id" : 42, + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 309, + "column" : 25, + "source_fragment" : "=" + }, "key" : [], "match_type" : "exact", "type" : "simple", @@ -7257,22 +12750,28 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [55], - "actions" : ["act_12"], - "base_default_next" : "node_57", + "action_ids" : [82], + "actions" : ["next309"], + "base_default_next" : "node_77", "next_tables" : { - "act_12" : "node_57" + "next309" : "node_77" }, "default_entry" : { - "action_id" : 55, + "action_id" : 82, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_13", - "id" : 32, + "name" : "tbl_next310", + "id" : 43, + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 310, + "column" : 35, + "source_fragment" : "mark_to_drop(standard_metadata)" + }, "key" : [], "match_type" : "exact", "type" : "simple", @@ -7280,27 +12779,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [56], - "actions" : ["act_13"], - "base_default_next" : "node_57", + "action_ids" : [81], + "actions" : ["next310"], + "base_default_next" : "node_83", "next_tables" : { - "act_13" : "node_57" + "next310" : "node_83" }, "default_entry" : { - "action_id" : 56, + "action_id" : 81, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_egress_next_push_vlan", - "id" : 33, + "name" : "tbl_next313", + "id" : 44, "source_info" : { "filename" : "include/control/next.p4", - "line" : 360, - "column" : 20, - "source_fragment" : "push_vlan()" + "line" : 313, + "column" : 29, + "source_fragment" : "=" }, "key" : [], "match_type" : "exact", @@ -7309,27 +12808,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [49], - "actions" : ["FabricEgress.egress_next.push_vlan"], - "base_default_next" : "node_60", + "action_ids" : [84], + "actions" : ["next313"], + "base_default_next" : "node_81", "next_tables" : { - "FabricEgress.egress_next.push_vlan" : "node_60" + "next313" : "node_81" }, "default_entry" : { - "action_id" : 49, + "action_id" : 84, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_14", - "id" : 34, + "name" : "tbl_next314", + "id" : 45, "source_info" : { "filename" : "include/control/next.p4", - "line" : 369, - "column" : 25, - "source_fragment" : "=" + "line" : 314, + "column" : 39, + "source_fragment" : "mark_to_drop(standard_metadata)" }, "key" : [], "match_type" : "exact", @@ -7338,27 +12837,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [58], - "actions" : ["act_15"], - "base_default_next" : "node_62", + "action_ids" : [83], + "actions" : ["next314"], + "base_default_next" : "node_83", "next_tables" : { - "act_15" : "node_62" + "next314" : "node_83" }, "default_entry" : { - "action_id" : 58, + "action_id" : 83, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_15", - "id" : 35, + "name" : "tbl_spgw_gtpu_encap_qfi", + "id" : 46, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 370, - "column" : 35, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/control/spgw.p4", + "line" : 371, + "column" : 20, + "source_fragment" : "gtpu_encap_qfi()" }, "key" : [], "match_type" : "exact", @@ -7367,27 +12866,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [57], - "actions" : ["act_14"], - "base_default_next" : "tbl_act_18", + "action_ids" : [77], + "actions" : ["FabricEgress.spgw.gtpu_encap_qfi"], + "base_default_next" : "node_88", "next_tables" : { - "act_14" : "tbl_act_18" + "FabricEgress.spgw.gtpu_encap_qfi" : "node_88" }, "default_entry" : { - "action_id" : 57, + "action_id" : 77, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_16", - "id" : 36, + "name" : "tbl_spgw_gtpu_encap", + "id" : 47, "source_info" : { - "filename" : "include/control/next.p4", + "filename" : "include/control/spgw.p4", "line" : 373, - "column" : 29, - "source_fragment" : "=" + "column" : 20, + "source_fragment" : "gtpu_encap()" }, "key" : [], "match_type" : "exact", @@ -7396,27 +12895,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [60], - "actions" : ["act_17"], - "base_default_next" : "node_66", + "action_ids" : [76], + "actions" : ["FabricEgress.spgw.gtpu_encap"], + "base_default_next" : "node_88", "next_tables" : { - "act_17" : "node_66" + "FabricEgress.spgw.gtpu_encap" : "node_88" }, "default_entry" : { - "action_id" : 60, + "action_id" : 76, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, - { - "name" : "tbl_act_17", - "id" : 37, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 374, - "column" : 39, - "source_fragment" : "mark_to_drop(standard_metadata)" + { + "name" : "tbl_spgw377", + "id" : 48, + "source_info" : { + "filename" : "include/control/spgw.p4", + "line" : 377, + "column" : 16, + "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" }, "key" : [], "match_type" : "exact", @@ -7425,22 +12924,28 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [59], - "actions" : ["act_16"], - "base_default_next" : "tbl_act_18", + "action_ids" : [85], + "actions" : ["spgw377"], + "base_default_next" : "tbl_slicing126", "next_tables" : { - "act_16" : "tbl_act_18" + "spgw377" : "tbl_slicing126" }, "default_entry" : { - "action_id" : 59, + "action_id" : 85, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_18", - "id" : 38, + "name" : "tbl_slicing126", + "id" : 49, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 126, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.dscp;" + }, "key" : [], "match_type" : "exact", "type" : "simple", @@ -7448,56 +12953,64 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [62], - "actions" : ["act_19"], - "base_default_next" : "node_69", + "action_ids" : [88], + "actions" : ["slicing126"], + "base_default_next" : "FabricEgress.dscp_rewriter.rewriter", "next_tables" : { - "act_19" : "node_69" + "slicing126" : "FabricEgress.dscp_rewriter.rewriter" }, "default_entry" : { - "action_id" : 62, + "action_id" : 88, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_19", - "id" : 39, + "name" : "FabricEgress.dscp_rewriter.rewriter", + "id" : 50, "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 343, - "column" : 46, - "source_fragment" : "return" + "filename" : "include/control/slicing.p4", + "line" : 138, + "column" : 10, + "source_fragment" : "rewriter" }, - "key" : [], + "key" : [ + { + "match_type" : "exact", + "name" : "eg_port", + "target" : ["standard_metadata", "egress_port"], + "mask" : null + } + ], "match_type" : "exact", "type" : "simple", - "max_size" : 1024, + "max_size" : 512, "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [61], - "actions" : ["act_18"], - "base_default_next" : "node_71", + "action_ids" : [74, 75, 68], + "actions" : ["FabricEgress.dscp_rewriter.rewrite", "FabricEgress.dscp_rewriter.clear", "nop"], + "base_default_next" : null, "next_tables" : { - "act_18" : "node_71" + "__MISS__" : null, + "__HIT__" : "node_92" }, "default_entry" : { - "action_id" : 61, + "action_id" : 68, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_20", - "id" : 40, + "name" : "tbl_slicing155", + "id" : 51, "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 344, - "column" : 8, - "source_fragment" : "pdr_counter.count(fabric_md.spgw.ctr_id)" + "filename" : "include/control/slicing.p4", + "line" : 155, + "column" : 30, + "source_fragment" : "=" }, "key" : [], "match_type" : "exact", @@ -7506,27 +13019,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [63], - "actions" : ["act_20"], - "base_default_next" : "node_73", + "action_ids" : [86], + "actions" : ["slicing155"], + "base_default_next" : null, "next_tables" : { - "act_20" : "node_73" + "slicing155" : null }, "default_entry" : { - "action_id" : 63, + "action_id" : 86, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_spgw_egress_gtpu_encap", - "id" : 41, + "name" : "tbl_slicing159", + "id" : 52, "source_info" : { - "filename" : "include/control/spgw.p4", - "line" : 347, - "column" : 12, - "source_fragment" : "gtpu_encap()" + "filename" : "include/control/slicing.p4", + "line" : 159, + "column" : 36, + "source_fragment" : "=" }, "key" : [], "match_type" : "exact", @@ -7535,14 +13048,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [51], - "actions" : ["FabricEgress.spgw_egress.gtpu_encap"], + "action_ids" : [87], + "actions" : ["slicing159"], "base_default_next" : null, "next_tables" : { - "FabricEgress.spgw_egress.gtpu_encap" : null + "slicing159" : null }, "default_entry" : { - "action_id" : 51, + "action_id" : 87, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -7552,41 +13065,31 @@ "action_profiles" : [], "conditionals" : [ { - "name" : "node_44", - "id" : 15, + "name" : "node_64", + "id" : 24, "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 39, - "column" : 12, - "source_fragment" : "fabric_metadata.is_controller_packet_out == true" + "filename" : "fabric.p4", + "line" : 118, + "column" : 33, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_controller_packet_out11"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._is_controller_packet_out19"] } } }, - "true_next" : "tbl_act_9", - "false_next" : "node_46" + "true_next" : "tbl_packetio41", + "false_next" : "node_66" }, { - "name" : "node_46", - "id" : 16, + "name" : "node_66", + "id" : 25, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 43, @@ -7607,15 +13110,15 @@ } } }, - "true_next" : "tbl_act_10", - "false_next" : "node_48" + "true_next" : "tbl_packetio44", + "false_next" : "node_68" }, { - "name" : "node_48", - "id" : 17, + "name" : "node_68", + "id" : 26, "source_info" : { "filename" : "include/control/next.p4", - "line" : 335, + "line" : 281, "column" : 12, "source_fragment" : "fabric_metadata.is_multicast == true ..." }, @@ -7626,21 +13129,11 @@ "left" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._is_multicast10"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._is_multicast18"] } } }, @@ -7660,15 +13153,15 @@ } } }, - "true_next" : "tbl_act_11", - "false_next" : "node_50" + "true_next" : "tbl_next283", + "false_next" : "node_70" }, { - "name" : "node_50", - "id" : 18, + "name" : "node_70", + "id" : 27, "source_info" : { "filename" : "include/control/next.p4", - "line" : 340, + "line" : 286, "column" : 12, "source_fragment" : "fabric_metadata.mpls_label == 0" }, @@ -7678,7 +13171,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._mpls_label4"] + "value" : ["scalars", "userMetadata._mpls_label12"] }, "right" : { "type" : "hexstr", @@ -7686,15 +13179,15 @@ } } }, - "true_next" : "node_51", + "true_next" : "node_71", "false_next" : "tbl_egress_next_set_mpls" }, { - "name" : "node_51", - "id" : 19, + "name" : "node_71", + "id" : 28, "source_info" : { "filename" : "include/control/next.p4", - "line" : 341, + "line" : 287, "column" : 16, "source_fragment" : "hdr.mpls.isValid()" }, @@ -7713,67 +13206,11 @@ "false_next" : "FabricEgress.egress_next.egress_vlan" }, { - "name" : "node_57", - "id" : 20, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 357, - "column" : 16, - "source_fragment" : "!egress_vlan.apply().hit" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "not", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - } - } - } - } - }, - "true_next" : "node_58", - "false_next" : "node_60" - }, - { - "name" : "node_58", - "id" : 21, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 359, - "column" : 20, - "source_fragment" : "fabric_metadata.vlan_id != DEFAULT_VLAN_ID" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t._vlan_id1"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x0ffe" - } - } - }, - "true_next" : "tbl_egress_next_push_vlan", - "false_next" : "node_60" - }, - { - "name" : "node_60", - "id" : 22, + "name" : "node_75", + "id" : 29, "source_info" : { "filename" : "include/control/next.p4", - "line" : 368, + "line" : 308, "column" : 12, "source_fragment" : "hdr.mpls.isValid()" }, @@ -7788,15 +13225,15 @@ } } }, - "true_next" : "tbl_act_14", - "false_next" : "node_64" + "true_next" : "tbl_next309", + "false_next" : "node_79" }, { - "name" : "node_62", - "id" : 23, + "name" : "node_77", + "id" : 30, "source_info" : { "filename" : "include/control/next.p4", - "line" : 370, + "line" : 310, "column" : 16, "source_fragment" : "hdr.mpls.ttl == 0" }, @@ -7814,15 +13251,15 @@ } } }, - "true_next" : "tbl_act_15", - "false_next" : "tbl_act_18" + "true_next" : "tbl_next310", + "false_next" : "node_83" }, { - "name" : "node_64", - "id" : 24, + "name" : "node_79", + "id" : 31, "source_info" : { "filename" : "include/control/next.p4", - "line" : 372, + "line" : 312, "column" : 15, "source_fragment" : "hdr.ipv4.isValid() && fabric_metadata.fwd_type != FWD_BRIDGING" }, @@ -7847,7 +13284,7 @@ "op" : "!=", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._fwd_type8"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -7857,15 +13294,15 @@ } } }, - "true_next" : "tbl_act_16", - "false_next" : "tbl_act_18" + "true_next" : "tbl_next313", + "false_next" : "node_83" }, { - "name" : "node_66", - "id" : 25, + "name" : "node_81", + "id" : 32, "source_info" : { "filename" : "include/control/next.p4", - "line" : 374, + "line" : 314, "column" : 20, "source_fragment" : "hdr.ipv4.ttl == 0" }, @@ -7883,98 +13320,160 @@ } } }, - "true_next" : "tbl_act_17", - "false_next" : "tbl_act_18" + "true_next" : "tbl_next314", + "false_next" : "node_83" }, { - "name" : "node_69", - "id" : 26, + "name" : "node_83", + "id" : 33, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 343, + "line" : 368, "column" : 12, - "source_fragment" : "fabric_md.spgw.skip_spgw == true" + "source_fragment" : "fabric_md.spgw.skip_spgw" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_skip_spgw28"] + "value" : ["scalars", "userMetadata._spgw_skip_spgw40"] } } - }, + } + } + }, + "true_next" : "node_84", + "false_next" : "tbl_slicing126" + }, + { + "name" : "node_84", + "id" : 34, + "source_info" : { + "filename" : "fabric.p4", + "line" : 121, + "column" : 24, + "source_fragment" : "fabric_metadata" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_gtpu_encap42"] } } }, - "true_next" : "tbl_act_19", - "false_next" : "node_71" + "true_next" : "node_85", + "false_next" : "node_88" }, { - "name" : "node_71", - "id" : 27, + "name" : "node_85", + "id" : 35, + "source_info" : { + "filename" : "fabric.p4", + "line" : 121, + "column" : 24, + "source_fragment" : "fabric_metadata" + }, "expression" : { "type" : "expression", "value" : { - "op" : "not", + "op" : "d2b", "left" : null, "right" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "spgw_egress_hasReturned"] - } - } + "type" : "field", + "value" : ["scalars", "userMetadata._spgw_needs_qfi_push45"] } } }, - "false_next" : null, - "true_next" : "tbl_act_20" + "true_next" : "tbl_spgw_gtpu_encap_qfi", + "false_next" : "tbl_spgw_gtpu_encap" }, { - "name" : "node_73", - "id" : 28, + "name" : "node_88", + "id" : 36, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 346, - "column" : 12, - "source_fragment" : "fabric_md.spgw.needs_gtpu_encap == true" + "line" : 376, + "column" : 16, + "source_fragment" : "fabric_md.spgw.skip_egress_pdr_ctr" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t._spgw_needs_gtpu_encap32"] + "value" : ["scalars", "userMetadata._spgw_skip_egress_pdr_ctr44"] } } - }, + } + } + }, + "true_next" : "tbl_spgw377", + "false_next" : "tbl_slicing126" + }, + { + "name" : "node_92", + "id" : 37, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 154, + "column" : 16, + "source_fragment" : "hdr.gtpu_ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["gtpu_ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_slicing155", + "false_next" : "node_94" + }, + { + "name" : "node_94", + "id" : 38, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 158, + "column" : 16, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["ipv4", "$valid$"] } } }, "false_next" : null, - "true_next" : "tbl_spgw_egress_gtpu_encap" + "true_next" : "tbl_slicing159" } ] } @@ -8011,7 +13510,7 @@ "id" : 1, "source_info" : { "filename" : "include/control/spgw.p4", - "line" : 362, + "line" : 393, "column" : 8, "source_fragment" : "update_checksum(gtpu_ipv4.isValid(), ..." }, @@ -8086,26 +13585,14 @@ "intrinsic_metadata.egress_global_timestamp", ["standard_metadata", "egress_global_timestamp"] ], - [ - "intrinsic_metadata.lf_field_list", - ["standard_metadata", "lf_field_list"] - ], [ "intrinsic_metadata.mcast_grp", ["standard_metadata", "mcast_grp"] ], - [ - "intrinsic_metadata.resubmit_flag", - ["standard_metadata", "resubmit_flag"] - ], [ "intrinsic_metadata.egress_rid", ["standard_metadata", "egress_rid"] ], - [ - "intrinsic_metadata.recirculate_flag", - ["standard_metadata", "recirculate_flag"] - ], [ "intrinsic_metadata.priority", ["standard_metadata", "priority"] @@ -8113,7 +13600,7 @@ ], "program" : "fabric.p4", "__meta__" : { - "version" : [2, 18], + "version" : [2, 23], "compiler" : "https://github.com/p4lang/p4c" } } \ No newline at end of file diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/p4info.txt b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/p4info.txt index 0db64318a5f..1934060570e 100644 --- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/p4info.txt +++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric-spgw/bmv2/default/p4info.txt @@ -3,7 +3,7 @@ pkg_info { } tables { preamble { - id: 33611649 + id: 43310977 name: "FabricIngress.filtering.ingress_port_vlan" alias: "ingress_port_vlan" } @@ -26,21 +26,21 @@ tables { match_type: TERNARY } action_refs { - id: 16836487 + id: 17164167 } action_refs { - id: 16818236 + id: 24158268 } action_refs { - id: 16794911 + id: 24266015 } - const_default_action_id: 16836487 - direct_resource_ids: 318815501 + const_default_action_id: 17164167 + direct_resource_ids: 326221069 size: 1024 } tables { preamble { - id: 33596298 + id: 49718154 name: "FabricIngress.filtering.fwd_classifier" alias: "fwd_classifier" } @@ -69,15 +69,15 @@ tables { match_type: EXACT } action_refs { - id: 16840921 + id: 25032921 } - const_default_action_id: 16840921 - direct_resource_ids: 318827326 + const_default_action_id: 25032921 + direct_resource_ids: 335473470 size: 1024 } tables { preamble { - id: 33596749 + id: 43623757 name: "FabricIngress.forwarding.bridging" alias: "bridging" } @@ -94,20 +94,20 @@ tables { match_type: TERNARY } action_refs { - id: 16811012 + id: 21791748 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318770289 + const_default_action_id: 28485346 + direct_resource_ids: 330959985 size: 1024 } tables { preamble { - id: 33574274 + id: 37768578 name: "FabricIngress.forwarding.mpls" alias: "mpls" } @@ -118,20 +118,20 @@ tables { match_type: EXACT } action_refs { - id: 16827758 + id: 30066030 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318830507 + const_default_action_id: 28485346 + direct_resource_ids: 318961579 size: 1024 } tables { preamble { - id: 33562650 + id: 41754650 name: "FabricIngress.forwarding.routing_v4" alias: "routing_v4" } @@ -142,13 +142,13 @@ tables { match_type: LPM } action_refs { - id: 16777434 + id: 19792090 } action_refs { - id: 16804187 + id: 29124955 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } @@ -156,7 +156,55 @@ tables { } tables { preamble { - id: 33618978 + id: 36626242 + name: "FabricIngress.pre_next.next_mpls" + alias: "next_mpls" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 22765924 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 330020245 + size: 1024 +} +tables { + preamble { + id: 48011802 + name: "FabricIngress.pre_next.next_vlan" + alias: "next_vlan" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 33475378 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 333692067 + size: 1024 +} +tables { + preamble { + id: 44104738 name: "FabricIngress.acl.acl" alias: "acl" } @@ -168,116 +216,98 @@ tables { } match_fields { id: 2 - name: "ip_proto" - bitwidth: 8 + name: "eth_dst" + bitwidth: 48 match_type: TERNARY } match_fields { id: 3 - name: "l4_sport" - bitwidth: 16 + name: "eth_src" + bitwidth: 48 match_type: TERNARY } match_fields { id: 4 - name: "l4_dport" - bitwidth: 16 + name: "vlan_id" + bitwidth: 12 match_type: TERNARY } match_fields { id: 5 - name: "eth_dst" - bitwidth: 48 + name: "eth_type" + bitwidth: 16 match_type: TERNARY } match_fields { id: 6 - name: "eth_src" - bitwidth: 48 + name: "ipv4_src" + bitwidth: 32 match_type: TERNARY } match_fields { id: 7 - name: "vlan_id" - bitwidth: 12 + name: "ipv4_dst" + bitwidth: 32 match_type: TERNARY } match_fields { id: 8 - name: "eth_type" - bitwidth: 16 + name: "ip_proto" + bitwidth: 8 match_type: TERNARY } match_fields { id: 9 - name: "ipv4_src" - bitwidth: 32 + name: "icmp_type" + bitwidth: 8 match_type: TERNARY } match_fields { id: 10 - name: "ipv4_dst" - bitwidth: 32 + name: "icmp_code" + bitwidth: 8 match_type: TERNARY } match_fields { id: 11 - name: "icmp_type" - bitwidth: 8 + name: "l4_sport" + bitwidth: 16 match_type: TERNARY } match_fields { id: 12 - name: "icmp_code" - bitwidth: 8 + name: "l4_dport" + bitwidth: 16 match_type: TERNARY } - action_refs { - id: 16807382 - } - action_refs { - id: 16829684 + match_fields { + id: 13 + name: "port_type" + bitwidth: 2 + match_type: TERNARY } action_refs { - id: 16781601 + id: 23623126 } action_refs { - id: 16820765 + id: 23579892 } action_refs { - id: 16827694 - } - const_default_action_id: 16827694 - direct_resource_ids: 318801025 - size: 1024 -} -tables { - preamble { - id: 33599709 - name: "FabricIngress.next.next_vlan" - alias: "next_vlan" - } - match_fields { - id: 1 - name: "next_id" - bitwidth: 32 - match_type: EXACT + id: 16912673 } action_refs { - id: 16790685 + id: 23570973 } action_refs { - id: 16819938 - annotations: "@defaultonly" - scope: DEFAULT_ONLY + id: 29607214 } - const_default_action_id: 16819938 - direct_resource_ids: 318768144 + const_default_action_id: 29607214 + direct_resource_ids: 319194241 size: 1024 } tables { preamble { - id: 33596977 + id: 48735793 name: "FabricIngress.next.xconnect" alias: "xconnect" } @@ -294,23 +324,23 @@ tables { match_type: EXACT } action_refs { - id: 16842190 + id: 24640974 } action_refs { - id: 16837052 + id: 30599612 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318778156 + const_default_action_id: 28485346 + direct_resource_ids: 321989420 size: 1024 } tables { preamble { - id: 33608588 + id: 47960972 name: "FabricIngress.next.hashed" alias: "hashed" } @@ -321,27 +351,24 @@ tables { match_type: EXACT } action_refs { - id: 16815357 + id: 27301117 } action_refs { - id: 16791402 + id: 20985706 } action_refs { - id: 16779255 - } - action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - implementation_id: 285217164 - direct_resource_ids: 318800532 + const_default_action_id: 28485346 + implementation_id: 291115404 + direct_resource_ids: 322798228 size: 1024 } tables { preamble { - id: 33606828 + id: 40619180 name: "FabricIngress.next.multicast" alias: "multicast" } @@ -352,22 +379,108 @@ tables { match_type: EXACT } action_refs { - id: 16779917 + id: 21629581 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318801752 + const_default_action_id: 28485346 + direct_resource_ids: 319194968 size: 1024 } tables { preamble { - id: 33584493 - name: "FabricIngress.spgw_ingress.interface_lookup" - alias: "interface_lookup" + id: 34606298 + name: "FabricIngress.slice_tc_classifier.classifier" + alias: "classifier" + } + match_fields { + id: 1 + name: "ig_port" + bitwidth: 9 + match_type: TERNARY + } + match_fields { + id: 2 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 3 + name: "ipv4_dst" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 4 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 5 + name: "l4_sport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 6 + name: "l4_dport" + bitwidth: 16 + match_type: TERNARY + } + action_refs { + id: 23786376 + } + action_refs { + id: 25983516 + } + const_default_action_id: 23786376 + direct_resource_ids: 334706097 + size: 512 +} +tables { + preamble { + id: 36435258 + name: "FabricIngress.qos.queues" + alias: "queues" + } + match_fields { + id: 1 + name: "slice_id" + bitwidth: 4 + match_type: EXACT + } + match_fields { + id: 2 + name: "tc" + bitwidth: 2 + match_type: EXACT + } + match_fields { + id: 3 + name: "color" + bitwidth: 2 + match_type: TERNARY + } + action_refs { + id: 32116918 + } + action_refs { + id: 28214351 + } + const_default_action_id: 32116918 + direct_resource_ids: 327743278 + size: 128 +} +tables { + preamble { + id: 36113154 + name: "FabricIngress.spgw.interfaces" + alias: "interfaces" } match_fields { id: 1 @@ -382,16 +495,21 @@ tables { match_type: EXACT } action_refs { - id: 16797935 + id: 18186268 } - const_default_action_id: 16797935 + action_refs { + id: 29103810 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 29103810 size: 128 } tables { preamble { - id: 33586958 - name: "FabricIngress.spgw_ingress.downlink_pdr_lookup" - alias: "downlink_pdr_lookup" + id: 47394697 + name: "FabricIngress.spgw.downlink_pdrs" + alias: "downlink_pdrs" } match_fields { id: 1 @@ -400,16 +518,23 @@ tables { match_type: EXACT } action_refs { - id: 16799934 + id: 18504550 + } + action_refs { + id: 25764352 + } + action_refs { + id: 21257015 + annotations: "@defaultonly" + scope: DEFAULT_ONLY } - const_default_action_id: 16799934 size: 1024 } tables { preamble { - id: 33587070 - name: "FabricIngress.spgw_ingress.uplink_pdr_lookup" - alias: "uplink_pdr_lookup" + id: 46648074 + name: "FabricIngress.spgw.uplink_pdrs" + alias: "uplink_pdrs" } match_fields { id: 1 @@ -423,17 +548,36 @@ tables { bitwidth: 32 match_type: EXACT } + match_fields { + id: 3 + name: "has_qfi" + bitwidth: 1 + match_type: EXACT + } + match_fields { + id: 4 + name: "qfi" + bitwidth: 6 + match_type: EXACT + } + action_refs { + id: 18504550 + } action_refs { - id: 16799934 + id: 25764352 + } + action_refs { + id: 21257015 + annotations: "@defaultonly" + scope: DEFAULT_ONLY } - const_default_action_id: 16799934 size: 1024 } tables { preamble { - id: 33613200 - name: "FabricIngress.spgw_ingress.far_lookup" - alias: "far_lookup" + id: 47558728 + name: "FabricIngress.spgw.fars" + alias: "fars" } match_fields { id: 1 @@ -442,17 +586,20 @@ tables { match_type: EXACT } action_refs { - id: 16834935 + id: 24881235 + } + action_refs { + id: 29659841 } action_refs { - id: 16787606 + id: 30642777 } - const_default_action_id: 16834935 + const_default_action_id: 24881235 size: 2048 } tables { preamble { - id: 33599342 + id: 49262446 name: "FabricEgress.egress_next.egress_vlan" alias: "egress_vlan" } @@ -469,41 +616,83 @@ tables { match_type: EXACT } action_refs { - id: 16790030 + id: 30307755 } action_refs { - id: 16819938 + id: 17183246 + } + action_refs { + id: 30812542 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318827144 + const_default_action_id: 30812542 + direct_resource_ids: 318892680 size: 1024 } +tables { + preamble { + id: 49970092 + name: "FabricEgress.dscp_rewriter.rewriter" + alias: "rewriter" + } + match_fields { + id: 1 + name: "eg_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 27951287 + } + action_refs { + id: 24120545 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + size: 512 +} actions { preamble { - id: 16819938 + id: 28485346 name: "nop" alias: "nop" } } actions { preamble { - id: 16836487 + id: 21257015 + name: "NoAction" + alias: "NoAction" + annotations: "@noWarn(\"unused\")" + } +} +actions { + preamble { + id: 17164167 name: "FabricIngress.filtering.deny" alias: "deny" } } actions { preamble { - id: 16818236 + id: 24158268 name: "FabricIngress.filtering.permit" alias: "permit" } + params { + id: 1 + name: "port_type" + bitwidth: 2 + } } actions { preamble { - id: 16794911 + id: 24266015 name: "FabricIngress.filtering.permit_with_internal_vlan" alias: "permit_with_internal_vlan" } @@ -512,10 +701,15 @@ actions { name: "vlan_id" bitwidth: 12 } + params { + id: 2 + name: "port_type" + bitwidth: 2 + } } actions { preamble { - id: 16840921 + id: 25032921 name: "FabricIngress.filtering.set_forwarding_type" alias: "set_forwarding_type" } @@ -527,7 +721,7 @@ actions { } actions { preamble { - id: 16811012 + id: 21791748 name: "FabricIngress.forwarding.set_next_id_bridging" alias: "set_next_id_bridging" } @@ -539,7 +733,7 @@ actions { } actions { preamble { - id: 16827758 + id: 30066030 name: "FabricIngress.forwarding.pop_mpls_and_next" alias: "pop_mpls_and_next" } @@ -551,7 +745,7 @@ actions { } actions { preamble { - id: 16777434 + id: 19792090 name: "FabricIngress.forwarding.set_next_id_routing_v4" alias: "set_next_id_routing_v4" } @@ -563,14 +757,38 @@ actions { } actions { preamble { - id: 16804187 + id: 29124955 name: "FabricIngress.forwarding.nop_routing_v4" alias: "nop_routing_v4" } } actions { preamble { - id: 16807382 + id: 22765924 + name: "FabricIngress.pre_next.set_mpls_label" + alias: "set_mpls_label" + } + params { + id: 1 + name: "label" + bitwidth: 20 + } +} +actions { + preamble { + id: 33475378 + name: "FabricIngress.pre_next.set_vlan" + alias: "set_vlan" + } + params { + id: 1 + name: "vlan_id" + bitwidth: 12 + } +} +actions { + preamble { + id: 23623126 name: "FabricIngress.acl.set_next_id_acl" alias: "set_next_id_acl" } @@ -582,14 +800,14 @@ actions { } actions { preamble { - id: 16829684 + id: 23579892 name: "FabricIngress.acl.punt_to_cpu" alias: "punt_to_cpu" } } actions { preamble { - id: 16781601 + id: 16912673 name: "FabricIngress.acl.set_clone_session_id" alias: "set_clone_session_id" } @@ -601,33 +819,21 @@ actions { } actions { preamble { - id: 16820765 + id: 23570973 name: "FabricIngress.acl.drop" - alias: "drop" + alias: "acl.drop" } } actions { preamble { - id: 16827694 + id: 29607214 name: "FabricIngress.acl.nop_acl" alias: "nop_acl" } } actions { preamble { - id: 16790685 - name: "FabricIngress.next.set_vlan" - alias: "set_vlan" - } - params { - id: 1 - name: "vlan_id" - bitwidth: 12 - } -} -actions { - preamble { - id: 16842190 + id: 24640974 name: "FabricIngress.next.output_xconnect" alias: "output_xconnect" } @@ -639,7 +845,7 @@ actions { } actions { preamble { - id: 16837052 + id: 30599612 name: "FabricIngress.next.set_next_id_xconnect" alias: "set_next_id_xconnect" } @@ -651,7 +857,7 @@ actions { } actions { preamble { - id: 16815357 + id: 27301117 name: "FabricIngress.next.output_hashed" alias: "output_hashed" } @@ -663,7 +869,7 @@ actions { } actions { preamble { - id: 16791402 + id: 20985706 name: "FabricIngress.next.routing_hashed" alias: "routing_hashed" } @@ -685,48 +891,64 @@ actions { } actions { preamble { - id: 16779255 - name: "FabricIngress.next.mpls_routing_hashed" - alias: "mpls_routing_hashed" + id: 21629581 + name: "FabricIngress.next.set_mcast_group_id" + alias: "set_mcast_group_id" } params { id: 1 - name: "port_num" - bitwidth: 9 + name: "group_id" + bitwidth: 16 } - params { - id: 2 - name: "smac" - bitwidth: 48 +} +actions { + preamble { + id: 23786376 + name: "FabricIngress.slice_tc_classifier.set_slice_id_tc" + alias: "set_slice_id_tc" } params { - id: 3 - name: "dmac" - bitwidth: 48 + id: 1 + name: "slice_id" + bitwidth: 4 } params { - id: 4 - name: "label" - bitwidth: 20 + id: 2 + name: "tc" + bitwidth: 2 } } actions { preamble { - id: 16779917 - name: "FabricIngress.next.set_mcast_group_id" - alias: "set_mcast_group_id" + id: 25983516 + name: "FabricIngress.slice_tc_classifier.trust_dscp" + alias: "trust_dscp" + } +} +actions { + preamble { + id: 32116918 + name: "FabricIngress.qos.set_queue" + alias: "set_queue" } params { id: 1 - name: "group_id" - bitwidth: 16 + name: "qid" + bitwidth: 5 + } +} +actions { + preamble { + id: 28214351 + name: "FabricIngress.qos.meter_drop" + alias: "meter_drop" } } actions { preamble { - id: 16797935 - name: "FabricIngress.spgw_ingress.set_source_iface" - alias: "set_source_iface" + id: 18186268 + name: "FabricIngress.spgw.load_iface" + alias: "load_iface" } params { id: 1 @@ -735,20 +957,49 @@ actions { } params { id: 2 - name: "direction" - bitwidth: 2 + name: "slice_id" + bitwidth: 4 + } +} +actions { + preamble { + id: 29103810 + name: "FabricIngress.spgw.iface_miss" + alias: "iface_miss" + } +} +actions { + preamble { + id: 18504550 + name: "FabricIngress.spgw.load_pdr" + alias: "load_pdr" + } + params { + id: 1 + name: "ctr_id" + bitwidth: 32 + } + params { + id: 2 + name: "far_id" + bitwidth: 32 } params { id: 3 - name: "skip_spgw" + name: "needs_gtpu_decap" bitwidth: 1 } + params { + id: 4 + name: "tc" + bitwidth: 2 + } } actions { preamble { - id: 16799934 - name: "FabricIngress.spgw_ingress.set_pdr_attributes" - alias: "set_pdr_attributes" + id: 25764352 + name: "FabricIngress.spgw.load_pdr_qos" + alias: "load_pdr_qos" } params { id: 1 @@ -765,12 +1016,27 @@ actions { name: "needs_gtpu_decap" bitwidth: 1 } + params { + id: 4 + name: "needs_qfi_push" + bitwidth: 1 + } + params { + id: 5 + name: "qfi" + bitwidth: 6 + } + params { + id: 6 + name: "tc" + bitwidth: 2 + } } actions { preamble { - id: 16834935 - name: "FabricIngress.spgw_ingress.load_normal_far_attributes" - alias: "load_normal_far_attributes" + id: 24881235 + name: "FabricIngress.spgw.load_normal_far" + alias: "load_normal_far" } params { id: 1 @@ -785,9 +1051,9 @@ actions { } actions { preamble { - id: 16787606 - name: "FabricIngress.spgw_ingress.load_tunnel_far_attributes" - alias: "load_tunnel_far_attributes" + id: 29659841 + name: "FabricIngress.spgw.load_tunnel_far" + alias: "load_tunnel_far" } params { id: 1 @@ -822,53 +1088,90 @@ actions { } actions { preamble { - id: 16829280 - name: "FabricIngress.spgw_ingress.decap_inner_tcp" - alias: "decap_inner_tcp" + id: 30642777 + name: "FabricIngress.spgw.load_dbuf_far" + alias: "load_dbuf_far" + } + params { + id: 1 + name: "drop" + bitwidth: 1 + } + params { + id: 2 + name: "notify_cp" + bitwidth: 1 + } + params { + id: 3 + name: "tunnel_src_port" + bitwidth: 16 + } + params { + id: 4 + name: "tunnel_src_addr" + bitwidth: 32 + } + params { + id: 5 + name: "tunnel_dst_addr" + bitwidth: 32 + } + params { + id: 6 + name: "teid" + bitwidth: 32 } } actions { preamble { - id: 16815878 - name: "FabricIngress.spgw_ingress.decap_inner_udp" - alias: "decap_inner_udp" + id: 30307755 + name: "FabricEgress.egress_next.push_vlan" + alias: "push_vlan" } } actions { preamble { - id: 16801274 - name: "FabricIngress.spgw_ingress.decap_inner_icmp" - alias: "decap_inner_icmp" + id: 17183246 + name: "FabricEgress.egress_next.pop_vlan" + alias: "pop_vlan" } } actions { preamble { - id: 16830582 - name: "FabricIngress.spgw_ingress.decap_inner_unknown" - alias: "decap_inner_unknown" + id: 30812542 + name: "FabricEgress.egress_next.drop" + alias: "egress_next.drop" } } actions { preamble { - id: 16790030 - name: "FabricEgress.egress_next.pop_vlan" - alias: "pop_vlan" + id: 27951287 + name: "FabricEgress.dscp_rewriter.rewrite" + alias: "rewrite" + } +} +actions { + preamble { + id: 24120545 + name: "FabricEgress.dscp_rewriter.clear" + alias: "clear" } } action_profiles { preamble { - id: 285217164 + id: 291115404 name: "FabricIngress.next.hashed_selector" alias: "hashed_selector" } - table_ids: 33608588 + table_ids: 47960972 with_selector: true size: 1024 max_group_size: 16 } counters { preamble { - id: 302011205 + id: 314528581 name: "FabricIngress.port_counters_control.egress_port_counter" alias: "egress_port_counter" } @@ -879,7 +1182,7 @@ counters { } counters { preamble { - id: 302002771 + id: 312947283 name: "FabricIngress.port_counters_control.ingress_port_counter" alias: "ingress_port_counter" } @@ -890,9 +1193,9 @@ counters { } counters { preamble { - id: 302029884 - name: "FabricIngress.spgw_ingress.pdr_counter" - alias: "spgw_ingress.pdr_counter" + id: 308925232 + name: "FabricIngress.spgw.pdr_counter" + alias: "FabricIngress.spgw.pdr_counter" } spec { unit: BOTH @@ -901,9 +1204,9 @@ counters { } counters { preamble { - id: 302012289 - name: "FabricEgress.spgw_egress.pdr_counter" - alias: "spgw_egress.pdr_counter" + id: 302049491 + name: "FabricEgress.spgw.pdr_counter" + alias: "FabricEgress.spgw.pdr_counter" } spec { unit: BOTH @@ -912,117 +1215,161 @@ counters { } direct_counters { preamble { - id: 318815501 + id: 326221069 name: "FabricIngress.filtering.ingress_port_vlan_counter" alias: "ingress_port_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33611649 + direct_table_id: 43310977 } direct_counters { preamble { - id: 318827326 + id: 335473470 name: "FabricIngress.filtering.fwd_classifier_counter" alias: "fwd_classifier_counter" } spec { unit: BOTH } - direct_table_id: 33596298 + direct_table_id: 49718154 } direct_counters { preamble { - id: 318770289 + id: 330959985 name: "FabricIngress.forwarding.bridging_counter" alias: "bridging_counter" } spec { unit: BOTH } - direct_table_id: 33596749 + direct_table_id: 43623757 } direct_counters { preamble { - id: 318830507 + id: 318961579 name: "FabricIngress.forwarding.mpls_counter" alias: "mpls_counter" } spec { unit: BOTH } - direct_table_id: 33574274 + direct_table_id: 37768578 } direct_counters { preamble { - id: 318801025 - name: "FabricIngress.acl.acl_counter" - alias: "acl_counter" + id: 330020245 + name: "FabricIngress.pre_next.next_mpls_counter" + alias: "next_mpls_counter" } spec { unit: BOTH } - direct_table_id: 33618978 + direct_table_id: 36626242 } direct_counters { preamble { - id: 318768144 - name: "FabricIngress.next.next_vlan_counter" + id: 333692067 + name: "FabricIngress.pre_next.next_vlan_counter" alias: "next_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33599709 + direct_table_id: 48011802 } direct_counters { preamble { - id: 318778156 + id: 319194241 + name: "FabricIngress.acl.acl_counter" + alias: "acl_counter" + } + spec { + unit: BOTH + } + direct_table_id: 44104738 +} +direct_counters { + preamble { + id: 321989420 name: "FabricIngress.next.xconnect_counter" alias: "xconnect_counter" } spec { unit: BOTH } - direct_table_id: 33596977 + direct_table_id: 48735793 } direct_counters { preamble { - id: 318800532 + id: 322798228 name: "FabricIngress.next.hashed_counter" alias: "hashed_counter" } spec { unit: BOTH } - direct_table_id: 33608588 + direct_table_id: 47960972 } direct_counters { preamble { - id: 318801752 + id: 319194968 name: "FabricIngress.next.multicast_counter" alias: "multicast_counter" } spec { unit: BOTH } - direct_table_id: 33606828 + direct_table_id: 40619180 +} +direct_counters { + preamble { + id: 334706097 + name: "FabricIngress.slice_tc_classifier.classifier_stats" + alias: "classifier_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 34606298 +} +direct_counters { + preamble { + id: 327743278 + name: "FabricIngress.qos.queues_stats" + alias: "queues_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 36435258 } direct_counters { preamble { - id: 318827144 + id: 318892680 name: "FabricEgress.egress_next.egress_vlan_counter" alias: "egress_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33599342 + direct_table_id: 49262446 +} +meters { + preamble { + id: 348573637 + name: "FabricIngress.qos.slice_tc_meter" + alias: "slice_tc_meter" + } + spec { + unit: BYTES + } + size: 64 } controller_packet_metadata { preamble { - id: 67146229 + id: 81826293 name: "packet_in" alias: "packet_in" annotations: "@controller_header(\"packet_in\")" @@ -1040,7 +1387,7 @@ controller_packet_metadata { } controller_packet_metadata { preamble { - id: 67121543 + id: 76689799 name: "packet_out" alias: "packet_out" annotations: "@controller_header(\"packet_out\")" @@ -1052,8 +1399,13 @@ controller_packet_metadata { } metadata { id: 2 + name: "do_forwarding" + bitwidth: 1 + } + metadata { + id: 3 name: "_pad" - bitwidth: 7 + bitwidth: 6 } } type_info { diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json index 972af8eb42e..f6a130fbef5 100644 --- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json +++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/bmv2.json @@ -4,42 +4,84 @@ "name" : "scalars_0", "id" : 0, "fields" : [ - ["tmp_0", 16, false], + ["tmp_0", 1, false], + ["tmp_2", 3, false], + ["tmp_4", 8, false], + ["gtpu_ext_len_0", 8, false], ["tmp_1", 16, false], - ["tmp_2", 4, false], - ["tmp", 32, false], - ["tmp_3", 32, false], - ["egress_next_tmp", 1, false], - ["fabric_metadata_t.ip_eth_type", 16, false], - ["fabric_metadata_t.vlan_id", 12, false], - ["fabric_metadata_t.vlan_pri", 3, false], - ["fabric_metadata_t.vlan_cfi", 1, false], - ["fabric_metadata_t.mpls_label", 20, false], - ["fabric_metadata_t.mpls_ttl", 8, false], - ["fabric_metadata_t.skip_forwarding", 1, false], - ["fabric_metadata_t.skip_next", 1, false], - ["fabric_metadata_t.fwd_type", 3, false], - ["fabric_metadata_t.next_id", 32, false], - ["fabric_metadata_t.is_multicast", 1, false], - ["fabric_metadata_t.is_controller_packet_out", 1, false], - ["fabric_metadata_t.ip_proto", 8, false], - ["fabric_metadata_t.l4_sport", 16, false], - ["fabric_metadata_t.l4_dport", 16, false], - ["fabric_metadata_t.ipv4_src_addr", 32, false], - ["fabric_metadata_t.ipv4_dst_addr", 32, false] + ["tmp_3", 16, false], + ["tmp_5", 4, false], + ["tmp_6", 16, false], + ["tmp_7", 64, false], + ["tmp_8", 32, false], + ["tmp_9", 32, false], + ["tmp_10", 32, false], + ["dscp_rewriter_tmp_dscp", 6, false], + ["userMetadata._lkp_is_ipv40", 1, false], + ["userMetadata._lkp_ipv4_src1", 32, false], + ["userMetadata._lkp_ipv4_dst2", 32, false], + ["userMetadata._lkp_ip_proto3", 8, false], + ["userMetadata._lkp_l4_sport4", 16, false], + ["userMetadata._lkp_l4_dport5", 16, false], + ["userMetadata._lkp_icmp_type6", 8, false], + ["userMetadata._lkp_icmp_code7", 8, false], + ["userMetadata._ip_eth_type8", 16, false], + ["userMetadata._vlan_id9", 12, false], + ["userMetadata._vlan_pri10", 3, false], + ["userMetadata._vlan_cfi11", 1, false], + ["userMetadata._mpls_label12", 20, false], + ["userMetadata._mpls_ttl13", 8, false], + ["userMetadata._skip_forwarding14", 1, false], + ["userMetadata._skip_next15", 1, false], + ["userMetadata._fwd_type16", 3, false], + ["userMetadata._next_id17", 32, false], + ["userMetadata._is_multicast18", 1, false], + ["userMetadata._is_controller_packet_out19", 1, false], + ["userMetadata._ip_proto20", 8, false], + ["userMetadata._l4_sport21", 16, false], + ["userMetadata._l4_dport22", 16, false], + ["userMetadata._ipv4_src_addr23", 32, false], + ["userMetadata._ipv4_dst_addr24", 32, false], + ["userMetadata._slice_id25", 4, false], + ["userMetadata._packet_color26", 2, false], + ["userMetadata._tc27", 2, false], + ["userMetadata._dscp28", 6, false], + ["userMetadata._port_type29", 2, false], + ["_padding_0", 6, false] ] }, { - "name" : "standard_metadata", + "name" : "packet_out_header_t", "id" : 1, + "fields" : [ + ["egress_port", 9, false], + ["do_forwarding", 1, false], + ["_pad", 6, false] + ] + }, + { + "name" : "gtpu_t", + "id" : 2, + "fields" : [ + ["version", 3, false], + ["pt", 1, false], + ["spare", 1, false], + ["ex_flag", 1, false], + ["seq_flag", 1, false], + ["npdu_flag", 1, false], + ["msgtype", 8, false], + ["msglen", 16, false], + ["teid", 32, false] + ] + }, + { + "name" : "standard_metadata", + "id" : 3, "fields" : [ ["ingress_port", 9, false], ["egress_spec", 9, false], ["egress_port", 9, false], - ["clone_spec", 32, false], ["instance_type", 32, false], - ["drop", 1, false], - ["recirculate_port", 16, false], ["packet_length", 32, false], ["enq_timestamp", 32, false], ["enq_qdepth", 19, false], @@ -47,20 +89,17 @@ ["deq_qdepth", 19, false], ["ingress_global_timestamp", 48, false], ["egress_global_timestamp", 48, false], - ["lf_field_list", 32, false], ["mcast_grp", 16, false], - ["resubmit_flag", 32, false], ["egress_rid", 16, false], - ["recirculate_flag", 32, false], ["checksum_error", 1, false], ["parser_error", 32, false], ["priority", 3, false], - ["_padding", 2, false] + ["_padding", 3, false] ] }, { "name" : "ethernet_t", - "id" : 2, + "id" : 4, "fields" : [ ["dst_addr", 48, false], ["src_addr", 48, false] @@ -68,7 +107,7 @@ }, { "name" : "vlan_tag_t", - "id" : 3, + "id" : 5, "fields" : [ ["eth_type", 16, false], ["pri", 3, false], @@ -78,14 +117,14 @@ }, { "name" : "eth_type_t", - "id" : 4, + "id" : 6, "fields" : [ ["value", 16, false] ] }, { "name" : "mpls_t", - "id" : 5, + "id" : 7, "fields" : [ ["label", 20, false], ["tc", 3, false], @@ -93,9 +132,31 @@ ["ttl", 8, false] ] }, + { + "name" : "gtpu_options_t", + "id" : 8, + "fields" : [ + ["seq_num", 16, false], + ["n_pdu_num", 8, false], + ["next_ext", 8, false] + ] + }, + { + "name" : "gtpu_ext_psc_t", + "id" : 9, + "fields" : [ + ["len", 8, false], + ["type", 4, false], + ["spare0", 4, false], + ["ppp", 1, false], + ["rqi", 1, false], + ["qfi", 6, false], + ["next_ext", 8, false] + ] + }, { "name" : "ipv4_t", - "id" : 6, + "id" : 10, "fields" : [ ["version", 4, false], ["ihl", 4, false], @@ -112,9 +173,19 @@ ["dst_addr", 32, false] ] }, + { + "name" : "udp_t", + "id" : 11, + "fields" : [ + ["sport", 16, false], + ["dport", 16, false], + ["len", 16, false], + ["checksum", 16, false] + ] + }, { "name" : "tcp_t", - "id" : 7, + "id" : 12, "fields" : [ ["sport", 16, false], ["dport", 16, false], @@ -129,19 +200,9 @@ ["urgent_ptr", 16, false] ] }, - { - "name" : "udp_t", - "id" : 8, - "fields" : [ - ["sport", 16, false], - ["dport", 16, false], - ["len", 16, false], - ["checksum", 16, false] - ] - }, { "name" : "icmp_t", - "id" : 9, + "id" : 13, "fields" : [ ["icmp_type", 8, false], ["icmp_code", 8, false], @@ -151,17 +212,9 @@ ["timestamp", 64, false] ] }, - { - "name" : "packet_out_header_t", - "id" : 10, - "fields" : [ - ["egress_port", 9, false], - ["_pad", 7, false] - ] - }, { "name" : "packet_in_header_t", - "id" : 11, + "id" : 14, "fields" : [ ["ingress_port", 9, false], ["_pad", 7, false] @@ -170,92 +223,155 @@ ], "headers" : [ { - "name" : "scalars", + "name" : "tmp", "id" : 0, + "header_type" : "packet_out_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_0", + "id" : 1, + "header_type" : "gtpu_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "scalars", + "id" : 2, "header_type" : "scalars_0", "metadata" : true, "pi_omit" : true }, { "name" : "standard_metadata", - "id" : 1, + "id" : 3, "header_type" : "standard_metadata", "metadata" : true, "pi_omit" : true }, { "name" : "ethernet", - "id" : 2, + "id" : 4, "header_type" : "ethernet_t", "metadata" : false, "pi_omit" : true }, { "name" : "vlan_tag", - "id" : 3, + "id" : 5, "header_type" : "vlan_tag_t", "metadata" : false, "pi_omit" : true }, { "name" : "inner_vlan_tag", - "id" : 4, + "id" : 6, "header_type" : "vlan_tag_t", "metadata" : false, "pi_omit" : true }, { "name" : "eth_type", - "id" : 5, + "id" : 7, "header_type" : "eth_type_t", "metadata" : false, "pi_omit" : true }, { "name" : "mpls", - "id" : 6, + "id" : 8, "header_type" : "mpls_t", "metadata" : false, "pi_omit" : true }, + { + "name" : "gtpu", + "id" : 9, + "header_type" : "gtpu_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_options", + "id" : 10, + "header_type" : "gtpu_options_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_ext_psc", + "id" : 11, + "header_type" : "gtpu_ext_psc_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "inner_ipv4", + "id" : 12, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "inner_udp", + "id" : 13, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "inner_tcp", + "id" : 14, + "header_type" : "tcp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "inner_icmp", + "id" : 15, + "header_type" : "icmp_t", + "metadata" : false, + "pi_omit" : true + }, { "name" : "ipv4", - "id" : 7, + "id" : 16, "header_type" : "ipv4_t", "metadata" : false, "pi_omit" : true }, { "name" : "tcp", - "id" : 8, + "id" : 17, "header_type" : "tcp_t", "metadata" : false, "pi_omit" : true }, { "name" : "udp", - "id" : 9, + "id" : 18, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "icmp", - "id" : 10, + "id" : 19, "header_type" : "icmp_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_out", - "id" : 11, + "id" : 20, "header_type" : "packet_out_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_in", - "id" : 12, + "id" : 21, "header_type" : "packet_in_header_t", "metadata" : false, "pi_omit" : true @@ -271,7 +387,7 @@ "name" : "fl", "source_info" : { "filename" : "include/control/acl.p4", - "line" : 46, + "line" : 45, "column" : 40, "source_fragment" : "{standard_metadata.ingress_port}" }, @@ -308,10 +424,11 @@ "type" : "hexstr", "value" : "0x00ff", "mask" : null, - "next_state" : "parse_packet_out" + "next_state" : "check_packet_out" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_ethernet" } @@ -324,50 +441,150 @@ ] }, { - "name" : "parse_packet_out", + "name" : "check_packet_out", "id" : 1, "parser_ops" : [ { "parameters" : [ { - "type" : "regular", - "value" : "packet_out" + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + { + "type" : "lookahead", + "value" : [0, 16] } ], - "op" : "extract" - } - ], - "transitions" : [ + "op" : "set" + }, { - "value" : "default", - "mask" : null, - "next_state" : "parse_ethernet" - } - ], - "transition_key" : [] - }, - { - "name" : "parse_ethernet", - "id" : 2, - "parser_ops" : [ + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "tmp" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, { "parameters" : [ { - "type" : "regular", - "value" : "ethernet" + "type" : "field", + "value" : ["tmp", "egress_port"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x7" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } } ], - "op" : "extract" + "op" : "set" }, { "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.vlan_id"] + "value" : ["tmp", "do_forwarding"] }, { - "type" : "hexstr", - "value" : "0x0ffe" + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x6" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp", "_pad"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + } } ], "op" : "set" @@ -379,8 +596,41 @@ "value" : ["scalars", "tmp_0"] }, { - "type" : "lookahead", - "value" : [0, 16] + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x6" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } } ], "op" : "set" @@ -389,26 +639,15 @@ "transitions" : [ { "type" : "hexstr", - "value" : "0x88a8", - "mask" : null, - "next_state" : "parse_vlan_tag" - }, - { - "type" : "hexstr", - "value" : "0x9100", - "mask" : null, - "next_state" : "parse_vlan_tag" - }, - { - "type" : "hexstr", - "value" : "0x8100", + "value" : "0x00", "mask" : null, - "next_state" : "parse_vlan_tag" + "next_state" : "parse_packet_out_and_accept" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, - "next_state" : "parse_eth_type" + "next_state" : "strip_packet_out" } ], "transition_key" : [ @@ -419,20 +658,81 @@ ] }, { - "name" : "parse_vlan_tag", - "id" : 3, + "name" : "parse_packet_out_and_accept", + "id" : 2, "parser_ops" : [ { "parameters" : [ { "type" : "regular", - "value" : "vlan_tag" + "value" : "packet_out" } ], "op" : "extract" - }, + } + ], + "transitions" : [ { - "parameters" : [ + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "strip_packet_out", + "id" : 3, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x00000010" + } + ], + "op" : "advance" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ethernet" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_ethernet", + "id" : 4, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "ethernet" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "op" : "set" + }, + { + "parameters" : [ { "type" : "field", "value" : ["scalars", "tmp_1"] @@ -445,6 +745,66 @@ "op" : "set" } ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x88a8", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "hexstr", + "value" : "0x9100", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "hexstr", + "value" : "0x8100", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_eth_type" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_1"] + } + ] + }, + { + "name" : "parse_vlan_tag", + "id" : 5, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "vlan_tag" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_3"] + }, + { + "type" : "lookahead", + "value" : [0, 16] + } + ], + "op" : "set" + } + ], "transitions" : [ { "type" : "hexstr", @@ -453,7 +813,8 @@ "next_state" : "parse_inner_vlan_tag" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -461,13 +822,13 @@ "transition_key" : [ { "type" : "field", - "value" : ["scalars", "tmp_1"] + "value" : ["scalars", "tmp_3"] } ] }, { "name" : "parse_inner_vlan_tag", - "id" : 4, + "id" : 6, "parser_ops" : [ { "parameters" : [ @@ -481,7 +842,8 @@ ], "transitions" : [ { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_eth_type" } @@ -490,7 +852,7 @@ }, { "name" : "parse_eth_type", - "id" : 5, + "id" : 7, "parser_ops" : [ { "parameters" : [ @@ -516,7 +878,8 @@ "next_state" : "parse_ipv4" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -530,7 +893,7 @@ }, { "name" : "parse_mpls", - "id" : 6, + "id" : 8, "parser_ops" : [ { "parameters" : [ @@ -545,7 +908,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.mpls_label"] + "value" : ["scalars", "userMetadata._mpls_label12"] }, { "type" : "field", @@ -558,7 +921,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.mpls_ttl"] + "value" : ["scalars", "userMetadata._mpls_ttl13"] }, { "type" : "field", @@ -571,7 +934,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_2"] + "value" : ["scalars", "tmp_5"] }, { "type" : "lookahead", @@ -589,7 +952,8 @@ "next_state" : "parse_ipv4" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : "parse_ethernet" } @@ -597,13 +961,13 @@ "transition_key" : [ { "type" : "field", - "value" : ["scalars", "tmp_2"] + "value" : ["scalars", "tmp_5"] } ] }, { "name" : "parse_ipv4", - "id" : 7, + "id" : 9, "parser_ops" : [ { "parameters" : [ @@ -618,7 +982,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.ip_proto"] + "value" : ["scalars", "userMetadata._ip_proto20"] }, { "type" : "field", @@ -631,7 +995,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.ip_eth_type"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] }, { "type" : "hexstr", @@ -644,7 +1008,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.ipv4_src_addr"] + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] }, { "type" : "field", @@ -657,7 +1021,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.ipv4_dst_addr"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] }, { "type" : "field", @@ -687,7 +1051,8 @@ "next_state" : "parse_icmp" }, { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -701,7 +1066,7 @@ }, { "name" : "parse_tcp", - "id" : 8, + "id" : 10, "parser_ops" : [ { "parameters" : [ @@ -716,7 +1081,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.l4_sport"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "field", @@ -729,7 +1094,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.l4_dport"] + "value" : ["scalars", "userMetadata._l4_dport22"] }, { "type" : "field", @@ -741,7 +1106,8 @@ ], "transitions" : [ { - "value" : "default", + "type" : "default", + "value" : null, "mask" : null, "next_state" : null } @@ -750,7 +1116,7 @@ }, { "name" : "parse_udp", - "id" : 9, + "id" : 11, "parser_ops" : [ { "parameters" : [ @@ -765,7 +1131,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.l4_sport"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "field", @@ -778,7 +1144,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.l4_dport"] + "value" : ["scalars", "userMetadata._l4_dport22"] }, { "type" : "field", @@ -786,381 +1152,2055 @@ } ], "op" : "set" - } - ], - "transitions" : [ + }, { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [ + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + { + "type" : "lookahead", + "value" : [0, 64] + } + ], + "op" : "set" + }, { - "type" : "field", - "value" : ["udp", "dport"] - } - ] - }, - { - "name" : "parse_icmp", - "id" : 10, - "parser_ops" : [ + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_0" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, { "parameters" : [ { - "type" : "regular", - "value" : "icmp" + "type" : "field", + "value" : ["gtpu_0", "version"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } } ], - "op" : "extract" - } - ], - "transitions" : [ + "op" : "set" + }, { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [] - } - ] - } - ], - "parse_vsets" : [], - "deparsers" : [ - { - "name" : "deparser", - "id" : 0, - "source_info" : { - "filename" : "include/parser.p4", - "line" : 268, - "column" : 8, - "source_fragment" : "FabricDeparser" - }, - "order" : ["packet_in", "ethernet", "vlan_tag", "inner_vlan_tag", "eth_type", "mpls", "ipv4", "tcp", "udp", "icmp"] - } - ], - "meter_arrays" : [], - "counter_arrays" : [ - { - "name" : "FabricIngress.filtering.ingress_port_vlan_counter", - "id" : 0, - "is_direct" : true, - "binding" : "FabricIngress.filtering.ingress_port_vlan", - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 31, - "column" : 50, - "source_fragment" : "ingress_port_vlan_counter" - } - }, - { - "name" : "FabricIngress.filtering.fwd_classifier_counter", - "id" : 1, - "is_direct" : true, - "binding" : "FabricIngress.filtering.fwd_classifier", - "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 85, - "column" : 50, - "source_fragment" : "fwd_classifier_counter" - } - }, - { - "name" : "FabricIngress.forwarding.bridging_counter", - "id" : 2, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.bridging", - "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 36, - "column" : 50, - "source_fragment" : "bridging_counter" - } - }, - { - "name" : "FabricIngress.forwarding.mpls_counter", - "id" : 3, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.mpls", - "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 63, - "column" : 50, - "source_fragment" : "mpls_counter" - } - }, - { - "name" : "FabricIngress.acl.acl_counter", - "id" : 4, - "is_direct" : true, - "binding" : "FabricIngress.acl.acl", - "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 30, - "column" : 50, + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "pt"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3c" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "spare"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3b" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "ex_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3a" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "seq_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x39" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "npdu_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x38" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msgtype"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msglen"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x20" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "teid"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x086801ff", + "mask" : null, + "next_state" : "parse_gtpu" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["udp", "dport"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + } + ] + }, + { + "name" : "parse_icmp", + "id" : 12, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "icmp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_gtpu", + "id" : 13, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x000000", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_gtpu_options" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu", "ex_flag"] + }, + { + "type" : "field", + "value" : ["gtpu", "seq_flag"] + }, + { + "type" : "field", + "value" : ["gtpu", "npdu_flag"] + } + ] + }, + { + "name" : "parse_gtpu_options", + "id" : 14, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu_options" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + }, + { + "type" : "lookahead", + "value" : [0, 8] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x8501", + "mask" : null, + "next_state" : "parse_gtpu_ext_psc" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu_options", "next_ext"] + }, + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + } + ] + }, + { + "name" : "parse_gtpu_ext_psc", + "id" : 15, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "gtpu_ext_psc" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x00", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["gtpu_ext_psc", "next_ext"] + } + ] + }, + { + "name" : "parse_inner_ipv4", + "id" : 16, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_ipv4" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_inner_tcp" + }, + { + "type" : "hexstr", + "value" : "0x11", + "mask" : null, + "next_state" : "parse_inner_udp" + }, + { + "type" : "hexstr", + "value" : "0x01", + "mask" : null, + "next_state" : "parse_inner_icmp" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ] + }, + { + "name" : "parse_inner_udp", + "id" : 17, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_udp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_tcp", + "id" : 18, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_tcp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_icmp", + "id" : 19, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "inner_icmp" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + } + ] + } + ], + "parse_vsets" : [], + "deparsers" : [ + { + "name" : "deparser", + "id" : 0, + "source_info" : { + "filename" : "include/parser.p4", + "line" : 308, + "column" : 8, + "source_fragment" : "FabricDeparser" + }, + "order" : ["packet_in", "ethernet", "vlan_tag", "inner_vlan_tag", "eth_type", "mpls", "ipv4", "tcp", "udp", "icmp", "gtpu", "gtpu_options", "gtpu_ext_psc", "inner_ipv4", "inner_tcp", "inner_udp", "inner_icmp"], + "primitives" : [] + } + ], + "meter_arrays" : [ + { + "name" : "FabricIngress.qos.slice_tc_meter", + "id" : 0, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 78, + "column" : 41, + "source_fragment" : "slice_tc_meter" + }, + "is_direct" : false, + "size" : 64, + "rate_count" : 2, + "type" : "bytes" + } + ], + "counter_arrays" : [ + { + "name" : "FabricIngress.filtering.ingress_port_vlan_counter", + "id" : 0, + "is_direct" : true, + "binding" : "FabricIngress.filtering.ingress_port_vlan", + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 31, + "column" : 50, + "source_fragment" : "ingress_port_vlan_counter" + } + }, + { + "name" : "FabricIngress.filtering.fwd_classifier_counter", + "id" : 1, + "is_direct" : true, + "binding" : "FabricIngress.filtering.fwd_classifier", + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 87, + "column" : 50, + "source_fragment" : "fwd_classifier_counter" + } + }, + { + "name" : "FabricIngress.forwarding.bridging_counter", + "id" : 2, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.bridging", + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 36, + "column" : 50, + "source_fragment" : "bridging_counter" + } + }, + { + "name" : "FabricIngress.forwarding.mpls_counter", + "id" : 3, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.mpls", + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 63, + "column" : 50, + "source_fragment" : "mpls_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_mpls_counter", + "id" : 4, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_mpls", + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 29, + "column" : 50, + "source_fragment" : "next_mpls_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_vlan_counter", + "id" : 5, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_vlan", + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 54, + "column" : 50, + "source_fragment" : "next_vlan_counter" + } + }, + { + "name" : "FabricIngress.acl.acl_counter", + "id" : 6, + "is_direct" : true, + "binding" : "FabricIngress.acl.acl", + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 29, + "column" : 50, "source_fragment" : "acl_counter" } }, { - "name" : "FabricIngress.next.next_vlan_counter", - "id" : 5, - "is_direct" : true, - "binding" : "FabricIngress.next.next_vlan", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 67, - "column" : 50, - "source_fragment" : "next_vlan_counter" - } + "name" : "FabricIngress.next.xconnect_counter", + "id" : 7, + "is_direct" : true, + "binding" : "FabricIngress.next.xconnect", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 56, + "column" : 50, + "source_fragment" : "xconnect_counter" + } + }, + { + "name" : "FabricIngress.next.hashed_counter", + "id" : 8, + "is_direct" : true, + "binding" : "FabricIngress.next.hashed", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 126, + "column" : 50, + "source_fragment" : "hashed_counter" + } + }, + { + "name" : "FabricIngress.next.multicast_counter", + "id" : 9, + "is_direct" : true, + "binding" : "FabricIngress.next.multicast", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 163, + "column" : 50, + "source_fragment" : "multicast_counter" + } + }, + { + "name" : "FabricIngress.slice_tc_classifier.classifier_stats", + "id" : 10, + "is_direct" : true, + "binding" : "FabricIngress.slice_tc_classifier.classifier", + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 32, + "column" : 40, + "source_fragment" : "classifier_stats" + } + }, + { + "name" : "FabricIngress.qos.queues_stats", + "id" : 11, + "is_direct" : true, + "binding" : "FabricIngress.qos.queues", + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 80, + "column" : 40, + "source_fragment" : "queues_stats" + } + }, + { + "name" : "FabricIngress.port_counters_control.egress_port_counter", + "id" : 12, + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 26, + "column" : 48, + "source_fragment" : "egress_port_counter" + }, + "size" : 511, + "is_direct" : false + }, + { + "name" : "FabricIngress.port_counters_control.ingress_port_counter", + "id" : 13, + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 27, + "column" : 48, + "source_fragment" : "ingress_port_counter" + }, + "size" : 511, + "is_direct" : false + }, + { + "name" : "FabricEgress.egress_next.egress_vlan_counter", + "id" : 14, + "is_direct" : true, + "binding" : "FabricEgress.egress_next.egress_vlan", + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 248, + "column" : 50, + "source_fragment" : "egress_vlan_counter" + } + } + ], + "register_arrays" : [], + "calculations" : [ + { + "name" : "calc", + "id" : 0, + "source_info" : { + "filename" : "include/checksum.p4", + "line" : 28, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["ipv4", "version"] + }, + { + "type" : "field", + "value" : ["ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["ipv4", "dst_addr"] + } + ] + }, + { + "name" : "calc_0", + "id" : 1, + "source_info" : { + "filename" : "include/checksum.p4", + "line" : 57, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["ipv4", "version"] + }, + { + "type" : "field", + "value" : ["ipv4", "ihl"] + }, + { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["ipv4", "ecn"] + }, + { + "type" : "field", + "value" : ["ipv4", "total_len"] + }, + { + "type" : "field", + "value" : ["ipv4", "identification"] + }, + { + "type" : "field", + "value" : ["ipv4", "flags"] + }, + { + "type" : "field", + "value" : ["ipv4", "frag_offset"] + }, + { + "type" : "field", + "value" : ["ipv4", "ttl"] + }, + { + "type" : "field", + "value" : ["ipv4", "protocol"] + }, + { + "type" : "field", + "value" : ["ipv4", "src_addr"] + }, + { + "type" : "field", + "value" : ["ipv4", "dst_addr"] + } + ] + } + ], + "learn_lists" : [], + "actions" : [ + { + "name" : "nop", + "id" : 0, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 1, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 2, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 3, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 4, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 5, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 6, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 7, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.filtering.deny", + "id" : 8, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_forwarding14"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 36, + "column" : 40, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 37, + "column" : 34, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type29"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/../define.p4", + "line" : 136, + "column" : 38, + "source_fragment" : "0x0; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit", + "id" : 9, + "runtime_data" : [ + { + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type29"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 44, + "column" : 34, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit_with_internal_vlan", + "id" : 10, + "runtime_data" : [ + { + "name" : "vlan_id", + "bitwidth" : 12 + }, + { + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 49, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._port_type29"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 44, + "column" : 34, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.set_forwarding_type", + "id" : 11, + "runtime_data" : [ + { + "name" : "fwd_type", + "bitwidth" : 3 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._fwd_type16"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/filtering.p4", + "line" : 90, + "column" : 33, + "source_fragment" : "= fwd_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_bridging", + "id" : 12, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] }, { - "name" : "FabricIngress.next.xconnect_counter", - "id" : 6, - "is_direct" : true, - "binding" : "FabricIngress.next.xconnect", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 107, - "column" : 50, - "source_fragment" : "xconnect_counter" - } + "name" : "FabricIngress.forwarding.pop_mpls_and_next", + "id" : 13, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label12"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 66, + "column" : 35, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] }, { - "name" : "FabricIngress.next.hashed_counter", - "id" : 7, - "is_direct" : true, - "binding" : "FabricIngress.next.hashed", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 184, - "column" : 50, - "source_fragment" : "hashed_counter" - } + "name" : "FabricIngress.forwarding.set_next_id_routing_v4", + "id" : 14, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 30, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] }, { - "name" : "FabricIngress.next.multicast_counter", - "id" : 8, - "is_direct" : true, - "binding" : "FabricIngress.next.multicast", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 228, - "column" : 50, - "source_fragment" : "multicast_counter" - } + "name" : "FabricIngress.forwarding.nop_routing_v4", + "id" : 15, + "runtime_data" : [], + "primitives" : [] }, { - "name" : "FabricIngress.port_counters_control.egress_port_counter", - "id" : 9, - "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 26, - "column" : 48, - "source_fragment" : "egress_port_counter" - }, - "size" : 511, - "is_direct" : false + "name" : "FabricIngress.pre_next.set_mpls_label", + "id" : 16, + "runtime_data" : [ + { + "name" : "label", + "bitwidth" : 20 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._mpls_label12"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 32, + "column" : 35, + "source_fragment" : "= label; ..." + } + } + ] }, { - "name" : "FabricIngress.port_counters_control.ingress_port_counter", - "id" : 10, - "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 27, - "column" : 48, - "source_fragment" : "ingress_port_counter" - }, - "size" : 511, - "is_direct" : false + "name" : "FabricIngress.pre_next.set_vlan", + "id" : 17, + "runtime_data" : [ + { + "name" : "vlan_id", + "bitwidth" : 12 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._vlan_id9"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 57, + "column" : 32, + "source_fragment" : "= vlan_id; ..." + } + } + ] }, { - "name" : "FabricEgress.egress_next.egress_vlan_counter", - "id" : 11, - "is_direct" : true, - "binding" : "FabricEgress.egress_next.egress_vlan", - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 313, - "column" : 50, - "source_fragment" : "egress_vlan_counter" - } - } - ], - "register_arrays" : [], - "calculations" : [ + "name" : "FabricIngress.acl.set_next_id_acl", + "id" : 18, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 32, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] + }, { - "name" : "calc", - "id" : 0, - "source_info" : { - "filename" : "include/checksum.p4", - "line" : 28, - "column" : 8, - "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ + "name" : "FabricIngress.acl.punt_to_cpu", + "id" : 19, + "runtime_data" : [], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "version"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "hexstr", + "value" : "0x00ff" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "standard_metadata.egress_spec = 255" + } }, { - "type" : "field", - "value" : ["ipv4", "ihl"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 39, + "column" : 28, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.set_clone_session_id", + "id" : 20, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "dscp"] - }, + "name" : "clone_id", + "bitwidth" : 32 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "ecn"] - }, + "op" : "clone_ingress_pkt_to_egress", + "parameters" : [ + { + "type" : "runtime_data", + "value" : 0 + }, + { + "type" : "hexstr", + "value" : "0x1" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})" + } + } + ] + }, + { + "name" : "FabricIngress.acl.drop", + "id" : 21, + "runtime_data" : [], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "total_len"] + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 50, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" + } }, { - "type" : "field", - "value" : ["ipv4", "identification"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/acl.p4", + "line" : 51, + "column" : 28, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.nop_acl", + "id" : 22, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.next.output_xconnect", + "id" : 23, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "flags"] - }, + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "frag_offset"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.set_next_id_xconnect", + "id" : 24, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "ttl"] - }, + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "protocol"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._next_id17"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 64, + "column" : 32, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.output_hashed", + "id" : 25, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "src_addr"] - }, + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "dst_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } } ] }, { - "name" : "calc_0", - "id" : 1, - "source_info" : { - "filename" : "include/checksum.p4", - "line" : 57, - "column" : 8, - "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." - }, - "algo" : "csum16", - "input" : [ + "name" : "FabricIngress.next.routing_hashed", + "id" : 26, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "version"] + "name" : "port_num", + "bitwidth" : 9 }, { - "type" : "field", - "value" : ["ipv4", "ihl"] + "name" : "smac", + "bitwidth" : 48 }, { - "type" : "field", - "value" : ["ipv4", "dscp"] - }, + "name" : "dmac", + "bitwidth" : 48 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "ecn"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ethernet", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 36, + "column" : 8, + "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "total_len"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["ethernet", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "identification"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 31, + "column" : 5, + "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.set_mcast_group_id", + "id" : 27, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "flags"] - }, + "name" : "group_id", + "bitwidth" : 16 + } + ], + "primitives" : [ { - "type" : "field", - "value" : ["ipv4", "frag_offset"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "mcast_grp"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 166, + "column" : 8, + "source_fragment" : "standard_metadata.mcast_grp = group_id" + } }, { - "type" : "field", - "value" : ["ipv4", "ttl"] - }, + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._is_multicast18"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 167, + "column" : 37, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.slice_tc_classifier.set_slice_id_tc", + "id" : 28, + "runtime_data" : [ { - "type" : "field", - "value" : ["ipv4", "protocol"] + "name" : "slice_id", + "bitwidth" : 4 }, { - "type" : "field", - "value" : ["ipv4", "src_addr"] + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 35, + "column" : 27, + "source_fragment" : "= slice_id; ..." + } }, { - "type" : "field", - "value" : ["ipv4", "dst_addr"] + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 36, + "column" : 21, + "source_fragment" : "= tc; ..." + } } ] - } - ], - "learn_lists" : [], - "actions" : [ - { - "name" : "nop", - "id" : 0, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 1, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 2, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 3, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 4, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 5, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 6, - "runtime_data" : [], - "primitives" : [] }, { - "name" : "FabricIngress.filtering.deny", - "id" : 7, + "name" : "FabricIngress.slice_tc_classifier.trust_dscp", + "id" : 29, "runtime_data" : [], "primitives" : [ { @@ -1168,28 +3208,51 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.skip_forwarding"] + "value" : ["scalars", "userMetadata._slice_id25"] }, { "type" : "expression", "value" : { "type" : "expression", "value" : { - "op" : "b2d", - "left" : null, + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0x0f" } } } } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "fabric_metadata.skip_forwarding = true" + "filename" : "include/control/slicing.p4", + "line" : 44, + "column" : 27, + "source_fragment" : "= hdr.ipv4.dscp[4 +2 -1:2]; ..." } }, { @@ -1197,158 +3260,135 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.skip_next"] + "value" : ["scalars", "userMetadata._tc27"] }, { "type" : "expression", "value" : { "type" : "expression", "value" : { - "op" : "b2d", - "left" : null, + "op" : "&", + "left" : { + "type" : "field", + "value" : ["ipv4", "dscp"] + }, "right" : { - "type" : "bool", - "value" : true + "type" : "hexstr", + "value" : "0x03" } } } } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 37, - "column" : 8, - "source_fragment" : "fabric_metadata.skip_next = true" + "filename" : "include/control/slicing.p4", + "line" : 45, + "column" : 21, + "source_fragment" : "= hdr.ipv4.dscp[2 -1:0]; ..." } } ] }, { - "name" : "FabricIngress.filtering.permit", - "id" : 8, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.filtering.permit_with_internal_vlan", - "id" : 9, + "name" : "FabricIngress.qos.set_queue", + "id" : 30, "runtime_data" : [ { - "name" : "vlan_id", - "bitwidth" : 12 + "name" : "qid", + "bitwidth" : 5 } ], + "primitives" : [] + }, + { + "name" : "FabricIngress.qos.meter_drop", + "id" : 31, + "runtime_data" : [], "primitives" : [ { - "op" : "assign", + "op" : "mark_to_drop", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.vlan_id"] - }, - { - "type" : "runtime_data", - "value" : 0 + "type" : "header", + "value" : "standard_metadata" } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 47, + "filename" : "include/control/slicing.p4", + "line" : 89, "column" : 8, - "source_fragment" : "fabric_metadata.vlan_id = vlan_id" + "source_fragment" : "mark_to_drop(standard_metadata)" } } ] }, { - "name" : "FabricIngress.filtering.set_forwarding_type", - "id" : 10, - "runtime_data" : [ - { - "name" : "fwd_type", - "bitwidth" : 3 - } - ], + "name" : "lookup_md_init37", + "id" : 32, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.fwd_type"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_tcp", "sport"] } ], "source_info" : { - "filename" : "include/control/filtering.p4", - "line" : 88, - "column" : 8, - "source_fragment" : "fabric_metadata.fwd_type = fwd_type" + "filename" : "include/control/lookup_md_init.p4", + "line" : 37, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id_bridging", - "id" : 11, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.next_id"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_tcp", "dport"] } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 8, - "source_fragment" : "fabric_metadata.next_id = next_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 38, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.dport; ..." } } ] }, { - "name" : "FabricIngress.forwarding.pop_mpls_and_next", - "id" : 12, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], + "name" : "lookup_md_init40", + "id" : 33, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.mpls_label"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "hexstr", - "value" : "0x000000" + "type" : "field", + "value" : ["inner_udp", "sport"] } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 66, - "column" : 8, - "source_fragment" : "fabric_metadata.mpls_label = 0" + "filename" : "include/control/lookup_md_init.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." } }, { @@ -1356,93 +3396,70 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.next_id"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_udp", "dport"] } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 8, - "source_fragment" : "fabric_metadata.next_id = next_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.dport; ..." } } ] }, { - "name" : "FabricIngress.forwarding.set_next_id_routing_v4", - "id" : 13, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], + "name" : "lookup_md_init43", + "id" : 34, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.next_id"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_icmp", "icmp_type"] } ], "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 30, - "column" : 8, - "source_fragment" : "fabric_metadata.next_id = next_id; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 43, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." } - } - ] - }, - { - "name" : "FabricIngress.forwarding.nop_routing_v4", - "id" : 14, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.acl.set_next_id_acl", - "id" : 15, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.next_id"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["inner_icmp", "icmp_code"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 33, - "column" : 8, - "source_fragment" : "fabric_metadata.next_id = next_id" + "filename" : "include/control/lookup_md_init.p4", + "line" : 44, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_code; ..." } } ] }, { - "name" : "FabricIngress.acl.punt_to_cpu", - "id" : 16, + "name" : "lookup_md_init32", + "id" : 35, "runtime_data" : [], "primitives" : [ { @@ -1450,26 +3467,7 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] - }, - { - "type" : "hexstr", - "value" : "0x00ff" - } - ], - "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 39, - "column" : 8, - "source_fragment" : "standard_metadata.egress_spec = 255" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.skip_next"] + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] }, { "type" : "expression", @@ -1487,63 +3485,93 @@ } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 40, - "column" : 8, - "source_fragment" : "fabric_metadata.skip_next = true" + "filename" : "include/control/lookup_md_init.p4", + "line" : 32, + "column" : 27, + "source_fragment" : "= true; ..." } - } - ] - }, - { - "name" : "FabricIngress.acl.set_clone_session_id", - "id" : 17, - "runtime_data" : [ + }, { - "name" : "clone_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "src_addr"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 33, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, { - "op" : "clone_ingress_pkt_to_egress", + "op" : "assign", "parameters" : [ { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "hexstr", - "value" : "0x1" + "type" : "field", + "value" : ["inner_ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 46, - "column" : 8, - "source_fragment" : "clone3(CloneType.I2E, clone_id, {standard_metadata.ingress_port})" + "filename" : "include/control/lookup_md_init.p4", + "line" : 34, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] + }, + { + "type" : "field", + "value" : ["inner_ipv4", "protocol"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 35, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." } } ] }, { - "name" : "FabricIngress.acl.drop", - "id" : 18, + "name" : "lookup_md_init52", + "id" : 36, "runtime_data" : [], "primitives" : [ { - "op" : "mark_to_drop", + "op" : "assign", "parameters" : [ { - "type" : "header", - "value" : "standard_metadata" + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] + }, + { + "type" : "field", + "value" : ["tcp", "sport"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 51, - "column" : 8, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/control/lookup_md_init.p4", + "line" : 52, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." } }, { @@ -1551,197 +3579,163 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.skip_next"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] + }, + { + "type" : "field", + "value" : ["tcp", "dport"] + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 53, + "column" : 32, + "source_fragment" : "= hdr.tcp.dport; ..." + } + } + ] + }, + { + "name" : "lookup_md_init55", + "id" : 37, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "field", + "value" : ["udp", "sport"] } ], "source_info" : { - "filename" : "include/control/acl.p4", - "line" : 52, - "column" : 8, - "source_fragment" : "fabric_metadata.skip_next = true" + "filename" : "include/control/lookup_md_init.p4", + "line" : 55, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." } - } - ] - }, - { - "name" : "FabricIngress.acl.nop_acl", - "id" : 19, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "FabricIngress.next.set_vlan", - "id" : 20, - "runtime_data" : [ - { - "name" : "vlan_id", - "bitwidth" : 12 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.vlan_id"] + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["udp", "dport"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 70, - "column" : 8, - "source_fragment" : "fabric_metadata.vlan_id = vlan_id" + "filename" : "include/control/lookup_md_init.p4", + "line" : 56, + "column" : 32, + "source_fragment" : "= hdr.udp.dport; ..." } } ] }, { - "name" : "FabricIngress.next.output_xconnect", - "id" : 21, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - } - ], + "name" : "lookup_md_init58", + "id" : 38, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["icmp", "icmp_type"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 58, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.set_next_id_xconnect", - "id" : 22, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.next_id"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["icmp", "icmp_code"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 115, - "column" : 8, - "source_fragment" : "fabric_metadata.next_id = next_id" + "filename" : "include/control/lookup_md_init.p4", + "line" : 59, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_code; ..." } } ] }, { - "name" : "FabricIngress.next.output_hashed", - "id" : 23, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - } - ], + "name" : "lookup_md_init47", + "id" : 39, + "runtime_data" : [], "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 47, + "column" : 27, + "source_fragment" : "= true; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.routing_hashed", - "id" : 24, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - }, - { - "name" : "smac", - "bitwidth" : 48 }, - { - "name" : "dmac", - "bitwidth" : 48 - } - ], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["ethernet", "src_addr"] + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "field", + "value" : ["ipv4", "src_addr"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 48, + "column" : 28, + "source_fragment" : "= hdr.ipv4.src_addr; ..." } }, { @@ -1749,18 +3743,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "dst_addr"] + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "runtime_data", - "value" : 2 + "type" : "field", + "value" : ["ipv4", "dst_addr"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 49, + "column" : 28, + "source_fragment" : "= hdr.ipv4.dst_addr; ..." } }, { @@ -1768,61 +3762,73 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "field", + "value" : ["ipv4", "protocol"] } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 50, + "column" : 28, + "source_fragment" : "= hdr.ipv4.protocol; ..." } } ] }, { - "name" : "FabricIngress.next.mpls_routing_hashed", - "id" : 25, - "runtime_data" : [ - { - "name" : "port_num", - "bitwidth" : 9 - }, - { - "name" : "smac", - "bitwidth" : 48 - }, + "name" : "lookup_md_init23", + "id" : 40, + "runtime_data" : [], + "primitives" : [ { - "name" : "dmac", - "bitwidth" : 48 + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_is_ipv40"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 23, + "column" : 23, + "source_fragment" : "= false; ..." + } }, - { - "name" : "label", - "bitwidth" : 20 - } - ], - "primitives" : [ { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.mpls_label"] + "value" : ["scalars", "userMetadata._lkp_ipv4_src1"] }, { - "type" : "runtime_data", - "value" : 3 + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 46, - "column" : 8, - "source_fragment" : "fabric_metadata.mpls_label = label; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 24, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -1830,18 +3836,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "src_addr"] + "value" : ["scalars", "userMetadata._lkp_ipv4_dst2"] }, { - "type" : "runtime_data", - "value" : 1 + "type" : "hexstr", + "value" : "0x00000000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 36, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 25, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -1849,18 +3855,18 @@ "parameters" : [ { "type" : "field", - "value" : ["ethernet", "dst_addr"] + "value" : ["scalars", "userMetadata._lkp_ip_proto3"] }, { - "type" : "runtime_data", - "value" : 2 + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 41, - "column" : 8, - "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 26, + "column" : 24, + "source_fragment" : "= 0; ..." } }, { @@ -1868,49 +3874,56 @@ "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "egress_spec"] + "value" : ["scalars", "userMetadata._lkp_l4_sport4"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "hexstr", + "value" : "0x0000" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 31, - "column" : 5, - "source_fragment" : "standard_metadata.egress_spec = port_num; ..." + "filename" : "include/control/lookup_md_init.p4", + "line" : 27, + "column" : 24, + "source_fragment" : "= 0; ..." } - } - ] - }, - { - "name" : "FabricIngress.next.set_mcast_group_id", - "id" : 26, - "runtime_data" : [ + }, { - "name" : "group_id", - "bitwidth" : 16 - } - ], - "primitives" : [ + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._lkp_l4_dport5"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 28, + "column" : 24, + "source_fragment" : "= 0; ..." + } + }, { "op" : "assign", "parameters" : [ { "type" : "field", - "value" : ["standard_metadata", "mcast_grp"] + "value" : ["scalars", "userMetadata._lkp_icmp_type6"] }, { - "type" : "runtime_data", - "value" : 0 + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 231, - "column" : 8, - "source_fragment" : "standard_metadata.mcast_grp = group_id" + "filename" : "include/control/lookup_md_init.p4", + "line" : 29, + "column" : 25, + "source_fragment" : "= 0; ..." } }, { @@ -1918,35 +3931,25 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.is_multicast"] + "value" : ["scalars", "userMetadata._lkp_icmp_code7"] }, { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } + "type" : "hexstr", + "value" : "0x00" } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 232, - "column" : 8, - "source_fragment" : "fabric_metadata.is_multicast = true" + "filename" : "include/control/lookup_md_init.p4", + "line" : 30, + "column" : 25, + "source_fragment" : "= 0; ..." } } ] }, { - "name" : "act", - "id" : 27, + "name" : "packetio25", + "id" : 41, "runtime_data" : [], "primitives" : [ { @@ -1988,7 +3991,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.is_controller_packet_out"] + "value" : ["scalars", "userMetadata._is_controller_packet_out19"] }, { "type" : "expression", @@ -2008,8 +4011,8 @@ "source_info" : { "filename" : "include/control/packetio.p4", "line" : 27, - "column" : 12, - "source_fragment" : "fabric_metadata.is_controller_packet_out = true" + "column" : 53, + "source_fragment" : "= true; ..." } }, { @@ -2025,8 +4028,8 @@ ] }, { - "name" : "act_0", - "id" : 28, + "name" : "filtering113", + "id" : 42, "runtime_data" : [], "primitives" : [ { @@ -2034,7 +4037,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.vlan_id"] + "value" : ["scalars", "userMetadata._vlan_id9"] }, { "type" : "field", @@ -2043,9 +4046,9 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 111, - "column" : 12, - "source_fragment" : "fabric_metadata.vlan_id = hdr.vlan_tag.vlan_id" + "line" : 113, + "column" : 36, + "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." } }, { @@ -2053,7 +4056,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.vlan_pri"] + "value" : ["scalars", "userMetadata._vlan_pri10"] }, { "type" : "field", @@ -2062,9 +4065,9 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 112, - "column" : 12, - "source_fragment" : "fabric_metadata.vlan_pri = hdr.vlan_tag.pri" + "line" : 114, + "column" : 37, + "source_fragment" : "= hdr.vlan_tag.pri; ..." } }, { @@ -2072,7 +4075,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.vlan_cfi"] + "value" : ["scalars", "userMetadata._vlan_cfi11"] }, { "type" : "field", @@ -2081,16 +4084,16 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 113, - "column" : 12, - "source_fragment" : "fabric_metadata.vlan_cfi = hdr.vlan_tag.cfi" + "line" : 115, + "column" : 37, + "source_fragment" : "= hdr.vlan_tag.cfi; ..." } } ] }, { - "name" : "act_1", - "id" : 29, + "name" : "filtering129", + "id" : 43, "runtime_data" : [], "primitives" : [ { @@ -2098,7 +4101,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.mpls_ttl"] + "value" : ["scalars", "userMetadata._mpls_ttl13"] }, { "type" : "hexstr", @@ -2107,16 +4110,16 @@ ], "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 127, - "column" : 12, - "source_fragment" : "fabric_metadata.mpls_ttl = DEFAULT_MPLS_TTL + 1" + "line" : 129, + "column" : 37, + "source_fragment" : "= DEFAULT_MPLS_TTL + 1; ..." } } ] }, { - "name" : "act_2", - "id" : 30, + "name" : "port_counter31", + "id" : 44, "runtime_data" : [], "primitives" : [ { @@ -2124,7 +4127,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp"] + "value" : ["scalars", "tmp_8"] }, { "type" : "expression", @@ -2160,7 +4163,7 @@ }, { "type" : "field", - "value" : ["scalars", "tmp"] + "value" : ["scalars", "tmp_8"] } ], "source_info" : { @@ -2173,8 +4176,8 @@ ] }, { - "name" : "act_3", - "id" : 31, + "name" : "port_counter34", + "id" : 45, "runtime_data" : [], "primitives" : [ { @@ -2182,7 +4185,7 @@ "parameters" : [ { "type" : "field", - "value" : ["scalars", "tmp_3"] + "value" : ["scalars", "tmp_9"] }, { "type" : "expression", @@ -2218,7 +4221,7 @@ }, { "type" : "field", - "value" : ["scalars", "tmp_3"] + "value" : ["scalars", "tmp_9"] } ], "source_info" : { @@ -2230,15 +4233,219 @@ } ] }, + { + "name" : "slicing114", + "id" : 46, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_10"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 37, + "source_fragment" : "(bit<32>) slice_tc" + } + }, + { + "op" : "execute_meter", + "parameters" : [ + { + "type" : "meter_array", + "value" : "FabricIngress.qos.slice_tc_meter" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_10"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._packet_color26"] + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 8, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) slice_tc, fabric_md.packet_color)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._dscp28"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._slice_id25"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._tc27"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 110, + "column" : 26, + "source_fragment" : "fabric_md.slice_id++fabric_md.tc; ..." + } + } + ] + }, { "name" : "nop", - "id" : 32, + "id" : 47, "runtime_data" : [], "primitives" : [] }, { "name" : "FabricEgress.egress_next.pop_mpls_if_present", - "id" : 33, + "id" : 48, "runtime_data" : [], "primitives" : [ { @@ -2251,7 +4458,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 270, + "line" : 204, "column" : 8, "source_fragment" : "hdr.mpls.setInvalid()" } @@ -2265,21 +4472,21 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.ip_eth_type"] + "value" : ["scalars", "userMetadata._ip_eth_type8"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 272, + "line" : 206, "column" : 8, - "source_fragment" : "hdr.eth_type.value = fabric_metadata.ip_eth_type" + "source_fragment" : "hdr.eth_type.value = fabric_metadata.ip_eth_type; ..." } } ] }, { "name" : "FabricEgress.egress_next.set_mpls", - "id" : 34, + "id" : 49, "runtime_data" : [], "primitives" : [ { @@ -2292,7 +4499,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 277, + "line" : 211, "column" : 8, "source_fragment" : "hdr.mpls.setValid()" } @@ -2306,14 +4513,14 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.mpls_label"] + "value" : ["scalars", "userMetadata._mpls_label12"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 278, + "line" : 212, "column" : 8, - "source_fragment" : "hdr.mpls.label = fabric_metadata.mpls_label" + "source_fragment" : "hdr.mpls.label = fabric_metadata.mpls_label; ..." } }, { @@ -2330,7 +4537,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 279, + "line" : 213, "column" : 8, "source_fragment" : "hdr.mpls.tc = 3w0" } @@ -2349,7 +4556,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 280, + "line" : 214, "column" : 8, "source_fragment" : "hdr.mpls.bos = 1w1" } @@ -2363,14 +4570,14 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.mpls_ttl"] + "value" : ["scalars", "userMetadata._mpls_ttl13"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 281, + "line" : 215, "column" : 8, - "source_fragment" : "hdr.mpls.ttl = fabric_metadata.mpls_ttl" + "source_fragment" : "hdr.mpls.ttl = fabric_metadata.mpls_ttl; // Decrement after push. ..." } }, { @@ -2387,7 +4594,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 126, + "line" : 147, "column" : 31, "source_fragment" : "0x8847; ..." } @@ -2396,7 +4603,7 @@ }, { "name" : "FabricEgress.egress_next.push_vlan", - "id" : 35, + "id" : 50, "runtime_data" : [], "primitives" : [ { @@ -2409,7 +4616,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 289, + "line" : 223, "column" : 8, "source_fragment" : "hdr.vlan_tag.setValid()" } @@ -2423,14 +4630,14 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.vlan_cfi"] + "value" : ["scalars", "userMetadata._vlan_cfi11"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 290, + "line" : 224, "column" : 8, - "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi" + "source_fragment" : "hdr.vlan_tag.cfi = fabric_metadata.vlan_cfi; ..." } }, { @@ -2442,14 +4649,14 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.vlan_pri"] + "value" : ["scalars", "userMetadata._vlan_pri10"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 291, + "line" : 225, "column" : 8, - "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri" + "source_fragment" : "hdr.vlan_tag.pri = fabric_metadata.vlan_pri; ..." } }, { @@ -2466,7 +4673,7 @@ ], "source_info" : { "filename" : "include/control/../define.p4", - "line" : 125, + "line" : 146, "column" : 31, "source_fragment" : "0x8100; ..." } @@ -2480,21 +4687,21 @@ }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.vlan_id"] + "value" : ["scalars", "userMetadata._vlan_id9"] } ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 293, + "line" : 227, "column" : 8, - "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id" + "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_metadata.vlan_id; ..." } } ] }, { "name" : "FabricEgress.egress_next.pop_vlan", - "id" : 36, + "id" : 51, "runtime_data" : [], "primitives" : [ { @@ -2507,7 +4714,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 316, + "line" : 256, "column" : 8, "source_fragment" : "hdr.vlan_tag.setInvalid()" } @@ -2515,8 +4722,62 @@ ] }, { - "name" : "act_4", - "id" : 37, + "name" : "FabricEgress.egress_next.drop", + "id" : 52, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 261, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_metadata)" + } + } + ] + }, + { + "name" : "FabricEgress.dscp_rewriter.rewrite", + "id" : 53, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.dscp_rewriter.clear", + "id" : 54, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 135, + "column" : 8, + "source_fragment" : "tmp_dscp = 0" + } + } + ] + }, + { + "name" : "packetio41", + "id" : 55, "runtime_data" : [], "primitives" : [ { @@ -2532,8 +4793,8 @@ ] }, { - "name" : "act_5", - "id" : 38, + "name" : "packetio44", + "id" : 56, "runtime_data" : [], "primitives" : [ { @@ -2573,100 +4834,40 @@ { "op" : "exit", "parameters" : [], - "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 47, - "column" : 12, - "source_fragment" : "exit" - } - } - ] - }, - { - "name" : "act_6", - "id" : 39, - "runtime_data" : [], - "primitives" : [ - { - "op" : "mark_to_drop", - "parameters" : [ - { - "type" : "header", - "value" : "standard_metadata" - } - ], - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 337, - "column" : 12, - "source_fragment" : "mark_to_drop(standard_metadata)" - } - } - ] - }, - { - "name" : "act_7", - "id" : 40, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : true - } - } - } - } - ] + "source_info" : { + "filename" : "include/control/packetio.p4", + "line" : 47, + "column" : 12, + "source_fragment" : "exit" + } } ] }, { - "name" : "act_8", - "id" : 41, + "name" : "next283", + "id" : 57, "runtime_data" : [], "primitives" : [ { - "op" : "assign", + "op" : "mark_to_drop", "parameters" : [ { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - }, - { - "type" : "expression", - "value" : { - "type" : "expression", - "value" : { - "op" : "b2d", - "left" : null, - "right" : { - "type" : "bool", - "value" : false - } - } - } + "type" : "header", + "value" : "standard_metadata" } - ] + ], + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 283, + "column" : 12, + "source_fragment" : "mark_to_drop(standard_metadata)" + } } ] }, { - "name" : "act_9", - "id" : 42, + "name" : "next310", + "id" : 58, "runtime_data" : [], "primitives" : [ { @@ -2679,7 +4880,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 370, + "line" : 310, "column" : 35, "source_fragment" : "mark_to_drop(standard_metadata)" } @@ -2687,8 +4888,8 @@ ] }, { - "name" : "act_10", - "id" : 43, + "name" : "next309", + "id" : 59, "runtime_data" : [], "primitives" : [ { @@ -2728,7 +4929,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 369, + "line" : 309, "column" : 12, "source_fragment" : "hdr.mpls.ttl = hdr.mpls.ttl - 1" } @@ -2736,8 +4937,8 @@ ] }, { - "name" : "act_11", - "id" : 44, + "name" : "next314", + "id" : 60, "runtime_data" : [], "primitives" : [ { @@ -2750,7 +4951,7 @@ ], "source_info" : { "filename" : "include/control/next.p4", - "line" : 374, + "line" : 314, "column" : 39, "source_fragment" : "mark_to_drop(standard_metadata)" } @@ -2758,8 +4959,8 @@ ] }, { - "name" : "act_12", - "id" : 45, + "name" : "next313", + "id" : 61, "runtime_data" : [], "primitives" : [ { @@ -2798,30 +4999,343 @@ } ], "source_info" : { - "filename" : "include/control/next.p4", - "line" : 373, - "column" : 16, - "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" + "filename" : "include/control/next.p4", + "line" : 313, + "column" : 16, + "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" + } + } + ] + }, + { + "name" : "slicing159", + "id" : 62, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["inner_ipv4", "dscp"] + }, + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 159, + "column" : 16, + "source_fragment" : "hdr.inner_ipv4.dscp = tmp_dscp" + } + } + ] + }, + { + "name" : "slicing126", + "id" : 63, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._dscp28"] + } + ], + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 126, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.dscp; ..." + } + } + ] + } + ], + "pipelines" : [ + { + "name" : "ingress", + "id" : 0, + "source_info" : { + "filename" : "fabric.p4", + "line" : 49, + "column" : 8, + "source_fragment" : "FabricIngress" + }, + "init_table" : "tbl_lookup_md_init23", + "tables" : [ + { + "name" : "tbl_lookup_md_init23", + "id" : 0, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 23, + "column" : 23, + "source_fragment" : "= false; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [40], + "actions" : ["lookup_md_init23"], + "base_default_next" : "node_3", + "next_tables" : { + "lookup_md_init23" : "node_3" + }, + "default_entry" : { + "action_id" : 40, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init32", + "id" : 1, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 32, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [35], + "actions" : ["lookup_md_init32"], + "base_default_next" : "node_5", + "next_tables" : { + "lookup_md_init32" : "node_5" + }, + "default_entry" : { + "action_id" : 35, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init37", + "id" : 2, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 37, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [32], + "actions" : ["lookup_md_init37"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init37" : "node_19" + }, + "default_entry" : { + "action_id" : 32, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init40", + "id" : 3, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 40, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [33], + "actions" : ["lookup_md_init40"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init40" : "node_19" + }, + "default_entry" : { + "action_id" : 33, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init43", + "id" : 4, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 43, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [34], + "actions" : ["lookup_md_init43"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init43" : "node_19" + }, + "default_entry" : { + "action_id" : 34, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init47", + "id" : 5, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 47, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [39], + "actions" : ["lookup_md_init47"], + "base_default_next" : "node_13", + "next_tables" : { + "lookup_md_init47" : "node_13" + }, + "default_entry" : { + "action_id" : 39, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init52", + "id" : 6, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 52, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [36], + "actions" : ["lookup_md_init52"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init52" : "node_19" + }, + "default_entry" : { + "action_id" : 36, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init55", + "id" : 7, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 55, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [37], + "actions" : ["lookup_md_init55"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init55" : "node_19" + }, + "default_entry" : { + "action_id" : 37, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init58", + "id" : 8, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 58, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [38], + "actions" : ["lookup_md_init58"], + "base_default_next" : "node_19", + "next_tables" : { + "lookup_md_init58" : "node_19" + }, + "default_entry" : { + "action_id" : 38, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true } - } - ] - } - ], - "pipelines" : [ - { - "name" : "ingress", - "id" : 0, - "source_info" : { - "filename" : "fabric.p4", - "line" : 46, - "column" : 8, - "source_fragment" : "FabricIngress" - }, - "init_table" : "node_2", - "tables" : [ + }, { - "name" : "tbl_act", - "id" : 0, + "name" : "tbl_packetio25", + "id" : 9, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 25, @@ -2835,25 +5349,92 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [27], - "actions" : ["act"], - "base_default_next" : "node_4", + "action_ids" : [41], + "actions" : ["packetio25"], + "base_default_next" : "FabricIngress.slice_tc_classifier.classifier", "next_tables" : { - "act" : "node_4" + "packetio25" : "FabricIngress.slice_tc_classifier.classifier" }, "default_entry" : { - "action_id" : 27, + "action_id" : 41, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_0", - "id" : 1, + "name" : "FabricIngress.slice_tc_classifier.classifier", + "id" : 10, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 49, + "column" : 10, + "source_fragment" : "classifier" + }, + "key" : [ + { + "match_type" : "ternary", + "name" : "ig_port", + "target" : ["standard_metadata", "ingress_port"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._lkp_ipv4_src1"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._lkp_ipv4_dst2"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._lkp_ip_proto3"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._lkp_l4_sport4"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._lkp_l4_dport5"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 512, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [28, 29], + "actions" : ["FabricIngress.slice_tc_classifier.set_slice_id_tc", "FabricIngress.slice_tc_classifier.trust_dscp"], + "base_default_next" : "node_22", + "next_tables" : { + "FabricIngress.slice_tc_classifier.set_slice_id_tc" : "node_22", + "FabricIngress.slice_tc_classifier.trust_dscp" : "node_22" + }, + "default_entry" : { + "action_id" : 28, + "action_const" : true, + "action_data" : ["0x0", "0x0"], + "action_entry_const" : true + } + }, + { + "name" : "tbl_filtering113", + "id" : 11, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 111, + "line" : 113, "column" : 36, "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." }, @@ -2864,25 +5445,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [28], - "actions" : ["act_0"], - "base_default_next" : "node_6", + "action_ids" : [42], + "actions" : ["filtering113"], + "base_default_next" : "node_24", "next_tables" : { - "act_0" : "node_6" + "filtering113" : "node_24" }, "default_entry" : { - "action_id" : 28, + "action_id" : 42, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_1", - "id" : 2, + "name" : "tbl_filtering129", + "id" : 12, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 127, + "line" : 129, "column" : 37, "source_fragment" : "=" }, @@ -2893,14 +5474,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [29], - "actions" : ["act_1"], + "action_ids" : [43], + "actions" : ["filtering129"], "base_default_next" : "FabricIngress.filtering.ingress_port_vlan", "next_tables" : { - "act_1" : "FabricIngress.filtering.ingress_port_vlan" + "filtering129" : "FabricIngress.filtering.ingress_port_vlan" }, "default_entry" : { - "action_id" : 29, + "action_id" : 43, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -2908,10 +5489,10 @@ }, { "name" : "FabricIngress.filtering.ingress_port_vlan", - "id" : 3, + "id" : 13, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 53, + "line" : 55, "column" : 10, "source_fragment" : "ingress_port_vlan" }, @@ -2941,7 +5522,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [7, 8, 9], + "action_ids" : [8, 9, 10], "actions" : ["FabricIngress.filtering.deny", "FabricIngress.filtering.permit", "FabricIngress.filtering.permit_with_internal_vlan"], "base_default_next" : "FabricIngress.filtering.fwd_classifier", "next_tables" : { @@ -2950,7 +5531,7 @@ "FabricIngress.filtering.permit_with_internal_vlan" : "FabricIngress.filtering.fwd_classifier" }, "default_entry" : { - "action_id" : 7, + "action_id" : 8, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -2958,10 +5539,10 @@ }, { "name" : "FabricIngress.filtering.fwd_classifier", - "id" : 4, + "id" : 14, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 92, + "line" : 94, "column" : 10, "source_fragment" : "fwd_classifier" }, @@ -2987,7 +5568,7 @@ { "match_type" : "exact", "name" : "ip_eth_type", - "target" : ["scalars", "fabric_metadata_t.ip_eth_type"], + "target" : ["scalars", "userMetadata._ip_eth_type8"], "mask" : null } ], @@ -2997,14 +5578,14 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [10], + "action_ids" : [11], "actions" : ["FabricIngress.filtering.set_forwarding_type"], - "base_default_next" : "node_10", + "base_default_next" : "node_28", "next_tables" : { - "FabricIngress.filtering.set_forwarding_type" : "node_10" + "FabricIngress.filtering.set_forwarding_type" : "node_28" }, "default_entry" : { - "action_id" : 10, + "action_id" : 11, "action_const" : true, "action_data" : ["0x0"], "action_entry_const" : true @@ -3012,7 +5593,7 @@ }, { "name" : "FabricIngress.forwarding.bridging", - "id" : 5, + "id" : 15, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 46, @@ -3023,7 +5604,7 @@ { "match_type" : "exact", "name" : "vlan_id", - "target" : ["scalars", "fabric_metadata_t.vlan_id"], + "target" : ["scalars", "userMetadata._vlan_id9"], "mask" : null }, { @@ -3039,12 +5620,12 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [11, 0], + "action_ids" : [12, 0], "actions" : ["FabricIngress.forwarding.set_next_id_bridging", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "base_default_next" : "node_35", "next_tables" : { - "FabricIngress.forwarding.set_next_id_bridging" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.set_next_id_bridging" : "node_35", + "nop" : "node_35" }, "default_entry" : { "action_id" : 0, @@ -3055,7 +5636,7 @@ }, { "name" : "FabricIngress.forwarding.mpls", - "id" : 6, + "id" : 16, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 71, @@ -3066,7 +5647,7 @@ { "match_type" : "exact", "name" : "mpls_label", - "target" : ["scalars", "fabric_metadata_t.mpls_label"], + "target" : ["scalars", "userMetadata._mpls_label12"], "mask" : null } ], @@ -3076,12 +5657,12 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [12, 1], + "action_ids" : [13, 1], "actions" : ["FabricIngress.forwarding.pop_mpls_and_next", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "base_default_next" : "node_35", "next_tables" : { - "FabricIngress.forwarding.pop_mpls_and_next" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.pop_mpls_and_next" : "node_35", + "nop" : "node_35" }, "default_entry" : { "action_id" : 1, @@ -3092,7 +5673,7 @@ }, { "name" : "FabricIngress.forwarding.routing_v4", - "id" : 7, + "id" : 17, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 108, @@ -3103,7 +5684,7 @@ { "match_type" : "lpm", "name" : "ipv4_dst", - "target" : ["scalars", "fabric_metadata_t.ipv4_dst_addr"], + "target" : ["scalars", "userMetadata._ipv4_dst_addr24"], "mask" : null } ], @@ -3113,13 +5694,13 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [13, 14, 2], + "action_ids" : [14, 15, 2], "actions" : ["FabricIngress.forwarding.set_next_id_routing_v4", "FabricIngress.forwarding.nop_routing_v4", "nop"], - "base_default_next" : "FabricIngress.acl.acl", + "base_default_next" : "node_35", "next_tables" : { - "FabricIngress.forwarding.set_next_id_routing_v4" : "FabricIngress.acl.acl", - "FabricIngress.forwarding.nop_routing_v4" : "FabricIngress.acl.acl", - "nop" : "FabricIngress.acl.acl" + "FabricIngress.forwarding.set_next_id_routing_v4" : "node_35", + "FabricIngress.forwarding.nop_routing_v4" : "node_35", + "nop" : "node_35" }, "default_entry" : { "action_id" : 2, @@ -3128,12 +5709,86 @@ "action_entry_const" : false } }, + { + "name" : "FabricIngress.pre_next.next_mpls", + "id" : 18, + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 36, + "column" : 10, + "source_fragment" : "next_mpls" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._next_id17"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [16, 3], + "actions" : ["FabricIngress.pre_next.set_mpls_label", "nop"], + "base_default_next" : "FabricIngress.pre_next.next_vlan", + "next_tables" : { + "FabricIngress.pre_next.set_mpls_label" : "FabricIngress.pre_next.next_vlan", + "nop" : "FabricIngress.pre_next.next_vlan" + }, + "default_entry" : { + "action_id" : 3, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.pre_next.next_vlan", + "id" : 19, + "source_info" : { + "filename" : "include/control/pre_next.p4", + "line" : 73, + "column" : 10, + "source_fragment" : "next_vlan" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._next_id17"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [17, 4], + "actions" : ["FabricIngress.pre_next.set_vlan", "nop"], + "base_default_next" : "FabricIngress.acl.acl", + "next_tables" : { + "FabricIngress.pre_next.set_vlan" : "FabricIngress.acl.acl", + "nop" : "FabricIngress.acl.acl" + }, + "default_entry" : { + "action_id" : 4, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, { "name" : "FabricIngress.acl.acl", - "id" : 8, + "id" : 20, "source_info" : { "filename" : "include/control/acl.p4", - "line" : 60, + "line" : 59, "column" : 10, "source_fragment" : "acl" }, @@ -3144,24 +5799,6 @@ "target" : ["standard_metadata", "ingress_port"], "mask" : null }, - { - "match_type" : "ternary", - "name" : "ip_proto", - "target" : ["scalars", "fabric_metadata_t.ip_proto"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "l4_sport", - "target" : ["scalars", "fabric_metadata_t.l4_sport"], - "mask" : null - }, - { - "match_type" : "ternary", - "name" : "l4_dport", - "target" : ["scalars", "fabric_metadata_t.l4_dport"], - "mask" : null - }, { "match_type" : "ternary", "name" : "eth_dst", @@ -3189,13 +5826,19 @@ { "match_type" : "ternary", "name" : "ipv4_src", - "target" : ["ipv4", "src_addr"], + "target" : ["scalars", "userMetadata._lkp_ipv4_src1"], "mask" : null }, { "match_type" : "ternary", "name" : "ipv4_dst", - "target" : ["ipv4", "dst_addr"], + "target" : ["scalars", "userMetadata._lkp_ipv4_dst2"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._lkp_ip_proto3"], "mask" : null }, { @@ -3209,6 +5852,24 @@ "name" : "icmp_code", "target" : ["icmp", "icmp_code"], "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._lkp_l4_sport4"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._lkp_l4_dport5"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "port_type", + "target" : ["scalars", "userMetadata._port_type29"], + "mask" : null } ], "match_type" : "ternary", @@ -3217,18 +5878,18 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [15, 16, 17, 18, 19], + "action_ids" : [18, 19, 20, 21, 22], "actions" : ["FabricIngress.acl.set_next_id_acl", "FabricIngress.acl.punt_to_cpu", "FabricIngress.acl.set_clone_session_id", "FabricIngress.acl.drop", "FabricIngress.acl.nop_acl"], - "base_default_next" : "node_18", + "base_default_next" : "node_39", "next_tables" : { - "FabricIngress.acl.set_next_id_acl" : "node_18", - "FabricIngress.acl.punt_to_cpu" : "node_18", - "FabricIngress.acl.set_clone_session_id" : "node_18", - "FabricIngress.acl.drop" : "node_18", - "FabricIngress.acl.nop_acl" : "node_18" + "FabricIngress.acl.set_next_id_acl" : "node_39", + "FabricIngress.acl.punt_to_cpu" : "node_39", + "FabricIngress.acl.set_clone_session_id" : "node_39", + "FabricIngress.acl.drop" : "node_39", + "FabricIngress.acl.nop_acl" : "node_39" }, "default_entry" : { - "action_id" : 19, + "action_id" : 22, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -3236,10 +5897,10 @@ }, { "name" : "FabricIngress.next.xconnect", - "id" : 9, + "id" : 21, "source_info" : { "filename" : "include/control/next.p4", - "line" : 119, + "line" : 68, "column" : 10, "source_fragment" : "xconnect" }, @@ -3253,7 +5914,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t.next_id"], + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], @@ -3263,7 +5924,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [21, 22, 4], + "action_ids" : [23, 24, 5], "actions" : ["FabricIngress.next.output_xconnect", "FabricIngress.next.set_next_id_xconnect", "nop"], "base_default_next" : "FabricIngress.next.hashed", "next_tables" : { @@ -3272,7 +5933,7 @@ "nop" : "FabricIngress.next.hashed" }, "default_entry" : { - "action_id" : 4, + "action_id" : 5, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -3280,10 +5941,10 @@ }, { "name" : "FabricIngress.next.hashed", - "id" : 10, + "id" : 22, "source_info" : { "filename" : "include/control/next.p4", - "line" : 202, + "line" : 138, "column" : 10, "source_fragment" : "hashed" }, @@ -3291,7 +5952,7 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t.next_id"], + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], @@ -3302,22 +5963,21 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [23, 24, 25, 5], - "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "FabricIngress.next.mpls_routing_hashed", "nop"], + "action_ids" : [25, 26, 6], + "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "nop"], "base_default_next" : "FabricIngress.next.multicast", "next_tables" : { "FabricIngress.next.output_hashed" : "FabricIngress.next.multicast", "FabricIngress.next.routing_hashed" : "FabricIngress.next.multicast", - "FabricIngress.next.mpls_routing_hashed" : "FabricIngress.next.multicast", "nop" : "FabricIngress.next.multicast" } }, { "name" : "FabricIngress.next.multicast", - "id" : 11, + "id" : 23, "source_info" : { "filename" : "include/control/next.p4", - "line" : 236, + "line" : 171, "column" : 10, "source_fragment" : "multicast" }, @@ -3325,75 +5985,96 @@ { "match_type" : "exact", "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t.next_id"], + "target" : ["scalars", "userMetadata._next_id17"], "mask" : null } ], "match_type" : "exact", "type" : "simple", "max_size" : 1024, - "with_counters" : true, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [27, 7], + "actions" : ["FabricIngress.next.set_mcast_group_id", "nop"], + "base_default_next" : "node_43", + "next_tables" : { + "FabricIngress.next.set_mcast_group_id" : "node_43", + "nop" : "node_43" + }, + "default_entry" : { + "action_id" : 7, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_port_counter31", + "id" : 24, + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 31, + "column" : 12, + "source_fragment" : "egress_port_counter.count((bit<32>)standard_metadata.egress_spec)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [26, 6], - "actions" : ["FabricIngress.next.set_mcast_group_id", "nop"], - "base_default_next" : "FabricIngress.next.next_vlan", + "action_ids" : [44], + "actions" : ["port_counter31"], + "base_default_next" : "node_45", "next_tables" : { - "FabricIngress.next.set_mcast_group_id" : "FabricIngress.next.next_vlan", - "nop" : "FabricIngress.next.next_vlan" + "port_counter31" : "node_45" }, "default_entry" : { - "action_id" : 6, + "action_id" : 44, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "FabricIngress.next.next_vlan", - "id" : 12, + "name" : "tbl_port_counter34", + "id" : 25, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 86, - "column" : 10, - "source_fragment" : "next_vlan" + "filename" : "include/control/port_counter.p4", + "line" : 34, + "column" : 12, + "source_fragment" : "ingress_port_counter.count((bit<32>)standard_metadata.ingress_port)" }, - "key" : [ - { - "match_type" : "exact", - "name" : "next_id", - "target" : ["scalars", "fabric_metadata_t.next_id"], - "mask" : null - } - ], + "key" : [], "match_type" : "exact", "type" : "simple", "max_size" : 1024, - "with_counters" : true, + "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [20, 3], - "actions" : ["FabricIngress.next.set_vlan", "nop"], - "base_default_next" : "node_23", + "action_ids" : [45], + "actions" : ["port_counter34"], + "base_default_next" : "tbl_slicing114", "next_tables" : { - "FabricIngress.next.set_vlan" : "node_23", - "nop" : "node_23" + "port_counter34" : "tbl_slicing114" }, "default_entry" : { - "action_id" : 3, + "action_id" : 45, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_2", - "id" : 13, + "name" : "tbl_slicing114", + "id" : 26, "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 31, - "column" : 12, - "source_fragment" : "egress_port_counter.count((bit<32>)standard_metadata.egress_spec)" + "filename" : "include/control/slicing.p4", + "line" : 114, + "column" : 8, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) slice_tc, fabric_md.packet_color); ..." }, "key" : [], "match_type" : "exact", @@ -3402,45 +6083,65 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [30], - "actions" : ["act_2"], - "base_default_next" : "node_25", + "action_ids" : [46], + "actions" : ["slicing114"], + "base_default_next" : "FabricIngress.qos.queues", "next_tables" : { - "act_2" : "node_25" + "slicing114" : "FabricIngress.qos.queues" }, "default_entry" : { - "action_id" : 30, + "action_id" : 46, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_3", - "id" : 14, + "name" : "FabricIngress.qos.queues", + "id" : 27, "source_info" : { - "filename" : "include/control/port_counter.p4", - "line" : 34, - "column" : 12, - "source_fragment" : "ingress_port_counter.count((bit<32>)standard_metadata.ingress_port)" + "filename" : "include/control/slicing.p4", + "line" : 93, + "column" : 10, + "source_fragment" : "queues" }, - "key" : [], - "match_type" : "exact", + "key" : [ + { + "match_type" : "exact", + "name" : "slice_id", + "target" : ["scalars", "userMetadata._slice_id25"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "tc", + "target" : ["scalars", "userMetadata._tc27"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "color", + "target" : ["scalars", "userMetadata._packet_color26"], + "mask" : null + } + ], + "match_type" : "ternary", "type" : "simple", - "max_size" : 1024, - "with_counters" : false, + "max_size" : 128, + "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [31], - "actions" : ["act_3"], + "action_ids" : [30, 31], + "actions" : ["FabricIngress.qos.set_queue", "FabricIngress.qos.meter_drop"], "base_default_next" : null, "next_tables" : { - "act_3" : null + "FabricIngress.qos.set_queue" : null, + "FabricIngress.qos.meter_drop" : null }, "default_entry" : { - "action_id" : 31, + "action_id" : 30, "action_const" : true, - "action_data" : [], + "action_data" : ["0x0"], "action_entry_const" : true } } @@ -3451,7 +6152,7 @@ "id" : 0, "source_info" : { "filename" : "include/control/next.p4", - "line" : 183, + "line" : 125, "column" : 57, "source_fragment" : "hashed_selector" }, @@ -3461,23 +6162,23 @@ "input" : [ { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.ipv4_src_addr"] + "value" : ["scalars", "userMetadata._ipv4_src_addr23"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.ipv4_dst_addr"] + "value" : ["scalars", "userMetadata._ipv4_dst_addr24"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.ip_proto"] + "value" : ["scalars", "userMetadata._ip_proto20"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.l4_sport"] + "value" : ["scalars", "userMetadata._l4_sport21"] }, { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.l4_dport"] + "value" : ["scalars", "userMetadata._l4_dport22"] } ] } @@ -3485,8 +6186,192 @@ ], "conditionals" : [ { - "name" : "node_2", + "name" : "node_3", "id" : 0, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 31, + "column" : 12, + "source_fragment" : "hdr.inner_ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init32", + "false_next" : "node_11" + }, + { + "name" : "node_5", + "id" : 1, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 36, + "column" : 16, + "source_fragment" : "hdr.inner_tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_tcp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init37", + "false_next" : "node_7" + }, + { + "name" : "node_7", + "id" : 2, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 39, + "column" : 23, + "source_fragment" : "hdr.inner_udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_udp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init40", + "false_next" : "node_9" + }, + { + "name" : "node_9", + "id" : 3, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 42, + "column" : 23, + "source_fragment" : "hdr.inner_icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["inner_icmp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init43", + "false_next" : "node_19" + }, + { + "name" : "node_11", + "id" : 4, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 46, + "column" : 19, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["ipv4", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init47", + "false_next" : "node_19" + }, + { + "name" : "node_13", + "id" : 5, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 51, + "column" : 16, + "source_fragment" : "hdr.tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["tcp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init52", + "false_next" : "node_15" + }, + { + "name" : "node_15", + "id" : 6, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 54, + "column" : 23, + "source_fragment" : "hdr.udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["udp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init55", + "false_next" : "node_17" + }, + { + "name" : "node_17", + "id" : 7, + "source_info" : { + "filename" : "include/control/lookup_md_init.p4", + "line" : 57, + "column" : 23, + "source_fragment" : "hdr.icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["icmp", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init58", + "false_next" : "node_19" + }, + { + "name" : "node_19", + "id" : 8, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 24, @@ -3504,15 +6389,15 @@ } } }, - "true_next" : "tbl_act", - "false_next" : "node_4" + "true_next" : "tbl_packetio25", + "false_next" : "FabricIngress.slice_tc_classifier.classifier" }, { - "name" : "node_4", - "id" : 1, + "name" : "node_22", + "id" : 9, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 110, + "line" : 112, "column" : 12, "source_fragment" : "hdr.vlan_tag.isValid()" }, @@ -3527,15 +6412,15 @@ } } }, - "true_next" : "tbl_act_0", - "false_next" : "node_6" + "true_next" : "tbl_filtering113", + "false_next" : "node_24" }, { - "name" : "node_6", - "id" : 2, + "name" : "node_24", + "id" : 10, "source_info" : { "filename" : "include/control/filtering.p4", - "line" : 122, + "line" : 124, "column" : 12, "source_fragment" : "!hdr.mpls.isValid()" }, @@ -3557,45 +6442,42 @@ } } }, - "true_next" : "tbl_act_1", + "true_next" : "tbl_filtering129", "false_next" : "FabricIngress.filtering.ingress_port_vlan" }, { - "name" : "node_10", - "id" : 3, + "name" : "node_28", + "id" : 11, "source_info" : { "filename" : "fabric.p4", - "line" : 69, + "line" : 80, "column" : 12, - "source_fragment" : "fabric_metadata.skip_forwarding == false" + "source_fragment" : "fabric_metadata.skip_forwarding" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.skip_forwarding"] + "value" : ["scalars", "userMetadata._skip_forwarding14"] } } - }, - "right" : { - "type" : "bool", - "value" : false } } }, - "true_next" : "node_11", - "false_next" : "FabricIngress.acl.acl" + "true_next" : "node_29", + "false_next" : "node_35" }, { - "name" : "node_11", - "id" : 4, + "name" : "node_29", + "id" : 12, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 150, @@ -3608,7 +6490,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.fwd_type"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -3617,11 +6499,11 @@ } }, "true_next" : "FabricIngress.forwarding.bridging", - "false_next" : "node_13" + "false_next" : "node_31" }, { - "name" : "node_13", - "id" : 5, + "name" : "node_31", + "id" : 13, "source_info" : { "filename" : "include/control/forwarding.p4", "line" : 151, @@ -3634,7 +6516,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.fwd_type"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -3643,70 +6525,97 @@ } }, "true_next" : "FabricIngress.forwarding.mpls", - "false_next" : "node_15" + "false_next" : "node_33" }, { - "name" : "node_15", - "id" : 6, + "name" : "node_33", + "id" : 14, + "source_info" : { + "filename" : "include/control/forwarding.p4", + "line" : 152, + "column" : 17, + "source_fragment" : "fabric_metadata.fwd_type == FWD_IPV4_UNICAST" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._fwd_type16"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x02" + } + } + }, + "true_next" : "FabricIngress.forwarding.routing_v4", + "false_next" : "node_35" + }, + { + "name" : "node_35", + "id" : 15, "source_info" : { - "filename" : "include/control/forwarding.p4", - "line" : 152, - "column" : 17, - "source_fragment" : "fabric_metadata.fwd_type == FWD_IPV4_UNICAST" + "filename" : "fabric.p4", + "line" : 83, + "column" : 12, + "source_fragment" : "fabric_metadata.skip_next" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.fwd_type"] - }, + "op" : "not", + "left" : null, "right" : { - "type" : "hexstr", - "value" : "0x02" + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_next15"] + } + } } } }, - "true_next" : "FabricIngress.forwarding.routing_v4", + "true_next" : "FabricIngress.pre_next.next_mpls", "false_next" : "FabricIngress.acl.acl" }, { - "name" : "node_18", - "id" : 7, + "name" : "node_39", + "id" : 16, "source_info" : { "filename" : "fabric.p4", - "line" : 73, + "line" : 87, "column" : 12, - "source_fragment" : "fabric_metadata.skip_next == false" + "source_fragment" : "fabric_metadata.skip_next" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { + "op" : "not", + "left" : null, + "right" : { "type" : "expression", "value" : { "op" : "d2b", "left" : null, "right" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.skip_next"] + "value" : ["scalars", "userMetadata._skip_next15"] } } - }, - "right" : { - "type" : "bool", - "value" : false } } }, - "false_next" : null, - "true_next" : "FabricIngress.next.xconnect" + "true_next" : "FabricIngress.next.xconnect", + "false_next" : "tbl_slicing114" }, { - "name" : "node_23", - "id" : 8, + "name" : "node_43", + "id" : 17, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 30, @@ -3727,12 +6636,12 @@ } } }, - "true_next" : "tbl_act_2", - "false_next" : "node_25" + "true_next" : "tbl_port_counter31", + "false_next" : "node_45" }, { - "name" : "node_25", - "id" : 9, + "name" : "node_45", + "id" : 18, "source_info" : { "filename" : "include/control/port_counter.p4", "line" : 33, @@ -3753,8 +6662,8 @@ } } }, - "false_next" : null, - "true_next" : "tbl_act_3" + "true_next" : "tbl_port_counter34", + "false_next" : "tbl_slicing114" } ] }, @@ -3763,15 +6672,15 @@ "id" : 1, "source_info" : { "filename" : "fabric.p4", - "line" : 91, + "line" : 105, "column" : 8, "source_fragment" : "FabricEgress" }, - "init_table" : "node_29", + "init_table" : "node_51", "tables" : [ { - "name" : "tbl_act_4", - "id" : 15, + "name" : "tbl_packetio41", + "id" : 28, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 41, @@ -3785,22 +6694,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [37], - "actions" : ["act_4"], - "base_default_next" : "node_31", + "action_ids" : [55], + "actions" : ["packetio41"], + "base_default_next" : "node_53", "next_tables" : { - "act_4" : "node_31" + "packetio41" : "node_53" }, "default_entry" : { - "action_id" : 37, + "action_id" : 55, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_5", - "id" : 16, + "name" : "tbl_packetio44", + "id" : 29, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 44, @@ -3814,25 +6723,25 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [38], - "actions" : ["act_5"], - "base_default_next" : "node_33", + "action_ids" : [56], + "actions" : ["packetio44"], + "base_default_next" : "node_55", "next_tables" : { - "act_5" : "node_33" + "packetio44" : "node_55" }, "default_entry" : { - "action_id" : 38, + "action_id" : 56, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_6", - "id" : 17, + "name" : "tbl_next283", + "id" : 30, "source_info" : { "filename" : "include/control/next.p4", - "line" : 337, + "line" : 283, "column" : 12, "source_fragment" : "mark_to_drop(standard_metadata)" }, @@ -3843,14 +6752,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [39], - "actions" : ["act_6"], - "base_default_next" : "node_35", + "action_ids" : [57], + "actions" : ["next283"], + "base_default_next" : "node_57", "next_tables" : { - "act_6" : "node_35" + "next283" : "node_57" }, "default_entry" : { - "action_id" : 39, + "action_id" : 57, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -3858,10 +6767,10 @@ }, { "name" : "tbl_egress_next_pop_mpls_if_present", - "id" : 18, + "id" : 31, "source_info" : { "filename" : "include/control/next.p4", - "line" : 341, + "line" : 287, "column" : 36, "source_fragment" : "pop_mpls_if_present()" }, @@ -3872,14 +6781,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [33], + "action_ids" : [48], "actions" : ["FabricEgress.egress_next.pop_mpls_if_present"], "base_default_next" : "FabricEgress.egress_next.egress_vlan", "next_tables" : { "FabricEgress.egress_next.pop_mpls_if_present" : "FabricEgress.egress_next.egress_vlan" }, "default_entry" : { - "action_id" : 33, + "action_id" : 48, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -3887,10 +6796,10 @@ }, { "name" : "tbl_egress_next_set_mpls", - "id" : 19, + "id" : 32, "source_info" : { "filename" : "include/control/next.p4", - "line" : 343, + "line" : 289, "column" : 12, "source_fragment" : "set_mpls()" }, @@ -3901,14 +6810,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [34], + "action_ids" : [49], "actions" : ["FabricEgress.egress_next.set_mpls"], "base_default_next" : "FabricEgress.egress_next.egress_vlan", "next_tables" : { "FabricEgress.egress_next.set_mpls" : "FabricEgress.egress_next.egress_vlan" }, "default_entry" : { - "action_id" : 34, + "action_id" : 49, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -3916,10 +6825,10 @@ }, { "name" : "FabricEgress.egress_next.egress_vlan", - "id" : 20, + "id" : 33, "source_info" : { "filename" : "include/control/next.p4", - "line" : 320, + "line" : 265, "column" : 10, "source_fragment" : "egress_vlan" }, @@ -3927,7 +6836,7 @@ { "match_type" : "exact", "name" : "vlan_id", - "target" : ["scalars", "fabric_metadata_t.vlan_id"], + "target" : ["scalars", "userMetadata._vlan_id9"], "mask" : null }, { @@ -3943,23 +6852,30 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [36, 32], - "actions" : ["FabricEgress.egress_next.pop_vlan", "nop"], - "base_default_next" : null, + "action_ids" : [50, 51, 52], + "actions" : ["FabricEgress.egress_next.push_vlan", "FabricEgress.egress_next.pop_vlan", "FabricEgress.egress_next.drop"], + "base_default_next" : "node_62", "next_tables" : { - "__HIT__" : "tbl_act_7", - "__MISS__" : "tbl_act_8" + "FabricEgress.egress_next.push_vlan" : "node_62", + "FabricEgress.egress_next.pop_vlan" : "node_62", + "FabricEgress.egress_next.drop" : "node_62" }, "default_entry" : { - "action_id" : 32, + "action_id" : 52, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_7", - "id" : 21, + "name" : "tbl_next309", + "id" : 34, + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 309, + "column" : 25, + "source_fragment" : "=" + }, "key" : [], "match_type" : "exact", "type" : "simple", @@ -3967,22 +6883,28 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [40], - "actions" : ["act_7"], - "base_default_next" : "node_42", + "action_ids" : [59], + "actions" : ["next309"], + "base_default_next" : "node_64", "next_tables" : { - "act_7" : "node_42" + "next309" : "node_64" }, "default_entry" : { - "action_id" : 40, + "action_id" : 59, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_8", - "id" : 22, + "name" : "tbl_next310", + "id" : 35, + "source_info" : { + "filename" : "include/control/next.p4", + "line" : 310, + "column" : 35, + "source_fragment" : "mark_to_drop(standard_metadata)" + }, "key" : [], "match_type" : "exact", "type" : "simple", @@ -3990,27 +6912,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [41], - "actions" : ["act_8"], - "base_default_next" : "node_42", + "action_ids" : [58], + "actions" : ["next310"], + "base_default_next" : "tbl_slicing126", "next_tables" : { - "act_8" : "node_42" + "next310" : "tbl_slicing126" }, "default_entry" : { - "action_id" : 41, + "action_id" : 58, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_egress_next_push_vlan", - "id" : 23, + "name" : "tbl_next313", + "id" : 36, "source_info" : { "filename" : "include/control/next.p4", - "line" : 360, - "column" : 20, - "source_fragment" : "push_vlan()" + "line" : 313, + "column" : 29, + "source_fragment" : "=" }, "key" : [], "match_type" : "exact", @@ -4019,27 +6941,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [35], - "actions" : ["FabricEgress.egress_next.push_vlan"], - "base_default_next" : "node_45", + "action_ids" : [61], + "actions" : ["next313"], + "base_default_next" : "node_68", "next_tables" : { - "FabricEgress.egress_next.push_vlan" : "node_45" + "next313" : "node_68" }, "default_entry" : { - "action_id" : 35, + "action_id" : 61, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_9", - "id" : 24, + "name" : "tbl_next314", + "id" : 37, "source_info" : { "filename" : "include/control/next.p4", - "line" : 369, - "column" : 25, - "source_fragment" : "=" + "line" : 314, + "column" : 39, + "source_fragment" : "mark_to_drop(standard_metadata)" }, "key" : [], "match_type" : "exact", @@ -4048,27 +6970,27 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [43], - "actions" : ["act_10"], - "base_default_next" : "node_47", + "action_ids" : [60], + "actions" : ["next314"], + "base_default_next" : "tbl_slicing126", "next_tables" : { - "act_10" : "node_47" + "next314" : "tbl_slicing126" }, "default_entry" : { - "action_id" : 43, + "action_id" : 60, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_10", - "id" : 25, + "name" : "tbl_slicing126", + "id" : 38, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 370, - "column" : 35, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/control/slicing.p4", + "line" : 126, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.dscp;" }, "key" : [], "match_type" : "exact", @@ -4077,56 +6999,64 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [42], - "actions" : ["act_9"], - "base_default_next" : null, + "action_ids" : [63], + "actions" : ["slicing126"], + "base_default_next" : "FabricEgress.dscp_rewriter.rewriter", "next_tables" : { - "act_9" : null + "slicing126" : "FabricEgress.dscp_rewriter.rewriter" }, "default_entry" : { - "action_id" : 42, + "action_id" : 63, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_11", - "id" : 26, + "name" : "FabricEgress.dscp_rewriter.rewriter", + "id" : 39, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 373, - "column" : 29, - "source_fragment" : "=" + "filename" : "include/control/slicing.p4", + "line" : 138, + "column" : 10, + "source_fragment" : "rewriter" }, - "key" : [], + "key" : [ + { + "match_type" : "exact", + "name" : "eg_port", + "target" : ["standard_metadata", "egress_port"], + "mask" : null + } + ], "match_type" : "exact", "type" : "simple", - "max_size" : 1024, + "max_size" : 512, "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [45], - "actions" : ["act_12"], - "base_default_next" : "node_51", + "action_ids" : [53, 54, 47], + "actions" : ["FabricEgress.dscp_rewriter.rewrite", "FabricEgress.dscp_rewriter.clear", "nop"], + "base_default_next" : null, "next_tables" : { - "act_12" : "node_51" + "__MISS__" : null, + "__HIT__" : "node_72" }, "default_entry" : { - "action_id" : 45, + "action_id" : 47, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_12", - "id" : 27, + "name" : "tbl_slicing159", + "id" : 40, "source_info" : { - "filename" : "include/control/next.p4", - "line" : 374, - "column" : 39, - "source_fragment" : "mark_to_drop(standard_metadata)" + "filename" : "include/control/slicing.p4", + "line" : 159, + "column" : 36, + "source_fragment" : "=" }, "key" : [], "match_type" : "exact", @@ -4135,14 +7065,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [44], - "actions" : ["act_11"], + "action_ids" : [62], + "actions" : ["slicing159"], "base_default_next" : null, "next_tables" : { - "act_11" : null + "slicing159" : null }, "default_entry" : { - "action_id" : 44, + "action_id" : 62, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4152,41 +7082,31 @@ "action_profiles" : [], "conditionals" : [ { - "name" : "node_29", - "id" : 10, + "name" : "node_51", + "id" : 19, "source_info" : { - "filename" : "include/control/packetio.p4", - "line" : 39, - "column" : 12, - "source_fragment" : "fabric_metadata.is_controller_packet_out == true" + "filename" : "fabric.p4", + "line" : 118, + "column" : 33, + "source_fragment" : "fabric_metadata" }, "expression" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.is_controller_packet_out"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._is_controller_packet_out19"] } } }, - "true_next" : "tbl_act_4", - "false_next" : "node_31" + "true_next" : "tbl_packetio41", + "false_next" : "node_53" }, { - "name" : "node_31", - "id" : 11, + "name" : "node_53", + "id" : 20, "source_info" : { "filename" : "include/control/packetio.p4", "line" : 43, @@ -4207,15 +7127,15 @@ } } }, - "true_next" : "tbl_act_5", - "false_next" : "node_33" + "true_next" : "tbl_packetio44", + "false_next" : "node_55" }, { - "name" : "node_33", - "id" : 12, + "name" : "node_55", + "id" : 21, "source_info" : { "filename" : "include/control/next.p4", - "line" : 335, + "line" : 281, "column" : 12, "source_fragment" : "fabric_metadata.is_multicast == true ..." }, @@ -4226,21 +7146,11 @@ "left" : { "type" : "expression", "value" : { - "op" : "==", - "left" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.is_multicast"] - } - } - }, + "op" : "d2b", + "left" : null, "right" : { - "type" : "bool", - "value" : true + "type" : "field", + "value" : ["scalars", "userMetadata._is_multicast18"] } } }, @@ -4260,15 +7170,15 @@ } } }, - "true_next" : "tbl_act_6", - "false_next" : "node_35" + "true_next" : "tbl_next283", + "false_next" : "node_57" }, { - "name" : "node_35", - "id" : 13, + "name" : "node_57", + "id" : 22, "source_info" : { "filename" : "include/control/next.p4", - "line" : 340, + "line" : 286, "column" : 12, "source_fragment" : "fabric_metadata.mpls_label == 0" }, @@ -4278,7 +7188,7 @@ "op" : "==", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.mpls_label"] + "value" : ["scalars", "userMetadata._mpls_label12"] }, "right" : { "type" : "hexstr", @@ -4286,15 +7196,15 @@ } } }, - "true_next" : "node_36", + "true_next" : "node_58", "false_next" : "tbl_egress_next_set_mpls" }, { - "name" : "node_36", - "id" : 14, + "name" : "node_58", + "id" : 23, "source_info" : { "filename" : "include/control/next.p4", - "line" : 341, + "line" : 287, "column" : 16, "source_fragment" : "hdr.mpls.isValid()" }, @@ -4313,67 +7223,11 @@ "false_next" : "FabricEgress.egress_next.egress_vlan" }, { - "name" : "node_42", - "id" : 15, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 357, - "column" : 16, - "source_fragment" : "!egress_vlan.apply().hit" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "not", - "left" : null, - "right" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["scalars", "egress_next_tmp"] - } - } - } - } - }, - "true_next" : "node_43", - "false_next" : "node_45" - }, - { - "name" : "node_43", - "id" : 16, - "source_info" : { - "filename" : "include/control/next.p4", - "line" : 359, - "column" : 20, - "source_fragment" : "fabric_metadata.vlan_id != DEFAULT_VLAN_ID" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "!=", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.vlan_id"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x0ffe" - } - } - }, - "true_next" : "tbl_egress_next_push_vlan", - "false_next" : "node_45" - }, - { - "name" : "node_45", - "id" : 17, + "name" : "node_62", + "id" : 24, "source_info" : { "filename" : "include/control/next.p4", - "line" : 368, + "line" : 308, "column" : 12, "source_fragment" : "hdr.mpls.isValid()" }, @@ -4388,15 +7242,15 @@ } } }, - "true_next" : "tbl_act_9", - "false_next" : "node_49" + "true_next" : "tbl_next309", + "false_next" : "node_66" }, { - "name" : "node_47", - "id" : 18, + "name" : "node_64", + "id" : 25, "source_info" : { "filename" : "include/control/next.p4", - "line" : 370, + "line" : 310, "column" : 16, "source_fragment" : "hdr.mpls.ttl == 0" }, @@ -4414,15 +7268,15 @@ } } }, - "false_next" : null, - "true_next" : "tbl_act_10" + "true_next" : "tbl_next310", + "false_next" : "tbl_slicing126" }, { - "name" : "node_49", - "id" : 19, + "name" : "node_66", + "id" : 26, "source_info" : { "filename" : "include/control/next.p4", - "line" : 372, + "line" : 312, "column" : 15, "source_fragment" : "hdr.ipv4.isValid() && fabric_metadata.fwd_type != FWD_BRIDGING" }, @@ -4447,7 +7301,7 @@ "op" : "!=", "left" : { "type" : "field", - "value" : ["scalars", "fabric_metadata_t.fwd_type"] + "value" : ["scalars", "userMetadata._fwd_type16"] }, "right" : { "type" : "hexstr", @@ -4457,15 +7311,15 @@ } } }, - "false_next" : null, - "true_next" : "tbl_act_11" + "true_next" : "tbl_next313", + "false_next" : "tbl_slicing126" }, { - "name" : "node_51", - "id" : 20, + "name" : "node_68", + "id" : 27, "source_info" : { "filename" : "include/control/next.p4", - "line" : 374, + "line" : 314, "column" : 20, "source_fragment" : "hdr.ipv4.ttl == 0" }, @@ -4483,8 +7337,31 @@ } } }, + "true_next" : "tbl_next314", + "false_next" : "tbl_slicing126" + }, + { + "name" : "node_72", + "id" : 28, + "source_info" : { + "filename" : "include/control/slicing.p4", + "line" : 158, + "column" : 16, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["ipv4", "$valid$"] + } + } + }, "false_next" : null, - "true_next" : "tbl_act_12" + "true_next" : "tbl_slicing159" } ] } @@ -4570,26 +7447,14 @@ "intrinsic_metadata.egress_global_timestamp", ["standard_metadata", "egress_global_timestamp"] ], - [ - "intrinsic_metadata.lf_field_list", - ["standard_metadata", "lf_field_list"] - ], [ "intrinsic_metadata.mcast_grp", ["standard_metadata", "mcast_grp"] ], - [ - "intrinsic_metadata.resubmit_flag", - ["standard_metadata", "resubmit_flag"] - ], [ "intrinsic_metadata.egress_rid", ["standard_metadata", "egress_rid"] ], - [ - "intrinsic_metadata.recirculate_flag", - ["standard_metadata", "recirculate_flag"] - ], [ "intrinsic_metadata.priority", ["standard_metadata", "priority"] @@ -4597,7 +7462,7 @@ ], "program" : "fabric.p4", "__meta__" : { - "version" : [2, 18], + "version" : [2, 23], "compiler" : "https://github.com/p4lang/p4c" } } \ No newline at end of file diff --git a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/p4info.txt b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/p4info.txt index d036bed7af5..a21c8cc3266 100644 --- a/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/p4info.txt +++ b/pipelines/fabric/impl/src/main/resources/p4c-out/fabric/bmv2/default/p4info.txt @@ -3,7 +3,7 @@ pkg_info { } tables { preamble { - id: 33611649 + id: 43310977 name: "FabricIngress.filtering.ingress_port_vlan" alias: "ingress_port_vlan" } @@ -26,21 +26,21 @@ tables { match_type: TERNARY } action_refs { - id: 16836487 + id: 17164167 } action_refs { - id: 16818236 + id: 24158268 } action_refs { - id: 16794911 + id: 24266015 } - const_default_action_id: 16836487 - direct_resource_ids: 318815501 + const_default_action_id: 17164167 + direct_resource_ids: 326221069 size: 1024 } tables { preamble { - id: 33596298 + id: 49718154 name: "FabricIngress.filtering.fwd_classifier" alias: "fwd_classifier" } @@ -69,15 +69,15 @@ tables { match_type: EXACT } action_refs { - id: 16840921 + id: 25032921 } - const_default_action_id: 16840921 - direct_resource_ids: 318827326 + const_default_action_id: 25032921 + direct_resource_ids: 335473470 size: 1024 } tables { preamble { - id: 33596749 + id: 43623757 name: "FabricIngress.forwarding.bridging" alias: "bridging" } @@ -94,20 +94,20 @@ tables { match_type: TERNARY } action_refs { - id: 16811012 + id: 21791748 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318770289 + const_default_action_id: 28485346 + direct_resource_ids: 330959985 size: 1024 } tables { preamble { - id: 33574274 + id: 37768578 name: "FabricIngress.forwarding.mpls" alias: "mpls" } @@ -118,20 +118,20 @@ tables { match_type: EXACT } action_refs { - id: 16827758 + id: 30066030 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318830507 + const_default_action_id: 28485346 + direct_resource_ids: 318961579 size: 1024 } tables { preamble { - id: 33562650 + id: 41754650 name: "FabricIngress.forwarding.routing_v4" alias: "routing_v4" } @@ -142,13 +142,13 @@ tables { match_type: LPM } action_refs { - id: 16777434 + id: 19792090 } action_refs { - id: 16804187 + id: 29124955 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } @@ -156,7 +156,55 @@ tables { } tables { preamble { - id: 33618978 + id: 36626242 + name: "FabricIngress.pre_next.next_mpls" + alias: "next_mpls" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 22765924 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 330020245 + size: 1024 +} +tables { + preamble { + id: 48011802 + name: "FabricIngress.pre_next.next_vlan" + alias: "next_vlan" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 33475378 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 333692067 + size: 1024 +} +tables { + preamble { + id: 44104738 name: "FabricIngress.acl.acl" alias: "acl" } @@ -168,116 +216,98 @@ tables { } match_fields { id: 2 - name: "ip_proto" - bitwidth: 8 + name: "eth_dst" + bitwidth: 48 match_type: TERNARY } match_fields { id: 3 - name: "l4_sport" - bitwidth: 16 + name: "eth_src" + bitwidth: 48 match_type: TERNARY } match_fields { id: 4 - name: "l4_dport" - bitwidth: 16 + name: "vlan_id" + bitwidth: 12 match_type: TERNARY } match_fields { id: 5 - name: "eth_dst" - bitwidth: 48 + name: "eth_type" + bitwidth: 16 match_type: TERNARY } match_fields { id: 6 - name: "eth_src" - bitwidth: 48 + name: "ipv4_src" + bitwidth: 32 match_type: TERNARY } match_fields { id: 7 - name: "vlan_id" - bitwidth: 12 + name: "ipv4_dst" + bitwidth: 32 match_type: TERNARY } match_fields { id: 8 - name: "eth_type" - bitwidth: 16 + name: "ip_proto" + bitwidth: 8 match_type: TERNARY } match_fields { id: 9 - name: "ipv4_src" - bitwidth: 32 + name: "icmp_type" + bitwidth: 8 match_type: TERNARY } match_fields { id: 10 - name: "ipv4_dst" - bitwidth: 32 + name: "icmp_code" + bitwidth: 8 match_type: TERNARY } match_fields { id: 11 - name: "icmp_type" - bitwidth: 8 + name: "l4_sport" + bitwidth: 16 match_type: TERNARY } match_fields { id: 12 - name: "icmp_code" - bitwidth: 8 + name: "l4_dport" + bitwidth: 16 match_type: TERNARY } - action_refs { - id: 16807382 - } - action_refs { - id: 16829684 + match_fields { + id: 13 + name: "port_type" + bitwidth: 2 + match_type: TERNARY } action_refs { - id: 16781601 + id: 23623126 } action_refs { - id: 16820765 + id: 23579892 } action_refs { - id: 16827694 - } - const_default_action_id: 16827694 - direct_resource_ids: 318801025 - size: 1024 -} -tables { - preamble { - id: 33599709 - name: "FabricIngress.next.next_vlan" - alias: "next_vlan" - } - match_fields { - id: 1 - name: "next_id" - bitwidth: 32 - match_type: EXACT + id: 16912673 } action_refs { - id: 16790685 + id: 23570973 } action_refs { - id: 16819938 - annotations: "@defaultonly" - scope: DEFAULT_ONLY + id: 29607214 } - const_default_action_id: 16819938 - direct_resource_ids: 318768144 + const_default_action_id: 29607214 + direct_resource_ids: 319194241 size: 1024 } tables { preamble { - id: 33596977 + id: 48735793 name: "FabricIngress.next.xconnect" alias: "xconnect" } @@ -294,23 +324,23 @@ tables { match_type: EXACT } action_refs { - id: 16842190 + id: 24640974 } action_refs { - id: 16837052 + id: 30599612 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318778156 + const_default_action_id: 28485346 + direct_resource_ids: 321989420 size: 1024 } tables { preamble { - id: 33608588 + id: 47960972 name: "FabricIngress.next.hashed" alias: "hashed" } @@ -321,27 +351,24 @@ tables { match_type: EXACT } action_refs { - id: 16815357 - } - action_refs { - id: 16791402 + id: 27301117 } action_refs { - id: 16779255 + id: 20985706 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - implementation_id: 285217164 - direct_resource_ids: 318800532 + const_default_action_id: 28485346 + implementation_id: 291115404 + direct_resource_ids: 322798228 size: 1024 } tables { preamble { - id: 33606828 + id: 40619180 name: "FabricIngress.next.multicast" alias: "multicast" } @@ -352,20 +379,106 @@ tables { match_type: EXACT } action_refs { - id: 16779917 + id: 21629581 } action_refs { - id: 16819938 + id: 28485346 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318801752 + const_default_action_id: 28485346 + direct_resource_ids: 319194968 size: 1024 } tables { preamble { - id: 33599342 + id: 34606298 + name: "FabricIngress.slice_tc_classifier.classifier" + alias: "classifier" + } + match_fields { + id: 1 + name: "ig_port" + bitwidth: 9 + match_type: TERNARY + } + match_fields { + id: 2 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 3 + name: "ipv4_dst" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 4 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 5 + name: "l4_sport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 6 + name: "l4_dport" + bitwidth: 16 + match_type: TERNARY + } + action_refs { + id: 23786376 + } + action_refs { + id: 25983516 + } + const_default_action_id: 23786376 + direct_resource_ids: 334706097 + size: 512 +} +tables { + preamble { + id: 36435258 + name: "FabricIngress.qos.queues" + alias: "queues" + } + match_fields { + id: 1 + name: "slice_id" + bitwidth: 4 + match_type: EXACT + } + match_fields { + id: 2 + name: "tc" + bitwidth: 2 + match_type: EXACT + } + match_fields { + id: 3 + name: "color" + bitwidth: 2 + match_type: TERNARY + } + action_refs { + id: 32116918 + } + action_refs { + id: 28214351 + } + const_default_action_id: 32116918 + direct_resource_ids: 327743278 + size: 128 +} +tables { + preamble { + id: 49262446 name: "FabricEgress.egress_next.egress_vlan" alias: "egress_vlan" } @@ -382,41 +495,75 @@ tables { match_type: EXACT } action_refs { - id: 16790030 + id: 30307755 + } + action_refs { + id: 17183246 } action_refs { - id: 16819938 + id: 30812542 annotations: "@defaultonly" scope: DEFAULT_ONLY } - const_default_action_id: 16819938 - direct_resource_ids: 318827144 + const_default_action_id: 30812542 + direct_resource_ids: 318892680 size: 1024 } +tables { + preamble { + id: 49970092 + name: "FabricEgress.dscp_rewriter.rewriter" + alias: "rewriter" + } + match_fields { + id: 1 + name: "eg_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 27951287 + } + action_refs { + id: 24120545 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + size: 512 +} actions { preamble { - id: 16819938 + id: 28485346 name: "nop" alias: "nop" } } actions { preamble { - id: 16836487 + id: 17164167 name: "FabricIngress.filtering.deny" alias: "deny" } } actions { preamble { - id: 16818236 + id: 24158268 name: "FabricIngress.filtering.permit" alias: "permit" } + params { + id: 1 + name: "port_type" + bitwidth: 2 + } } actions { preamble { - id: 16794911 + id: 24266015 name: "FabricIngress.filtering.permit_with_internal_vlan" alias: "permit_with_internal_vlan" } @@ -425,10 +572,15 @@ actions { name: "vlan_id" bitwidth: 12 } + params { + id: 2 + name: "port_type" + bitwidth: 2 + } } actions { preamble { - id: 16840921 + id: 25032921 name: "FabricIngress.filtering.set_forwarding_type" alias: "set_forwarding_type" } @@ -440,7 +592,7 @@ actions { } actions { preamble { - id: 16811012 + id: 21791748 name: "FabricIngress.forwarding.set_next_id_bridging" alias: "set_next_id_bridging" } @@ -452,7 +604,7 @@ actions { } actions { preamble { - id: 16827758 + id: 30066030 name: "FabricIngress.forwarding.pop_mpls_and_next" alias: "pop_mpls_and_next" } @@ -464,7 +616,7 @@ actions { } actions { preamble { - id: 16777434 + id: 19792090 name: "FabricIngress.forwarding.set_next_id_routing_v4" alias: "set_next_id_routing_v4" } @@ -476,14 +628,38 @@ actions { } actions { preamble { - id: 16804187 + id: 29124955 name: "FabricIngress.forwarding.nop_routing_v4" alias: "nop_routing_v4" } } actions { preamble { - id: 16807382 + id: 22765924 + name: "FabricIngress.pre_next.set_mpls_label" + alias: "set_mpls_label" + } + params { + id: 1 + name: "label" + bitwidth: 20 + } +} +actions { + preamble { + id: 33475378 + name: "FabricIngress.pre_next.set_vlan" + alias: "set_vlan" + } + params { + id: 1 + name: "vlan_id" + bitwidth: 12 + } +} +actions { + preamble { + id: 23623126 name: "FabricIngress.acl.set_next_id_acl" alias: "set_next_id_acl" } @@ -495,14 +671,14 @@ actions { } actions { preamble { - id: 16829684 + id: 23579892 name: "FabricIngress.acl.punt_to_cpu" alias: "punt_to_cpu" } } actions { preamble { - id: 16781601 + id: 16912673 name: "FabricIngress.acl.set_clone_session_id" alias: "set_clone_session_id" } @@ -514,33 +690,21 @@ actions { } actions { preamble { - id: 16820765 + id: 23570973 name: "FabricIngress.acl.drop" - alias: "drop" + alias: "acl.drop" } } actions { preamble { - id: 16827694 + id: 29607214 name: "FabricIngress.acl.nop_acl" alias: "nop_acl" } } actions { preamble { - id: 16790685 - name: "FabricIngress.next.set_vlan" - alias: "set_vlan" - } - params { - id: 1 - name: "vlan_id" - bitwidth: 12 - } -} -actions { - preamble { - id: 16842190 + id: 24640974 name: "FabricIngress.next.output_xconnect" alias: "output_xconnect" } @@ -552,7 +716,7 @@ actions { } actions { preamble { - id: 16837052 + id: 30599612 name: "FabricIngress.next.set_next_id_xconnect" alias: "set_next_id_xconnect" } @@ -564,7 +728,7 @@ actions { } actions { preamble { - id: 16815357 + id: 27301117 name: "FabricIngress.next.output_hashed" alias: "output_hashed" } @@ -576,7 +740,7 @@ actions { } actions { preamble { - id: 16791402 + id: 20985706 name: "FabricIngress.next.routing_hashed" alias: "routing_hashed" } @@ -598,64 +762,108 @@ actions { } actions { preamble { - id: 16779255 - name: "FabricIngress.next.mpls_routing_hashed" - alias: "mpls_routing_hashed" + id: 21629581 + name: "FabricIngress.next.set_mcast_group_id" + alias: "set_mcast_group_id" } params { id: 1 - name: "port_num" - bitwidth: 9 + name: "group_id" + bitwidth: 16 } - params { - id: 2 - name: "smac" - bitwidth: 48 +} +actions { + preamble { + id: 23786376 + name: "FabricIngress.slice_tc_classifier.set_slice_id_tc" + alias: "set_slice_id_tc" } params { - id: 3 - name: "dmac" - bitwidth: 48 + id: 1 + name: "slice_id" + bitwidth: 4 } params { - id: 4 - name: "label" - bitwidth: 20 + id: 2 + name: "tc" + bitwidth: 2 } } actions { preamble { - id: 16779917 - name: "FabricIngress.next.set_mcast_group_id" - alias: "set_mcast_group_id" + id: 25983516 + name: "FabricIngress.slice_tc_classifier.trust_dscp" + alias: "trust_dscp" + } +} +actions { + preamble { + id: 32116918 + name: "FabricIngress.qos.set_queue" + alias: "set_queue" } params { id: 1 - name: "group_id" - bitwidth: 16 + name: "qid" + bitwidth: 5 + } +} +actions { + preamble { + id: 28214351 + name: "FabricIngress.qos.meter_drop" + alias: "meter_drop" } } actions { preamble { - id: 16790030 + id: 30307755 + name: "FabricEgress.egress_next.push_vlan" + alias: "push_vlan" + } +} +actions { + preamble { + id: 17183246 name: "FabricEgress.egress_next.pop_vlan" alias: "pop_vlan" } } +actions { + preamble { + id: 30812542 + name: "FabricEgress.egress_next.drop" + alias: "egress_next.drop" + } +} +actions { + preamble { + id: 27951287 + name: "FabricEgress.dscp_rewriter.rewrite" + alias: "rewrite" + } +} +actions { + preamble { + id: 24120545 + name: "FabricEgress.dscp_rewriter.clear" + alias: "clear" + } +} action_profiles { preamble { - id: 285217164 + id: 291115404 name: "FabricIngress.next.hashed_selector" alias: "hashed_selector" } - table_ids: 33608588 + table_ids: 47960972 with_selector: true size: 1024 max_group_size: 16 } counters { preamble { - id: 302011205 + id: 314528581 name: "FabricIngress.port_counters_control.egress_port_counter" alias: "egress_port_counter" } @@ -666,7 +874,7 @@ counters { } counters { preamble { - id: 302002771 + id: 312947283 name: "FabricIngress.port_counters_control.ingress_port_counter" alias: "ingress_port_counter" } @@ -677,117 +885,161 @@ counters { } direct_counters { preamble { - id: 318815501 + id: 326221069 name: "FabricIngress.filtering.ingress_port_vlan_counter" alias: "ingress_port_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33611649 + direct_table_id: 43310977 } direct_counters { preamble { - id: 318827326 + id: 335473470 name: "FabricIngress.filtering.fwd_classifier_counter" alias: "fwd_classifier_counter" } spec { unit: BOTH } - direct_table_id: 33596298 + direct_table_id: 49718154 } direct_counters { preamble { - id: 318770289 + id: 330959985 name: "FabricIngress.forwarding.bridging_counter" alias: "bridging_counter" } spec { unit: BOTH } - direct_table_id: 33596749 + direct_table_id: 43623757 } direct_counters { preamble { - id: 318830507 + id: 318961579 name: "FabricIngress.forwarding.mpls_counter" alias: "mpls_counter" } spec { unit: BOTH } - direct_table_id: 33574274 + direct_table_id: 37768578 } direct_counters { preamble { - id: 318801025 - name: "FabricIngress.acl.acl_counter" - alias: "acl_counter" + id: 330020245 + name: "FabricIngress.pre_next.next_mpls_counter" + alias: "next_mpls_counter" } spec { unit: BOTH } - direct_table_id: 33618978 + direct_table_id: 36626242 } direct_counters { preamble { - id: 318768144 - name: "FabricIngress.next.next_vlan_counter" + id: 333692067 + name: "FabricIngress.pre_next.next_vlan_counter" alias: "next_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33599709 + direct_table_id: 48011802 } direct_counters { preamble { - id: 318778156 + id: 319194241 + name: "FabricIngress.acl.acl_counter" + alias: "acl_counter" + } + spec { + unit: BOTH + } + direct_table_id: 44104738 +} +direct_counters { + preamble { + id: 321989420 name: "FabricIngress.next.xconnect_counter" alias: "xconnect_counter" } spec { unit: BOTH } - direct_table_id: 33596977 + direct_table_id: 48735793 } direct_counters { preamble { - id: 318800532 + id: 322798228 name: "FabricIngress.next.hashed_counter" alias: "hashed_counter" } spec { unit: BOTH } - direct_table_id: 33608588 + direct_table_id: 47960972 } direct_counters { preamble { - id: 318801752 + id: 319194968 name: "FabricIngress.next.multicast_counter" alias: "multicast_counter" } spec { unit: BOTH } - direct_table_id: 33606828 + direct_table_id: 40619180 } direct_counters { preamble { - id: 318827144 + id: 334706097 + name: "FabricIngress.slice_tc_classifier.classifier_stats" + alias: "classifier_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 34606298 +} +direct_counters { + preamble { + id: 327743278 + name: "FabricIngress.qos.queues_stats" + alias: "queues_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 36435258 +} +direct_counters { + preamble { + id: 318892680 name: "FabricEgress.egress_next.egress_vlan_counter" alias: "egress_vlan_counter" } spec { unit: BOTH } - direct_table_id: 33599342 + direct_table_id: 49262446 +} +meters { + preamble { + id: 348573637 + name: "FabricIngress.qos.slice_tc_meter" + alias: "slice_tc_meter" + } + spec { + unit: BYTES + } + size: 64 } controller_packet_metadata { preamble { - id: 67146229 + id: 81826293 name: "packet_in" alias: "packet_in" annotations: "@controller_header(\"packet_in\")" @@ -805,7 +1057,7 @@ controller_packet_metadata { } controller_packet_metadata { preamble { - id: 67121543 + id: 76689799 name: "packet_out" alias: "packet_out" annotations: "@controller_header(\"packet_out\")" @@ -817,8 +1069,13 @@ controller_packet_metadata { } metadata { id: 2 + name: "do_forwarding" + bitwidth: 1 + } + metadata { + id: 3 name: "_pad" - bitwidth: 7 + bitwidth: 6 } } type_info { diff --git a/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreterTest.java b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreterTest.java index a0e61946514..385262958c2 100644 --- a/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreterTest.java +++ b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricInterpreterTest.java @@ -23,11 +23,21 @@ import org.onlab.packet.MplsLabel; import org.onlab.packet.VlanId; import org.onlab.util.ImmutableByteSequence; +import org.onosproject.net.DeviceId; import org.onosproject.net.PortNumber; import org.onosproject.net.flow.DefaultTrafficTreatment; import org.onosproject.net.flow.TrafficTreatment; +import org.onosproject.net.packet.DefaultOutboundPacket; +import org.onosproject.net.packet.OutboundPacket; +import org.onosproject.net.pi.model.PiPacketOperationType; import org.onosproject.net.pi.runtime.PiAction; import org.onosproject.net.pi.runtime.PiActionParam; +import org.onosproject.net.pi.runtime.PiPacketMetadata; +import org.onosproject.net.pi.runtime.PiPacketOperation; +import org.onosproject.pipelines.fabric.FabricConstants; + +import java.nio.ByteBuffer; +import java.util.Collection; import static org.easymock.EasyMock.createNiceMock; import static org.easymock.EasyMock.expect; @@ -43,6 +53,8 @@ public class FabricInterpreterTest { private static final MacAddress SRC_MAC = MacAddress.valueOf("00:00:00:00:00:01"); private static final MacAddress DST_MAC = MacAddress.valueOf("00:00:00:00:00:02"); private static final MplsLabel MPLS_10 = MplsLabel.mplsLabel(10); + private static final DeviceId DEVICE_ID = DeviceId.deviceId("device:1"); + private static final int PORT_BITWIDTH = 9; private FabricInterpreter interpreter; @@ -57,70 +69,48 @@ public void setup() { interpreter = new FabricInterpreter(allCapabilities); } - /* Filtering control block */ - - /** - * Map treatment to push_internal_vlan action. - */ - @Test - public void testFilteringTreatmentPermitWithInternalVlan() throws Exception { - TrafficTreatment treatment = DefaultTrafficTreatment.builder() - .pushVlan() - .setVlanId(VLAN_100) - .build(); - PiAction mappedAction = interpreter.mapTreatment(treatment, - FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN); - PiActionParam param = new PiActionParam(FabricConstants.VLAN_ID, - ImmutableByteSequence.copyFrom(VLAN_100.toShort())); - PiAction expectedAction = PiAction.builder() - .withId(FabricConstants.FABRIC_INGRESS_FILTERING_PERMIT_WITH_INTERNAL_VLAN) - .withParameter(param) - .build(); - - assertEquals(expectedAction, mappedAction); - } + /* Forwarding control block */ /** - * Map treatment to permit action. + * Map empty treatment for routing v4 table. */ @Test - public void testFilteringTreatmentPermit() throws Exception { + public void testRoutingV4TreatmentEmpty() throws Exception { TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment(); - PiAction mappedAction = interpreter.mapTreatment(treatment, - FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN); + PiAction mappedAction = interpreter.mapTreatment( + treatment, FabricConstants.FABRIC_INGRESS_FORWARDING_ROUTING_V4); PiAction expectedAction = PiAction.builder() - .withId(FabricConstants.FABRIC_INGRESS_FILTERING_PERMIT) + .withId(FabricConstants.FABRIC_INGRESS_FORWARDING_NOP_ROUTING_V4) .build(); - assertEquals(expectedAction, mappedAction); } - /* Forwarding control block */ - /** - * Map empty treatment for routing v4 table. + * Map empty treatment to NOP for ACL table. */ @Test - public void testRoutingV4TreatmentEmpty() throws Exception { + public void testAclTreatmentEmpty() throws Exception { TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment(); PiAction mappedAction = interpreter.mapTreatment( - treatment, FabricConstants.FABRIC_INGRESS_FORWARDING_ROUTING_V4); + treatment, FabricConstants.FABRIC_INGRESS_ACL_ACL); PiAction expectedAction = PiAction.builder() - .withId(FabricConstants.FABRIC_INGRESS_FORWARDING_NOP_ROUTING_V4) + .withId(FabricConstants.FABRIC_INGRESS_ACL_NOP_ACL) .build(); assertEquals(expectedAction, mappedAction); } /** - * Map empty treatment for ACL table. + * Map wipeDeferred treatment to DROP for ACL table. */ @Test - public void testAclTreatmentEmpty() throws Exception { - TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment(); + public void testAclTreatmentWipeDeferred() throws Exception { + TrafficTreatment treatment = DefaultTrafficTreatment.builder() + .wipeDeferred() + .build(); PiAction mappedAction = interpreter.mapTreatment( treatment, FabricConstants.FABRIC_INGRESS_ACL_ACL); PiAction expectedAction = PiAction.builder() - .withId(FabricConstants.FABRIC_INGRESS_ACL_NOP_ACL) + .withId(FabricConstants.FABRIC_INGRESS_ACL_DROP) .build(); assertEquals(expectedAction, mappedAction); } @@ -168,46 +158,96 @@ public void testNextTreatmentHashedRoutingV4() throws Exception { } /** - * Map treatment for hashed table to routing v4 action. + * Map treatment to set_vlan_output action. */ @Test - public void testNextTreatmentHashedRoutingMpls() throws Exception { + public void testNextVlanTreatment() throws Exception { TrafficTreatment treatment = DefaultTrafficTreatment.builder() - .setEthSrc(SRC_MAC) - .setEthDst(DST_MAC) - .setOutput(PORT_1) - .pushMpls() - .setMpls(MPLS_10) + .setVlanId(VLAN_100) .build(); PiAction mappedAction = interpreter.mapTreatment( - treatment, FabricConstants.FABRIC_INGRESS_NEXT_HASHED); - PiActionParam ethSrcParam = new PiActionParam(FabricConstants.SMAC, SRC_MAC.toBytes()); - PiActionParam ethDstParam = new PiActionParam(FabricConstants.DMAC, DST_MAC.toBytes()); - PiActionParam portParam = new PiActionParam(FabricConstants.PORT_NUM, PORT_1.toLong()); - PiActionParam mplsParam = new PiActionParam(FabricConstants.LABEL, MPLS_10.toInt()); + treatment, FabricConstants.FABRIC_INGRESS_PRE_NEXT_NEXT_VLAN); + PiActionParam vlanParam = new PiActionParam( + FabricConstants.VLAN_ID, VLAN_100.toShort()); PiAction expectedAction = PiAction.builder() - .withId(FabricConstants.FABRIC_INGRESS_NEXT_MPLS_ROUTING_HASHED) - .withParameters(ImmutableList.of(ethSrcParam, ethDstParam, portParam, mplsParam)) + .withId(FabricConstants.FABRIC_INGRESS_PRE_NEXT_SET_VLAN) + .withParameter(vlanParam) .build(); assertEquals(expectedAction, mappedAction); } /** - * Map treatment to set_vlan_output action. + * Map treatment to set_mpls action. */ @Test - public void testNextTreatment3() throws Exception { + public void testNextMplsTreatment() throws Exception { TrafficTreatment treatment = DefaultTrafficTreatment.builder() - .setVlanId(VLAN_100) + .setMpls(MPLS_10) .build(); PiAction mappedAction = interpreter.mapTreatment( - treatment, FabricConstants.FABRIC_INGRESS_NEXT_NEXT_VLAN); - PiActionParam vlanParam = new PiActionParam( - FabricConstants.VLAN_ID, VLAN_100.toShort()); + treatment, FabricConstants.FABRIC_INGRESS_PRE_NEXT_NEXT_MPLS); + PiActionParam mplsParam = new PiActionParam( + FabricConstants.LABEL, MPLS_10.toInt()); PiAction expectedAction = PiAction.builder() - .withId(FabricConstants.FABRIC_INGRESS_NEXT_SET_VLAN) - .withParameter(vlanParam) + .withId(FabricConstants.FABRIC_INGRESS_PRE_NEXT_SET_MPLS_LABEL) + .withParameter(mplsParam) .build(); assertEquals(expectedAction, mappedAction); } + + @Test + public void testMapOutboundPacketWithoutForwarding() + throws Exception { + PortNumber outputPort = PortNumber.portNumber(1); + TrafficTreatment outputTreatment = DefaultTrafficTreatment.builder() + .setOutput(outputPort) + .build(); + ByteBuffer data = ByteBuffer.allocate(64); + OutboundPacket outPkt = new DefaultOutboundPacket(DEVICE_ID, outputTreatment, data); + Collection result = interpreter.mapOutboundPacket(outPkt); + assertEquals(result.size(), 1); + + ImmutableList.Builder builder = ImmutableList.builder(); + builder.add(PiPacketMetadata.builder() + .withId(FabricConstants.EGRESS_PORT) + .withValue(ImmutableByteSequence.copyFrom(outputPort.toLong()) + .fit(PORT_BITWIDTH)) + .build()); + + PiPacketOperation expectedPktOp = PiPacketOperation.builder() + .withType(PiPacketOperationType.PACKET_OUT) + .withData(ImmutableByteSequence.copyFrom(data)) + .withMetadatas(builder.build()) + .build(); + + assertEquals(expectedPktOp, result.iterator().next()); + } + + @Test + public void testMapOutboundPacketWithForwarding() + throws Exception { + PortNumber outputPort = PortNumber.TABLE; + TrafficTreatment outputTreatment = DefaultTrafficTreatment.builder() + .setOutput(outputPort) + .build(); + ByteBuffer data = ByteBuffer.allocate(64); + OutboundPacket outPkt = new DefaultOutboundPacket(DEVICE_ID, outputTreatment, data); + Collection result = interpreter.mapOutboundPacket(outPkt); + assertEquals(result.size(), 1); + + ImmutableList.Builder builder = ImmutableList.builder(); + builder.add(PiPacketMetadata.builder() + .withId(FabricConstants.DO_FORWARDING) + .withValue(ImmutableByteSequence.copyFrom(1) + .fit(1)) + .build()); + + PiPacketOperation expectedPktOp = PiPacketOperation.builder() + .withType(PiPacketOperationType.PACKET_OUT) + .withData(ImmutableByteSequence.copyFrom(data)) + .withMetadatas(builder.build()) + .build(); + + assertEquals(expectedPktOp, result.iterator().next()); + } } diff --git a/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/BaseObjectiveTranslatorTest.java b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/BaseObjectiveTranslatorTest.java new file mode 100644 index 00000000000..5015d4e9933 --- /dev/null +++ b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/BaseObjectiveTranslatorTest.java @@ -0,0 +1,78 @@ +/* + * Copyright 2017-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.pipelines.fabric.impl.behaviour.pipeliner; + +import org.junit.Test; +import org.onlab.packet.IpPrefix; +import org.onlab.packet.MacAddress; +import org.onlab.packet.MplsLabel; +import org.onlab.packet.VlanId; +import org.onosproject.TestApplicationId; +import org.onosproject.core.ApplicationId; +import org.onosproject.net.DeviceId; +import org.onosproject.net.PortNumber; +import org.onosproject.net.flow.DefaultTrafficSelector; +import org.onosproject.net.flow.TrafficSelector; +import org.onosproject.pipelines.fabric.impl.behaviour.FabricCapabilities; + +import static org.easymock.EasyMock.createNiceMock; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.replay; + +public class BaseObjectiveTranslatorTest { + static final ApplicationId APP_ID = TestApplicationId.create("FabricPipelinerTest"); + static final ApplicationId XCONNECT_APP_ID = TestApplicationId.create("FabricPipelinerTest.xconnect"); + static final DeviceId DEVICE_ID = DeviceId.deviceId("device:bmv2:11"); + static final int PRIORITY = 100; + static final PortNumber PORT_1 = PortNumber.portNumber(1); + static final PortNumber PORT_2 = PortNumber.portNumber(2); + static final VlanId VLAN_100 = VlanId.vlanId("100"); + static final VlanId VLAN_200 = VlanId.vlanId("200"); + static final MacAddress HOST_MAC = MacAddress.valueOf("00:00:00:00:00:01"); + static final MacAddress ROUTER_MAC = MacAddress.valueOf("00:00:00:00:02:01"); + static final MacAddress SPINE1_MAC = MacAddress.valueOf("00:00:00:00:03:01"); + static final MacAddress SPINE2_MAC = MacAddress.valueOf("00:00:00:00:03:02"); + static final IpPrefix IPV4_UNICAST_ADDR = IpPrefix.valueOf("10.0.0.1/32"); + static final IpPrefix IPV4_MCAST_ADDR = IpPrefix.valueOf("224.0.0.1/32"); + static final IpPrefix IPV6_UNICAST_ADDR = IpPrefix.valueOf("2000::1/32"); + static final IpPrefix IPV6_MCAST_ADDR = IpPrefix.valueOf("ff00::1/32"); + static final MplsLabel MPLS_10 = MplsLabel.mplsLabel(10); + static final Integer NEXT_ID_1 = 1; + static final TrafficSelector VLAN_META = DefaultTrafficSelector.builder() + .matchVlanId(VLAN_100) + .build(); + + FabricCapabilities capabilitiesHashed; + FabricCapabilities capabilitiesSimple; + + void doSetup() { + this.capabilitiesHashed = createNiceMock(FabricCapabilities.class); + this.capabilitiesSimple = createNiceMock(FabricCapabilities.class); + expect(capabilitiesHashed.hasHashedTable()).andReturn(true).anyTimes(); + expect(capabilitiesHashed.supportDoubleVlanTerm()).andReturn(true).anyTimes(); + expect(capabilitiesSimple.hasHashedTable()).andReturn(false).anyTimes(); + expect(capabilitiesSimple.supportDoubleVlanTerm()).andReturn(true).anyTimes(); + replay(capabilitiesHashed); + replay(capabilitiesSimple); + } + + @Test + public void fakeTest() { + // Needed otherwise Bazel complains about a test class without test cases. + assert true; + } +} diff --git a/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricPipelinerTest.java b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricPipelinerTest.java index 31db010a51a..ad988f5a005 100644 --- a/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricPipelinerTest.java +++ b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricPipelinerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-present Open Networking Foundation + * Copyright 2021-present Open Networking Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,64 +13,134 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.onosproject.pipelines.fabric.impl.behaviour.pipeliner; +import org.easymock.Capture; +import org.easymock.CaptureType; +import org.junit.Before; import org.junit.Test; -import org.onlab.packet.IpPrefix; -import org.onlab.packet.MacAddress; -import org.onlab.packet.MplsLabel; -import org.onlab.packet.VlanId; +import org.onlab.packet.Ethernet; import org.onosproject.TestApplicationId; import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; import org.onosproject.net.PortNumber; +import org.onosproject.net.flow.DefaultFlowRule; import org.onosproject.net.flow.DefaultTrafficSelector; +import org.onosproject.net.flow.DefaultTrafficTreatment; +import org.onosproject.net.flow.FlowRule; +import org.onosproject.net.flow.FlowRuleService; import org.onosproject.net.flow.TrafficSelector; +import org.onosproject.net.flow.TrafficTreatment; +import org.onosproject.net.flow.criteria.Criteria; +import org.onosproject.net.flow.criteria.PiCriterion; +import org.onosproject.net.pi.runtime.PiAction; +import org.onosproject.net.pi.runtime.PiActionParam; +import org.onosproject.pipelines.fabric.FabricConstants; import org.onosproject.pipelines.fabric.impl.behaviour.FabricCapabilities; -import static org.easymock.EasyMock.createNiceMock; +import java.io.IOException; +import java.util.Optional; + +import static org.easymock.EasyMock.capture; +import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.newCapture; import static org.easymock.EasyMock.replay; +import static org.easymock.EasyMock.reset; +import static org.easymock.EasyMock.verify; +import static org.junit.Assert.assertTrue; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.PORT_TYPE_INTERNAL; public class FabricPipelinerTest { - static final ApplicationId APP_ID = TestApplicationId.create("FabricPipelinerTest"); - static final ApplicationId XCONNECT_APP_ID = TestApplicationId.create("FabricPipelinerTest.xconnect"); - static final DeviceId DEVICE_ID = DeviceId.deviceId("device:bmv2:11"); - static final int PRIORITY = 100; - static final PortNumber PORT_1 = PortNumber.portNumber(1); - static final PortNumber PORT_2 = PortNumber.portNumber(2); - static final VlanId VLAN_100 = VlanId.vlanId("100"); - static final VlanId VLAN_200 = VlanId.vlanId("200"); - static final MacAddress HOST_MAC = MacAddress.valueOf("00:00:00:00:00:01"); - static final MacAddress ROUTER_MAC = MacAddress.valueOf("00:00:00:00:02:01"); - static final IpPrefix IPV4_UNICAST_ADDR = IpPrefix.valueOf("10.0.0.1/32"); - static final IpPrefix IPV4_MCAST_ADDR = IpPrefix.valueOf("224.0.0.1/32"); - static final IpPrefix IPV6_UNICAST_ADDR = IpPrefix.valueOf("2000::1/32"); - static final IpPrefix IPV6_MCAST_ADDR = IpPrefix.valueOf("ff00::1/32"); - static final MplsLabel MPLS_10 = MplsLabel.mplsLabel(10); - static final Integer NEXT_ID_1 = 1; - static final TrafficSelector VLAN_META = DefaultTrafficSelector.builder() - .matchVlanId(VLAN_100) - .build(); - FabricCapabilities capabilitiesHashed; - FabricCapabilities capabilitiesSimple; + private static final ApplicationId APP_ID = TestApplicationId.create("FabricPipelinerTest"); + private static final DeviceId DEVICE_ID = DeviceId.deviceId("device:1"); + private static final int DEFAULT_FLOW_PRIORITY = 100; + private static final long CPU_PORT = 320; + private static final byte FWD_IPV4_ROUTING = 2; + private static final int DEFAULT_VLAN = 4094; + public static final byte[] ONE = new byte[]{1}; + public static final byte[] ZERO = new byte[]{0}; + + private FabricPipeliner pipeliner; + private FlowRuleService flowRuleService; + + @Before + public void setup() throws IOException { + FabricCapabilities capabilities = createMock(FabricCapabilities.class); + expect(capabilities.cpuPort()).andReturn(Optional.of(CPU_PORT)).anyTimes(); + replay(capabilities); + + // Services mock + flowRuleService = createMock(FlowRuleService.class); - void doSetup() { - this.capabilitiesHashed = createNiceMock(FabricCapabilities.class); - this.capabilitiesSimple = createNiceMock(FabricCapabilities.class); - expect(capabilitiesHashed.hasHashedTable()).andReturn(true).anyTimes(); - expect(capabilitiesHashed.supportDoubleVlanTerm()).andReturn(true).anyTimes(); - expect(capabilitiesSimple.hasHashedTable()).andReturn(false).anyTimes(); - expect(capabilitiesSimple.supportDoubleVlanTerm()).andReturn(true).anyTimes(); - replay(capabilitiesHashed); - replay(capabilitiesSimple); + pipeliner = new FabricPipeliner(capabilities); + pipeliner.flowRuleService = flowRuleService; + pipeliner.appId = APP_ID; + pipeliner.deviceId = DEVICE_ID; } @Test - public void fakeTest() { - // Needed otherwise Bazel complains about a test class without test cases. - assert true; + public void testInitializePipeline() { + final Capture capturedCpuIgVlanRule = newCapture(CaptureType.ALL); + final Capture capturedCpuFwdClsRule = newCapture(CaptureType.ALL); + + // ingress_port_vlan table for cpu port + final TrafficSelector cpuIgVlanSelector = DefaultTrafficSelector.builder() + .add(Criteria.matchInPort(PortNumber.portNumber(CPU_PORT))) + .add(PiCriterion.builder() + .matchExact(FabricConstants.HDR_VLAN_IS_VALID, ZERO) + .build()) + .build(); + final TrafficTreatment cpuIgVlanTreatment = DefaultTrafficTreatment.builder() + .piTableAction(PiAction.builder() + .withId(FabricConstants.FABRIC_INGRESS_FILTERING_PERMIT_WITH_INTERNAL_VLAN) + .withParameter(new PiActionParam(FabricConstants.VLAN_ID, DEFAULT_VLAN)) + .withParameter(new PiActionParam(FabricConstants.PORT_TYPE, PORT_TYPE_INTERNAL)) + .build()) + .build(); + final FlowRule expectedCpuIgVlanRule = DefaultFlowRule.builder() + .withSelector(cpuIgVlanSelector) + .withTreatment(cpuIgVlanTreatment) + .forTable(FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN) + .makePermanent() + .withPriority(DEFAULT_FLOW_PRIORITY) + .forDevice(DEVICE_ID) + .fromApp(APP_ID) + .build(); + + final TrafficSelector cpuFwdClsSelector = DefaultTrafficSelector.builder() + .matchInPort(PortNumber.portNumber(CPU_PORT)) + .matchPi(PiCriterion.builder() + .matchExact(FabricConstants.HDR_IP_ETH_TYPE, Ethernet.TYPE_IPV4) + .build()) + .build(); + final TrafficTreatment cpuFwdClsTreatment = DefaultTrafficTreatment.builder() + .piTableAction(PiAction.builder() + .withId(FabricConstants.FABRIC_INGRESS_FILTERING_SET_FORWARDING_TYPE) + .withParameter(new PiActionParam(FabricConstants.FWD_TYPE, FWD_IPV4_ROUTING)) + .build()) + .build(); + final FlowRule expectedCpuFwdClsRule = DefaultFlowRule.builder() + .withSelector(cpuFwdClsSelector) + .withTreatment(cpuFwdClsTreatment) + .forTable(FabricConstants.FABRIC_INGRESS_FILTERING_FWD_CLASSIFIER) + .makePermanent() + .withPriority(DEFAULT_FLOW_PRIORITY) + .forDevice(DEVICE_ID) + .fromApp(APP_ID) + .build(); + flowRuleService.applyFlowRules( + capture(capturedCpuIgVlanRule), + capture(capturedCpuFwdClsRule)); + + replay(flowRuleService); + pipeliner.initializePipeline(); + + assertTrue(expectedCpuIgVlanRule.exactMatch(capturedCpuIgVlanRule.getValue())); + assertTrue(expectedCpuFwdClsRule.exactMatch(capturedCpuFwdClsRule.getValue())); + + verify(flowRuleService); + reset(flowRuleService); } } diff --git a/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricFilteringPipelinerTest.java b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FilteringObjectiveTranslatorTest.java similarity index 60% rename from pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricFilteringPipelinerTest.java rename to pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FilteringObjectiveTranslatorTest.java index 18cd132202c..5e126cccd9d 100644 --- a/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricFilteringPipelinerTest.java +++ b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FilteringObjectiveTranslatorTest.java @@ -38,21 +38,31 @@ import org.onosproject.net.flowobjective.ObjectiveError; import org.onosproject.net.pi.runtime.PiAction; import org.onosproject.net.pi.runtime.PiActionParam; -import org.onosproject.pipelines.fabric.impl.behaviour.FabricConstants; +import org.onosproject.pipelines.fabric.FabricConstants; import java.util.Collection; import java.util.List; import static org.junit.Assert.assertEquals; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.DEFAULT_PW_TRANSPORT_VLAN; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.DEFAULT_VLAN; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.EDGE_PORT; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.ETH_TYPE_EXACT_MASK; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.FWD_IPV4_ROUTING; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.FWD_IPV6_ROUTING; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.FWD_MPLS; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.INFRA_PORT; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.ONE; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.PAIR_PORT; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.PORT_TYPE_EDGE; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.PORT_TYPE_INFRA; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.ZERO; /** * Test cases for fabric.p4 pipeline filtering control block. */ -public class FabricFilteringPipelinerTest extends FabricPipelinerTest { +public class FilteringObjectiveTranslatorTest extends BaseObjectiveTranslatorTest { - public static final byte[] ONE = {1}; - public static final byte[] ZERO = {0}; - public static final short EXACT_MATCH_ETH_TYPE = (short) 0xFFFF; private FilteringObjectiveTranslator translator; @Before @@ -68,7 +78,7 @@ public void setup() { */ @Test public void testRouterMacAndVlanFilter() throws FabricPipelinerException { - FilteringObjective filteringObjective = buildFilteringObjective(ROUTER_MAC); + FilteringObjective filteringObjective = buildFilteringObjective(ROUTER_MAC, EDGE_PORT); ObjectiveTranslation actualTranslation = translator.translate(filteringObjective); Collection expectedFlowRules = Lists.newArrayList(); // in port vlan flow rule @@ -77,6 +87,7 @@ public void testRouterMacAndVlanFilter() throws FabricPipelinerException { VlanId.NONE, VlanId.NONE, VLAN_100, + PORT_TYPE_EDGE, FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN)); // forwarding classifier ipv4 @@ -85,7 +96,7 @@ public void testRouterMacAndVlanFilter() throws FabricPipelinerException { ROUTER_MAC, null, Ethernet.TYPE_IPV4, - FilteringObjectiveTranslator.FWD_IPV4_ROUTING)); + FWD_IPV4_ROUTING)); // forwarding classifier ipv6 expectedFlowRules.addAll(buildExpectedFwdClassifierRule( @@ -93,7 +104,7 @@ public void testRouterMacAndVlanFilter() throws FabricPipelinerException { ROUTER_MAC, null, Ethernet.TYPE_IPV6, - FilteringObjectiveTranslator.FWD_IPV6_ROUTING)); + FWD_IPV6_ROUTING)); // forwarding classifier mpls expectedFlowRules.addAll(buildExpectedFwdClassifierRule( @@ -101,7 +112,7 @@ public void testRouterMacAndVlanFilter() throws FabricPipelinerException { ROUTER_MAC, null, Ethernet.MPLS_UNICAST, - FilteringObjectiveTranslator.FWD_MPLS)); + FWD_MPLS)); // ObjectiveTranslation.Builder expectedTranslationBuilder = ObjectiveTranslation.builder() // .addFlowRule(inportFlowRuleExpected); @@ -129,6 +140,7 @@ public void testIpv4MulticastFwdClass() throws FabricPipelinerException { TrafficTreatment treatment = DefaultTrafficTreatment.builder() .pushVlan() .setVlanId(VLAN_100) + .writeMetadata(EDGE_PORT, 0xffffffffffffffffL) .build(); FilteringObjective filteringObjective = DefaultFilteringObjective.builder() .permit() @@ -148,6 +160,7 @@ public void testIpv4MulticastFwdClass() throws FabricPipelinerException { VlanId.NONE, VlanId.NONE, VLAN_100, + PORT_TYPE_EDGE, FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN)); // forwarding classifier @@ -156,7 +169,7 @@ public void testIpv4MulticastFwdClass() throws FabricPipelinerException { MacAddress.IPV4_MULTICAST, MacAddress.IPV4_MULTICAST_MASK, Ethernet.TYPE_IPV4, - FilteringObjectiveTranslator.FWD_IPV4_ROUTING)); + FWD_IPV4_ROUTING)); ObjectiveTranslation expectedTranslation = buildExpectedTranslation(expectedFlowRules); @@ -173,6 +186,7 @@ public void testIpv6MulticastFwdClass() throws FabricPipelinerException { TrafficTreatment treatment = DefaultTrafficTreatment.builder() .pushVlan() .setVlanId(VLAN_100) + .writeMetadata(EDGE_PORT, 0xffffffffffffffffL) .build(); FilteringObjective filteringObjective = DefaultFilteringObjective.builder() .permit() @@ -192,6 +206,7 @@ public void testIpv6MulticastFwdClass() throws FabricPipelinerException { VlanId.NONE, VlanId.NONE, VLAN_100, + PORT_TYPE_EDGE, FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN)); flowRules.addAll(buildExpectedFwdClassifierRule( @@ -199,7 +214,7 @@ public void testIpv6MulticastFwdClass() throws FabricPipelinerException { MacAddress.IPV6_MULTICAST, MacAddress.IPV6_MULTICAST_MASK, Ethernet.TYPE_IPV6, - FilteringObjectiveTranslator.FWD_IPV6_ROUTING)); + FWD_IPV6_ROUTING)); ObjectiveTranslation expectedTranslation = buildExpectedTranslation(flowRules); @@ -213,7 +228,7 @@ public void testIpv6MulticastFwdClass() throws FabricPipelinerException { */ @Test public void testFwdBridging() throws Exception { - FilteringObjective filteringObjective = buildFilteringObjective(null); + FilteringObjective filteringObjective = buildFilteringObjective(null, EDGE_PORT); ObjectiveTranslation actualTranslation = translator.translate(filteringObjective); // in port vlan flow rule @@ -222,6 +237,7 @@ public void testFwdBridging() throws Exception { VlanId.NONE, VlanId.NONE, VLAN_100, + PORT_TYPE_EDGE, FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN); // No rules in forwarding classifier, will do default action: set fwd type to bridging @@ -289,26 +305,27 @@ public void testPopVlan() throws FabricPipelinerException { .withPriority(PRIORITY) .fromApp(APP_ID) .withMeta(DefaultTrafficTreatment.builder() - .popVlan() - .build()) + .popVlan() + .writeMetadata(EDGE_PORT, 0xffffffffffffffffL) + .build()) .permit() .add(); ObjectiveTranslation actualTranslation = translator.translate(filteringObjective); Collection expectedFlowRules = Lists.newArrayList(); // Ingress port vlan rule expectedFlowRules.add(buildExpectedVlanInPortRule( - PORT_1, VLAN_100, VLAN_200, VlanId.NONE, + PORT_1, VLAN_100, VLAN_200, VlanId.NONE, PORT_TYPE_EDGE, FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN)); // Forwarding classifier rules (ipv6, ipv4, mpls) expectedFlowRules.addAll(buildExpectedFwdClassifierRule( PORT_1, ROUTER_MAC, null, Ethernet.TYPE_IPV4, - FilteringObjectiveTranslator.FWD_IPV4_ROUTING)); + FWD_IPV4_ROUTING)); expectedFlowRules.addAll(buildExpectedFwdClassifierRule( PORT_1, ROUTER_MAC, null, Ethernet.TYPE_IPV6, - FilteringObjectiveTranslator.FWD_IPV6_ROUTING)); + FWD_IPV6_ROUTING)); expectedFlowRules.addAll(buildExpectedFwdClassifierRule( PORT_1, ROUTER_MAC, null, Ethernet.MPLS_UNICAST, - FilteringObjectiveTranslator.FWD_MPLS)); + FWD_MPLS)); ObjectiveTranslation expectedTranslation = buildExpectedTranslation(expectedFlowRules); assertEquals(expectedTranslation, actualTranslation); @@ -344,6 +361,262 @@ public void badParamTest() { assertError(ObjectiveError.BADPARAMS, result2); } + /** + * Test port update scenarios for filtering objective. Creates only one rule for + * ingress_port_vlan table. + */ + @Test + public void testIsPortUpdate() throws FabricPipelinerException { + // Tagged port scenario + FilteringObjective filteringObjective = DefaultFilteringObjective.builder() + .withKey(Criteria.matchInPort(PORT_1)) + .addCondition(Criteria.matchEthDst(ROUTER_MAC)) + .addCondition(Criteria.matchVlanId(VLAN_100)) + .withPriority(PRIORITY) + .fromApp(APP_ID) + .withMeta(DefaultTrafficTreatment.builder() + .writeMetadata(10, 0xffffffffffffffffL) + .build()) + .permit() + .add(); + ObjectiveTranslation actualTranslation = translator.translate(filteringObjective); + Collection expectedFlowRules = Lists.newArrayList(); + // Ingress port vlan rule + expectedFlowRules.add(buildExpectedVlanInPortRule( + PORT_1, VLAN_100, null, VlanId.NONE, PORT_TYPE_EDGE, + FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN)); + ObjectiveTranslation expectedTranslation = buildExpectedTranslation(expectedFlowRules); + assertEquals(expectedTranslation, actualTranslation); + + // Untagged port scenario + filteringObjective = DefaultFilteringObjective.builder() + .withKey(Criteria.matchInPort(PORT_1)) + .addCondition(Criteria.matchEthDst(ROUTER_MAC)) + .addCondition(Criteria.matchVlanId(VlanId.NONE)) + .withPriority(PRIORITY) + .fromApp(APP_ID) + .withMeta(DefaultTrafficTreatment.builder() + .pushVlan() + .setVlanId(VLAN_200) + .writeMetadata(10, 0xffffffffffffffffL) + .build()) + .permit() + .add(); + actualTranslation = translator.translate(filteringObjective); + expectedFlowRules = Lists.newArrayList(); + // Ingress port vlan rule + expectedFlowRules.add(buildExpectedVlanInPortRule( + PORT_1, VlanId.NONE, null, VLAN_200, PORT_TYPE_EDGE, + FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN)); + expectedTranslation = buildExpectedTranslation(expectedFlowRules); + assertEquals(expectedTranslation, actualTranslation); + } + + /** + * Test no more ports scenario for filtering objective. + */ + @Test + public void testNoMorePorts() throws FabricPipelinerException { + // Tagged port scenario + FilteringObjective filteringObjective = DefaultFilteringObjective.builder() + .withKey(Criteria.matchInPort(PORT_1)) + .addCondition(Criteria.matchEthDst(ROUTER_MAC)) + .addCondition(Criteria.matchVlanId(VLAN_100)) + .withPriority(PRIORITY) + .fromApp(APP_ID) + .withMeta(DefaultTrafficTreatment.builder() + .writeMetadata(EDGE_PORT, 0xffffffffffffffffL) + .wipeDeferred() + .build()) + .permit() + .add(); + ObjectiveTranslation actualTranslation = translator.translate(filteringObjective); + Collection expectedFlowRules = Lists.newArrayList(); + // Ingress port vlan rule + expectedFlowRules.add(buildExpectedVlanInPortRule( + PORT_1, VLAN_100, null, VlanId.NONE, PORT_TYPE_EDGE, + FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN)); + // forwarding classifier ipv4 + expectedFlowRules.addAll(buildExpectedFwdClassifierRule( + PORT_1, + ROUTER_MAC, + null, + Ethernet.TYPE_IPV4, + FWD_IPV4_ROUTING)); + // forwarding classifier ipv6 + expectedFlowRules.addAll(buildExpectedFwdClassifierRule( + PORT_1, + ROUTER_MAC, + null, + Ethernet.TYPE_IPV6, + FWD_IPV6_ROUTING)); + // forwarding classifier mpls + expectedFlowRules.addAll(buildExpectedFwdClassifierRule( + PORT_1, + ROUTER_MAC, + null, + Ethernet.MPLS_UNICAST, + FWD_MPLS)); + + ObjectiveTranslation expectedTranslation = buildExpectedTranslation(expectedFlowRules); + assertEquals(expectedTranslation, actualTranslation); + } + + /** + * Test is infra port scenarios for filtering objective. + */ + @Test + public void testIsInfraPort() throws FabricPipelinerException { + // PW transport vlan + FilteringObjective filteringObjective = DefaultFilteringObjective.builder() + .withKey(Criteria.matchInPort(PORT_1)) + .addCondition(Criteria.matchEthDst(ROUTER_MAC)) + .addCondition(Criteria.matchVlanId(VlanId.vlanId((short) DEFAULT_PW_TRANSPORT_VLAN))) + .withPriority(PRIORITY) + .withMeta(DefaultTrafficTreatment.builder() + .writeMetadata(INFRA_PORT, 0xffffffffffffffffL) + .build()) + .fromApp(APP_ID) + .permit() + .add(); + ObjectiveTranslation actualTranslation = translator.translate(filteringObjective); + + Collection expectedFlowRules = Lists.newArrayList(); + expectedFlowRules.add(buildExpectedVlanInPortRule( + PORT_1, VlanId.vlanId((short) DEFAULT_PW_TRANSPORT_VLAN), null, VlanId.NONE, + PORT_TYPE_INFRA, FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN)); + expectedFlowRules.addAll(buildExpectedFwdClassifierRule( + PORT_1, + ROUTER_MAC, + null, + Ethernet.TYPE_IPV4, + FWD_IPV4_ROUTING)); + expectedFlowRules.addAll(buildExpectedFwdClassifierRule( + PORT_1, + ROUTER_MAC, + null, + Ethernet.TYPE_IPV6, + FWD_IPV6_ROUTING)); + expectedFlowRules.addAll(buildExpectedFwdClassifierRule( + PORT_1, + ROUTER_MAC, + null, + Ethernet.MPLS_UNICAST, + FWD_MPLS)); + + ObjectiveTranslation expectedTranslation = buildExpectedTranslation(expectedFlowRules); + assertEquals(expectedTranslation, actualTranslation); + + // Untagged port scenario + filteringObjective = DefaultFilteringObjective.builder() + .withKey(Criteria.matchInPort(PORT_1)) + .addCondition(Criteria.matchEthDst(ROUTER_MAC)) + .addCondition(Criteria.matchVlanId(VlanId.NONE)) + .withPriority(PRIORITY) + .fromApp(APP_ID) + .withMeta(DefaultTrafficTreatment.builder() + .pushVlan() + .setVlanId(VlanId.vlanId((short) DEFAULT_VLAN)) + .writeMetadata(INFRA_PORT, 0xffffffffffffffffL) + .build()) + .permit() + .add(); + actualTranslation = translator.translate(filteringObjective); + expectedFlowRules = Lists.newArrayList(); + expectedFlowRules.add(buildExpectedVlanInPortRule( + PORT_1, null, null, VlanId.vlanId((short) DEFAULT_VLAN), + PORT_TYPE_INFRA, FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN)); + expectedFlowRules.addAll(buildExpectedFwdClassifierRule( + PORT_1, + ROUTER_MAC, + null, + Ethernet.TYPE_IPV4, + FWD_IPV4_ROUTING)); + expectedFlowRules.addAll(buildExpectedFwdClassifierRule( + PORT_1, + ROUTER_MAC, + null, + Ethernet.TYPE_IPV6, + FWD_IPV6_ROUTING)); + expectedFlowRules.addAll(buildExpectedFwdClassifierRule( + PORT_1, + ROUTER_MAC, + null, + Ethernet.MPLS_UNICAST, + FWD_MPLS)); + + expectedTranslation = buildExpectedTranslation(expectedFlowRules); + assertEquals(expectedTranslation, actualTranslation); + } + + /** + * Test is pair port scenarios for filtering objective. + */ + @Test + public void testIsPairPort() throws FabricPipelinerException { + // Only pair port flag + FilteringObjective filteringObjective = DefaultFilteringObjective.builder() + .withKey(Criteria.matchInPort(PORT_1)) + .addCondition(Criteria.matchEthDst(ROUTER_MAC)) + .addCondition(Criteria.matchVlanId(VLAN_100)) + .withPriority(PRIORITY) + .withMeta(DefaultTrafficTreatment.builder() + .writeMetadata(PAIR_PORT, 0xffffffffffffffffL) + .build()) + .fromApp(APP_ID) + .permit() + .add(); + ObjectiveTranslation actualTranslation = translator.translate(filteringObjective); + + Collection expectedFlowRules = Lists.newArrayList(); + expectedFlowRules.add(buildExpectedVlanInPortRule( + PORT_1, VLAN_100, null, VlanId.NONE, + PORT_TYPE_INFRA, FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN)); + expectedFlowRules.addAll(buildExpectedFwdClassifierRule( + PORT_1, + ROUTER_MAC, + null, + Ethernet.TYPE_IPV4, + FWD_IPV4_ROUTING)); + expectedFlowRules.addAll(buildExpectedFwdClassifierRule( + PORT_1, + ROUTER_MAC, + null, + Ethernet.TYPE_IPV6, + FWD_IPV6_ROUTING)); + expectedFlowRules.addAll(buildExpectedFwdClassifierRule( + PORT_1, + ROUTER_MAC, + null, + Ethernet.MPLS_UNICAST, + FWD_MPLS)); + + ObjectiveTranslation expectedTranslation = buildExpectedTranslation(expectedFlowRules); + assertEquals(expectedTranslation, actualTranslation); + + // Pair port and config update flags + filteringObjective = DefaultFilteringObjective.builder() + .withKey(Criteria.matchInPort(PORT_1)) + .addCondition(Criteria.matchEthDst(ROUTER_MAC)) + .addCondition(Criteria.matchVlanId(VLAN_100)) + .withPriority(PRIORITY) + .fromApp(APP_ID) + .withMeta(DefaultTrafficTreatment.builder() + .writeMetadata(6, 0xffffffffffffffffL) + .build()) + .permit() + .add(); + + actualTranslation = translator.translate(filteringObjective); + expectedFlowRules = Lists.newArrayList(); + // Ingress port vlan rule + expectedFlowRules.add(buildExpectedVlanInPortRule( + PORT_1, VLAN_100, null, VlanId.NONE, PORT_TYPE_INFRA, + FabricConstants.FABRIC_INGRESS_FILTERING_INGRESS_PORT_VLAN)); + expectedTranslation = buildExpectedTranslation(expectedFlowRules); + assertEquals(expectedTranslation, actualTranslation); + } + /* Utilities */ private void assertError(ObjectiveError error, ObjectiveTranslation actualTranslation) { @@ -351,10 +624,11 @@ private void assertError(ObjectiveError error, ObjectiveTranslation actualTransl assertEquals(expectedTranslation, actualTranslation); } - private FilteringObjective buildFilteringObjective(MacAddress dstMac) { + private FilteringObjective buildFilteringObjective(MacAddress dstMac, long portType) { TrafficTreatment treatment = DefaultTrafficTreatment.builder() .pushVlan() .setVlanId(VLAN_100) + .writeMetadata(portType, 0xffffffffffffffffL) .build(); DefaultFilteringObjective.Builder builder = DefaultFilteringObjective.builder() .permit() @@ -375,6 +649,7 @@ private FlowRule buildExpectedVlanInPortRule(PortNumber inPort, VlanId vlanId, VlanId innerVlanId, VlanId internalVlan, + byte portType, TableId tableId) { TrafficSelector.Builder selector = DefaultTrafficSelector.builder() @@ -384,8 +659,8 @@ private FlowRule buildExpectedVlanInPortRule(PortNumber inPort, if (!vlanValid(vlanId)) { piAction = PiAction.builder() .withId(FabricConstants.FABRIC_INGRESS_FILTERING_PERMIT_WITH_INTERNAL_VLAN) - .withParameter(new PiActionParam( - FabricConstants.VLAN_ID, internalVlan.toShort())) + .withParameter(new PiActionParam(FabricConstants.VLAN_ID, internalVlan.toShort())) + .withParameter(new PiActionParam(FabricConstants.PORT_TYPE, portType)) .build(); } else { selector.matchVlanId(vlanId); @@ -394,6 +669,7 @@ private FlowRule buildExpectedVlanInPortRule(PortNumber inPort, } piAction = PiAction.builder() .withId(FabricConstants.FABRIC_INGRESS_FILTERING_PERMIT) + .withParameter(new PiActionParam(FabricConstants.PORT_TYPE, portType)) .build(); } @@ -469,13 +745,13 @@ private Collection buildExpectedFwdClassifierRulesMpls(PiAction fwdCla Collection flowRules = Lists.newArrayList(); TrafficSelector selectorIpv4 = selectorBuilder .add(PiCriterion.builder() - .matchTernary(FabricConstants.HDR_ETH_TYPE, Ethernet.MPLS_UNICAST, EXACT_MATCH_ETH_TYPE) + .matchTernary(FabricConstants.HDR_ETH_TYPE, Ethernet.MPLS_UNICAST, ETH_TYPE_EXACT_MASK) .matchExact(FabricConstants.HDR_IP_ETH_TYPE, Ethernet.TYPE_IPV4) .build()) .build(); TrafficSelector selectorIpv6 = selectorBuilder .add(PiCriterion.builder() - .matchTernary(FabricConstants.HDR_ETH_TYPE, Ethernet.MPLS_UNICAST, EXACT_MATCH_ETH_TYPE) + .matchTernary(FabricConstants.HDR_ETH_TYPE, Ethernet.MPLS_UNICAST, ETH_TYPE_EXACT_MASK) .matchExact(FabricConstants.HDR_IP_ETH_TYPE, Ethernet.TYPE_IPV6) .build()) .build(); diff --git a/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricForwardingPipelineTest.java b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/ForwardingObjectiveTranslatorTest.java similarity index 60% rename from pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricForwardingPipelineTest.java rename to pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/ForwardingObjectiveTranslatorTest.java index 3d2942fbc17..94517bf62fb 100644 --- a/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricForwardingPipelineTest.java +++ b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/ForwardingObjectiveTranslatorTest.java @@ -34,6 +34,7 @@ import org.onosproject.net.flow.TrafficTreatment; import org.onosproject.net.flow.criteria.Criterion; import org.onosproject.net.flow.criteria.EthCriterion; +import org.onosproject.net.flow.criteria.PiCriterion; import org.onosproject.net.flowobjective.DefaultForwardingObjective; import org.onosproject.net.flowobjective.ForwardingObjective; import org.onosproject.net.group.DefaultGroupBucket; @@ -46,17 +47,22 @@ import org.onosproject.net.pi.model.PiTableId; import org.onosproject.net.pi.runtime.PiAction; import org.onosproject.net.pi.runtime.PiActionParam; -import org.onosproject.pipelines.fabric.impl.behaviour.FabricConstants; +import org.onosproject.pipelines.fabric.FabricConstants; import java.util.List; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.EDGE_PORT; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.INFRA_PORT; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.PORT_TYPE_EDGE; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.PORT_TYPE_INFRA; +import static org.onosproject.pipelines.fabric.impl.behaviour.Constants.PORT_TYPE_MASK; /** * Test cases for fabric.p4 pipeline forwarding control block. */ -public class FabricForwardingPipelineTest extends FabricPipelinerTest { +public class ForwardingObjectiveTranslatorTest extends BaseObjectiveTranslatorTest { private ForwardingObjectiveTranslator translator; @@ -186,6 +192,239 @@ public void testAclDhcp() { assertTrue(expectedFlowRule.exactMatch(actualFlowRule)); } + /** + * Test versatile flag of forwarding objective with next step. + */ + @Test + public void testAclNext() { + // ACL 8-tuples + TrafficSelector selector = DefaultTrafficSelector.builder() + .matchEthType(Ethernet.TYPE_IPV4) + .matchIPDst(IPV4_UNICAST_ADDR) + .build(); + ForwardingObjective fwd = DefaultForwardingObjective.builder() + .withSelector(selector) + .withPriority(PRIORITY) + .fromApp(APP_ID) + .makePermanent() + .withFlag(ForwardingObjective.Flag.VERSATILE) + .nextStep(NEXT_ID_1) + .add(); + + ObjectiveTranslation result = translator.translate(fwd); + + List flowRulesInstalled = (List) result.flowRules(); + List groupsInstalled = (List) result.groups(); + assertEquals(1, flowRulesInstalled.size()); + assertTrue(groupsInstalled.isEmpty()); + + FlowRule actualFlowRule = flowRulesInstalled.get(0); + PiAction piAction = PiAction.builder() + .withId(FabricConstants.FABRIC_INGRESS_ACL_SET_NEXT_ID_ACL) + .withParameter(new PiActionParam(FabricConstants.NEXT_ID, NEXT_ID_1)) + .build(); + FlowRule expectedFlowRule = DefaultFlowRule.builder() + .forDevice(DEVICE_ID) + .forTable(FabricConstants.FABRIC_INGRESS_ACL_ACL) + .withPriority(PRIORITY) + .makePermanent() + .withSelector(selector) + .withTreatment(DefaultTrafficTreatment.builder() + .piTableAction(piAction).build()) + .fromApp(APP_ID) + .build(); + + assertTrue(expectedFlowRule.exactMatch(actualFlowRule)); + } + + /** + * Test versatile flag of forwarding objective with next step and port type. + */ + @Test + public void testAclNextWithPortType() { + // ACL 8-tuples + TrafficSelector selector = DefaultTrafficSelector.builder() + .matchEthType(Ethernet.TYPE_IPV4) + .matchIPDst(IPV4_UNICAST_ADDR) + .build(); + TrafficSelector metaSelector = DefaultTrafficSelector.builder() + .matchMetadata(EDGE_PORT) + .build(); + ForwardingObjective fwd = DefaultForwardingObjective.builder() + .withSelector(selector) + .withPriority(PRIORITY) + .fromApp(APP_ID) + .makePermanent() + .withFlag(ForwardingObjective.Flag.VERSATILE) + .nextStep(NEXT_ID_1) + .withMeta(metaSelector) + .add(); + + ObjectiveTranslation result = translator.translate(fwd); + + List flowRulesInstalled = (List) result.flowRules(); + List groupsInstalled = (List) result.groups(); + assertEquals(1, flowRulesInstalled.size()); + assertTrue(groupsInstalled.isEmpty()); + + FlowRule actualFlowRule = flowRulesInstalled.get(0); + PiAction piAction = PiAction.builder() + .withId(FabricConstants.FABRIC_INGRESS_ACL_SET_NEXT_ID_ACL) + .withParameter(new PiActionParam(FabricConstants.NEXT_ID, NEXT_ID_1)) + .build(); + TrafficSelector expectedSelector = DefaultTrafficSelector.builder() + .matchEthType(Ethernet.TYPE_IPV4) + .matchIPDst(IPV4_UNICAST_ADDR) + .matchPi(PiCriterion.builder() + .matchTernary(FabricConstants.HDR_PORT_TYPE, PORT_TYPE_EDGE, PORT_TYPE_MASK) + .build()) + .build(); + FlowRule expectedFlowRule = DefaultFlowRule.builder() + .forDevice(DEVICE_ID) + .forTable(FabricConstants.FABRIC_INGRESS_ACL_ACL) + .withPriority(PRIORITY) + .makePermanent() + .withSelector(expectedSelector) + .withTreatment(DefaultTrafficTreatment.builder() + .piTableAction(piAction).build()) + .fromApp(APP_ID) + .build(); + + assertTrue(expectedFlowRule.exactMatch(actualFlowRule)); + + metaSelector = DefaultTrafficSelector.builder() + .matchMetadata(INFRA_PORT) + .build(); + fwd = DefaultForwardingObjective.builder() + .withSelector(selector) + .withPriority(PRIORITY) + .fromApp(APP_ID) + .makePermanent() + .withFlag(ForwardingObjective.Flag.VERSATILE) + .nextStep(NEXT_ID_1) + .withMeta(metaSelector) + .add(); + + result = translator.translate(fwd); + + flowRulesInstalled = (List) result.flowRules(); + groupsInstalled = (List) result.groups(); + assertEquals(1, flowRulesInstalled.size()); + assertTrue(groupsInstalled.isEmpty()); + + actualFlowRule = flowRulesInstalled.get(0); + expectedSelector = DefaultTrafficSelector.builder() + .matchEthType(Ethernet.TYPE_IPV4) + .matchIPDst(IPV4_UNICAST_ADDR) + .matchPi(PiCriterion.builder() + .matchTernary(FabricConstants.HDR_PORT_TYPE, PORT_TYPE_INFRA, PORT_TYPE_MASK) + .build()) + .build(); + expectedFlowRule = DefaultFlowRule.builder() + .forDevice(DEVICE_ID) + .forTable(FabricConstants.FABRIC_INGRESS_ACL_ACL) + .withPriority(PRIORITY) + .makePermanent() + .withSelector(expectedSelector) + .withTreatment(DefaultTrafficTreatment.builder() + .piTableAction(piAction).build()) + .fromApp(APP_ID) + .build(); + + assertTrue(expectedFlowRule.exactMatch(actualFlowRule)); + } + + /** + * Test versatile flag of forwarding objective with acl drop. + */ + @Test + public void testAclDrop() { + TrafficTreatment treatment = DefaultTrafficTreatment.builder() + .wipeDeferred() + .build(); + // ACL 8-tuples like + TrafficSelector selector = DefaultTrafficSelector.builder() + .matchIPDst(IPV4_UNICAST_ADDR) + .build(); + ForwardingObjective fwd = DefaultForwardingObjective.builder() + .withSelector(selector) + .withPriority(PRIORITY) + .fromApp(APP_ID) + .makePermanent() + .withFlag(ForwardingObjective.Flag.VERSATILE) + .withTreatment(treatment) + .add(); + + ObjectiveTranslation result = translator.translate(fwd); + + List flowRulesInstalled = (List) result.flowRules(); + List groupsInstalled = (List) result.groups(); + assertEquals(1, flowRulesInstalled.size()); + assertTrue(groupsInstalled.isEmpty()); + + FlowRule actualFlowRule = flowRulesInstalled.get(0); + PiAction piAction = PiAction.builder() + .withId(FabricConstants.FABRIC_INGRESS_ACL_DROP) + .build(); + FlowRule expectedFlowRule = DefaultFlowRule.builder() + .forDevice(DEVICE_ID) + .forTable(FabricConstants.FABRIC_INGRESS_ACL_ACL) + .withPriority(PRIORITY) + .makePermanent() + .withSelector(selector) + .withTreatment(DefaultTrafficTreatment.builder() + .piTableAction(piAction).build()) + .fromApp(APP_ID) + .build(); + + assertTrue(expectedFlowRule.exactMatch(actualFlowRule)); + } + + /** + * Test versatile flag of forwarding objective with acl nop. + */ + @Test + public void testAclNop() { + TrafficTreatment treatment = DefaultTrafficTreatment.builder() + .build(); + // ACL 8-tuples like + TrafficSelector selector = DefaultTrafficSelector.builder() + .matchIPDst(IPV4_UNICAST_ADDR) + .build(); + ForwardingObjective fwd = DefaultForwardingObjective.builder() + .withSelector(selector) + .withPriority(PRIORITY) + .fromApp(APP_ID) + .makePermanent() + .withFlag(ForwardingObjective.Flag.VERSATILE) + .withTreatment(treatment) + .add(); + + ObjectiveTranslation result = translator.translate(fwd); + + List flowRulesInstalled = (List) result.flowRules(); + List groupsInstalled = (List) result.groups(); + assertEquals(1, flowRulesInstalled.size()); + assertTrue(groupsInstalled.isEmpty()); + + FlowRule actualFlowRule = flowRulesInstalled.get(0); + PiAction piAction = PiAction.builder() + .withId(FabricConstants.FABRIC_INGRESS_ACL_NOP_ACL) + .build(); + FlowRule expectedFlowRule = DefaultFlowRule.builder() + .forDevice(DEVICE_ID) + .forTable(FabricConstants.FABRIC_INGRESS_ACL_ACL) + .withPriority(PRIORITY) + .makePermanent() + .withSelector(selector) + .withTreatment(DefaultTrafficTreatment.builder() + .piTableAction(piAction).build()) + .fromApp(APP_ID) + .build(); + + assertTrue(expectedFlowRule.exactMatch(actualFlowRule)); + } + /** * Test programming L2 unicast rule to bridging table. */ diff --git a/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricNextPipelinerTest.java b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/NextObjectiveTranslatorTest.java similarity index 68% rename from pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricNextPipelinerTest.java rename to pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/NextObjectiveTranslatorTest.java index a7d03c28eb2..6647a83d07f 100644 --- a/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FabricNextPipelinerTest.java +++ b/pipelines/fabric/impl/src/test/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/NextObjectiveTranslatorTest.java @@ -19,6 +19,7 @@ import com.google.common.collect.ImmutableList; import org.junit.Before; import org.junit.Test; +import org.onosproject.net.PortNumber; import org.onosproject.net.flow.DefaultFlowRule; import org.onosproject.net.flow.DefaultTrafficSelector; import org.onosproject.net.flow.DefaultTrafficTreatment; @@ -39,22 +40,24 @@ import org.onosproject.net.pi.runtime.PiActionParam; import org.onosproject.net.pi.runtime.PiActionProfileGroupId; import org.onosproject.net.pi.runtime.PiGroupKey; -import org.onosproject.pipelines.fabric.impl.behaviour.FabricConstants; +import org.onosproject.pipelines.fabric.FabricConstants; import java.util.List; import java.util.stream.Collectors; import static org.junit.Assert.assertEquals; +import static org.onosproject.pipelines.fabric.impl.behaviour.FabricUtils.outputPort; /** * Test cases for fabric.p4 pipeline next control block. */ -public class FabricNextPipelinerTest extends FabricPipelinerTest { +public class NextObjectiveTranslatorTest extends BaseObjectiveTranslatorTest { private NextObjectiveTranslator translatorHashed; private NextObjectiveTranslator translatorSimple; private FlowRule vlanMetaFlowRule; + private FlowRule mplsFlowRule; @Before public void setup() { @@ -70,7 +73,7 @@ public void setup() { .matchPi(nextIdCriterion) .build(); PiAction piAction = PiAction.builder() - .withId(FabricConstants.FABRIC_INGRESS_NEXT_SET_VLAN) + .withId(FabricConstants.FABRIC_INGRESS_PRE_NEXT_SET_VLAN) .withParameter(new PiActionParam(FabricConstants.VLAN_ID, VLAN_100.toShort())) .build(); TrafficTreatment treatment = DefaultTrafficTreatment.builder() @@ -79,15 +82,190 @@ public void setup() { vlanMetaFlowRule = DefaultFlowRule.builder() .withSelector(selector) .withTreatment(treatment) - .forTable(FabricConstants.FABRIC_INGRESS_NEXT_NEXT_VLAN) + .forTable(FabricConstants.FABRIC_INGRESS_PRE_NEXT_NEXT_VLAN) .makePermanent() // FIXME: currently next objective doesn't support priority, ignore this .withPriority(0) .forDevice(DEVICE_ID) .fromApp(APP_ID) .build(); + piAction = PiAction.builder() + .withId(FabricConstants.FABRIC_INGRESS_PRE_NEXT_SET_MPLS_LABEL) + .withParameter(new PiActionParam(FabricConstants.LABEL, MPLS_10.toInt())) + .build(); + treatment = DefaultTrafficTreatment.builder() + .piTableAction(piAction) + .build(); + mplsFlowRule = DefaultFlowRule.builder() + .withSelector(selector) + .withTreatment(treatment) + .forTable(FabricConstants.FABRIC_INGRESS_PRE_NEXT_NEXT_MPLS) + .makePermanent() + // FIXME: currently next objective doesn't support priority, ignore this + .withPriority(0) + .forDevice(DEVICE_ID) + .fromApp(APP_ID) + .build(); + } + + /** + * Test program mpls ecmp output group for Hashed table. + */ + @Test + public void testMplsHashedOutput() throws Exception { + TrafficTreatment treatment1 = DefaultTrafficTreatment.builder() + .setEthSrc(ROUTER_MAC) + .setEthDst(SPINE1_MAC) + .pushMpls() + .copyTtlOut() + .setMpls(MPLS_10) + .popVlan() + .setOutput(PORT_1) + .build(); + TrafficTreatment treatment2 = DefaultTrafficTreatment.builder() + .setEthSrc(ROUTER_MAC) + .setEthDst(SPINE2_MAC) + .pushMpls() + .copyTtlOut() + .setMpls(MPLS_10) + .popVlan() + .setOutput(PORT_2) + .build(); + + NextObjective nextObjective = DefaultNextObjective.builder() + .withId(NEXT_ID_1) + .withPriority(PRIORITY) + .withMeta(VLAN_META) + .addTreatment(treatment1) + .addTreatment(treatment2) + .withType(NextObjective.Type.HASHED) + .makePermanent() + .fromApp(APP_ID) + .add(); + + ObjectiveTranslation actualTranslation = translatorHashed.doTranslate(nextObjective); + + // Expected hashed table flow rule. + PiCriterion nextIdCriterion = PiCriterion.builder() + .matchExact(FabricConstants.HDR_NEXT_ID, NEXT_ID_1) + .build(); + TrafficSelector nextIdSelector = DefaultTrafficSelector.builder() + .matchPi(nextIdCriterion) + .build(); + PiActionProfileGroupId actionGroupId = PiActionProfileGroupId.of(NEXT_ID_1); + TrafficTreatment treatment = DefaultTrafficTreatment.builder() + .piTableAction(actionGroupId) + .build(); + FlowRule expectedFlowRule = DefaultFlowRule.builder() + .forDevice(DEVICE_ID) + .fromApp(APP_ID) + .makePermanent() + // FIXME: currently next objective doesn't support priority, ignore this + .withPriority(0) + .forTable(FabricConstants.FABRIC_INGRESS_NEXT_HASHED) + .withSelector(nextIdSelector) + .withTreatment(treatment) + .build(); + + // First egress rule - port1 + PortNumber outPort = outputPort(treatment1); + PiCriterion egressVlanTableMatch = PiCriterion.builder() + .matchExact(FabricConstants.HDR_EG_PORT, outPort.toLong()) + .build(); + TrafficSelector selectorForEgressVlan = DefaultTrafficSelector.builder() + .matchPi(egressVlanTableMatch) + .matchVlanId(VLAN_100) + .build(); + PiAction piActionForEgressVlan = PiAction.builder() + .withId(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_POP_VLAN) + .build(); + TrafficTreatment treatmentForEgressVlan = DefaultTrafficTreatment.builder() + .piTableAction(piActionForEgressVlan) + .build(); + FlowRule expectedEgressVlanPopRule1 = DefaultFlowRule.builder() + .withSelector(selectorForEgressVlan) + .withTreatment(treatmentForEgressVlan) + .forTable(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_EGRESS_VLAN) + .makePermanent() + .withPriority(nextObjective.priority()) + .forDevice(DEVICE_ID) + .fromApp(APP_ID) + .build(); + + // Second egress rule - port2 + outPort = outputPort(treatment2); + egressVlanTableMatch = PiCriterion.builder() + .matchExact(FabricConstants.HDR_EG_PORT, outPort.toLong()) + .build(); + selectorForEgressVlan = DefaultTrafficSelector.builder() + .matchPi(egressVlanTableMatch) + .matchVlanId(VLAN_100) + .build(); + FlowRule expectedEgressVlanPopRule2 = DefaultFlowRule.builder() + .withSelector(selectorForEgressVlan) + .withTreatment(treatmentForEgressVlan) + .forTable(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_EGRESS_VLAN) + .makePermanent() + .withPriority(nextObjective.priority()) + .forDevice(DEVICE_ID) + .fromApp(APP_ID) + .build(); + + // Expected group + PiAction piAction1 = PiAction.builder() + .withId(FabricConstants.FABRIC_INGRESS_NEXT_ROUTING_HASHED) + .withParameter(new PiActionParam( + FabricConstants.SMAC, ROUTER_MAC.toBytes())) + .withParameter(new PiActionParam( + FabricConstants.DMAC, SPINE1_MAC.toBytes())) + .withParameter(new PiActionParam( + FabricConstants.PORT_NUM, PORT_1.toLong())) + .build(); + PiAction piAction2 = PiAction.builder() + .withId(FabricConstants.FABRIC_INGRESS_NEXT_ROUTING_HASHED) + .withParameter(new PiActionParam( + FabricConstants.SMAC, ROUTER_MAC.toBytes())) + .withParameter(new PiActionParam( + FabricConstants.DMAC, SPINE2_MAC.toBytes())) + .withParameter(new PiActionParam( + FabricConstants.PORT_NUM, PORT_2.toLong())) + .build(); + treatment1 = DefaultTrafficTreatment.builder() + .piTableAction(piAction1) + .build(); + treatment2 = DefaultTrafficTreatment.builder() + .piTableAction(piAction2) + .build(); + List treatments = ImmutableList.of(treatment1, treatment2); + List buckets = treatments.stream() + .map(DefaultGroupBucket::createSelectGroupBucket) + .collect(Collectors.toList()); + GroupBuckets groupBuckets = new GroupBuckets(buckets); + PiGroupKey groupKey = new PiGroupKey(FabricConstants.FABRIC_INGRESS_NEXT_HASHED, + FabricConstants.FABRIC_INGRESS_NEXT_HASHED_SELECTOR, + NEXT_ID_1); + GroupDescription expectedGroup = new DefaultGroupDescription( + DEVICE_ID, + GroupDescription.Type.SELECT, + groupBuckets, + groupKey, + NEXT_ID_1, + APP_ID + ); + + ObjectiveTranslation expectedTranslation = ObjectiveTranslation.builder() + .addFlowRule(expectedFlowRule) + .addFlowRule(vlanMetaFlowRule) + .addFlowRule(mplsFlowRule) + .addGroup(expectedGroup) + .addFlowRule(expectedEgressVlanPopRule1) + .addFlowRule(expectedEgressVlanPopRule2) + .build(); + + assertEquals(expectedTranslation, actualTranslation); } + // TODO: add profile with simple next or remove tests /** * Test program output rule for Simple table. */ @@ -197,10 +375,35 @@ private void testSimple(TrafficTreatment treatment, PiAction piAction) throws Fa .withTreatment(DefaultTrafficTreatment.builder() .piTableAction(piAction).build()) .build(); + // Expected egress VLAN_PUSH flow rule. + final PortNumber outPort = outputPort(treatment); + PiCriterion egressVlanTableMatch = PiCriterion.builder() + .matchExact(FabricConstants.HDR_EG_PORT, outPort.toLong()) + .build(); + TrafficSelector selectorForEgressVlan = DefaultTrafficSelector.builder() + .matchPi(egressVlanTableMatch) + .matchVlanId(VLAN_100) + .build(); + PiAction piActionForEgressVlan = PiAction.builder() + .withId(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_PUSH_VLAN) + .build(); + TrafficTreatment treatmentForEgressVlan = DefaultTrafficTreatment.builder() + .piTableAction(piActionForEgressVlan) + .build(); + FlowRule expectedEgressVlanPushRule = DefaultFlowRule.builder() + .withSelector(selectorForEgressVlan) + .withTreatment(treatmentForEgressVlan) + .forTable(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_EGRESS_VLAN) + .makePermanent() + .withPriority(nextObjective.priority()) + .forDevice(DEVICE_ID) + .fromApp(APP_ID) + .build(); ObjectiveTranslation expectedTranslation = ObjectiveTranslation.builder() .addFlowRule(vlanMetaFlowRule) .addFlowRule(expectedFlowRule) + .addFlowRule(expectedEgressVlanPushRule) .build(); assertEquals(expectedTranslation, actualTranslation); @@ -242,7 +445,7 @@ public void testRouteAndPushNextObjective() throws FabricPipelinerException { .build(); PiAction piActionPush = PiAction.builder() - .withId(FabricConstants.FABRIC_INGRESS_NEXT_SET_DOUBLE_VLAN) + .withId(FabricConstants.FABRIC_INGRESS_PRE_NEXT_SET_DOUBLE_VLAN) .withParameter(new PiActionParam( FabricConstants.INNER_VLAN_ID, VLAN_100.toShort())) .withParameter(new PiActionParam( @@ -271,7 +474,7 @@ public void testRouteAndPushNextObjective() throws FabricPipelinerException { .withTreatment(DefaultTrafficTreatment.builder() .piTableAction(piActionPush) .build()) - .forTable(FabricConstants.FABRIC_INGRESS_NEXT_NEXT_VLAN) + .forTable(FabricConstants.FABRIC_INGRESS_PRE_NEXT_NEXT_VLAN) .makePermanent() // FIXME: currently next objective doesn't support priority, ignore this .withPriority(0) @@ -438,21 +641,44 @@ public void testBroadcastOutput() throws FabricPipelinerException { .withTreatment(treatment) .build(); - // Expected egress VLAN POP flow rule. + // Expected egress VLAN_PUSH flow rule. PiCriterion egressVlanTableMatch = PiCriterion.builder() - .matchExact(FabricConstants.HDR_EG_PORT, PORT_2.toLong()) + .matchExact(FabricConstants.HDR_EG_PORT, PORT_1.toLong()) .build(); TrafficSelector selectorForEgressVlan = DefaultTrafficSelector.builder() .matchPi(egressVlanTableMatch) .matchVlanId(VLAN_100) .build(); PiAction piActionForEgressVlan = PiAction.builder() - .withId(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_POP_VLAN) + .withId(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_PUSH_VLAN) .build(); TrafficTreatment treatmentForEgressVlan = DefaultTrafficTreatment.builder() .piTableAction(piActionForEgressVlan) .build(); - FlowRule expectedEgressVlanRule = DefaultFlowRule.builder() + FlowRule expectedEgressVlanPushRule = DefaultFlowRule.builder() + .withSelector(selectorForEgressVlan) + .withTreatment(treatmentForEgressVlan) + .forTable(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_EGRESS_VLAN) + .makePermanent() + .withPriority(nextObjective.priority()) + .forDevice(DEVICE_ID) + .fromApp(APP_ID) + .build(); + // Expected egress VLAN POP flow rule. + egressVlanTableMatch = PiCriterion.builder() + .matchExact(FabricConstants.HDR_EG_PORT, PORT_2.toLong()) + .build(); + selectorForEgressVlan = DefaultTrafficSelector.builder() + .matchPi(egressVlanTableMatch) + .matchVlanId(VLAN_100) + .build(); + piActionForEgressVlan = PiAction.builder() + .withId(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_POP_VLAN) + .build(); + treatmentForEgressVlan = DefaultTrafficTreatment.builder() + .piTableAction(piActionForEgressVlan) + .build(); + FlowRule expectedEgressVlanPopRule = DefaultFlowRule.builder() .withSelector(selectorForEgressVlan) .withTreatment(treatmentForEgressVlan) .forTable(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_EGRESS_VLAN) @@ -488,7 +714,8 @@ public void testBroadcastOutput() throws FabricPipelinerException { ObjectiveTranslation expectedTranslation = ObjectiveTranslation.builder() .addFlowRule(expectedHashedFlowRule) .addFlowRule(vlanMetaFlowRule) - .addFlowRule(expectedEgressVlanRule) + .addFlowRule(expectedEgressVlanPushRule) + .addFlowRule(expectedEgressVlanPopRule) .addGroup(expectedAllGroup) .build(); diff --git a/pipelines/fabric/impl/src/test/resources/basic.json b/pipelines/fabric/impl/src/test/resources/basic.json new file mode 100644 index 00000000000..7f4007f3007 --- /dev/null +++ b/pipelines/fabric/impl/src/test/resources/basic.json @@ -0,0 +1,3 @@ +{ + "managementAddress" : "grpc://localhost:1234?device_id=1" +} \ No newline at end of file diff --git a/protocols/gnmi/ctl/src/main/java/org/onosproject/gnmi/ctl/GnmiControllerImpl.java b/protocols/gnmi/ctl/src/main/java/org/onosproject/gnmi/ctl/GnmiControllerImpl.java index 42d31db9e15..448ea810939 100644 --- a/protocols/gnmi/ctl/src/main/java/org/onosproject/gnmi/ctl/GnmiControllerImpl.java +++ b/protocols/gnmi/ctl/src/main/java/org/onosproject/gnmi/ctl/GnmiControllerImpl.java @@ -17,30 +17,90 @@ package org.onosproject.gnmi.ctl; import io.grpc.ManagedChannel; +import org.onlab.util.Tools; +import org.onosproject.cfg.ComponentConfigService; import org.onosproject.gnmi.api.GnmiClient; import org.onosproject.gnmi.api.GnmiController; import org.onosproject.gnmi.api.GnmiEvent; import org.onosproject.gnmi.api.GnmiEventListener; import org.onosproject.grpc.ctl.AbstractGrpcClientController; import org.onosproject.net.DeviceId; +import org.osgi.service.component.ComponentContext; +import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Modified; +import org.osgi.service.component.annotations.Reference; +import org.osgi.service.component.annotations.ReferenceCardinality; +import org.slf4j.Logger; + +import java.util.Dictionary; + +import static org.onosproject.gnmi.ctl.OsgiPropertyConstants.READ_PORT_ID; +import static org.onosproject.gnmi.ctl.OsgiPropertyConstants.READ_PORT_ID_DEFAULT; +import static org.slf4j.LoggerFactory.getLogger; /** * Implementation of gNMI controller. */ -@Component(immediate = true, service = GnmiController.class) +@Component(immediate = true, + service = GnmiController.class, + property = { + READ_PORT_ID + ":Boolean=" + READ_PORT_ID_DEFAULT, + }) public class GnmiControllerImpl extends AbstractGrpcClientController implements GnmiController { + private final Logger log = getLogger(getClass()); + + @Reference(cardinality = ReferenceCardinality.MANDATORY) + private ComponentConfigService componentConfigService; + + /** + * Configure read port-id for gnmi drivers; default is false. + */ + private boolean readPortId = READ_PORT_ID_DEFAULT; + public GnmiControllerImpl() { super(GnmiEvent.class, "gNMI"); } + @Activate + public void activate(ComponentContext context) { + super.activate(); + componentConfigService.registerProperties(getClass()); + modified(context); + } + + @Modified + public void modified(ComponentContext context) { + if (context == null) { + return; + } + + Dictionary properties = context.getProperties(); + String strReadPortId = Tools.get(properties, READ_PORT_ID); + // FIXME temporary solution will be substituted by + // an XML driver property when the transition to + // p4rt translation is completed + readPortId = Boolean.parseBoolean(strReadPortId); + log.info("Configured. {} is configured to {}", + READ_PORT_ID, readPortId); + } + @Override protected GnmiClient createClientInstance( DeviceId deviceId, ManagedChannel channel) { return new GnmiClientImpl(deviceId, channel, this); } + + /** + * Returns whether or not readPortId is enabled. + * + * @return true if readPortId is enabled, false otherwise. + */ + public boolean readPortId() { + return readPortId; + } } diff --git a/protocols/gnmi/ctl/src/main/java/org/onosproject/gnmi/ctl/OsgiPropertyConstants.java b/protocols/gnmi/ctl/src/main/java/org/onosproject/gnmi/ctl/OsgiPropertyConstants.java new file mode 100644 index 00000000000..8751ad5b6c9 --- /dev/null +++ b/protocols/gnmi/ctl/src/main/java/org/onosproject/gnmi/ctl/OsgiPropertyConstants.java @@ -0,0 +1,29 @@ +/* + * Copyright 2022-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.gnmi.ctl; + +/** + * Constants for default values of configurable properties. + */ +public final class OsgiPropertyConstants { + + private OsgiPropertyConstants() {} + + public static final String READ_PORT_ID = "readPortId"; + public static final boolean READ_PORT_ID_DEFAULT = false; + +} diff --git a/protocols/grpc/ctl/src/main/java/org/onosproject/grpc/ctl/AbstractGrpcClientController.java b/protocols/grpc/ctl/src/main/java/org/onosproject/grpc/ctl/AbstractGrpcClientController.java index f7c33c3b76b..5b3153cb95d 100644 --- a/protocols/grpc/ctl/src/main/java/org/onosproject/grpc/ctl/AbstractGrpcClientController.java +++ b/protocols/grpc/ctl/src/main/java/org/onosproject/grpc/ctl/AbstractGrpcClientController.java @@ -101,7 +101,7 @@ private boolean doCreateClient(DeviceId deviceId, ManagedChannel channel) { "A %s client already exists for %s", serviceName, deviceId)); } - log.debug("Creating {}...", clientName(deviceId)); + log.info("Creating {}...", clientName(deviceId)); final C client; try { @@ -135,7 +135,7 @@ public void remove(DeviceId deviceId) { withDeviceLock(() -> { final C client = clients.remove(deviceId); if (client != null) { - log.debug("Removing {}...", clientName(deviceId)); + log.info("Removing {}...", clientName(deviceId)); client.shutdown(); } return null; diff --git a/protocols/grpc/ctl/src/main/java/org/onosproject/grpc/ctl/GrpcChannelControllerImpl.java b/protocols/grpc/ctl/src/main/java/org/onosproject/grpc/ctl/GrpcChannelControllerImpl.java index 9e2321ef837..b5b10db8b69 100644 --- a/protocols/grpc/ctl/src/main/java/org/onosproject/grpc/ctl/GrpcChannelControllerImpl.java +++ b/protocols/grpc/ctl/src/main/java/org/onosproject/grpc/ctl/GrpcChannelControllerImpl.java @@ -70,6 +70,14 @@ public class GrpcChannelControllerImpl implements GrpcChannelController { private static final String GRPCS = "grpcs"; private static final int DEFAULT_MAX_INBOUND_MSG_SIZE = 256; // Megabytes. + // The maximum metadata size in Megabytes that a P4Runtime client should accept. + // This is necessary, because the P4Runtime protocol returns individual errors to + // requests in a batch all wrapped in a single status, which counts towards the + // metadata size limit. For large batches, this easily exceeds the default of + // 8KB. According to the tests done with Stratum, 4MB will support batches of + // around 40000 entries, assuming 100 bytes per error, without exceeding the + // maximum metadata size. Setting here 10 times higher. + private static final int DEFAULT_MAX_INBOUND_META_SIZE = 40; private static final int MEGABYTES = 1024 * 1024; private static final PickFirstLoadBalancerProvider PICK_FIRST_LOAD_BALANCER_PROVIDER = @@ -184,7 +192,9 @@ private NettyChannelBuilder makeChannelBuilder(URI channelUri) { .defaultLoadBalancingPolicy( PICK_FIRST_LOAD_BALANCER_PROVIDER.getPolicyName()) .maxInboundMessageSize( - DEFAULT_MAX_INBOUND_MSG_SIZE * MEGABYTES); + DEFAULT_MAX_INBOUND_MSG_SIZE * MEGABYTES) + .maxInboundMetadataSize( + DEFAULT_MAX_INBOUND_META_SIZE * MEGABYTES); if (useTls) { try { @@ -210,6 +220,7 @@ public void destroy(URI channelUri) { channelLocks.get(channelUri).lock(); try { + log.info("Destroying gRPC channel {}...", channelUri); final ManagedChannel channel = channels.remove(channelUri); if (channel != null) { shutdownNowAndWait(channel, channelUri); diff --git a/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfController.java b/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfController.java index daf92fa8dbc..c7e89237df7 100644 --- a/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfController.java +++ b/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfController.java @@ -140,6 +140,19 @@ default CompletableFuture executeAtMaster(NetconfProxyMessage proxyMessag return errorFuture; } + /** + * If master, will execute the call locally else will use + * clusterCommunicationManager to execute at master controller. + * Meant only for internal synchronization and not to be used by applications. + * + * @param deviceId deviceId of device + * @param for handling reply of generic type + * @return true or false + */ + default boolean pingDevice(DeviceId deviceId) { + return false; + } + /** * Get a contoller node Id . * diff --git a/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfDeviceInfo.java b/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfDeviceInfo.java index 3ef4e602fc9..17849fc80ad 100644 --- a/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfDeviceInfo.java +++ b/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfDeviceInfo.java @@ -126,8 +126,9 @@ public NetconfDeviceInfo(String name, String password, IpAddress ipAddress, /** * Convenieince constructor that converts all known fields from NetCfg data. * @param netconfConfig NetCf configuration + * @param deviceId deviceId as per netcfg */ - public NetconfDeviceInfo(NetconfDeviceConfig netconfConfig) { + public NetconfDeviceInfo(NetconfDeviceConfig netconfConfig, DeviceId deviceId) { checkArgument(!netconfConfig.username().isEmpty(), "Empty device name"); checkArgument(netconfConfig.port() > 0, "Negative port"); checkNotNull(netconfConfig.ip(), "Null ip address"); @@ -135,6 +136,7 @@ public NetconfDeviceInfo(NetconfDeviceConfig netconfConfig) { this.name = netconfConfig.username(); this.password = netconfConfig.password(); this.ipAddress = netconfConfig.ip(); + this.deviceId = deviceId; this.port = netconfConfig.port(); this.path = netconfConfig.path(); if (netconfConfig.sshKey() != null && !netconfConfig.sshKey().isEmpty()) { diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfControllerImpl.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfControllerImpl.java index 90f6d146121..51e8913743e 100644 --- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfControllerImpl.java +++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfControllerImpl.java @@ -104,6 +104,7 @@ NETCONF_REPLY_TIMEOUT + ":Integer=" + NETCONF_REPLY_TIMEOUT_DEFAULT, NETCONF_IDLE_TIMEOUT + ":Integer=" + NETCONF_IDLE_TIMEOUT_DEFAULT, SSH_LIBRARY + "=" + SSH_LIBRARY_DEFAULT, + SSH_KEY_PATH + "=" + SSH_KEY_PATH_DEFAULT, }) public class NetconfControllerImpl implements NetconfController { @@ -119,6 +120,9 @@ public class NetconfControllerImpl implements NetconfController { /** SSH client library to use. */ protected static String sshLibrary = SSH_LIBRARY_DEFAULT; + /** Private SSH Key File Path to use. */ + protected static String sshKeyPath = SSH_KEY_PATH_DEFAULT; + protected NetconfSshClientLib sshClientLib = NetconfSshClientLib.APACHE_MINA; private static final MessageSubject SEND_REQUEST_SUBJECT_STRING = @@ -254,6 +258,7 @@ public void modified(ComponentContext context) { netconfConnectTimeout = NETCONF_CONNECT_TIMEOUT_DEFAULT; netconfIdleTimeout = NETCONF_IDLE_TIMEOUT_DEFAULT; sshLibrary = SSH_LIBRARY_DEFAULT; + sshKeyPath = SSH_KEY_PATH_DEFAULT; sshClientLib = NetconfSshClientLib.APACHE_MINA; log.info("No component configuration"); return; @@ -262,6 +267,7 @@ public void modified(ComponentContext context) { Dictionary properties = context.getProperties(); String newSshLibrary; + String newSshKeyPath; int newNetconfReplyTimeout = getIntegerProperty( properties, NETCONF_REPLY_TIMEOUT, netconfReplyTimeout); @@ -271,6 +277,7 @@ public void modified(ComponentContext context) { properties, NETCONF_IDLE_TIMEOUT, netconfIdleTimeout); newSshLibrary = get(properties, SSH_LIBRARY); + newSshKeyPath = get(properties, SSH_KEY_PATH); if (newNetconfConnectTimeout < 0) { log.warn("netconfConnectTimeout is invalid - less than 0"); @@ -290,11 +297,15 @@ public void modified(ComponentContext context) { sshLibrary = newSshLibrary; sshClientLib = NetconfSshClientLib.getEnum(newSshLibrary); } - log.info("Settings: {} = {}, {} = {}, {} = {}, {} = {}", + if (newSshKeyPath != null) { + sshKeyPath = newSshKeyPath; + } + log.info("Settings: {} = {}, {} = {}, {} = {}, {} = {}, {} = {}", NETCONF_REPLY_TIMEOUT, netconfReplyTimeout, NETCONF_CONNECT_TIMEOUT, netconfConnectTimeout, NETCONF_IDLE_TIMEOUT, netconfIdleTimeout, - SSH_LIBRARY, sshLibrary); + SSH_LIBRARY, sshLibrary, + SSH_KEY_PATH, sshKeyPath); } @Override @@ -370,7 +381,7 @@ public NetconfDevice connectDevice(DeviceId deviceId, boolean isMaster) throws N if (netCfg != null) { log.debug("Device {} is present in NetworkConfig", deviceId); - deviceInfo = new NetconfDeviceInfo(netCfg); + deviceInfo = new NetconfDeviceInfo(netCfg, deviceId); } else { log.debug("Creating NETCONF device {}", deviceId); deviceInfo = createDeviceInfo(deviceId); @@ -558,6 +569,27 @@ public CompletableFuture executeAtMaster(NetconfProxyMessage proxyMessage } } + @Override + public boolean pingDevice(DeviceId deviceId) { + NetconfProxyMessage proxyMessage = new DefaultNetconfProxyMessage( + NetconfProxyMessage.SubjectType.GET_DEVICE_CAPABILITIES_SET, deviceId, null, localNodeId); + CompletableFuture reply; + if (deviceService.getRole(deviceId).equals(MastershipRole.MASTER)) { + reply = handleProxyMessage(proxyMessage); + } else { + reply = relayMessageToMaster(proxyMessage); + } + try { + T deviceCapabilities = reply.get(); + log.debug("Get device capabilities from device : {} -> {}", deviceId, deviceCapabilities); + } catch (InterruptedException | ExecutionException e) { + log.error("Error while getting device capabilities for device : {}", deviceId); + log.error("Error details : ", e); + return false; + } + return true; + } + public CompletableFuture relayMessageToMaster(NetconfProxyMessage proxyMessage) { DeviceId deviceId = proxyMessage.deviceId(); @@ -592,6 +624,7 @@ public CompletableFuture relayMessageToMaster(NetconfProxyMessage proxyMe } private CompletableFuture handleProxyMessage(NetconfProxyMessage proxyMessage) { + countDownLatch = new CountDownLatch(1); try { switch (proxyMessage.subjectType()) { case GET_DEVICE_CAPABILITIES_SET: @@ -639,7 +672,7 @@ public T handleIncomingMessage(NetconfProxyMessage proxyMessage) throws Netc NetconfProxyMessage.SubjectType subjectType = proxyMessage.subjectType(); NetconfSession secureTransportSession; - if (netconfDeviceMap.get(deviceId).isMasterSession()) { + if (netconfDeviceMap.get(deviceId) != null && netconfDeviceMap.get(deviceId).isMasterSession()) { secureTransportSession = netconfDeviceMap.get(deviceId).getSession(); } else { throw new NetconfException("Ssh session not present"); @@ -709,7 +742,7 @@ public Set handleIncomingSetMessage(NetconfProxyMessage proxyMessage) th NetconfProxyMessage.SubjectType subjectType = proxyMessage.subjectType(); NetconfSession secureTransportSession; - if (netconfDeviceMap.get(deviceId).isMasterSession()) { + if (netconfDeviceMap.get(deviceId) != null && netconfDeviceMap.get(deviceId).isMasterSession()) { secureTransportSession = netconfDeviceMap.get(deviceId).getSession(); } else { throw new NetconfException("SSH session not present"); diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionMinaImpl.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionMinaImpl.java index 22bb2b8ed03..61913bde67f 100644 --- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionMinaImpl.java +++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionMinaImpl.java @@ -122,7 +122,6 @@ public class NetconfSessionMinaImpl extends AbstractNetconfSession { private static final String NETCONF_11_CAPABILITY = "urn:ietf:params:netconf:base:1.1"; private static final String NETCONF_CLIENT_CAPABILITY = "netconfClientCapability"; private static final String NOTIFICATION_STREAM = "notificationStream"; - private static final String SSH_KEY_PATH = "/root/.ssh/id_rsa"; private static final String EMPTY_STRING = ""; private static ServiceDirectory directory = new DefaultServiceDirectory(); @@ -257,16 +256,17 @@ private void startSession() throws IOException { deviceInfo.port()) .verify(connectTimeout, TimeUnit.SECONDS); session = connectFuture.getSession(); - //Using the onos private ssh key at path SSH_KEY_PATH + //Using the onos private ssh key at path NetconfControllerImpl.sshKeyPath + String sshKeyPath = NetconfControllerImpl.sshKeyPath; if (deviceInfo.password().equals(EMPTY_STRING)) { - try (PEMParser pemParser = new PEMParser(new FileReader(SSH_KEY_PATH))) { + try (PEMParser pemParser = new PEMParser(new FileReader(sshKeyPath))) { JcaPEMKeyConverter converter = new JcaPEMKeyConverter().setProvider(BouncyCastleProvider.PROVIDER_NAME); try { KeyPair kp = converter.getKeyPair((PEMKeyPair) pemParser.readObject()); session.addPublicKeyIdentity(kp); } catch (IOException e) { throw new NetconfException("Failed to authenticate session. Please check if ssk key is generated" + -" on ONOS host machine at path " + SSH_KEY_PATH + " : ", e); +" on ONOS host machine at path " + sshKeyPath + " : ", e); } } } else { @@ -580,7 +580,7 @@ public CompletableFuture rpc(String request) { String rpc = request; // - assign message-id - int msgId = messageIdInteger.incrementAndGet(); + int msgId = messageIdInteger.getAndIncrement(); // - re-write request to insert message-id // FIXME avoid using formatRequestMessageId rpc = formatRequestMessageId(rpc, msgId); diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/OsgiPropertyConstants.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/OsgiPropertyConstants.java index 6fcdcfda08d..cb1570650ea 100644 --- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/OsgiPropertyConstants.java +++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/OsgiPropertyConstants.java @@ -34,4 +34,7 @@ private OsgiPropertyConstants() {} public static final String SSH_LIBRARY = "sshLibrary"; public static final String SSH_LIBRARY_DEFAULT = "apache-mina"; + + public static final String SSH_KEY_PATH = "sshKeyPath"; + public static final String SSH_KEY_PATH_DEFAULT = "/root/.ssh/id_rsa"; } diff --git a/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelHandler.java b/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelHandler.java index 84d9deba1ee..79645eb79e5 100644 --- a/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelHandler.java +++ b/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelHandler.java @@ -19,10 +19,12 @@ import static java.util.concurrent.Executors.newSingleThreadExecutor; import static org.onlab.packet.Ethernet.TYPE_BSN; import static org.onlab.packet.Ethernet.TYPE_LLDP; +import static org.onlab.util.GroupedThreadFactory.groupedThreadFactory; import static org.onlab.util.Tools.groupedThreads; import static org.onosproject.openflow.controller.Dpid.uri; import java.io.IOException; +import java.io.UncheckedIOException; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.nio.ByteBuffer; @@ -44,10 +46,13 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.RejectedExecutionException; +import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantLock; +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import org.onlab.util.GroupedThreadFactory; import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality; import org.onlab.osgi.DefaultServiceDirectory; @@ -197,7 +202,6 @@ class OFChannelHandler extends ChannelInboundHandlerAdapter private List> messageClassifiersMapProducer = new CopyOnWriteArrayList>(); - /** * Lock held by take, poll, etc. */ @@ -213,7 +217,6 @@ class OFChannelHandler extends ChannelInboundHandlerAdapter */ private final AtomicInteger totalCount = new AtomicInteger(); - /** * Single thread executor for OFMessage dispatching. * @@ -236,10 +239,15 @@ class OFChannelHandler extends ChannelInboundHandlerAdapter private final Deque dispatchBacklog; /** - * Port Status executor to offload from the main thread the processing of port - * status OF messages. + * Executor for runtime status events to offload from the main thread the + * processing of port status, mastership and connection OF messages. + * Executor is instantiated as a single thread executor guaranteeing processing + * of device status messages in order. */ - protected ExecutorService portStatusExecutor; + // TODO With a huge number of ports per device congestion can be created at the runtimeExecutor, + // leading to mastership roles check going into timeout, with issues in multi-instance mastership handling. + // An option is to Experiment with priority tasks - to give priority (under certain conditions) to the ROLE_REPLY + protected ExecutorService runtimeStatusExecutor; /** * Create a new unconnected OFChannelHandler. @@ -252,8 +260,17 @@ class OFChannelHandler extends ChannelInboundHandlerAdapter this.pendingPortStatusMsg = new CopyOnWriteArrayList<>(); this.portDescReplies = new ArrayList<>(); duplicateDpidFound = Boolean.FALSE; - portStatusExecutor = newSingleThreadExecutor( - groupedThreads("onos/of-channel-handler", "port-status-%d", log)); + String groupName = "onos/of-channel-handler"; + String pattern = "runtime-status-%d"; + ThreadFactory factory = new ThreadFactoryBuilder() + .setThreadFactory(groupedThreadFactory(groupName)) + .setNameFormat(groupName.replace(GroupedThreadFactory.DELIMITER, "-") + "-" + pattern) + .setUncaughtExceptionHandler((t, e) -> { + log.error("Exception on " + t.getName(), e); + throw new UncheckedIOException(new IOException(e)); + }).build(); + runtimeStatusExecutor = newSingleThreadExecutor( + factory); //Initialize queues and classifiers dispatchBacklog = new LinkedBlockingDeque<>(BACKLOG_READ_BUFFER_DEFAULT); for (int i = 0; i < NUM_OF_QUEUES; i++) { @@ -267,15 +284,11 @@ class OFChannelHandler extends ChannelInboundHandlerAdapter } } - - // XXX S consider if necessary public void disconnectSwitch() { sw.disconnectSwitch(); } - - //************************* // Channel State Machine //************************* @@ -376,7 +389,6 @@ void processOFPortStatus(OFChannelHandler h, OFPortStatus m) } }, - /** * We are waiting for a features reply message. Once we receive it, the * behavior depends on whether this is a 1.0 or 1.3 switch. For 1.0, @@ -570,7 +582,6 @@ void processOFPortStatus(OFChannelHandler h, OFPortStatus m) } }, - /** * We are waiting for a OFDescriptionStat message from the switch. * Once we receive any stat message we try to parse it. If it's not @@ -675,7 +686,6 @@ void processOFPortStatus(OFChannelHandler h, OFPortStatus m) } }, - /** * We are waiting for the respective switch driver to complete its * configuration. Notice that we do not consider this to be part of the main @@ -692,8 +702,6 @@ void processOFError(OFChannelHandler h, OFErrorMsg m) // will never be called. We override processOFMessage } - - @Override void processOFMessage(OFChannelHandler h, OFMessage m) throws IOException, SwitchStateException { @@ -827,7 +835,6 @@ void processIdle(OFChannelHandler h) throws IOException { } }, - /** * This controller is in MASTER role for this switch. We enter this state * after requesting and winning control from the global registry. @@ -846,20 +853,19 @@ void processOFError(OFChannelHandler h, OFErrorMsg m) throws IOException, SwitchStateException { // if we get here, then the error message is for something else if (m.getErrType() == OFErrorType.BAD_REQUEST && - (((OFBadRequestErrorMsg) m).getCode() == - OFBadRequestCode.EPERM || - ((OFBadRequestErrorMsg) m).getCode() == - OFBadRequestCode.IS_SLAVE)) { + (((OFBadRequestErrorMsg) m).getCode() == OFBadRequestCode.EPERM || + ((OFBadRequestErrorMsg) m).getCode() == OFBadRequestCode.IS_SLAVE)) { // We are the master controller and the switch returned // a permission error. This is a likely indicator that - // the switch thinks we are slave. Reassert our - // role + // the switch thinks we are slave. Reassert our role // FIXME: this could be really bad during role transitions // if two controllers are master (even if its only for // a brief period). We might need to see if these errors // persist before we reassert - - h.sw.reassertRole(); + // Scheduling in the executor to keep in line with other status events. + h.runtimeStatusExecutor.submit(() -> { + h.sw.reassertRole(); + }); } else if (m.getErrType() == OFErrorType.FLOW_MOD_FAILED && ((OFFlowModFailedErrorMsg) m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL) { @@ -910,32 +916,39 @@ void processOFExperimenter(OFChannelHandler h, OFExperimenter m) @Override void processOFRoleReply(OFChannelHandler h, OFRoleReply m) throws SwitchStateException { - h.sw.handleRole(m); + h.runtimeStatusExecutor.execute(() -> { + try { + h.sw.handleRole(m); + } catch (SwitchStateException e) { + log.error("SwitchStateException while processing " + + "role reply message {}", m, e); + log.error("Disconnecting switch {} due to switch state error: {}", + h.getSwitchInfoString(), e.getMessage()); + h.channel.close(); + } + }); } @Override void processOFPortStatus(OFChannelHandler h, OFPortStatus m) throws SwitchStateException { // Handing over processing of port status messages to a thread to avoid - // getting blocked on the main thread and resulting other OF - // message being delayed. - // Ordering of the port status messages is guaranteed by portStatsExecutor - // being a single threaded executor. - // This executor will execute concurrently to the netty thread; - // meaning that the order is no more guaranteed like it was in the - // past between port status handling and the other events handled - // inline to the netty thread. - // This also remove guarantees of ordered processing of ROLE_CHANGED - // during active state, this should have no effect given that mastership - // is ignored here: https://github.com/opennetworkinglab/onos/blob/master/ - // protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/ - // driver/AbstractOpenFlowSwitch.java#L279 - h.portStatusExecutor.submit(() -> { + // getting blocked on the main thread and resulting other OF message being delayed. + // Ordering of the status messages is guaranteed by runtimeStatsExecutor being a single + // threaded executor. This executor will execute concurrently to the netty thread; meaning + // that the order is no more guaranteed like it was in the past between different + // status handling messages and other messages: statistics (port, flows, meters, groups) + // barriers, idle, features, packet-ins handled inline to the netty thread. This executor + // will only apply to messages during the ACTIVE state of the connection. + h.runtimeStatusExecutor.execute(() -> { try { handlePortStatusMessage(h, m, true); } catch (SwitchStateException e) { log.error("SwitchStateException while processing " + "port status message {}", m, e); + log.error("Disconnecting switch {} due to switch state error: {}", + h.getSwitchInfoString(), e.getMessage()); + h.channel.close(); } }); //h.dispatchMessage(m); @@ -1079,8 +1092,6 @@ protected void disconnectDuplicate(OFChannelHandler h) { h.channel.disconnect(); } - - /** * Handles all pending port status messages before a switch is declared * activated in MASTER or EQUAL role. Note that since this handling @@ -1155,7 +1166,6 @@ protected void handlePortStatusMessage(OFChannelHandler h, OFPortStatus m, h.sw.handleMessage(m); } - /** * Process an OF message received on the channel and * update state accordingly. @@ -1359,8 +1369,6 @@ void processIdle(OFChannelHandler h) throws IOException { } } - - //************************* // Channel handler methods //************************* @@ -1400,7 +1408,6 @@ public void channelActive(ChannelHandlerContext ctx) @Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { - log.info("Switch disconnected callback for sw:{}. Cleaning up ...", getSwitchInfoString()); @@ -1409,29 +1416,31 @@ public void channelInactive(ChannelHandlerContext ctx) dispatcher = null; } - if (thisdpid != 0) { - if (!duplicateDpidFound) { - // if the disconnected switch (on this ChannelHandler) - // was not one with a duplicate-dpid, it is safe to remove all - // state for it at the controller. Notice that if the disconnected - // switch was a duplicate-dpid, calling the method below would clear - // all state for the original switch (with the same dpid), - // which we obviously don't want. - log.info("{}:removal called", getSwitchInfoString()); - if (sw != null) { - sw.removeConnectedSwitch(); - } - } else { - // A duplicate was disconnected on this ChannelHandler, - // this is the same switch reconnecting, but the original state was - // not cleaned up - XXX check liveness of original ChannelHandler - log.info("{}:duplicate found", getSwitchInfoString()); - duplicateDpidFound = Boolean.FALSE; - } - } else { - log.warn("no dpid in channelHandler registered for " - + "disconnected switch {}", getSwitchInfoString()); - } + if (thisdpid != 0) { + if (!duplicateDpidFound) { + // if the disconnected switch (on this ChannelHandler) + // was not one with a duplicate-dpid, it is safe to remove all + // state for it at the controller. Notice that if the disconnected + // switch was a duplicate-dpid, calling the method below would clear + // all state for the original switch (with the same dpid), + // which we obviously don't want. + runtimeStatusExecutor.submit(() -> { + log.info("{}:removal called", getSwitchInfoString()); + if (sw != null) { + sw.removeConnectedSwitch(); + } + }); + } else { + // A duplicate was disconnected on this ChannelHandler, + // this is the same switch reconnecting, but the original state was + // not cleaned up - XXX check liveness of original ChannelHandler + log.info("{}:duplicate found", getSwitchInfoString()); + duplicateDpidFound = Boolean.FALSE; + } + } else { + log.warn("no dpid in channelHandler registered for " + + "disconnected switch {}", getSwitchInfoString()); + } } @Override diff --git a/protocols/ovsdb/ctl/src/main/java/org/onosproject/ovsdb/controller/impl/Controller.java b/protocols/ovsdb/ctl/src/main/java/org/onosproject/ovsdb/controller/impl/Controller.java index 86998c0f64d..c4616be89de 100644 --- a/protocols/ovsdb/ctl/src/main/java/org/onosproject/ovsdb/controller/impl/Controller.java +++ b/protocols/ovsdb/ctl/src/main/java/org/onosproject/ovsdb/controller/impl/Controller.java @@ -254,6 +254,8 @@ public void start(OvsdbAgent agent, Callback monitorCallback, boolean mode) { log.warn("Interrupted while waiting to start"); Thread.currentThread().interrupt(); } + } else { + initEventLoopGroup(); } } diff --git a/protocols/p4runtime/BUILD b/protocols/p4runtime/BUILD index 39f640312fb..5db0ebea4cd 100644 --- a/protocols/p4runtime/BUILD +++ b/protocols/p4runtime/BUILD @@ -3,6 +3,7 @@ BUNDLES = [ "//protocols/p4runtime/ctl:onos-protocols-p4runtime-ctl", "//protocols/p4runtime/model:onos-protocols-p4runtime-model", "//protocols/p4runtime/proto:onos-protocols-p4runtime-proto", + "//protocols/p4runtime/utils:onos-protocols-p4runtime-utils", ] onos_app( diff --git a/protocols/p4runtime/ctl/BUILD b/protocols/p4runtime/ctl/BUILD index 5fbbd6896a2..dca5f38eec8 100644 --- a/protocols/p4runtime/ctl/BUILD +++ b/protocols/p4runtime/ctl/BUILD @@ -4,6 +4,7 @@ COMPILE_DEPS = CORE_DEPS + KRYO + [ "//protocols/grpc/ctl:onos-protocols-grpc-ctl", "//protocols/p4runtime/api:onos-protocols-p4runtime-api", "//protocols/p4runtime/proto:onos-protocols-p4runtime-proto", + "//protocols/p4runtime/utils:onos-protocols-p4runtime-utils", "//deps:com_google_protobuf_protobuf_java", "//deps:io_grpc_grpc_api_context", "//deps:io_grpc_grpc_netty", diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/P4RuntimeClientImpl.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/P4RuntimeClientImpl.java index fdf5a947556..5e29d62bcb0 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/P4RuntimeClientImpl.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/P4RuntimeClientImpl.java @@ -55,10 +55,12 @@ public final class P4RuntimeClientImpl private static final long DEFAULT_P4_DEVICE_ID = 1; // TODO: consider making timeouts configurable per-device via netcfg + // We have measured that some devices can take up to 15s to push a pipeline + // which can block potentially other READ done against the target. /** * Timeout in seconds for short/fast RPCs. */ - static final int SHORT_TIMEOUT_SECONDS = 10; + static final int SHORT_TIMEOUT_SECONDS = 15; /** * Timeout in seconds for RPCs that involve transfer of potentially large * amount of data. This shoulld be long enough to allow for network delay 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 3b628b45d15..c7e21cbdd0d 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 @@ -166,16 +166,20 @@ public CompletableFuture isAnyPipelineConfigSet(long p4DeviceId) { private boolean comparePipelineConfig( PiPipeconf pipeconf, ForwardingPipelineConfig cfgFromDevice) { if (cfgFromDevice == null) { + log.debug("Failed to comparePipelineConfig. cfgFromDevice is null"); return false; } final ForwardingPipelineConfig expectedCfg = buildForwardingPipelineConfigMsg( pipeconf, null); if (expectedCfg == null) { + // Problem logged by buildForwardingPipelineConfigMsg return false; } if (cfgFromDevice.hasCookie()) { + log.debug("Cookie from device = {}", cfgFromDevice.getCookie().getCookie()); + log.debug("Pipeconf fingerprint = {}", pipeconf.fingerprint()); return cfgFromDevice.getCookie().getCookie() == pipeconf.fingerprint(); } diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/StreamClientImpl.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/StreamClientImpl.java index b2516b43f6e..5c64a0c9920 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/StreamClientImpl.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/StreamClientImpl.java @@ -181,12 +181,21 @@ private void handlePendingElectionId(BigInteger masterElectionId) { ARBITRATION_RETRY_SECONDS, TimeUnit.SECONDS); } else { // Send now. - log.info("Setting mastership on {}... " + - "master={}, newElectionId={}, " + - "masterElectionId={}, sessionOpen={}", - deviceId, requestedToBeMaster.get(), - pendingElectionId, masterElectionId, - streamChannelManager.isOpen()); + if (log.isDebugEnabled()) { + log.debug("Setting mastership on {}... " + + "master={}, newElectionId={}, " + + "masterElectionId={}, sessionOpen={}", + deviceId, requestedToBeMaster.get(), + pendingElectionId, masterElectionId, + streamChannelManager.isOpen()); + } else if (!pendingElectionId.equals(lastUsedElectionId)) { + log.info("Setting mastership on {}... " + + "master={}, newElectionId={}, " + + "masterElectionId={}, sessionOpen={}", + deviceId, requestedToBeMaster.get(), + pendingElectionId, masterElectionId, + streamChannelManager.isOpen()); + } // Optimistically set the reported master status, if wrong, it // will be updated by the arbitration response. This alleviates // race conditions when calling isMaster() right after setting @@ -445,6 +454,12 @@ public void onNext(StreamMessageResponse message) { case ARBITRATION: handleArbitrationUpdate(message.getArbitration()); return; + case ERROR: + P4RuntimeOuterClass.StreamError error = message.getError(); + log.warn("Receive stream error {} from {} Canonical Code: {} Message: {} Space: {} Code: {}", + error.getDetailsCase(), deviceId, error.getCanonicalCode(), error.getMessage(), + error.getSpace(), error.getCode()); + return; default: log.warn("Unrecognized StreamMessageResponse from {}: {}", deviceId, message.getUpdateCase()); diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/WriteRequestImpl.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/WriteRequestImpl.java index 36befeb076b..45e2c75b610 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/WriteRequestImpl.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/client/WriteRequestImpl.java @@ -169,7 +169,7 @@ public CompletableFuture submit() { client.deviceId(), writeRequest.getUpdatesCount()); if (writeRequest.getUpdatesCount() == 0) { // No need to ask the server. - return completedFuture(WriteResponseImpl.EMPTY); + return completedFuture(responseBuilder.buildAsIs()); } final CompletableFuture future = new CompletableFuture<>(); @@ -238,7 +238,12 @@ private void appendToRequestMsg(P4RuntimeWriteClient.UpdateType updateType, .build(); requestMsg.addUpdates(updateMsg); responseBuilder.addPendingResponse(handle, piEntity, updateType); + if (log.isTraceEnabled()) { + log.trace("Adding {} update to write request for {}: {}", updateType, handle.deviceId(), + piEntity == null ? handle : piEntity); + } } catch (CodecException e) { + log.error("Failed to add {} to write request for {}: {}", updateType, handle.deviceId(), e.getMessage()); responseBuilder.addFailedResponse( handle, piEntity, updateType, e.getMessage(), P4RuntimeWriteClient.EntityUpdateStatus.CODEC_ERROR); diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/controller/DistributedMasterElectionIdStore.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/controller/DistributedMasterElectionIdStore.java index 04e39f73c8b..f5dea71f63d 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/controller/DistributedMasterElectionIdStore.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/controller/DistributedMasterElectionIdStore.java @@ -17,6 +17,7 @@ package org.onosproject.p4runtime.ctl.controller; import com.google.common.collect.Maps; +import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; import org.onlab.util.KryoNamespace; import org.onosproject.net.DeviceId; @@ -51,6 +52,7 @@ public class DistributedMasterElectionIdStore implements MasterElectionIdStore { private static final KryoNamespace SERIALIZER = KryoNamespace.newBuilder() .register(KryoNamespaces.API) .register(Pair.class) + .register(ImmutablePair.class) .register(Long.class) .register(BigInteger.class) .build(); diff --git a/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/P4RuntimeGroupTest.java b/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/P4RuntimeGroupTest.java index 146f10218c1..1ee881b47da 100644 --- a/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/P4RuntimeGroupTest.java +++ b/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/P4RuntimeGroupTest.java @@ -45,6 +45,7 @@ import org.onosproject.net.pi.runtime.PiActionProfileGroupId; import org.onosproject.net.pi.runtime.PiActionProfileMember; import org.onosproject.net.pi.runtime.PiActionProfileMemberId; +import org.onosproject.p4runtime.api.P4RuntimeWriteClient; import org.onosproject.p4runtime.ctl.client.P4RuntimeClientImpl; import org.onosproject.p4runtime.ctl.controller.P4RuntimeControllerImpl; import p4.v1.P4RuntimeOuterClass.ActionProfileGroup; @@ -167,6 +168,28 @@ public void teardown() { client.shutdown(); } + @Test + public void testInvalidPiActionProfileMember() { + PiActionParam param = new PiActionParam(PORT_PARAM_ID, "invalidString"); + PiAction piAction = PiAction.builder() + .withId(EGRESS_PORT_ACTION_ID) + .withParameter(param).build(); + PiActionProfileMember actionProfileMember = PiActionProfileMember.builder() + .forActionProfile(ACT_PROF_ID) + .withAction(piAction) + .withId(PiActionProfileMemberId.of(BASE_MEM_ID + 1)) + .build(); + P4RuntimeWriteClient.WriteRequest writeRequest = client.write(P4_DEVICE_ID, PIPECONF); + writeRequest.insert(actionProfileMember); + P4RuntimeWriteClient.WriteResponse response = writeRequest.submitSync(); + + assertEquals(false, response.isSuccess()); + assertEquals(1, response.all().size()); + assertEquals("Wrong size for param 'port' of action 'set_egress_port', " + + "expected no more than 2 bytes, but found 13", + response.all().iterator().next().explanation()); + } + @Test public void testInsertPiActionProfileGroup() throws Exception { CompletableFuture complete = p4RuntimeServerImpl.expectRequests(1); @@ -222,7 +245,7 @@ public void testInsertPiActionMembers() throws Exception { Action.Param param = action.getParamsList().get(0); assertEquals(1, param.getParamId()); byte outPort = (byte) (member.getMemberId() - BASE_MEM_ID); - ByteString bs = ByteString.copyFrom(new byte[]{0, outPort}); + ByteString bs = ByteString.copyFrom(new byte[]{outPort}); assertEquals(bs, param.getValue()); } } diff --git a/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/codec/TableEntryEncoderTest.java b/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/codec/TableEntryEncoderTest.java index 0619f6a7487..a5ccecfde0d 100644 --- a/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/codec/TableEntryEncoderTest.java +++ b/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/codec/TableEntryEncoderTest.java @@ -34,19 +34,24 @@ import org.onosproject.net.pi.runtime.PiCounterCellData; import org.onosproject.net.pi.runtime.PiExactFieldMatch; import org.onosproject.net.pi.runtime.PiMatchKey; +import org.onosproject.net.pi.runtime.PiOptionalFieldMatch; import org.onosproject.net.pi.runtime.PiTableEntry; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; import org.onosproject.p4runtime.ctl.utils.P4InfoBrowser; import org.onosproject.p4runtime.ctl.utils.PipeconfHelper; +import p4.v1.P4RuntimeOuterClass; import p4.v1.P4RuntimeOuterClass.Action; import p4.v1.P4RuntimeOuterClass.CounterData; import p4.v1.P4RuntimeOuterClass.TableEntry; import java.net.URL; import java.util.Random; +import java.util.stream.Collectors; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.hasItem; import static org.onlab.util.ImmutableByteSequence.copyFrom; import static org.onlab.util.ImmutableByteSequence.ofOnes; import static org.onosproject.net.pi.model.PiPipeconf.ExtensionType.P4_INFO_TEXT; @@ -66,6 +71,7 @@ public class TableEntryEncoderTest { private static final String DST_ADDR = "dstAddr"; private static final String SRC_ADDR = "srcAddr"; private static final String STANDARD_METADATA = "standard_metadata"; + private static final String LOCAL_METADATA = "local_metadata"; private static final String ECMP_METADATA = "ecmp_metadata"; private static final String INGRESS_PORT = "ingress_port"; private static final String ETHER_TYPE = "etherType"; @@ -76,6 +82,7 @@ public class TableEntryEncoderTest { private final Random rand = new Random(); private final URL p4InfoUrl = this.getClass().getResource("/test.p4info"); + private final URL p4InfoUrl2 = this.getClass().getResource("/test_p4runtime_translation_p4info.txt"); private final PiPipeconf defaultPipeconf = DefaultPiPipeconf.builder() .withId(new PiPipeconfId("mock")) @@ -83,17 +90,31 @@ public class TableEntryEncoderTest { .addExtension(P4_INFO_TEXT, p4InfoUrl) .build(); + private final PiPipeconf defaultPipeconf2 = DefaultPiPipeconf.builder() + .withId(new PiPipeconfId("mock")) + .withPipelineModel(EasyMock.niceMock(PiPipelineModel.class)) + .addExtension(P4_INFO_TEXT, p4InfoUrl2) + .build(); + private final P4InfoBrowser browser = PipeconfHelper.getP4InfoBrowser(defaultPipeconf); + private final P4InfoBrowser browser2 = PipeconfHelper.getP4InfoBrowser(defaultPipeconf2); private final ImmutableByteSequence ethAddr = copyFrom(rand.nextInt()).fit(48); + private final ImmutableByteSequence ethAddrString = ImmutableByteSequence.copyFrom( + "00:11:22:33:44:55:66"); private final ImmutableByteSequence portValue = copyFrom((short) rand.nextInt()); + private final ImmutableByteSequence portValueString = ImmutableByteSequence.copyFrom( + String.format("Ethernet%d", rand.nextInt())); + private final ImmutableByteSequence portValue32Bit = copyFrom((short) rand.nextInt()).fit(32); private final PiMatchFieldId ethDstAddrFieldId = PiMatchFieldId.of(HDR + DOT + ETHERNET + DOT + DST_ADDR); private final PiMatchFieldId ethSrcAddrFieldId = PiMatchFieldId.of(HDR + DOT + ETHERNET + DOT + SRC_ADDR); private final PiMatchFieldId inPortFieldId = PiMatchFieldId.of(STANDARD_METADATA + DOT + INGRESS_PORT); + private final PiMatchFieldId inPortFieldId2 = PiMatchFieldId.of(LOCAL_METADATA + DOT + INGRESS_PORT); private final PiMatchFieldId ethTypeFieldId = PiMatchFieldId.of(HDR + DOT + ETHERNET + DOT + ETHER_TYPE); private final PiMatchFieldId ecmpGroupFieldId = PiMatchFieldId.of(META + DOT + ECMP_METADATA + DOT + ECMP_GROUP_ID); private final PiActionParamId portParamId = PiActionParamId.of(PORT); private final PiActionId outActionId = PiActionId.of(SET_EGRESS_PORT); + private final PiActionId outActionId2 = PiActionId.of(SET_EGRESS_PORT + "2"); private final PiTableId tableId = PiTableId.of(TABLE_0); private final PiTableId ecmpTableId = PiTableId.of(TABLE_ECMP); private final PiCounterCellData counterCellData = new PiCounterCellData(PACKETS, BYTES); @@ -117,6 +138,59 @@ public class TableEntryEncoderTest { .withCounterCellData(counterCellData) .build(); + private final PiTableEntry piTableEntry2 = PiTableEntry + .builder() + .forTable(tableId) + .withMatchKey(PiMatchKey.builder() + .addFieldMatch(new PiExactFieldMatch(inPortFieldId2, portValue32Bit)) + .addFieldMatch(new PiExactFieldMatch(ethDstAddrFieldId, ethAddrString)) + .addFieldMatch(new PiExactFieldMatch(ethSrcAddrFieldId, ethAddrString)) + .addFieldMatch(new PiOptionalFieldMatch(ethTypeFieldId, portValue)) + .build()) + .withAction(PiAction + .builder() + .withId(outActionId) + .withParameter(new PiActionParam(portParamId, portValueString)) + .build()) + .withPriority(1) + .withCookie(2) + .build(); + + private final PiTableEntry piTableEntry3 = PiTableEntry + .builder() + .forTable(tableId) + .withMatchKey(PiMatchKey.builder() + .addFieldMatch(new PiExactFieldMatch(inPortFieldId2, portValue32Bit)) + .addFieldMatch(new PiExactFieldMatch(ethDstAddrFieldId, ethAddrString)) + .addFieldMatch(new PiExactFieldMatch(ethSrcAddrFieldId, ethAddrString)) + .addFieldMatch(new PiOptionalFieldMatch(ethTypeFieldId, portValue)) + .build()) + .withAction(PiAction + .builder() + .withId(outActionId2) + .withParameter(new PiActionParam(portParamId, portValue32Bit)) + .build()) + .withPriority(1) + .withCookie(2) + .build(); + + private final PiTableEntry piTableEntryWithoutOptionalField = PiTableEntry + .builder() + .forTable(tableId) + .withMatchKey(PiMatchKey.builder() + .addFieldMatch(new PiExactFieldMatch(inPortFieldId2, portValue32Bit)) + .addFieldMatch(new PiExactFieldMatch(ethDstAddrFieldId, ethAddrString)) + .addFieldMatch(new PiExactFieldMatch(ethSrcAddrFieldId, ethAddrString)) + .build()) + .withAction(PiAction + .builder() + .withId(outActionId) + .withParameter(new PiActionParam(portParamId, portValueString)) + .build()) + .withPriority(1) + .withCookie(2) + .build(); + private final PiTableEntry piTableEntryWithoutAction = PiTableEntry .builder() .forTable(tableId) @@ -175,7 +249,6 @@ public void testTableEntryEncoder() throws Exception { new EqualsTester() .addEqualityGroup(piTableEntry, decodedPiTableEntry) .testEquals(); - // Table ID. int p4InfoTableId = browser.tables().getByName(tableId.id()).getPreamble().getId(); int encodedTableId = tableEntryMsg.getTableId(); @@ -183,7 +256,7 @@ public void testTableEntryEncoder() throws Exception { // Ternary match. byte[] encodedTernaryMatchValue = tableEntryMsg.getMatch(0).getTernary().getValue().toByteArray(); - assertThat(encodedTernaryMatchValue, is(ethAddr.asArray())); + assertThat(encodedTernaryMatchValue, is(ethAddr.canonical().asArray())); Action actionMsg = tableEntryMsg.getAction().getAction(); @@ -210,6 +283,64 @@ public void testTableEntryEncoder() throws Exception { // TODO: improve, assert other field match types (ternary, LPM) } + @Test + public void testTableEntryEncoderWithTranslations() throws Exception { + TableEntry tableEntryMsg = Codecs.CODECS.tableEntry().encode( + piTableEntry2, null, defaultPipeconf2); + PiTableEntry decodedPiTableEntry = Codecs.CODECS.tableEntry().decode( + tableEntryMsg, null, defaultPipeconf2); + + // Test equality for decoded entry. + new EqualsTester() + .addEqualityGroup(piTableEntry2, decodedPiTableEntry) + .testEquals(); + + // Check the exact match with string + byte[] encodedExactMatchValueString = tableEntryMsg.getMatch(1).getExact().getValue().toByteArray(); + assertThat(encodedExactMatchValueString, is(ethAddrString.asArray())); + + Action actionMsg = tableEntryMsg.getAction().getAction(); + + // Check action param value with string + byte[] encodedActionParamString = actionMsg.getParams(0).getValue().toByteArray(); + assertThat(encodedActionParamString, is(portValueString.asArray())); + + TableEntry tableEntryMsg1 = Codecs.CODECS.tableEntry().encode( + piTableEntry3, null, defaultPipeconf2); + PiTableEntry decodedPiTableEntry1 = Codecs.CODECS.tableEntry().decode( + tableEntryMsg1, null, defaultPipeconf2); + + // Test equality for decoded entry. + new EqualsTester() + .addEqualityGroup(piTableEntry3, decodedPiTableEntry1) + .testEquals(); + } + + @Test + public void testTableEntryEncoderWithoutOptionalField() throws Exception { + TableEntry tableEntryMsg = Codecs.CODECS.tableEntry().encode( + piTableEntryWithoutOptionalField, null, defaultPipeconf2); + PiTableEntry decodedPiTableEntry = Codecs.CODECS.tableEntry().decode( + tableEntryMsg, null, defaultPipeconf2); + + // Table ID. + int p4InfoTableId = browser2.tables().getByName(tableId.id()).getPreamble().getId(); + int encodedTableId = tableEntryMsg.getTableId(); + assertThat(encodedTableId, is(p4InfoTableId)); + + // Test equality for decoded entry. + new EqualsTester() + .addEqualityGroup(piTableEntryWithoutOptionalField, decodedPiTableEntry) + .testEquals(); + + // no optional field + assertThat(tableEntryMsg.getMatchCount(), is(3)); + assertThat(tableEntryMsg.getMatchList().stream() + .map(P4RuntimeOuterClass.FieldMatch::getFieldMatchTypeCase) + .collect(Collectors.toList()), + not(hasItem(P4RuntimeOuterClass.FieldMatch.FieldMatchTypeCase.OPTIONAL))); + } + @Test public void testActopProfileGroup() throws Exception { TableEntry tableEntryMsg = Codecs.CODECS.tableEntry().encode( @@ -255,7 +386,7 @@ public void testEncodeWithNoAction() throws Exception { // Ternary match. byte[] encodedTernaryMatchValue = tableEntryMsg.getMatch(0).getTernary().getValue().toByteArray(); - assertThat(encodedTernaryMatchValue, is(ethAddr.asArray())); + assertThat(encodedTernaryMatchValue, is(ethAddr.canonical().asArray())); // no action assertThat(tableEntryMsg.hasAction(), is(false)); diff --git a/protocols/p4runtime/ctl/src/test/resources/Makefile b/protocols/p4runtime/ctl/src/test/resources/Makefile new file mode 100644 index 00000000000..964ca18c820 --- /dev/null +++ b/protocols/p4runtime/ctl/src/test/resources/Makefile @@ -0,0 +1,7 @@ +all: test + +test: test_p4runtime_translation.p4 + @./bmv2-compile.sh "test_p4runtime_translation" "" + +clean: + rm test_p4runtime_translation_p4info.txt diff --git a/protocols/p4runtime/ctl/src/test/resources/bmv2-compile.sh b/protocols/p4runtime/ctl/src/test/resources/bmv2-compile.sh new file mode 100755 index 00000000000..4bcf40b4625 --- /dev/null +++ b/protocols/p4runtime/ctl/src/test/resources/bmv2-compile.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -e + +PROFILE=$1 +OTHER_FLAGS=$2 + +SRC_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +echo +echo "## Compiling profile ${PROFILE} in ${SRC_DIR}..." + +# Using stable-20210108 because stable doesn't support @p4runtime_translation annotations +dockerImage=opennetworking/p4c:stable-20210108 +dockerRun="docker run --rm -w ${SRC_DIR} -v ${SRC_DIR}:${SRC_DIR} ${dockerImage}" + + +# Generate BMv2 JSON and P4Info. +(set -x; ${dockerRun} p4c-bm2-ss --arch v1model \ + ${OTHER_FLAGS} \ + --p4runtime-files ${SRC_DIR}/${PROFILE}_p4info.txt ${PROFILE}.p4) diff --git a/protocols/p4runtime/ctl/src/test/resources/test_p4runtime_translation.p4 b/protocols/p4runtime/ctl/src/test/resources/test_p4runtime_translation.p4 new file mode 100644 index 00000000000..7f5431cb03a --- /dev/null +++ b/protocols/p4runtime/ctl/src/test/resources/test_p4runtime_translation.p4 @@ -0,0 +1,185 @@ +/* + * Copyright 2020-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +typedef bit<9> port_t; + +@p4runtime_translation("", string) +type bit<48> mac_addr_t; + +@p4runtime_translation("", 32) +type port_t port_id_bit_t; + +@p4runtime_translation("", string) +type port_t port_id_str_t; + +const port_t CPU_PORT = 255; + +@controller_header("packet_in") +header packet_in_header_t { + bit<9> ingress_port; + bit<7> _padding; +} + +@controller_header("packet_out") +header packet_out_header_t { + bit<9> egress_port; + bit<7> _padding; +} + +header ethernet_t { + mac_addr_t dstAddr; + mac_addr_t srcAddr; + bit<16> etherType; +} + +struct headers_t { + packet_out_header_t packet_out; + packet_in_header_t packet_in; + ethernet_t ethernet; +} + +struct local_metadata_t { + port_id_bit_t ingress_port; +} + +// Test P4 Program for P4Runtime translation (simplified version of basic.p4). + +//------------------------------------------------------------------------------ +// PARSER +//------------------------------------------------------------------------------ +parser parser_impl(packet_in packet, + out headers_t hdr, + inout local_metadata_t local_metadata, + inout standard_metadata_t standard_metadata) { + + state start { + local_metadata.ingress_port = (port_id_bit_t) standard_metadata.ingress_port; + transition select(standard_metadata.ingress_port) { + CPU_PORT: parse_packet_out; + default: parse_ethernet; + } + } + + state parse_packet_out { + packet.extract(hdr.packet_out); + transition parse_ethernet; + } + + state parse_ethernet { + packet.extract(hdr.ethernet); + transition accept; + } +} + +//------------------------------------------------------------------------------ +// DEPARSER +//------------------------------------------------------------------------------ +control deparser(packet_out packet, in headers_t hdr) { + apply { + packet.emit(hdr.packet_in); + packet.emit(hdr.ethernet); + } +} + + +//------------------------------------------------------------------------------ +// INGRESS PIPELINE +//------------------------------------------------------------------------------ + +control ingress(inout headers_t hdr, + inout local_metadata_t local_metadata, + inout standard_metadata_t standard_metadata) { + + @name(".send_to_cpu") + action send_to_cpu() { + standard_metadata.egress_spec = CPU_PORT; + } + + @name(".set_egress_port") + action set_egress_port(port_id_str_t port) { + standard_metadata.egress_spec = (bit<9>) port; + } + @name(".set_egress_port2") + action set_egress_port2(port_id_bit_t port) { + standard_metadata.egress_spec = (bit<9>) port; + } + + @name(".drop") + action drop() { + mark_to_drop(standard_metadata); + } + @name(".table0") + table table0 { + key = { + local_metadata.ingress_port : exact; + hdr.ethernet.srcAddr : exact; + hdr.ethernet.dstAddr : exact; + hdr.ethernet.etherType : optional; + } + actions = { + set_egress_port; + set_egress_port2; + send_to_cpu; + drop; + } + const default_action = drop(); + } + + apply { + table0.apply(); + } +} + +//------------------------------------------------------------------------------ +// EGRESS PIPELINE +//------------------------------------------------------------------------------ + +control egress(inout headers_t hdr, + inout local_metadata_t local_metadata, + inout standard_metadata_t standard_metadata) { + + apply { + // no-op + } +} + +control verify_checksum_control(inout headers_t hdr, + inout local_metadata_t local_metadata) { + apply { + // Assume checksum is always correct. + } +} + +control compute_checksum_control(inout headers_t hdr, + inout local_metadata_t local_metadata) { + apply { + // no-op for the test program + } +} + +//------------------------------------------------------------------------------ +// SWITCH INSTANTIATION +//------------------------------------------------------------------------------ + +V1Switch(parser_impl(), + verify_checksum_control(), + ingress(), + egress(), + compute_checksum_control(), + deparser()) main; diff --git a/protocols/p4runtime/ctl/src/test/resources/test_p4runtime_translation_p4info.txt b/protocols/p4runtime/ctl/src/test/resources/test_p4runtime_translation_p4info.txt new file mode 100644 index 00000000000..b984b4ca7f5 --- /dev/null +++ b/protocols/p4runtime/ctl/src/test/resources/test_p4runtime_translation_p4info.txt @@ -0,0 +1,162 @@ +pkg_info { + arch: "v1model" +} +tables { + preamble { + id: 36960149 + name: "table0" + alias: "table0" + } + match_fields { + id: 1 + name: "local_metadata.ingress_port" + bitwidth: 32 + match_type: EXACT + type_name { + name: "port_id_bit_t" + } + } + match_fields { + id: 2 + name: "hdr.ethernet.srcAddr" + match_type: EXACT + type_name { + name: "mac_addr_t" + } + } + match_fields { + id: 3 + name: "hdr.ethernet.dstAddr" + match_type: EXACT + type_name { + name: "mac_addr_t" + } + } + match_fields { + id: 4 + name: "hdr.ethernet.etherType" + bitwidth: 16 + match_type: OPTIONAL + } + action_refs { + id: 27607748 + } + action_refs { + id: 32872817 + } + action_refs { + id: 24562328 + } + action_refs { + id: 18759588 + } + const_default_action_id: 18759588 + size: 1024 +} +actions { + preamble { + id: 24562328 + name: "send_to_cpu" + alias: "send_to_cpu" + } +} +actions { + preamble { + id: 27607748 + name: "set_egress_port" + alias: "set_egress_port" + } + params { + id: 1 + name: "port" + type_name { + name: "port_id_str_t" + } + } +} +actions { + preamble { + id: 32872817 + name: "set_egress_port2" + alias: "set_egress_port2" + } + params { + id: 1 + name: "port" + bitwidth: 32 + type_name { + name: "port_id_bit_t" + } + } +} +actions { + preamble { + id: 18759588 + name: "drop" + alias: "drop" + } +} +controller_packet_metadata { + preamble { + id: 81826293 + name: "packet_in" + alias: "packet_in" + annotations: "@controller_header(\"packet_in\")" + } + metadata { + id: 1 + name: "ingress_port" + bitwidth: 9 + } + metadata { + id: 2 + name: "_padding" + bitwidth: 7 + } +} +controller_packet_metadata { + preamble { + id: 76689799 + name: "packet_out" + alias: "packet_out" + annotations: "@controller_header(\"packet_out\")" + } + metadata { + id: 1 + name: "egress_port" + bitwidth: 9 + } + metadata { + id: 2 + name: "_padding" + bitwidth: 7 + } +} +type_info { + new_types { + key: "mac_addr_t" + value { + translated_type { + sdn_string { + } + } + } + } + new_types { + key: "port_id_bit_t" + value { + translated_type { + sdn_bitwidth: 32 + } + } + } + new_types { + key: "port_id_str_t" + value { + translated_type { + sdn_string { + } + } + } + } +} diff --git a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ActionModel.java b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ActionModel.java index dec4d1cc81f..6b1af83cf4c 100644 --- a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ActionModel.java +++ b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ActionModel.java @@ -26,6 +26,8 @@ import java.util.Objects; import java.util.Optional; +import static com.google.common.base.MoreObjects.toStringHelper; + /** * Implementation of PiActionModel for P4Runtime. */ @@ -72,4 +74,12 @@ public boolean equals(Object obj) { return Objects.equals(this.id, other.id) && Objects.equals(this.params, other.params); } + + @Override + public String toString() { + return toStringHelper(this) + .add("id", id) + .add("params", params.values()) + .toString(); + } } diff --git a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ActionParamModel.java b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ActionParamModel.java index 1c1f0a58dd5..467e72918db 100644 --- a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ActionParamModel.java +++ b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ActionParamModel.java @@ -21,10 +21,13 @@ import java.util.Objects; +import static com.google.common.base.MoreObjects.toStringHelper; + /** * Implementation of PiActionParamModel for P4Runtime. */ final class P4ActionParamModel implements PiActionParamModel { + static final int BIT_WIDTH_UNDEFINED = -1; private final PiActionParamId id; private final int bitWidth; @@ -44,6 +47,11 @@ public int bitWidth() { return bitWidth; } + @Override + public boolean hasBitWidth() { + return bitWidth != BIT_WIDTH_UNDEFINED; + } + @Override public int hashCode() { return Objects.hash(id, bitWidth); @@ -61,4 +69,12 @@ public boolean equals(Object obj) { return Objects.equals(this.id, other.id) && Objects.equals(this.bitWidth, other.bitWidth); } + + @Override + public String toString() { + return toStringHelper(this) + .add("id", id) + .add("bitWidth", bitWidth) + .toString(); + } } diff --git a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ActionProfileModel.java b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ActionProfileModel.java index 443d4074910..5059bceb3f7 100644 --- a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ActionProfileModel.java +++ b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ActionProfileModel.java @@ -24,6 +24,8 @@ import java.util.Collection; import java.util.Objects; +import static com.google.common.base.MoreObjects.toStringHelper; + /** * Implementation of PiActionProfileModel for P4Runtime. */ @@ -90,4 +92,15 @@ public boolean equals(Object obj) { && Objects.equals(this.size, other.size) && Objects.equals(this.maxGroupSize, other.maxGroupSize); } + + @Override + public String toString() { + return toStringHelper(this) + .add("id", id) + .add("tables", tables) + .add("hasSelector", hasSelector) + .add("size", size) + .add("maxGroupSize", maxGroupSize) + .toString(); + } } diff --git a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4CounterModel.java b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4CounterModel.java index de6e7556066..01f33ff05de 100644 --- a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4CounterModel.java +++ b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4CounterModel.java @@ -23,6 +23,8 @@ import java.util.Objects; +import static com.google.common.base.MoreObjects.toStringHelper; + /** * Implementation of PiCounterModel for P4Runtime. */ @@ -88,4 +90,15 @@ public boolean equals(Object obj) { && Objects.equals(this.table, other.table) && Objects.equals(this.size, other.size); } + + @Override + public String toString() { + return toStringHelper(this) + .add("id", id) + .add("counterType", counterType) + .add("unit", unit) + .add("table", table) + .add("size", size) + .toString(); + } } diff --git a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4InfoParser.java b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4InfoParser.java index d5bf2e675f5..85deacc29b9 100644 --- a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4InfoParser.java +++ b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4InfoParser.java @@ -20,6 +20,8 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; +import com.google.common.hash.Hashing; +import com.google.common.hash.HashingInputStream; import com.google.protobuf.ExtensionRegistry; import com.google.protobuf.TextFormat; import org.onosproject.net.pi.model.PiActionId; @@ -62,6 +64,7 @@ import p4.config.v1.P4InfoOuterClass.MeterSpec; import p4.config.v1.P4InfoOuterClass.P4Info; import p4.config.v1.P4InfoOuterClass.Table; +import p4.config.v1.P4Types; import java.io.IOException; import java.io.InputStream; @@ -111,6 +114,7 @@ public final class P4InfoParser { .put(MatchField.MatchType.LPM, PiMatchType.LPM) .put(MatchField.MatchType.TERNARY, PiMatchType.TERNARY) .put(MatchField.MatchType.RANGE, PiMatchType.RANGE) + .put(MatchField.MatchType.OPTIONAL, PiMatchType.OPTIONAL) // Don't map UNSPECIFIED as we don't support it at the moment. .build(); public static final int NO_SIZE = -1; @@ -135,9 +139,24 @@ public static PiPipelineModel parse(URL p4InfoUrl) throws P4InfoParserException throw new P4InfoParserException("Unable to parse protobuf " + p4InfoUrl.toString(), e); } + // Generate fingerprint of the pipeline by hashing p4info file + final int fingerprint; + try { + HashingInputStream hin = new HashingInputStream(Hashing.crc32(), p4InfoUrl.openStream()); + //noinspection StatementWithEmptyBody + while (hin.read() != -1) { + // Do nothing. Reading all input stream to update hash. + } + fingerprint = hin.hash().asInt(); + } catch (IOException e) { + throw new P4InfoParserException("Unable to generate fingerprint " + p4InfoUrl.toString(), e); + } + // Start by parsing and mapping instances to to their integer P4Info IDs. // Convenient to build the table model at the end. + final String architecture = parseArchitecture(p4info); + // Counters. final Map counterMap = Maps.newHashMap(); counterMap.putAll(parseCounters(p4info)); @@ -174,7 +193,9 @@ public static PiPipelineModel parse(URL p4InfoUrl) throws P4InfoParserException tableFieldMapBuilder.put( fieldId, new P4MatchFieldModel(fieldId, - fieldMsg.getBitwidth(), + isFieldString(p4info, fieldMsg.getTypeName().getName()) ? + P4MatchFieldModel.BIT_WIDTH_UNDEFINED : + fieldMsg.getBitwidth(), mapMatchFieldType(fieldMsg.getMatchType()))); } @@ -243,9 +264,17 @@ public static PiPipelineModel parse(URL p4InfoUrl) throws P4InfoParserException meterImmMap, registerImmMap, actProfileImmMap, - ImmutableMap.copyOf(pktOpMap)); + ImmutableMap.copyOf(pktOpMap), + architecture, + fingerprint); } + private static String parseArchitecture(P4Info p4info) { + if (p4info.hasPkgInfo()) { + return p4info.getPkgInfo().getArch(); + } + return null; + } private static Map parseCounters(P4Info p4info) throws P4InfoParserException { @@ -369,8 +398,11 @@ private static Map parseActions(P4Info p4info) { actionMsg.getParamsList().forEach(paramMsg -> { final PiActionParamId paramId = PiActionParamId.of(paramMsg.getName()); paramMapBuilder.put(paramId, - new P4ActionParamModel(PiActionParamId.of(paramMsg.getName()), - paramMsg.getBitwidth())); + new P4ActionParamModel( + PiActionParamId.of(paramMsg.getName()), + isFieldString(p4info, paramMsg.getTypeName().getName()) ? + P4ActionParamModel.BIT_WIDTH_UNDEFINED : + paramMsg.getBitwidth())); }); actionMap.put( actionMsg.getPreamble().getId(), @@ -390,7 +422,9 @@ private static Map parseCtrlPktMe ImmutableList.builder(); ctrlPktMetaMsg.getMetadataList().forEach(metadataMsg -> metadataListBuilder.add( new P4PacketMetadataModel(PiPacketMetadataId.of(metadataMsg.getName()), - metadataMsg.getBitwidth()))); + isFieldString(p4info, metadataMsg.getTypeName().getName()) ? + P4PacketMetadataModel.BIT_WIDTH_UNDEFINED : + metadataMsg.getBitwidth()))); packetOpMap.put( mapPacketOpType(ctrlPktMetaMsg.getPreamble().getName()), new P4PacketOperationModel(mapPacketOpType(ctrlPktMetaMsg.getPreamble().getName()), @@ -464,4 +498,11 @@ private static String findAnnotation(String name, P4InfoOuterClass.Preamble prea .findFirst() .orElse(null); } + + private static boolean isFieldString(P4Info p4info, String fieldTypeName) { + P4Types.P4TypeInfo p4TypeInfo = p4info.getTypeInfo(); + return p4TypeInfo.containsNewTypes(fieldTypeName) && + p4TypeInfo.getNewTypesOrThrow(fieldTypeName).hasTranslatedType() && + p4TypeInfo.getNewTypesOrThrow(fieldTypeName).getTranslatedType().hasSdnString(); + } } diff --git a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4MatchFieldModel.java b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4MatchFieldModel.java index f3b5ddc7c9a..73bc4aa695f 100644 --- a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4MatchFieldModel.java +++ b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4MatchFieldModel.java @@ -22,10 +22,13 @@ import java.util.Objects; +import static com.google.common.base.MoreObjects.toStringHelper; + /** * Implementation of PiMatchFieldModel for P4Runtime. */ final class P4MatchFieldModel implements PiMatchFieldModel { + static final int BIT_WIDTH_UNDEFINED = -1; private final PiMatchFieldId id; private final int bitWidth; @@ -47,6 +50,11 @@ public int bitWidth() { return bitWidth; } + @Override + public boolean hasBitWidth() { + return bitWidth != BIT_WIDTH_UNDEFINED; + } + @Override public PiMatchType matchType() { return matchType; @@ -70,4 +78,13 @@ public boolean equals(Object obj) { && Objects.equals(this.bitWidth, other.bitWidth) && Objects.equals(this.matchType, other.matchType); } + + @Override + public String toString() { + return toStringHelper(this) + .add("id", id) + .add("bitWidth", bitWidth) + .add("matchType", matchType) + .toString(); + } } diff --git a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4MeterModel.java b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4MeterModel.java index 93827cc644f..a11c8ec49fd 100644 --- a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4MeterModel.java +++ b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4MeterModel.java @@ -23,6 +23,8 @@ import java.util.Objects; +import static com.google.common.base.MoreObjects.toStringHelper; + /** * Implementation of PiMeterModel for P4Runtime. */ @@ -87,4 +89,15 @@ public boolean equals(Object obj) { && Objects.equals(this.table, other.table) && Objects.equals(this.size, other.size); } + + @Override + public String toString() { + return toStringHelper(this) + .add("id", id) + .add("meterType", meterType) + .add("unit", unit) + .add("table", table) + .add("size", size) + .toString(); + } } diff --git a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ControlMetadataModel.java b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4PacketMetadataModel.java similarity index 81% rename from protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ControlMetadataModel.java rename to protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4PacketMetadataModel.java index a6e2a43b34e..65867ff4824 100644 --- a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4ControlMetadataModel.java +++ b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4PacketMetadataModel.java @@ -21,11 +21,15 @@ import java.util.Objects; +import static com.google.common.base.MoreObjects.toStringHelper; + /** * Implementation of PiPacketMetadataModel for P4Runtime. */ final class P4PacketMetadataModel implements PiPacketMetadataModel { + static final int BIT_WIDTH_UNDEFINED = -1; + private final PiPacketMetadataId id; private final int bitWidth; @@ -44,6 +48,11 @@ public int bitWidth() { return bitWidth; } + @Override + public boolean hasBitWidth() { + return bitWidth != BIT_WIDTH_UNDEFINED; + } + @Override public int hashCode() { return Objects.hash(id, bitWidth); @@ -61,4 +70,12 @@ public boolean equals(Object obj) { return Objects.equals(this.id, other.id) && Objects.equals(this.bitWidth, other.bitWidth); } + + @Override + public String toString() { + return toStringHelper(this) + .add("id", id) + .add("bitWidth", bitWidth) + .toString(); + } } diff --git a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4PacketOperationModel.java b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4PacketOperationModel.java index e29553fec90..3421e703191 100644 --- a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4PacketOperationModel.java +++ b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4PacketOperationModel.java @@ -24,6 +24,8 @@ import java.util.List; import java.util.Objects; +import static com.google.common.base.MoreObjects.toStringHelper; + /** * Implementation of PiPacketOperationModel for P4Runtime. */ @@ -33,7 +35,7 @@ final class P4PacketOperationModel implements PiPacketOperationModel { private final ImmutableList metadatas; P4PacketOperationModel(PiPacketOperationType type, - ImmutableList metadatas) { + ImmutableList metadatas) { this.type = type; this.metadatas = metadatas; } @@ -65,4 +67,12 @@ public boolean equals(Object obj) { return Objects.equals(this.type, other.type) && Objects.equals(this.metadatas, other.metadatas); } + + @Override + public String toString() { + return toStringHelper(this) + .add("type", type) + .add("metadatas", metadatas) + .toString(); + } } diff --git a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4PipelineModel.java b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4PipelineModel.java index ce9ec131bcb..46889a6ccf0 100644 --- a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4PipelineModel.java +++ b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4PipelineModel.java @@ -35,6 +35,8 @@ import java.util.Objects; import java.util.Optional; +import static com.google.common.base.MoreObjects.toStringHelper; + /** * Implementation of PiPipelineModel for P4Runtime. */ @@ -46,6 +48,8 @@ final class P4PipelineModel implements PiPipelineModel { private final ImmutableMap registers; private final ImmutableMap actionProfiles; private final ImmutableMap packetOperations; + private final String architecture; + private final int fingerprint; P4PipelineModel( ImmutableMap tables, @@ -53,13 +57,22 @@ final class P4PipelineModel implements PiPipelineModel { ImmutableMap meters, ImmutableMap registers, ImmutableMap actionProfiles, - ImmutableMap packetOperations) { + ImmutableMap packetOperations, + String architecture, + int fingerprint) { this.tables = tables; this.counters = counters; this.meters = meters; this.registers = registers; this.actionProfiles = actionProfiles; this.packetOperations = packetOperations; + this.fingerprint = fingerprint; + this.architecture = architecture; + } + + @Override + public Optional architecture() { + return Optional.ofNullable(this.architecture); } @Override @@ -120,7 +133,11 @@ public Optional packetOperationModel(PiPacketOperationTy @Override public int hashCode() { - return Objects.hash(tables, counters, meters, actionProfiles, packetOperations); + // NOTE: that the fingerprint is derived by hashing the p4Info file + // this because the hashcode is not deterministic across multiple + // JVMs instance. This hashcode is also used to derive the fingerprint + // of the pipeconf. + return fingerprint; } @Override @@ -135,7 +152,23 @@ public boolean equals(Object obj) { return Objects.equals(this.tables, other.tables) && Objects.equals(this.counters, other.counters) && Objects.equals(this.meters, other.meters) + && Objects.equals(this.registers, other.registers) && Objects.equals(this.actionProfiles, other.actionProfiles) - && Objects.equals(this.packetOperations, other.packetOperations); + && Objects.equals(this.packetOperations, other.packetOperations) + && this.fingerprint == other.fingerprint; + } + + @Override + public String toString() { + return toStringHelper(this) + .add("tables", tables.values()) + .add("counters", counters.values()) + .add("meters", meters.values()) + .add("registers", registers.values()) + .add("actionProfiles", actionProfiles.values()) + .add("packetOperations", packetOperations.values()) + .add("fingerprint", fingerprint) + .add("architecture", architecture) + .toString(); } } diff --git a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4RegisterModel.java b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4RegisterModel.java index 7e4fcdaf1c8..44af1e0510a 100644 --- a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4RegisterModel.java +++ b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4RegisterModel.java @@ -21,6 +21,8 @@ import java.util.Objects; +import static com.google.common.base.MoreObjects.toStringHelper; + /** * Implementation of PiRegisterModel for P4Runtime. */ @@ -61,4 +63,12 @@ public boolean equals(Object obj) { return Objects.equals(this.id, other.id) && Objects.equals(this.size, other.size); } + + @Override + public String toString() { + return toStringHelper(this) + .add("id", id) + .add("size", size) + .toString(); + } } \ No newline at end of file diff --git a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4TableModel.java b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4TableModel.java index 2eed1bb0433..be1b71c2aea 100644 --- a/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4TableModel.java +++ b/protocols/p4runtime/model/src/main/java/org/onosproject/p4runtime/model/P4TableModel.java @@ -34,6 +34,8 @@ import java.util.Objects; import java.util.Optional; +import static com.google.common.base.MoreObjects.toStringHelper; + /** * Implementation of PiTableModel for P4Runtime. */ @@ -164,4 +166,21 @@ public boolean equals(Object obj) { && Objects.equals(this.actions, other.actions) && Objects.equals(this.constDefaultAction, other.constDefaultAction); } + + @Override + public String toString() { + return toStringHelper(this) + .add("id", id) + .add("tableType", tableType) + .add("actionProfile", actionProfile) + .add("maxSize", maxSize) + .add("counters", counters) + .add("meters", meters) + .add("supportAging", supportAging) + .add("matchFields", matchFields) + .add("actions", actions) + .add("constDefaultAction", constDefaultAction) + .add("isConstTable", isConstTable) + .toString(); + } } diff --git a/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4ActionParamModelTest.java b/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4ActionParamModelTest.java index 035465c10f3..c98d40186fc 100644 --- a/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4ActionParamModelTest.java +++ b/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4ActionParamModelTest.java @@ -41,6 +41,15 @@ public class P4ActionParamModelTest { private final P4ActionParamModel actionParamModel3 = new P4ActionParamModel(piActionParamId, BIT_WIDTH_64); + private final P4ActionParamModel actionParamModel4 = new + P4ActionParamModel(piActionParamId, P4ActionParamModel.BIT_WIDTH_UNDEFINED); + + private final P4ActionParamModel sameAsActionParamModel4 = + new P4ActionParamModel(sameAsPiActionParamId, P4ActionParamModel.BIT_WIDTH_UNDEFINED); + + private final P4ActionParamModel actionParamModel5 = + new P4ActionParamModel(piActionParamId2, P4ActionParamModel.BIT_WIDTH_UNDEFINED); + /** @@ -58,8 +67,10 @@ public void testImmutability() { public void testEquals() { new EqualsTester() .addEqualityGroup(actionParamModel, sameAsActionParamModel) + .addEqualityGroup(actionParamModel4, sameAsActionParamModel4) .addEqualityGroup(actionParamModel2) .addEqualityGroup(actionParamModel3) + .addEqualityGroup(actionParamModel5) .testEquals(); } } \ No newline at end of file diff --git a/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4InfoParserTest.java b/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4InfoParserTest.java index c05a84cd624..22d3e110f6a 100644 --- a/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4InfoParserTest.java +++ b/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4InfoParserTest.java @@ -59,39 +59,65 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsNull.notNullValue; +import static org.hamcrest.core.IsNull.nullValue; /** * Test for P4Info Parser. */ public class P4InfoParserTest { private static final String PATH = "basic.p4info"; + private static final String PATH2 = "test_p4runtime_translation_p4info.txt"; private final URL p4InfoUrl = P4InfoParserTest.class.getResource(PATH); + private final URL p4InfoUrl2 = P4InfoParserTest.class.getResource(PATH2); private static final Long DEFAULT_MAX_TABLE_SIZE = 1024L; private static final Long DEFAULT_MAX_ACTION_PROFILE_SIZE = 64L; private static final int DEFAULT_MAX_GROUP_SIZE = 16; + /** + * Tests the parsing of the architecture field. + * @throws Exception if the equality group objects does not match expected + */ + @Test + public void testParseArchitecture() throws Exception { + // Generate two PiPipelineModels from the same p4Info file + PiPipelineModel model = P4InfoParser.parse(p4InfoUrl); + PiPipelineModel sameAsModel = P4InfoParser.parse(p4InfoUrl); + + PiPipelineModel model3 = P4InfoParser.parse(p4InfoUrl2); + + String architecture1 = model.architecture().orElse(null); + String architecture2 = sameAsModel.architecture().orElse(null); + + assertThat("null value is returned if `arch` not present in P4Info", + architecture1, + is(nullValue())); + assertThat("null value is returned if `arch` not present in P4Info", + architecture2, + is(nullValue())); + + String architecture3 = model3.architecture().orElse(null); + assertThat("test that `arch` field is correctly parsed", + architecture3, + is("v1model")); + } + /** * Tests parse method. * @throws Exception if equality group objects dose not match as expected */ @Test public void testParse() throws Exception { - // Generate two PiPipelineModels from p4Info file + // Generate two PiPipelineModels from the same p4Info file PiPipelineModel model = P4InfoParser.parse(p4InfoUrl); - PiPipelineModel model2 = P4InfoParser.parse(p4InfoUrl); + PiPipelineModel sameAsModel = P4InfoParser.parse(p4InfoUrl); // Check equality - new EqualsTester().addEqualityGroup(model, model2).testEquals(); + new EqualsTester().addEqualityGroup(model, sameAsModel).testEquals(); // Generate a P4Info object from the file - final P4Info p4info; - try { - p4info = getP4InfoMessage(p4InfoUrl); - } catch (IOException e) { - throw new P4InfoParserException("Unable to parse protobuf " + p4InfoUrl.toString(), e); - } + final P4Info p4info = getP4InfoMessage(p4InfoUrl); List tableMsgs = p4info.getTablesList(); PiTableId table0Id = PiTableId.of(tableMsgs.get(0).getPreamble().getName()); @@ -100,8 +126,8 @@ public void testParse() throws Exception { //parse tables PiTableModel table0Model = model.table(table0Id).orElse(null); PiTableModel wcmpTableModel = model.table(wcmpTableId).orElse(null); - PiTableModel table0Model2 = model2.table(table0Id).orElse(null); - PiTableModel wcmpTableModel2 = model2.table(wcmpTableId).orElse(null); + PiTableModel table0Model2 = sameAsModel.table(table0Id).orElse(null); + PiTableModel wcmpTableModel2 = sameAsModel.table(wcmpTableId).orElse(null); new EqualsTester().addEqualityGroup(table0Model, table0Model2) .addEqualityGroup(wcmpTableModel, wcmpTableModel2).testEquals(); @@ -209,7 +235,7 @@ public void testParse() throws Exception { true, DEFAULT_MAX_ACTION_PROFILE_SIZE, DEFAULT_MAX_GROUP_SIZE); PiActionProfileModel wcmpSelector = model.actionProfiles(actionProfileId).orElse(null); - PiActionProfileModel wcmpSelector2 = model2.actionProfiles(actionProfileId).orElse(null); + PiActionProfileModel wcmpSelector2 = sameAsModel.actionProfiles(actionProfileId).orElse(null); new EqualsTester().addEqualityGroup(wcmpSelector, wcmpSelector2, wcmpSelector3).testEquals(); @@ -230,13 +256,13 @@ public void testParse() throws Exception { model.counter(PiCounterId.of("wcmp_control.wcmp_table_counter")).orElse(null); PiCounterModel ingressPortCounterModel2 = - model2.counter(PiCounterId.of("port_counters_ingress.ingress_port_counter")).orElse(null); + sameAsModel.counter(PiCounterId.of("port_counters_ingress.ingress_port_counter")).orElse(null); PiCounterModel egressPortCounterModel2 = - model2.counter(PiCounterId.of("port_counters_egress.egress_port_counter")).orElse(null); + sameAsModel.counter(PiCounterId.of("port_counters_egress.egress_port_counter")).orElse(null); PiCounterModel table0CounterModel2 = - model2.counter(PiCounterId.of("table0_control.table0_counter")).orElse(null); + sameAsModel.counter(PiCounterId.of("table0_control.table0_counter")).orElse(null); PiCounterModel wcmpTableCounterModel2 = - model2.counter(PiCounterId.of("wcmp_control.wcmp_table_counter")).orElse(null); + sameAsModel.counter(PiCounterId.of("wcmp_control.wcmp_table_counter")).orElse(null); new EqualsTester() .addEqualityGroup(ingressPortCounterModel, ingressPortCounterModel2) @@ -252,7 +278,7 @@ public void testParse() throws Exception { //Parse meters Collection meterModel = model.meters(); - Collection meterModel2 = model2.meters(); + Collection meterModel2 = sameAsModel.meters(); assertThat("model pased meter collaction should be empty", meterModel.isEmpty(), is(true)); assertThat("model pased meter collaction should be empty", meterModel2.isEmpty(), is(true)); @@ -264,9 +290,9 @@ public void testParse() throws Exception { model.packetOperationModel(PiPacketOperationType.PACKET_OUT).orElse(null); PiPacketOperationModel packetInOperationalModel2 = - model2.packetOperationModel(PiPacketOperationType.PACKET_IN).orElse(null); + sameAsModel.packetOperationModel(PiPacketOperationType.PACKET_IN).orElse(null); PiPacketOperationModel packetOutOperationalModel2 = - model2.packetOperationModel(PiPacketOperationType.PACKET_OUT).orElse(null); + sameAsModel.packetOperationModel(PiPacketOperationType.PACKET_OUT).orElse(null); new EqualsTester() .addEqualityGroup(packetInOperationalModel, packetInOperationalModel2) @@ -278,6 +304,97 @@ public void testParse() throws Exception { assertThat("model parsed value is null", packetOutOperationalModel, notNullValue()); } + /** + * Tests parse method with P4Runtime translation fields and optional fields. + * @throws Exception if equality group objects dose not match as expected + */ + @Test + public void testParseP4RuntimeTranslationAndOptional() throws Exception { + PiPipelineModel model = P4InfoParser.parse(p4InfoUrl2); + // Generate a P4Info object from the file + final P4Info p4info; + try { + p4info = getP4InfoMessage(p4InfoUrl2); + } catch (IOException e) { + throw new P4InfoParserException("Unable to parse protobuf " + p4InfoUrl.toString(), e); + } + List
tableMsgs = p4info.getTablesList(); + PiTableId table0Id = PiTableId.of(tableMsgs.get(0).getPreamble().getName()); + + //parse tables + PiTableModel table0Model = model.table(table0Id).orElse(null); + + // Check matchFields + List matchFieldList = tableMsgs.get(0).getMatchFieldsList(); + List piMatchFieldList = new ArrayList<>(); + + for (MatchField matchFieldIter : matchFieldList) { + MatchField.MatchType matchType = matchFieldIter.getMatchType(); + PiMatchType piMatchType; + switch (matchType) { + case EXACT: piMatchType = PiMatchType.EXACT; break; + case LPM: piMatchType = PiMatchType.LPM; break; + case TERNARY: piMatchType = PiMatchType.TERNARY; break; + case RANGE: piMatchType = PiMatchType.RANGE; break; + case OPTIONAL: piMatchType = PiMatchType.OPTIONAL; break; + default: Assert.fail(); return; + } + if (matchFieldIter.getTypeName().getName().equals("mac_addr_t")) { + piMatchFieldList.add(new P4MatchFieldModel(PiMatchFieldId.of(matchFieldIter.getName()), + P4MatchFieldModel.BIT_WIDTH_UNDEFINED, piMatchType)); + } else { + piMatchFieldList.add(new P4MatchFieldModel(PiMatchFieldId.of(matchFieldIter.getName()), + matchFieldIter.getBitwidth(), piMatchType)); + } + } + assertThat("Incorrect order for matchFields", + table0Model.matchFields(), + IsIterableContainingInOrder.contains( + piMatchFieldList.get(0), piMatchFieldList.get(1), + piMatchFieldList.get(2), piMatchFieldList.get(3))); + + //check table0 actionsRefs + List actionRefList = tableMsgs.get(0).getActionRefsList(); + assertThat("Incorrect size for actionRefs", + actionRefList.size(), + is(equalTo(4))); + + //create action instances + // Set egress with string as parameter + PiActionId actionId = PiActionId.of("set_egress_port"); + PiActionParamId piActionParamId = PiActionParamId.of("port"); + PiActionParamModel actionParamModel = new P4ActionParamModel( + piActionParamId, P4ActionParamModel.BIT_WIDTH_UNDEFINED); + ImmutableMap params = new + ImmutableMap.Builder() + .put(piActionParamId, actionParamModel).build(); + PiActionModel setEgressPortAction = new P4ActionModel(actionId, params); + + // Set egress with 32 bit as parameter + actionId = PiActionId.of("set_egress_port2"); + piActionParamId = PiActionParamId.of("port"); + int bitWitdth = 32; + actionParamModel = new P4ActionParamModel( + piActionParamId, bitWitdth); + params = new ImmutableMap.Builder() + .put(piActionParamId, actionParamModel).build(); + + PiActionModel setEgressPortAction2 = new P4ActionModel(actionId, params); + + actionId = PiActionId.of("send_to_cpu"); + PiActionModel sendToCpuAction = + new P4ActionModel(actionId, new ImmutableMap.Builder().build()); + + actionId = PiActionId.of("drop"); + PiActionModel dropAction = + new P4ActionModel(actionId, new ImmutableMap.Builder().build()); + + //check table0 actions + assertThat("action dose not match", + table0Model.actions(), IsIterableContainingInAnyOrder.containsInAnyOrder( + setEgressPortAction, setEgressPortAction2, sendToCpuAction, dropAction)); + } + /** * Gets P4Info message from the URL. * @param p4InfoUrl link to the p4Info file diff --git a/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4MatchFieldModelTest.java b/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4MatchFieldModelTest.java index 448dcc5aa28..86a0e66afbf 100644 --- a/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4MatchFieldModelTest.java +++ b/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4MatchFieldModelTest.java @@ -42,6 +42,14 @@ public class P4MatchFieldModelTest { private static final P4MatchFieldModel P4_MATCH_FIELD_MODEL_2 = new P4MatchFieldModel(PI_MATCH_FIELD_ID_2, BIT_WIDTH_2, PI_MATCH_TYPE_2); + private static final P4MatchFieldModel P4_MATCH_FIELD_MODEL_3 = + new P4MatchFieldModel(PI_MATCH_FIELD_ID_1, P4MatchFieldModel.BIT_WIDTH_UNDEFINED, PI_MATCH_TYPE_1); + private static final P4MatchFieldModel SAME_AS_P4_MATCH_FIELD_MODEL_3 = + new P4MatchFieldModel(PI_MATCH_FIELD_ID_1, P4MatchFieldModel.BIT_WIDTH_UNDEFINED, PI_MATCH_TYPE_1); + + private static final P4MatchFieldModel P4_MATCH_FIELD_MODEL_4 = + new P4MatchFieldModel(PI_MATCH_FIELD_ID_2, P4MatchFieldModel.BIT_WIDTH_UNDEFINED, PI_MATCH_TYPE_2); + /** * Checks that the P4MatchFieldModel class is immutable. */ @@ -57,7 +65,9 @@ public void testImmutability() { public void testEquals() { new EqualsTester() .addEqualityGroup(P4_MATCH_FIELD_MODEL_1, SAME_AS_P4_MATCH_FIELD_MODEL_1) + .addEqualityGroup(P4_MATCH_FIELD_MODEL_3, SAME_AS_P4_MATCH_FIELD_MODEL_3) .addEqualityGroup(P4_MATCH_FIELD_MODEL_2) + .addEqualityGroup(P4_MATCH_FIELD_MODEL_4) .testEquals(); } } \ No newline at end of file diff --git a/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4PacketOperationModelTest.java b/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4PacketOperationModelTest.java index 5d760e8e827..6fa288937f8 100644 --- a/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4PacketOperationModelTest.java +++ b/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4PacketOperationModelTest.java @@ -22,6 +22,7 @@ import org.onosproject.net.pi.model.PiPacketMetadataId; import org.onosproject.net.pi.model.PiPacketMetadataModel; import org.onosproject.net.pi.model.PiPacketOperationType; + import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable; /** @@ -42,6 +43,9 @@ public class P4PacketOperationModelTest { new P4PacketMetadataModel(PI_CONTROL_METADATA_ID_1, BIT_WIDTH_1); private static final PiPacketMetadataModel PI_CONTROL_METADATA_MODEL_2 = new P4PacketMetadataModel(PI_CONTROL_METADATA_ID_2, BIT_WIDTH_2); + private static final PiPacketMetadataModel PI_CONTROL_METADATA_MODEL_3 = + new P4PacketMetadataModel( + PI_CONTROL_METADATA_ID_2, P4PacketMetadataModel.BIT_WIDTH_UNDEFINED); private static final ImmutableList METADATAS_1 = new ImmutableList.Builder() @@ -58,6 +62,11 @@ public class P4PacketOperationModelTest { .add(PI_CONTROL_METADATA_MODEL_1) .add(PI_CONTROL_METADATA_MODEL_2) .build(); + private static final ImmutableList METADATAS_4 = + new ImmutableList.Builder() + .add(PI_CONTROL_METADATA_MODEL_1) + .add(PI_CONTROL_METADATA_MODEL_3) + .build(); private static final P4PacketOperationModel P4_PACKET_OPERATION_MODEL_1 = new P4PacketOperationModel(PI_PACKET_OPERATION_TYPE_1, METADATAS_1); @@ -67,6 +76,8 @@ public class P4PacketOperationModelTest { new P4PacketOperationModel(PI_PACKET_OPERATION_TYPE_2, METADATAS_2); private static final P4PacketOperationModel P4_PACKET_OPERATION_MODEL_3 = new P4PacketOperationModel(PI_PACKET_OPERATION_TYPE_2, METADATAS_3); + private static final P4PacketOperationModel P4_PACKET_OPERATION_MODEL_4 = + new P4PacketOperationModel(PI_PACKET_OPERATION_TYPE_2, METADATAS_4); /** * Checks that the P4PacketOperationModel class is immutable. @@ -85,6 +96,7 @@ public void testEquals() { .addEqualityGroup(P4_PACKET_OPERATION_MODEL_1, SAME_AS_P4_PACKET_OPERATION_MODEL_1) .addEqualityGroup(P4_PACKET_OPERATION_MODEL_2) .addEqualityGroup(P4_PACKET_OPERATION_MODEL_3) + .addEqualityGroup(P4_PACKET_OPERATION_MODEL_4) .testEquals(); } } diff --git a/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4PipelineModelTest.java b/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4PipelineModelTest.java index e8b1c70eb32..8aa222d2ccd 100644 --- a/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4PipelineModelTest.java +++ b/protocols/p4runtime/model/src/test/java/org/onosproject/p4runtime/model/P4PipelineModelTest.java @@ -27,8 +27,6 @@ import org.onosproject.net.pi.model.PiActionParamModel; import org.onosproject.net.pi.model.PiActionProfileId; import org.onosproject.net.pi.model.PiActionProfileModel; -import org.onosproject.net.pi.model.PiPacketMetadataId; -import org.onosproject.net.pi.model.PiPacketMetadataModel; import org.onosproject.net.pi.model.PiCounterId; import org.onosproject.net.pi.model.PiCounterModel; import org.onosproject.net.pi.model.PiCounterType; @@ -38,6 +36,8 @@ import org.onosproject.net.pi.model.PiMeterId; import org.onosproject.net.pi.model.PiMeterModel; import org.onosproject.net.pi.model.PiMeterType; +import org.onosproject.net.pi.model.PiPacketMetadataId; +import org.onosproject.net.pi.model.PiPacketMetadataModel; import org.onosproject.net.pi.model.PiPacketOperationModel; import org.onosproject.net.pi.model.PiPacketOperationType; import org.onosproject.net.pi.model.PiPipelineModel; @@ -297,6 +297,8 @@ public class P4PipelineModelTest { new P4PacketMetadataModel(PI_CONTROL_METADATA_ID_1, META_BIT_WIDTH_1); private static final PiPacketMetadataModel P4_CONTROL_METADATA_MODEL_2 = new P4PacketMetadataModel(PI_CONTROL_METADATA_ID_2, META_BIT_WIDTH_2); + private static final PiPacketMetadataModel P4_CONTROL_METADATA_MODEL_3 = + new P4PacketMetadataModel(PI_CONTROL_METADATA_ID_2, P4PacketMetadataModel.BIT_WIDTH_UNDEFINED); /* Pipeline Models */ private static final ImmutableMap TABLES_1 = @@ -325,11 +327,17 @@ public class P4PipelineModelTest { new ImmutableList.Builder() .add(P4_CONTROL_METADATA_MODEL_2) .build(); + private static final ImmutableList METADATAS_3 = + new ImmutableList.Builder() + .add(P4_CONTROL_METADATA_MODEL_3) + .build(); private static final PiPacketOperationModel P4_PACKET_OPERATION_MODEL_1 = new P4PacketOperationModel(PI_PACKET_OPERATION_TYPE_1, METADATAS_1); private static final PiPacketOperationModel P4_PACKET_OPERATION_MODEL_2 = new P4PacketOperationModel(PI_PACKET_OPERATION_TYPE_2, METADATAS_2); + private static final PiPacketOperationModel P4_PACKET_OPERATION_MODEL_3 = + new P4PacketOperationModel(PI_PACKET_OPERATION_TYPE_1, METADATAS_3); private static final ImmutableMap PACKET_OPERATIONS_1 = new ImmutableMap.Builder() @@ -339,13 +347,30 @@ public class P4PipelineModelTest { new ImmutableMap.Builder() .put(PI_PACKET_OPERATION_TYPE_2, P4_PACKET_OPERATION_MODEL_2) .build(); + private static final ImmutableMap PACKET_OPERATIONS_3 = + new ImmutableMap.Builder() + .put(PI_PACKET_OPERATION_TYPE_1, P4_PACKET_OPERATION_MODEL_3) + .build(); + + private static final int FINGER_PRINT_1 = 0; + private static final int FINGER_PRINT_2 = 1; + + private static final String ARCHITECTURE_ID_1 = "tna"; + private static final String ARCHITECTURE_ID_2 = "v1model"; + private static final PiPipelineModel P4_PIPELINE_MODEL_1 = - new P4PipelineModel(TABLES_1, COUNTERS_1, METERS_1, REGISTERS_1, ACTION_PROFILES_1, PACKET_OPERATIONS_1); + new P4PipelineModel(TABLES_1, COUNTERS_1, METERS_1, REGISTERS_1, ACTION_PROFILES_1, PACKET_OPERATIONS_1, + ARCHITECTURE_ID_1, FINGER_PRINT_1); private static final PiPipelineModel SAME_AS_P4_PIPELINE_MODEL_1 = - new P4PipelineModel(TABLES_1, COUNTERS_1, METERS_1, REGISTERS_1, ACTION_PROFILES_1, PACKET_OPERATIONS_1); + new P4PipelineModel(TABLES_1, COUNTERS_1, METERS_1, REGISTERS_1, ACTION_PROFILES_1, PACKET_OPERATIONS_1, + ARCHITECTURE_ID_1, FINGER_PRINT_1); private static final PiPipelineModel P4_PIPELINE_MODEL_2 = - new P4PipelineModel(TABLES_2, COUNTERS_2, METERS_2, REGISTERS_1, ACTION_PROFILES_2, PACKET_OPERATIONS_2); + new P4PipelineModel(TABLES_2, COUNTERS_2, METERS_2, REGISTERS_1, ACTION_PROFILES_2, PACKET_OPERATIONS_2, + ARCHITECTURE_ID_2, FINGER_PRINT_2); + private static final PiPipelineModel P4_PIPELINE_MODEL_3 = + new P4PipelineModel(TABLES_2, COUNTERS_2, METERS_2, REGISTERS_1, ACTION_PROFILES_2, PACKET_OPERATIONS_3, + ARCHITECTURE_ID_2, FINGER_PRINT_2); /** * Checks that the P4PipelineModel class is immutable. @@ -363,6 +388,7 @@ public void testEquals() { new EqualsTester() .addEqualityGroup(P4_PIPELINE_MODEL_1, SAME_AS_P4_PIPELINE_MODEL_1) .addEqualityGroup(P4_PIPELINE_MODEL_2) + .addEqualityGroup(P4_PIPELINE_MODEL_3) .testEquals(); } } diff --git a/protocols/p4runtime/model/src/test/resources/org/onosproject/p4runtime/model/test_p4runtime_translation_p4info.txt b/protocols/p4runtime/model/src/test/resources/org/onosproject/p4runtime/model/test_p4runtime_translation_p4info.txt new file mode 100644 index 00000000000..b984b4ca7f5 --- /dev/null +++ b/protocols/p4runtime/model/src/test/resources/org/onosproject/p4runtime/model/test_p4runtime_translation_p4info.txt @@ -0,0 +1,162 @@ +pkg_info { + arch: "v1model" +} +tables { + preamble { + id: 36960149 + name: "table0" + alias: "table0" + } + match_fields { + id: 1 + name: "local_metadata.ingress_port" + bitwidth: 32 + match_type: EXACT + type_name { + name: "port_id_bit_t" + } + } + match_fields { + id: 2 + name: "hdr.ethernet.srcAddr" + match_type: EXACT + type_name { + name: "mac_addr_t" + } + } + match_fields { + id: 3 + name: "hdr.ethernet.dstAddr" + match_type: EXACT + type_name { + name: "mac_addr_t" + } + } + match_fields { + id: 4 + name: "hdr.ethernet.etherType" + bitwidth: 16 + match_type: OPTIONAL + } + action_refs { + id: 27607748 + } + action_refs { + id: 32872817 + } + action_refs { + id: 24562328 + } + action_refs { + id: 18759588 + } + const_default_action_id: 18759588 + size: 1024 +} +actions { + preamble { + id: 24562328 + name: "send_to_cpu" + alias: "send_to_cpu" + } +} +actions { + preamble { + id: 27607748 + name: "set_egress_port" + alias: "set_egress_port" + } + params { + id: 1 + name: "port" + type_name { + name: "port_id_str_t" + } + } +} +actions { + preamble { + id: 32872817 + name: "set_egress_port2" + alias: "set_egress_port2" + } + params { + id: 1 + name: "port" + bitwidth: 32 + type_name { + name: "port_id_bit_t" + } + } +} +actions { + preamble { + id: 18759588 + name: "drop" + alias: "drop" + } +} +controller_packet_metadata { + preamble { + id: 81826293 + name: "packet_in" + alias: "packet_in" + annotations: "@controller_header(\"packet_in\")" + } + metadata { + id: 1 + name: "ingress_port" + bitwidth: 9 + } + metadata { + id: 2 + name: "_padding" + bitwidth: 7 + } +} +controller_packet_metadata { + preamble { + id: 76689799 + name: "packet_out" + alias: "packet_out" + annotations: "@controller_header(\"packet_out\")" + } + metadata { + id: 1 + name: "egress_port" + bitwidth: 9 + } + metadata { + id: 2 + name: "_padding" + bitwidth: 7 + } +} +type_info { + new_types { + key: "mac_addr_t" + value { + translated_type { + sdn_string { + } + } + } + } + new_types { + key: "port_id_bit_t" + value { + translated_type { + sdn_bitwidth: 32 + } + } + } + new_types { + key: "port_id_str_t" + value { + translated_type { + sdn_string { + } + } + } + } +} diff --git a/protocols/p4runtime/utils/BUILD b/protocols/p4runtime/utils/BUILD new file mode 100644 index 00000000000..a521bbbf8bf --- /dev/null +++ b/protocols/p4runtime/utils/BUILD @@ -0,0 +1,8 @@ +COMPILE_DEPS = CORE_DEPS + [ + "//protocols/p4runtime/proto:onos-protocols-p4runtime-proto", + "//deps:com_google_protobuf_protobuf_java", +] + +osgi_jar_with_tests( + deps = COMPILE_DEPS, +) diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractEntityCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractEntityCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractEntityCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/AbstractEntityCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionCodec.java similarity index 67% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionCodec.java index 3ae46c9c8fa..cbf112cf865 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionCodec.java +++ b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionCodec.java @@ -28,6 +28,8 @@ import p4.v1.P4RuntimeOuterClass; import static java.lang.String.format; +import static org.onlab.util.ImmutableByteSequence.copyAndFit; +import static org.onlab.util.ImmutableByteSequence.copyFrom; import static org.onosproject.p4runtime.ctl.codec.Utils.assertSize; /** @@ -47,9 +49,15 @@ protected P4RuntimeOuterClass.Action encode( for (PiActionParam p : piAction.parameters()) { final P4InfoOuterClass.Action.Param paramInfo = browser.actionParams(actionId) .getByName(p.id().toString()); - final ByteString paramValue = ByteString.copyFrom(p.value().asReadOnlyBuffer()); - assertSize(format("param '%s' of action '%s'", p.id(), piAction.id()), - paramValue, paramInfo.getBitwidth()); + final ByteString paramValue; + if (browser.isTypeString(paramInfo.getTypeName())) { + paramValue = ByteString.copyFrom(p.value().asReadOnlyBuffer()); + } else { + paramValue = ByteString.copyFrom(p.value().canonical().asReadOnlyBuffer()); + // Check size only if the param type is not a sdn_string + assertSize(format("param '%s' of action '%s'", p.id(), piAction.id()), + paramValue, paramInfo.getBitwidth()); + } actionMsgBuilder.addParams(P4RuntimeOuterClass.Action.Param.newBuilder() .setParamId(paramInfo.getId()) .setValue(paramValue) @@ -62,7 +70,7 @@ protected P4RuntimeOuterClass.Action encode( protected PiAction decode( P4RuntimeOuterClass.Action message, Object ignored, PiPipeconf pipeconf, P4InfoBrowser browser) - throws P4InfoBrowser.NotFoundException { + throws P4InfoBrowser.NotFoundException, CodecException { final P4InfoBrowser.EntityBrowser paramInfo = browser.actionParams(message.getActionId()); final String actionName = browser.actions() @@ -71,10 +79,20 @@ protected PiAction decode( final PiAction.Builder builder = PiAction.builder() .withId(PiActionId.of(actionName)); for (P4RuntimeOuterClass.Action.Param p : message.getParamsList()) { - final String paramName = paramInfo.getById(p.getParamId()).getName(); - final ImmutableByteSequence value = ImmutableByteSequence.copyFrom( - p.getValue().toByteArray()); - builder.withParameter(new PiActionParam(PiActionParamId.of(paramName), value)); + final P4InfoOuterClass.Action.Param actionParam = paramInfo.getById(p.getParamId()); + final ImmutableByteSequence value; + if (browser.isTypeString(actionParam.getTypeName())) { + value = copyFrom(new String(p.getValue().toByteArray())); + } else { + try { + value = copyAndFit(p.getValue().asReadOnlyByteBuffer(), + actionParam.getBitwidth()); + } catch (ImmutableByteSequence.ByteSequenceTrimException e) { + throw new CodecException(e.getMessage()); + } + } + builder.withParameter(new PiActionParam( + PiActionParamId.of(actionParam.getName()), value)); } return builder.build(); } diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileGroupCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileGroupCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileGroupCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileGroupCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileMemberCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileMemberCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileMemberCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/ActionProfileMemberCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/CloneSessionEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/CloneSessionEntryCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/CloneSessionEntryCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/CloneSessionEntryCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/CodecException.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/CodecException.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/CodecException.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/CodecException.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/Codecs.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/Codecs.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/Codecs.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/Codecs.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/CounterEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/CounterEntryCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/CounterEntryCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/CounterEntryCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectCounterEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectCounterEntryCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectCounterEntryCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectCounterEntryCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectMeterEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectMeterEntryCodec.java similarity index 72% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectMeterEntryCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectMeterEntryCodec.java index 3bedfbf4115..3be0244a82d 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectMeterEntryCodec.java +++ b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/DirectMeterEntryCodec.java @@ -17,7 +17,6 @@ package org.onosproject.p4runtime.ctl.codec; import org.onosproject.net.pi.model.PiPipeconf; -import org.onosproject.net.pi.runtime.PiMeterBand; import org.onosproject.net.pi.runtime.PiMeterCellConfig; import org.onosproject.net.pi.runtime.PiMeterCellHandle; import org.onosproject.net.pi.runtime.PiMeterCellId; @@ -38,11 +37,16 @@ protected P4RuntimeOuterClass.DirectMeterEntry encode( PiMeterCellConfig piEntity, Object ignored, PiPipeconf pipeconf, P4InfoBrowser browser) throws CodecException { - return P4RuntimeOuterClass.DirectMeterEntry.newBuilder() + P4RuntimeOuterClass.DirectMeterEntry.Builder builder = + P4RuntimeOuterClass.DirectMeterEntry.newBuilder() .setTableEntry(CODECS.tableEntry().encode( - piEntity.cellId().tableEntry(), null, pipeconf)) - .setConfig(MeterEntryCodec.getP4Config(piEntity)) - .build(); + piEntity.cellId().tableEntry(), null, pipeconf)); + // We keep the config field unset if it is reset scenario + P4RuntimeOuterClass.MeterConfig meterConfig = MeterEntryCodec.getP4Config(piEntity); + if (meterConfig != null) { + builder = builder.setConfig(meterConfig); + } + return builder.build(); } @Override @@ -74,14 +78,17 @@ protected PiMeterCellConfig decode( P4RuntimeOuterClass.DirectMeterEntry message, Object ignored, PiPipeconf pipeconf, P4InfoBrowser browser) throws CodecException { - return PiMeterCellConfig.builder() - .withMeterCellId(PiMeterCellId.ofDirect( - CODECS.tableEntry().decode( - message.getTableEntry(), null, pipeconf))) - .withMeterBand(new PiMeterBand(message.getConfig().getCir(), - message.getConfig().getCburst())) - .withMeterBand(new PiMeterBand(message.getConfig().getPir(), - message.getConfig().getPburst())) - .build(); + PiMeterCellId cellId = + PiMeterCellId.ofDirect( + CODECS.tableEntry().decode( + message.getTableEntry(), null, pipeconf)); + // When a field is unset, gRPC (P4RT) will return a default value + // So, if the meter config is unset, the value of rate and burst will be 0, + // while 0 is a meaningful value and not equals to UNSET in P4RT. + // We cannot extract the values directly. + P4RuntimeOuterClass.MeterConfig p4Config = + message.hasConfig() ? message.getConfig() : null; + + return MeterEntryCodec.getPiMeterCellConfig(cellId, p4Config); } } diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/EntityCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/EntityCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/EntityCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/EntityCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/FieldMatchCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/FieldMatchCodec.java similarity index 50% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/FieldMatchCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/FieldMatchCodec.java index f289d5d8901..4b8fe500b98 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/FieldMatchCodec.java +++ b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/FieldMatchCodec.java @@ -23,6 +23,7 @@ import org.onosproject.net.pi.runtime.PiExactFieldMatch; import org.onosproject.net.pi.runtime.PiFieldMatch; import org.onosproject.net.pi.runtime.PiLpmFieldMatch; +import org.onosproject.net.pi.runtime.PiOptionalFieldMatch; import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; import org.onosproject.p4runtime.ctl.utils.P4InfoBrowser; @@ -30,9 +31,11 @@ import p4.v1.P4RuntimeOuterClass; import static java.lang.String.format; +import static org.onlab.util.ImmutableByteSequence.copyAndFit; import static org.onlab.util.ImmutableByteSequence.copyFrom; import static org.onosproject.p4runtime.ctl.codec.Utils.assertPrefixLen; import static org.onosproject.p4runtime.ctl.codec.Utils.assertSize; +import static org.onosproject.p4runtime.ctl.codec.Utils.sdnStringUnsupported; /** * Codec for P4Runtime FieldMatch. Metadata is expected to be a Preamble for @@ -64,14 +67,20 @@ public P4RuntimeOuterClass.FieldMatch encode( matchFieldInfo.getName(), tablePreamble.getName()); int fieldId = matchFieldInfo.getId(); int fieldBitwidth = matchFieldInfo.getBitwidth(); + boolean isSdnString = browser.isTypeString(matchFieldInfo.getTypeName()); messageBuilder.setFieldId(fieldId); switch (piFieldMatch.type()) { case EXACT: PiExactFieldMatch fieldMatch = (PiExactFieldMatch) piFieldMatch; - ByteString exactValue = ByteString.copyFrom(fieldMatch.value().asReadOnlyBuffer()); - assertSize(VALUE_OF_PREFIX + entityName, exactValue, fieldBitwidth); + ByteString exactValue; + if (isSdnString) { + exactValue = ByteString.copyFrom(fieldMatch.value().asReadOnlyBuffer()); + } else { + exactValue = ByteString.copyFrom(fieldMatch.value().canonical().asReadOnlyBuffer()); + assertSize(VALUE_OF_PREFIX + entityName, exactValue, fieldBitwidth); + } return messageBuilder.setExact( P4RuntimeOuterClass.FieldMatch.Exact .newBuilder() @@ -80,8 +89,11 @@ public P4RuntimeOuterClass.FieldMatch encode( .build(); case TERNARY: PiTernaryFieldMatch ternaryMatch = (PiTernaryFieldMatch) piFieldMatch; - ByteString ternaryValue = ByteString.copyFrom(ternaryMatch.value().asReadOnlyBuffer()); - ByteString ternaryMask = ByteString.copyFrom(ternaryMatch.mask().asReadOnlyBuffer()); + ByteString ternaryValue = ByteString.copyFrom(ternaryMatch.value().canonical().asReadOnlyBuffer()); + ByteString ternaryMask = ByteString.copyFrom(ternaryMatch.mask().canonical().asReadOnlyBuffer()); + if (isSdnString) { + sdnStringUnsupported(entityName, piFieldMatch.type()); + } assertSize(VALUE_OF_PREFIX + entityName, ternaryValue, fieldBitwidth); assertSize(MASK_OF_PREFIX + entityName, ternaryMask, fieldBitwidth); return messageBuilder.setTernary( @@ -93,8 +105,11 @@ public P4RuntimeOuterClass.FieldMatch encode( .build(); case LPM: PiLpmFieldMatch lpmMatch = (PiLpmFieldMatch) piFieldMatch; - ByteString lpmValue = ByteString.copyFrom(lpmMatch.value().asReadOnlyBuffer()); + ByteString lpmValue = ByteString.copyFrom(lpmMatch.value().canonical().asReadOnlyBuffer()); int lpmPrefixLen = lpmMatch.prefixLength(); + if (isSdnString) { + sdnStringUnsupported(entityName, piFieldMatch.type()); + } assertSize(VALUE_OF_PREFIX + entityName, lpmValue, fieldBitwidth); assertPrefixLen(entityName, lpmPrefixLen, fieldBitwidth); return messageBuilder.setLpm( @@ -105,8 +120,11 @@ public P4RuntimeOuterClass.FieldMatch encode( .build(); case RANGE: PiRangeFieldMatch rangeMatch = (PiRangeFieldMatch) piFieldMatch; - ByteString rangeHighValue = ByteString.copyFrom(rangeMatch.highValue().asReadOnlyBuffer()); - ByteString rangeLowValue = ByteString.copyFrom(rangeMatch.lowValue().asReadOnlyBuffer()); + ByteString rangeHighValue = ByteString.copyFrom(rangeMatch.highValue().canonical().asReadOnlyBuffer()); + ByteString rangeLowValue = ByteString.copyFrom(rangeMatch.lowValue().canonical().asReadOnlyBuffer()); + if (isSdnString) { + sdnStringUnsupported(entityName, piFieldMatch.type()); + } assertSize(HIGH_RANGE_VALUE_OF_PREFIX + entityName, rangeHighValue, fieldBitwidth); assertSize(LOW_RANGE_VALUE_OF_PREFIX + entityName, rangeLowValue, fieldBitwidth); return messageBuilder.setRange( @@ -115,6 +133,20 @@ public P4RuntimeOuterClass.FieldMatch encode( .setLow(rangeLowValue) .build()) .build(); + case OPTIONAL: + PiOptionalFieldMatch optionalMatch = (PiOptionalFieldMatch) piFieldMatch; + ByteString optionalValue; + if (isSdnString) { + optionalValue = ByteString.copyFrom(optionalMatch.value().asReadOnlyBuffer()); + } else { + optionalValue = ByteString.copyFrom(optionalMatch.value().canonical().asReadOnlyBuffer()); + assertSize(VALUE_OF_PREFIX + entityName, optionalValue, fieldBitwidth); + } + return messageBuilder.setOptional( + P4RuntimeOuterClass.FieldMatch.Optional.newBuilder() + .setValue(optionalValue) + .build()) + .build(); default: throw new CodecException(format( "Building of match type %s not implemented", piFieldMatch.type())); @@ -127,35 +159,69 @@ public PiFieldMatch decode( PiPipeconf pipeconf, P4InfoBrowser browser) throws CodecException, P4InfoBrowser.NotFoundException { - String fieldMatchName = browser.matchFields(tablePreamble.getId()) - .getById(message.getFieldId()).getName(); - PiMatchFieldId headerFieldId = PiMatchFieldId.of(fieldMatchName); - - P4RuntimeOuterClass.FieldMatch.FieldMatchTypeCase typeCase = message.getFieldMatchTypeCase(); + final P4InfoOuterClass.MatchField matchField = + browser.matchFields(tablePreamble.getId()) + .getById(message.getFieldId()); + final int fieldBitwidth = matchField.getBitwidth(); + final PiMatchFieldId headerFieldId = PiMatchFieldId.of(matchField.getName()); + final boolean isSdnString = browser.isTypeString(matchField.getTypeName()); - switch (typeCase) { - case EXACT: - P4RuntimeOuterClass.FieldMatch.Exact exactFieldMatch = message.getExact(); - ImmutableByteSequence exactValue = copyFrom(exactFieldMatch.getValue().asReadOnlyByteBuffer()); - return new PiExactFieldMatch(headerFieldId, exactValue); - case TERNARY: - P4RuntimeOuterClass.FieldMatch.Ternary ternaryFieldMatch = message.getTernary(); - ImmutableByteSequence ternaryValue = copyFrom(ternaryFieldMatch.getValue().asReadOnlyByteBuffer()); - ImmutableByteSequence ternaryMask = copyFrom(ternaryFieldMatch.getMask().asReadOnlyByteBuffer()); - return new PiTernaryFieldMatch(headerFieldId, ternaryValue, ternaryMask); - case LPM: - P4RuntimeOuterClass.FieldMatch.LPM lpmFieldMatch = message.getLpm(); - ImmutableByteSequence lpmValue = copyFrom(lpmFieldMatch.getValue().asReadOnlyByteBuffer()); - int lpmPrefixLen = lpmFieldMatch.getPrefixLen(); - return new PiLpmFieldMatch(headerFieldId, lpmValue, lpmPrefixLen); - case RANGE: - P4RuntimeOuterClass.FieldMatch.Range rangeFieldMatch = message.getRange(); - ImmutableByteSequence rangeHighValue = copyFrom(rangeFieldMatch.getHigh().asReadOnlyByteBuffer()); - ImmutableByteSequence rangeLowValue = copyFrom(rangeFieldMatch.getLow().asReadOnlyByteBuffer()); - return new PiRangeFieldMatch(headerFieldId, rangeLowValue, rangeHighValue); - default: - throw new CodecException(format( - "Decoding of field match type '%s' not implemented", typeCase.name())); + final P4RuntimeOuterClass.FieldMatch.FieldMatchTypeCase typeCase = message.getFieldMatchTypeCase(); + try { + switch (typeCase) { + case EXACT: + P4RuntimeOuterClass.FieldMatch.Exact exactFieldMatch = message.getExact(); + final ImmutableByteSequence exactValue; + if (isSdnString) { + exactValue = copyFrom(new String(exactFieldMatch.getValue().toByteArray())); + } else { + exactValue = copyAndFit( + exactFieldMatch.getValue().asReadOnlyByteBuffer(), + fieldBitwidth); + } + return new PiExactFieldMatch(headerFieldId, exactValue); + case TERNARY: + P4RuntimeOuterClass.FieldMatch.Ternary ternaryFieldMatch = message.getTernary(); + ImmutableByteSequence ternaryValue = copyAndFit( + ternaryFieldMatch.getValue().asReadOnlyByteBuffer(), + fieldBitwidth); + ImmutableByteSequence ternaryMask = copyAndFit( + ternaryFieldMatch.getMask().asReadOnlyByteBuffer(), + fieldBitwidth); + return new PiTernaryFieldMatch(headerFieldId, ternaryValue, ternaryMask); + case LPM: + P4RuntimeOuterClass.FieldMatch.LPM lpmFieldMatch = message.getLpm(); + ImmutableByteSequence lpmValue = copyAndFit( + lpmFieldMatch.getValue().asReadOnlyByteBuffer(), + fieldBitwidth); + int lpmPrefixLen = lpmFieldMatch.getPrefixLen(); + return new PiLpmFieldMatch(headerFieldId, lpmValue, lpmPrefixLen); + case RANGE: + P4RuntimeOuterClass.FieldMatch.Range rangeFieldMatch = message.getRange(); + ImmutableByteSequence rangeHighValue = copyAndFit( + rangeFieldMatch.getHigh().asReadOnlyByteBuffer(), + fieldBitwidth); + ImmutableByteSequence rangeLowValue = copyAndFit( + rangeFieldMatch.getLow().asReadOnlyByteBuffer(), + fieldBitwidth); + return new PiRangeFieldMatch(headerFieldId, rangeLowValue, rangeHighValue); + case OPTIONAL: + P4RuntimeOuterClass.FieldMatch.Optional optionalFieldMatch = message.getOptional(); + final ImmutableByteSequence optionalValue; + if (isSdnString) { + optionalValue = copyFrom(new String(optionalFieldMatch.getValue().toByteArray())); + } else { + optionalValue = copyAndFit( + optionalFieldMatch.getValue().asReadOnlyByteBuffer(), + fieldBitwidth); + } + return new PiOptionalFieldMatch(headerFieldId, optionalValue); + default: + throw new CodecException(format( + "Decoding of field match type '%s' not implemented", typeCase.name())); + } + } catch (ImmutableByteSequence.ByteSequenceTrimException e) { + throw new CodecException(e.getMessage()); } } } diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/HandleCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/HandleCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/HandleCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/HandleCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/MeterEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/MeterEntryCodec.java similarity index 62% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/MeterEntryCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/MeterEntryCodec.java index b2107091e49..35845275cdc 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/MeterEntryCodec.java +++ b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/MeterEntryCodec.java @@ -32,32 +32,19 @@ public final class MeterEntryCodec extends AbstractEntityCodec { - static P4RuntimeOuterClass.MeterConfig getP4Config(PiMeterCellConfig piConfig) - throws CodecException { - if (piConfig.meterBands().size() != 2) { - throw new CodecException("Number of meter bands should be 2"); - } - final PiMeterBand[] bands = piConfig.meterBands().toArray(new PiMeterBand[0]); - long cir, cburst, pir, pburst; - // The band with bigger burst is peak if rate of them is equal. - if (bands[0].rate() > bands[1].rate() || - (bands[0].rate() == bands[1].rate() && - bands[0].burst() >= bands[1].burst())) { - cir = bands[1].rate(); - cburst = bands[1].burst(); - pir = bands[0].rate(); - pburst = bands[0].burst(); - } else { - cir = bands[0].rate(); - cburst = bands[0].burst(); - pir = bands[1].rate(); - pburst = bands[1].burst(); + static P4RuntimeOuterClass.MeterConfig getP4Config(PiMeterCellConfig piConfig) { + // The config has no band, we don't have to create a P4RT meter config + if (piConfig.isDefaultConfig()) { + return null; } + + final PiMeterBand committedBand = piConfig.committedBand(); + final PiMeterBand peakBand = piConfig.peakBand(); return P4RuntimeOuterClass.MeterConfig.newBuilder() - .setCir(cir) - .setCburst(cburst) - .setPir(pir) - .setPburst(pburst) + .setCir(committedBand.rate()) + .setCburst(committedBand.burst()) + .setPir(peakBand.rate()) + .setPburst(peakBand.burst()) .build(); } @@ -65,15 +52,20 @@ static P4RuntimeOuterClass.MeterConfig getP4Config(PiMeterCellConfig piConfig) protected P4RuntimeOuterClass.MeterEntry encode( PiMeterCellConfig piEntity, Object ignored, PiPipeconf pipeconf, P4InfoBrowser browser) - throws P4InfoBrowser.NotFoundException, CodecException { + throws P4InfoBrowser.NotFoundException { final int meterId = browser.meters().getByName( piEntity.cellId().meterId().id()).getPreamble().getId(); - return P4RuntimeOuterClass.MeterEntry.newBuilder() + P4RuntimeOuterClass.MeterEntry.Builder builder = + P4RuntimeOuterClass.MeterEntry.newBuilder() .setMeterId(meterId) .setIndex(P4RuntimeOuterClass.Index.newBuilder() - .setIndex(piEntity.cellId().index()).build()) - .setConfig(getP4Config(piEntity)) - .build(); + .setIndex(piEntity.cellId().index()).build()); + // We keep the config field unset if it is reset scenario + P4RuntimeOuterClass.MeterConfig meterConfig = getP4Config(piEntity); + if (meterConfig != null) { + builder = builder.setConfig(meterConfig); + } + return builder.build(); } @Override @@ -112,13 +104,26 @@ protected PiMeterCellConfig decode( .getById(message.getMeterId()) .getPreamble() .getName(); - return PiMeterCellConfig.builder() - .withMeterCellId(PiMeterCellId.ofIndirect( - PiMeterId.of(meterName), message.getIndex().getIndex())) - .withMeterBand(new PiMeterBand(message.getConfig().getCir(), - message.getConfig().getCburst())) - .withMeterBand(new PiMeterBand(message.getConfig().getPir(), - message.getConfig().getPburst())) - .build(); + PiMeterCellId cellId = + PiMeterCellId.ofIndirect(PiMeterId.of(meterName), message.getIndex().getIndex()); + // When a field is unset, gRPC (P4RT) will return a default value + // So, if the meter config is unset, the value of rate and burst will be 0, + // while 0 is a meaningful value and not equals to UNSET in P4RT. + // We cannot extract the values directly. + P4RuntimeOuterClass.MeterConfig p4Config = + message.hasConfig() ? message.getConfig() : null; + + return getPiMeterCellConfig(cellId, p4Config); + } + + public static PiMeterCellConfig getPiMeterCellConfig( + PiMeterCellId cellId, P4RuntimeOuterClass.MeterConfig p4Config) { + PiMeterCellConfig.Builder builder = + PiMeterCellConfig.builder().withMeterCellId(cellId); + if (p4Config != null) { + builder.withCommittedBand(p4Config.getCir(), p4Config.getCburst()) + .withPeakBand(p4Config.getPir(), p4Config.getPburst()); + } + return builder.build(); } } diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/MulticastGroupEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/MulticastGroupEntryCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/MulticastGroupEntryCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/MulticastGroupEntryCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/P4DataCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/P4DataCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/P4DataCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/P4DataCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketInCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketInCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketInCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketInCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketMetadataCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketMetadataCodec.java similarity index 58% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketMetadataCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketMetadataCodec.java index 3f78085fdb7..24aa00e522d 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketMetadataCodec.java +++ b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketMetadataCodec.java @@ -17,6 +17,7 @@ package org.onosproject.p4runtime.ctl.codec; import com.google.protobuf.ByteString; +import org.onlab.util.ImmutableByteSequence; import org.onosproject.net.pi.model.PiPacketMetadataId; import org.onosproject.net.pi.model.PiPipeconf; import org.onosproject.net.pi.runtime.PiPacketMetadata; @@ -24,6 +25,9 @@ import p4.config.v1.P4InfoOuterClass; import p4.v1.P4RuntimeOuterClass; +import java.nio.ByteBuffer; + +import static org.onlab.util.ImmutableByteSequence.copyAndFit; import static org.onlab.util.ImmutableByteSequence.copyFrom; /** @@ -39,12 +43,18 @@ protected P4RuntimeOuterClass.PacketMetadata encode( PiPacketMetadata piEntity, P4InfoOuterClass.Preamble ctrlPktMetaPreamble, PiPipeconf pipeconf, P4InfoBrowser browser) throws P4InfoBrowser.NotFoundException { - final int metadataId = browser + P4InfoOuterClass.ControllerPacketMetadata.Metadata packetMetadata = browser .packetMetadatas(ctrlPktMetaPreamble.getId()) - .getByName(piEntity.id().id()).getId(); + .getByName(piEntity.id().id()); + final ByteBuffer value; + if (browser.isTypeString(packetMetadata.getTypeName())) { + value = piEntity.value().asReadOnlyBuffer(); + } else { + value = piEntity.value().canonical().asReadOnlyBuffer(); + } return P4RuntimeOuterClass.PacketMetadata.newBuilder() - .setMetadataId(metadataId) - .setValue(ByteString.copyFrom(piEntity.value().asReadOnlyBuffer())) + .setMetadataId(packetMetadata.getId()) + .setValue(ByteString.copyFrom(value)) .build(); } @@ -53,15 +63,24 @@ protected PiPacketMetadata decode( P4RuntimeOuterClass.PacketMetadata message, P4InfoOuterClass.Preamble ctrlPktMetaPreamble, PiPipeconf pipeconf, P4InfoBrowser browser) - throws P4InfoBrowser.NotFoundException { - final String packetMetadataName = browser - .packetMetadatas(ctrlPktMetaPreamble.getId()) - .getById(message.getMetadataId()).getName(); - final PiPacketMetadataId metadataId = PiPacketMetadataId - .of(packetMetadataName); + throws P4InfoBrowser.NotFoundException, CodecException { + final P4InfoOuterClass.ControllerPacketMetadata.Metadata pktMeta = + browser.packetMetadatas(ctrlPktMetaPreamble.getId()) + .getById(message.getMetadataId()); + final ImmutableByteSequence value; + if (browser.isTypeString(pktMeta.getTypeName())) { + value = copyFrom(new String(message.getValue().toByteArray())); + } else { + try { + value = copyAndFit(message.getValue().asReadOnlyByteBuffer(), + pktMeta.getBitwidth()); + } catch (ImmutableByteSequence.ByteSequenceTrimException e) { + throw new CodecException(e.getMessage()); + } + } return PiPacketMetadata.builder() - .withId(metadataId) - .withValue(copyFrom(message.getValue().asReadOnlyByteBuffer())) + .withId(PiPacketMetadataId.of(pktMeta.getName())) + .withValue(value) .build(); } } diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketOutCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketOutCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketOutCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PacketOutCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PreReplicaCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PreReplicaCodec.java similarity index 89% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PreReplicaCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PreReplicaCodec.java index 7402b142c50..315e2697cea 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/PreReplicaCodec.java +++ b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/PreReplicaCodec.java @@ -16,6 +16,7 @@ package org.onosproject.p4runtime.ctl.codec; +import com.google.common.primitives.UnsignedInteger; import org.onosproject.net.PortNumber; import org.onosproject.net.pi.model.PiPipeconf; import org.onosproject.net.pi.runtime.PiPreReplica; @@ -37,8 +38,9 @@ protected P4RuntimeOuterClass.Replica encode( throws CodecException, P4InfoBrowser.NotFoundException { final int p4PortId; try { - p4PortId = Math.toIntExact(replica.egressPort().toLong()); - } catch (ArithmeticException e) { + UnsignedInteger egressPort = UnsignedInteger.valueOf(replica.egressPort().toLong()); + p4PortId = egressPort.intValue(); + } catch (IllegalArgumentException e) { throw new CodecException(format( "Cannot cast 64 bit port value '%s' to 32 bit", replica.egressPort())); diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/TableEntryCodec.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/TableEntryCodec.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/TableEntryCodec.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/TableEntryCodec.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/Utils.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/Utils.java similarity index 76% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/Utils.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/Utils.java index c72489a7b36..af1c1596c79 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/Utils.java +++ b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/Utils.java @@ -17,6 +17,7 @@ package org.onosproject.p4runtime.ctl.codec; import com.google.protobuf.ByteString; +import org.onosproject.net.pi.model.PiMatchType; import static java.lang.String.format; @@ -33,9 +34,9 @@ static void assertSize(String entityDescr, ByteString value, int bitWidth) throws CodecException { int byteWidth = (int) Math.ceil((float) bitWidth / 8); - if (value.size() != byteWidth) { + if (value.size() > byteWidth) { throw new CodecException(format( - "Wrong size for %s, expected %d bytes, but found %d", + "Wrong size for %s, expected no more than %d bytes, but found %d", entityDescr, byteWidth, value.size())); } } @@ -49,4 +50,11 @@ static void assertPrefixLen(String entityDescr, int prefixLength, int bitWidth) entityDescr, bitWidth, prefixLength)); } } + + static void sdnStringUnsupported(String entityDescr, PiMatchType matchType) + throws CodecException { + throw new CodecException(format( + "%s is expected to be a sdn_string, but it is unsupported for %s match type", + entityDescr, matchType.name())); + } } diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/package-info.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/package-info.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/codec/package-info.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/codec/package-info.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/utils/P4InfoBrowser.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/utils/P4InfoBrowser.java similarity index 91% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/utils/P4InfoBrowser.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/utils/P4InfoBrowser.java index 29cddffb913..85405cad96d 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/utils/P4InfoBrowser.java +++ b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/utils/P4InfoBrowser.java @@ -30,6 +30,8 @@ import p4.config.v1.P4InfoOuterClass.P4Info; import p4.config.v1.P4InfoOuterClass.Preamble; import p4.config.v1.P4InfoOuterClass.Table; +import p4.config.v1.P4InfoOuterClass.Digest; +import p4.config.v1.P4Types; import java.util.Map; @@ -55,6 +57,8 @@ public final class P4InfoBrowser { private final Map> matchFields = Maps.newHashMap(); private final Map> ctrlPktMetadatasMetadata = Maps.newHashMap(); + private final EntityBrowser digests = new EntityBrowser<>("digest"); + private final Map isTypeString = Maps.newHashMap(); /** * Creates a new browser for the given P4Info. @@ -116,6 +120,15 @@ private void parseP4Info(P4Info p4info) { entity.getMetadataList().forEach(m -> metadataBrowser.add(m.getName(), null, m.getId(), m)); ctrlPktMetadatasMetadata.put(ctrlPktMetadataId, metadataBrowser); }); + + p4info.getDigestsList().forEach( + entity -> digests.addWithPreamble(entity.getPreamble(), entity)); + p4info.getTypeInfo().getNewTypesMap().forEach( + (s, p4NewTypeSpec) -> + isTypeString.put(s, + p4NewTypeSpec.hasTranslatedType() + && p4NewTypeSpec.getTranslatedType().hasSdnString() + )); } /** @@ -190,6 +203,15 @@ public EntityBrowser controllerPacketMetadatas() { return ctrlPktMetadatas; } + /** + * Returns a browser for digests. + * + * @return digest browser + */ + public EntityBrowser digests() { + return digests; + } + /** * Returns a browser for params of the given action. * @@ -230,6 +252,17 @@ public EntityBrowser packetMetadatas(int cont return ctrlPktMetadatasMetadata.get(controllerPacketMetadataId); } + /** + * Checks if the given type name is a sdn_string. + * + * @param typeName Type name to check + * @return True if the given type name is a sdn_string, false otherwise + */ + public boolean isTypeString(P4Types.P4NamedType typeName) { + return isTypeString.containsKey(typeName.getName()) + && isTypeString.get(typeName.getName()); + } + /** * Browser of P4Info entities. * diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/utils/PipeconfHelper.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/utils/PipeconfHelper.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/utils/PipeconfHelper.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/utils/PipeconfHelper.java diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/utils/package-info.java b/protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/utils/package-info.java similarity index 100% rename from protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/utils/package-info.java rename to protocols/p4runtime/utils/src/main/java/org/onosproject/p4runtime/ctl/utils/package-info.java diff --git a/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/DeviceTaskExecutor.java b/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/DeviceTaskExecutor.java index 6f90256fd81..30e754abdd1 100644 --- a/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/DeviceTaskExecutor.java +++ b/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/DeviceTaskExecutor.java @@ -75,15 +75,22 @@ public TaskQueue load(DeviceId deviceId) { return new TaskQueue(); } }); + /** + * Type of tasks allowed to be back to back. + */ + private final Set allowList; /** - * Creates a new executor with the given delegate executor service. + * Creates a new executor with the given delegate executor service + * and the allowed back to back task types. * * @param delegate executor service + * @param allowed tasks allowed to be back to back */ - DeviceTaskExecutor(ExecutorService delegate) { + DeviceTaskExecutor(ExecutorService delegate, Set allowed) { checkNotNull(delegate); this.delegate = delegate; + this.allowList = allowed; } /** @@ -108,7 +115,7 @@ void submit(DeviceId deviceId, T type, Runnable runnable) { final DeviceTask task = new DeviceTask(deviceId, type, runnable); deviceLocks.get(deviceId).lock(); try { - if (taskQueues.get(deviceId).isBackToBackDuplicate(type)) { + if (taskQueues.get(deviceId).isBackToBackDuplicate(type) && !allowList.contains(type)) { if (log.isDebugEnabled()) { log.debug("Dropping back-to-back duplicate task {} for {}", type, deviceId); diff --git a/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/GeneralDeviceProvider.java b/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/GeneralDeviceProvider.java index c466d73c945..5b32187d69e 100644 --- a/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/GeneralDeviceProvider.java +++ b/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/GeneralDeviceProvider.java @@ -19,6 +19,7 @@ import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.google.common.util.concurrent.Futures; +import org.apache.commons.lang3.tuple.Pair; import org.onlab.packet.ChassisId; import org.onlab.util.ItemNotFoundException; import org.onlab.util.SharedScheduledExecutors; @@ -110,7 +111,7 @@ @Component(immediate = true, property = { CHECKUP_INTERVAL + ":Integer=" + CHECKUP_INTERVAL_DEFAULT, - STATS_POLL_INTERVAL + ":Integer=" + STATS_POLL_INTERVAL_DEFAULT, + STATS_POLL_INTERVAL + ":Integer=" + STATS_POLL_INTERVAL_DEFAULT }) public class GeneralDeviceProvider extends AbstractProvider implements DeviceProvider { @@ -124,6 +125,11 @@ public class GeneralDeviceProvider extends AbstractProvider private static final int CORE_POOL_SIZE = 10; private static final String UNKNOWN = "unknown"; + // We have measured a grace period of 5s with the + // current devices - giving some time more to absorb + // any fluctuation. + private static final int GRACE_PERIOD = 8000; + @Reference(cardinality = ReferenceCardinality.MANDATORY) private DeviceProviderRegistry providerRegistry; @@ -187,6 +193,9 @@ public class GeneralDeviceProvider extends AbstractProvider private StatsPoller statsPoller; private DeviceProviderService providerService; + private final Map> lastRoleRequest = + Maps.newConcurrentMap(); + public GeneralDeviceProvider() { super(new ProviderId(URI_SCHEME, DEVICE_PROVIDER_PACKAGE)); } @@ -199,7 +208,7 @@ protected DeviceProviderService providerService() { public void activate(ComponentContext context) { mainExecutor = newFixedThreadPool(CORE_POOL_SIZE, groupedThreads( "onos/gdp", "%d", log)); - taskExecutor = new DeviceTaskExecutor<>(mainExecutor); + taskExecutor = new DeviceTaskExecutor<>(mainExecutor, GDP_ALLOWLIST); providerService = providerRegistry.register(this); componentConfigService.registerProperties(getClass()); coreService.registerApplication(APP_NAME); @@ -324,7 +333,13 @@ public void roleChanged(DeviceId deviceId, MastershipRole newRole) { break; case NONE: // No preference for NONE, apply as is. - log.info("Notifying role {} to {}", newRole, deviceId); + Pair pairRolePref = Pair.of(newRole, -1); + if (log.isDebugEnabled()) { + log.debug("Notifying role {} to {}", newRole, deviceId); + } else if (!pairRolePref.equals(lastRoleRequest.get(deviceId))) { + log.info("Notifying role {} to {}", newRole, deviceId); + } + lastRoleRequest.put(deviceId, pairRolePref); handshaker.roleChanged(newRole); return; default: @@ -332,8 +347,15 @@ public void roleChanged(DeviceId deviceId, MastershipRole newRole) { return; } - log.info("Notifying role {} (preference {}) for term {} to {}", - newRole, preference, mastershipInfo.term(), deviceId); + Pair pairRolePref = Pair.of(newRole, preference); + if (log.isDebugEnabled()) { + log.debug("Notifying role {} (preference {}) for term {} to {}", + newRole, preference, mastershipInfo.term(), deviceId); + } else if (!pairRolePref.equals(lastRoleRequest.get(deviceId))) { + log.info("Notifying role {} (preference {}) for term {} to {}", + newRole, preference, mastershipInfo.term(), deviceId); + } + lastRoleRequest.put(deviceId, pairRolePref); try { handshaker.roleChanged(preference, mastershipInfo.term()); @@ -401,6 +423,28 @@ public void triggerDisconnect(DeviceId deviceId) { submitTask(deviceId, TaskType.CONNECTION_TEARDOWN); } + @Override + public CompletableFuture probeReachability(DeviceId deviceId) { + final DeviceHandshaker handshaker = getBehaviour( + deviceId, DeviceHandshaker.class); + if (handshaker == null) { + return CompletableFuture.completedFuture(false); + } + return handshaker.probeReachability(); + } + + @Override + public int gracePeriod() { + return GRACE_PERIOD; + } + + private boolean probeReachabilitySync(DeviceId deviceId) { + // Wait 3/4 of the checkup interval and make sure the thread + // is not blocked more than the checkUpInterval + return Tools.futureGetOrElse(probeReachability(deviceId), (checkupInterval * 3000 / 4), + TimeUnit.MILLISECONDS, Boolean.FALSE); + } + /** * Listener for configuration events. */ @@ -520,7 +564,8 @@ private void startOrReschedulePeriodicCheckupTasks() { this::submitCheckupTasksForAllDevices, 1, checkupInterval, - TimeUnit.SECONDS); + TimeUnit.SECONDS, + true); } } @@ -559,6 +604,9 @@ enum TaskType { NOT_MASTER, } + private static final Set GDP_ALLOWLIST = Sets.newHashSet(TaskType.ROLE_MASTER, TaskType.ROLE_NONE, + TaskType.ROLE_STANDBY, TaskType.NOT_MASTER); + private void submitTask(DeviceId deviceId, TaskType taskType) { taskExecutor.submit(deviceId, taskType, taskRunnable(deviceId, taskType)); } @@ -633,20 +681,42 @@ private void handleConnectionUpdate(DeviceId deviceId) { } private void createOrUpdateDevice(DeviceId deviceId, boolean available) { - if (deviceService.getDevice(deviceId) != null - && deviceService.isAvailable(deviceId) == available) { - // Other nodes might have advertised this device before us. - return; - } assertConfig(deviceId); + if (available) { // Push port descriptions. If marking online, make sure to update // ports before other subsystems pick up the device event. final List ports = getPortDetails(deviceId); providerService.updatePorts(deviceId, ports); } - providerService.deviceConnected(deviceId, getDeviceDescription( - deviceId, available)); + + DeviceDescription deviceDescription = getDeviceDescription(deviceId, available); + DeviceDescription storeDescription = providerService.getDeviceDescription(deviceId); + if (deviceService.getDevice(deviceId) != null && + deviceService.isAvailable(deviceId) == available && + storeDescription != null) { + // FIXME SDFAB-650 rethink the APIs and abstractions around the DeviceStore. + // Device registration is a two-step process for the GDP. Initially, the device is + // registered with default avail. to false. Later, the checkup task will update the + // description with the default avail to true in order to mark it available. Today, + // there is only one API to mark online a device from the device provider which is + // deviceConnected which assumes an update on the device description. The device provider + // is the only one able to update the device description and we have to make sure that + // the default avail. is flipped to true as it is used to mark as online the device when + // it is created or updated. Otherwise, if an ONOS instance fails and restarts, when re-joining + // the cluster, it will get the device marked as offline and will not be able to update + // its status until it become the master. This process concurs with the markOnline done + // by the background thread in the DeviceManager and its the reason why we cannot just check + // the device availability but we need to compare also the desc. Checking here the equality, + // as in general we may want to upgrade the device description at run time. + DeviceDescription testDeviceDescription = DefaultDeviceDescription.copyReplacingAnnotation( + deviceDescription, storeDescription.annotations()); + if (testDeviceDescription.equals(storeDescription)) { + return; + } + } + + providerService.deviceConnected(deviceId, deviceDescription); } private boolean probeAvailability(DeviceHandshaker handshaker) { @@ -696,16 +766,12 @@ private void doCheckupAndRepair(DeviceId deviceId) { // If here, device should be registered in the core. assertDeviceRegistered(deviceId); - if (!handshaker.isReachable()) { + if (!handshaker.isReachable() || !probeReachabilitySync(deviceId)) { // Device appears to be offline. markOfflineIfNeeded(deviceId); - // While we expect the protocol layer to implement some sort of + // We expect the protocol layer to implement some sort of // connection backoff mechanism and to signal availability via - // CHANNEL_OPEN events, we stimulate some channel activity now. - // Trigger probe over the network and forget about it (not waiting - // for future to complete). If channel is ready, we expect to come - // back here via a CHANNEL_OPEN event. - handshaker.probeReachability(); + // CHANNEL_OPEN events. return; } @@ -740,14 +806,24 @@ private void doCheckupAndRepair(DeviceId deviceId) { } final MastershipRole deviceRole = handshaker.getRole(); + // FIXME: we should be checking the mastership term as well. if (expectedRole != deviceRole) { - // FIXME: we should be checking the mastership term as well. - log.debug("Detected role mismatch for {}, core expects {}, " + - "but device reports {}, waiting for mastership " + - "service to fix this...", - deviceId, expectedRole, deviceRole); - // Gentle nudge to fix things... - providerService.receivedRoleReply(deviceId, deviceRole); + // Let's be greedy, if the role is NONE likely is due to the lazy channel + if (deviceRole == MastershipRole.NONE) { + log.warn("Detected role mismatch for {}, core expects {}, " + + "but device reports {}, reassert the role... ", + deviceId, expectedRole, deviceRole); + // If we are experiencing a severe issue, eventually + // the DeviceManager will move the mastership + roleChanged(deviceId, expectedRole); + } else { + log.debug("Detected role mismatch for {}, core expects {}, " + + "but device reports {}, waiting for mastership " + + "service to fix this...", + deviceId, expectedRole, deviceRole); + // Gentle nudge to fix things... + providerService.receivedRoleReply(deviceId, deviceRole); + } return; } diff --git a/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/GnmiDeviceStateSubscriber.java b/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/GnmiDeviceStateSubscriber.java index b7804bbe19d..f36e7a85ea5 100644 --- a/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/GnmiDeviceStateSubscriber.java +++ b/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/GnmiDeviceStateSubscriber.java @@ -52,9 +52,13 @@ import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.concurrent.ExecutorService; import java.util.concurrent.locks.Lock; import java.util.stream.Collectors; +import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; +import static org.onlab.util.Tools.groupedThreads; + /** * Entity that manages gNMI subscription for devices using OpenConfig models and * that reports relevant events to the core. @@ -62,7 +66,7 @@ @Beta class GnmiDeviceStateSubscriber { - private static final String LAST_CHANGE = "last-changed"; + private static final String LAST_CHANGE = "last-change"; private static Logger log = LoggerFactory.getLogger(GnmiDeviceStateSubscriber.class); @@ -78,6 +82,8 @@ class GnmiDeviceStateSubscriber { private final Striped deviceLocks = Striped.lock(30); + private ExecutorService eventExecutor; + GnmiDeviceStateSubscriber(GnmiController gnmiController, DeviceService deviceService, MastershipService mastershipService, DeviceProviderService providerService) { @@ -88,6 +94,8 @@ class GnmiDeviceStateSubscriber { } public void activate() { + eventExecutor = newSingleThreadScheduledExecutor(groupedThreads( + "onos/gnmi", "events-%d", log)); deviceService.addListener(deviceEventListener); mastershipService.addListener(mastershipListener); gnmiController.addListener(gnmiEventListener); @@ -100,6 +108,8 @@ public void deactivate() { deviceService.removeListener(deviceEventListener); mastershipService.removeListener(mastershipListener); gnmiController.removeListener(gnmiEventListener); + eventExecutor.shutdownNow(); + eventExecutor = null; } private void checkSubscription(DeviceId deviceId) { @@ -126,13 +136,12 @@ private boolean shouldHaveSubscription(DeviceId deviceId) { && !deviceService.getPorts(deviceId).isEmpty(); } - private Path interfaceOperStatusPath(String interfaceName) { + private Path interfaceStatePath(String interfaceName) { return Path.newBuilder() .addElem(PathElem.newBuilder().setName("interfaces").build()) .addElem(PathElem.newBuilder() .setName("interface").putKey("name", interfaceName).build()) .addElem(PathElem.newBuilder().setName("state").build()) - .addElem(PathElem.newBuilder().setName("oper-status").build()) .build(); } @@ -163,7 +172,7 @@ private void subscribeIfNeeded(DeviceId deviceId) { .setUpdatesOnly(true) .addAllSubscription(ports.stream().map( port -> Subscription.newBuilder() - .setPath(interfaceOperStatusPath(port.name())) + .setPath(interfaceStatePath(port.name())) .setMode(SubscriptionMode.ON_CHANGE) .build()).collect(Collectors.toList())) .build(); @@ -183,19 +192,32 @@ private void handleGnmiUpdate(GnmiUpdate eventSubject) { return; } - List updateList = notification.getUpdateList(); - updateList.forEach(update -> { - Path path = update.getPath(); - PathElem lastElem = path.getElem(path.getElemCount() - 1); + long lastChange = 0; + Update statusUpdate = null; + Path path; + PathElem lastElem; + // The assumption is that the notification contains all the updates: + // last-change, oper-status, counters, and so on. Otherwise, we need + // to put in place the aggregation logic in ONOS + for (Update update : notification.getUpdateList()) { + path = update.getPath(); + lastElem = path.getElem(path.getElemCount() - 1); // Use last element to identify which state updated if ("oper-status".equals(lastElem.getName())) { - handleOperStatusUpdate(eventSubject.deviceId(), update, - notification.getTimestamp()); - } else { + statusUpdate = update; + } else if ("last-change".equals(lastElem.getName())) { + lastChange = update.getVal().getUintVal(); + } else if (log.isDebugEnabled()) { log.debug("Unrecognized update {}", GnmiUtils.pathToString(path)); } - }); + } + + // Last-change could be not supported by the device + // Cannot proceed without the status update. + if (statusUpdate != null) { + handleOperStatusUpdate(eventSubject.deviceId(), statusUpdate, lastChange); + } } private void handleOperStatusUpdate(DeviceId deviceId, Update update, long timestamp) { @@ -236,19 +258,21 @@ class InternalGnmiEventListener implements GnmiEventListener { @Override public void event(GnmiEvent event) { - if (!deviceSubscribed.containsKey(event.subject().deviceId())) { - log.warn("Received gNMI event from {}, but we did'nt expect to " + - "be subscribed to it! Discarding event...", - event.subject().deviceId()); - return; - } - - log.debug("Received gNMI event {}", event.toString()); - if (event.type() == GnmiEvent.Type.UPDATE) { - handleGnmiUpdate((GnmiUpdate) event.subject()); - } else { - log.debug("Unsupported gNMI event type: {}", event.type()); - } + eventExecutor.execute(() -> { + if (!deviceSubscribed.containsKey(event.subject().deviceId())) { + log.warn("Received gNMI event from {}, but we did'nt expect to " + + "be subscribed to it! Discarding event...", + event.subject().deviceId()); + return; + } + + log.debug("Received gNMI event {}", event.toString()); + if (event.type() == GnmiEvent.Type.UPDATE) { + handleGnmiUpdate((GnmiUpdate) event.subject()); + } else { + log.debug("Unsupported gNMI event type: {}", event.type()); + } + }); } } @@ -256,7 +280,7 @@ class InternalMastershipListener implements MastershipListener { @Override public void event(MastershipEvent event) { - checkSubscription(event.subject()); + eventExecutor.execute(() -> checkSubscription(event.subject())); } } @@ -264,18 +288,20 @@ class InternalDeviceListener implements DeviceListener { @Override public void event(DeviceEvent event) { - switch (event.type()) { - case DEVICE_ADDED: - case DEVICE_AVAILABILITY_CHANGED: - case DEVICE_UPDATED: - case DEVICE_REMOVED: - case PORT_ADDED: - case PORT_REMOVED: - checkSubscription(event.subject().id()); - break; - default: - break; - } + eventExecutor.execute(() -> { + switch (event.type()) { + case DEVICE_ADDED: + case DEVICE_AVAILABILITY_CHANGED: + case DEVICE_UPDATED: + case DEVICE_REMOVED: + case PORT_ADDED: + case PORT_REMOVED: + checkSubscription(event.subject().id()); + break; + default: + break; + } + }); } } } diff --git a/providers/hostprobing/src/main/java/org/onosproject/provider/hostprobing/impl/DefaultHostProbingProvider.java b/providers/hostprobing/src/main/java/org/onosproject/provider/hostprobing/impl/DefaultHostProbingProvider.java index 522ed20eecd..079489e4e4d 100644 --- a/providers/hostprobing/src/main/java/org/onosproject/provider/hostprobing/impl/DefaultHostProbingProvider.java +++ b/providers/hostprobing/src/main/java/org/onosproject/provider/hostprobing/impl/DefaultHostProbingProvider.java @@ -29,6 +29,8 @@ import org.onosproject.net.ConnectPoint; import org.onosproject.net.Host; import org.onosproject.net.HostLocation; +import org.onosproject.net.Port; +import org.onosproject.net.device.DeviceService; import org.onosproject.net.flow.DefaultTrafficTreatment; import org.onosproject.net.flow.TrafficTreatment; import org.onosproject.net.host.HostProbe; @@ -84,6 +86,9 @@ public class DefaultHostProbingProvider extends AbstractProvider implements Host @Reference(cardinality = ReferenceCardinality.MANDATORY) private MastershipService mastershipService; + @Reference(cardinality = ReferenceCardinality.MANDATORY) + private DeviceService deviceService; + private HostProviderService providerService; private HostProbingProviderService hostProbingProviderService; private ExecutorService packetHandler; @@ -170,16 +175,23 @@ public void processEvent(HostProbingEvent event) { case PROBE_FAIL: // Remove this location if this is a verify probe. if (hostProbe.mode() == ProbeMode.VERIFY) { + ConnectPoint oldConnectPoint = hostProbe.connectPoint(); + if (!oldConnectPoint.port().hasName()) { + oldConnectPoint = translateSwitchPort(oldConnectPoint); + } providerService.removeLocationFromHost(hostProbe.id(), - new HostLocation(hostProbe.connectPoint(), 0L)); + new HostLocation(oldConnectPoint, 0L)); } break; case PROBE_COMPLETED: // Add this location if this is a discover probe. if (hostProbe.mode() == ProbeMode.DISCOVER) { - HostLocation newLocation = new HostLocation(hostProbe.connectPoint(), - System.currentTimeMillis()); - providerService.addLocationToHost(hostProbe.id(), newLocation); + ConnectPoint newConnectPoint = hostProbe.connectPoint(); + if (!newConnectPoint.port().hasName()) { + newConnectPoint = translateSwitchPort(newConnectPoint); + } + providerService.addLocationToHost(hostProbe.id(), + new HostLocation(newConnectPoint, System.currentTimeMillis())); } break; default: @@ -247,4 +259,14 @@ private void sendLocationProbe(Ethernet probe, ConnectPoint connectPoint) { treatment, ByteBuffer.wrap(probe.serialize())); packetService.emit(outboundPacket); } + + /* Connect point generated from netcfg may not have port name + we use the device service as translation service */ + private ConnectPoint translateSwitchPort(ConnectPoint connectPoint) { + Port devicePort = deviceService.getPort(connectPoint); + if (devicePort != null) { + return new ConnectPoint(connectPoint.deviceId(), devicePort.number()); + } + return connectPoint; + } } diff --git a/providers/lldpcommon/src/main/java/org/onosproject/provider/lldpcommon/LinkDiscovery.java b/providers/lldpcommon/src/main/java/org/onosproject/provider/lldpcommon/LinkDiscovery.java index 578e1c16f2f..eb8df9d1d50 100644 --- a/providers/lldpcommon/src/main/java/org/onosproject/provider/lldpcommon/LinkDiscovery.java +++ b/providers/lldpcommon/src/main/java/org/onosproject/provider/lldpcommon/LinkDiscovery.java @@ -223,7 +223,7 @@ private boolean processOnosLldp(PacketContext packetContext, Ethernet eth) { DeviceId srcDeviceId = DeviceId.deviceId(idString); DeviceId dstDeviceId = packetContext.inPacket().receivedFrom().deviceId(); - ConnectPoint src = new ConnectPoint(srcDeviceId, srcPort); + ConnectPoint src = translateSwitchPort(srcDeviceId, srcPort); ConnectPoint dst = new ConnectPoint(dstDeviceId, dstPort); LinkDescription ld = new DefaultLinkDescription(src, dst, lt); @@ -260,7 +260,7 @@ private boolean processLldp(PacketContext packetContext, Ethernet eth) { Optional srcDevice = findSourceDeviceByChassisId(deviceService, srcChassisId); if (!srcDevice.isPresent()) { - log.warn("source device not found. srcChassisId value: {}", srcChassisId); + log.debug("source device not found. srcChassisId value: {}", srcChassisId); return false; } Optional sourcePort = findSourcePortByName( @@ -269,7 +269,7 @@ private boolean processLldp(PacketContext packetContext, Ethernet eth) { srcDevice.get()); if (!sourcePort.isPresent()) { - log.warn("source port not found. sourcePort value: {}", sourcePort); + log.debug("source port not found. sourcePort value: {}", sourcePort); return false; } @@ -477,4 +477,14 @@ private void sendProbes(Long portNumber, String portDesc) { public boolean containsPort(long portNumber) { return portMap.containsKey(portNumber); } + + /* Port number created from ONOS lldp does not have port name + we use the device service as translation service */ + private ConnectPoint translateSwitchPort(DeviceId deviceId, PortNumber portNumber) { + Port devicePort = this.context.deviceService().getPort(deviceId, portNumber); + if (devicePort != null) { + return new ConnectPoint(deviceId, devicePort.number()); + } + return new ConnectPoint(deviceId, portNumber); + } } diff --git a/providers/netcfglinks/src/main/java/org/onosproject/provider/netcfglinks/NetworkConfigLinksProvider.java b/providers/netcfglinks/src/main/java/org/onosproject/provider/netcfglinks/NetworkConfigLinksProvider.java index 30608e40f5e..d908681465e 100644 --- a/providers/netcfglinks/src/main/java/org/onosproject/provider/netcfglinks/NetworkConfigLinksProvider.java +++ b/providers/netcfglinks/src/main/java/org/onosproject/provider/netcfglinks/NetworkConfigLinksProvider.java @@ -519,7 +519,11 @@ public void event(DeviceEvent event) { private class InternalConfigListener implements NetworkConfigListener { private void addLink(LinkKey linkKey) { + DefaultLinkDescription linkDescription = + new DefaultLinkDescription(linkKey.src(), linkKey.dst(), + Link.Type.DIRECT); configuredLinks.add(linkKey); + providerService.linkDetected(linkDescription); } private void removeLink(LinkKey linkKey) { diff --git a/providers/netconf/device/src/main/java/org/onosproject/provider/netconf/device/impl/NetconfDeviceProvider.java b/providers/netconf/device/src/main/java/org/onosproject/provider/netconf/device/impl/NetconfDeviceProvider.java index 9ff800284f5..2a0533f3276 100644 --- a/providers/netconf/device/src/main/java/org/onosproject/provider/netconf/device/impl/NetconfDeviceProvider.java +++ b/providers/netconf/device/src/main/java/org/onosproject/provider/netconf/device/impl/NetconfDeviceProvider.java @@ -320,6 +320,15 @@ public void roleChanged(DeviceId deviceId, MastershipRole newRole) { } } + @Override + public boolean isAvailable(DeviceId deviceId) { + boolean isReachable = isTcpConnectionAvailable(deviceId); + if (isReachable) { + return controller.pingDevice(deviceId); + } + return false; + } + @Override public boolean isReachable(DeviceId deviceId) { boolean sessionExists = @@ -332,33 +341,7 @@ public boolean isReachable(DeviceId deviceId) { //FIXME this is a workaround util device state is shared // between controller instances. - Device device = deviceService.getDevice(deviceId); - String ip; - int port; - if (device != null) { - ip = device.annotations().value(IPADDRESS); - port = Integer.parseInt(device.annotations().value(PORT)); - } else { - Triple> info = extractIpPortPath(deviceId); - ip = info.getLeft(); - port = info.getMiddle(); - } - // FIXME just opening TCP session probably is not the appropriate - // method to test reachability. - //test connection to device opening a socket to it. - log.debug("Testing reachability for {}:{}", ip, port); - Socket socket = new Socket(); - try { - socket.connect(new InetSocketAddress(ip, port), 1000); - log.debug("rechability of {}, {}, {}", deviceId, socket.isConnected(), !socket.isClosed()); - boolean isConnected = socket.isConnected() && !socket.isClosed(); - socket.close(); - return isConnected; - } catch (IOException e) { - log.info("Device {} is not reachable", deviceId); - log.debug(" error details", e); - return false; - } + return isTcpConnectionAvailable(deviceId); } @Override @@ -409,6 +392,36 @@ public void triggerDisconnect(DeviceId deviceId) { controller.disconnectDevice(deviceId, true); } + private boolean isTcpConnectionAvailable(DeviceId deviceId) { + Device device = deviceService.getDevice(deviceId); + String ip; + int port; + if (device != null) { + ip = device.annotations().value(IPADDRESS); + port = Integer.parseInt(device.annotations().value(PORT)); + } else { + Triple> info = extractIpPortPath(deviceId); + ip = info.getLeft(); + port = info.getMiddle(); + } + // FIXME just opening TCP session probably is not the appropriate + // method to test reachability. + //test connection to device opening a socket to it. + log.debug("Testing reachability for {}:{}", ip, port); + Socket socket = new Socket(); + try { + socket.connect(new InetSocketAddress(ip, port), 1000); + log.debug("rechability of {}, {}, {}", deviceId, socket.isConnected(), !socket.isClosed()); + boolean isConnected = socket.isConnected() && !socket.isClosed(); + socket.close(); + return isConnected; + } catch (IOException e) { + log.info("Device {} is not reachable", deviceId); + log.debug(" error details", e); + return false; + } + } + private ScheduledFuture schedulePolling() { return pollingExecutor.scheduleAtFixedRate(exceptionSafe(this::checkAndUpdateDevices), pollFrequency / 10, diff --git a/providers/null/src/main/java/org/onosproject/provider/nil/NullProviders.java b/providers/null/src/main/java/org/onosproject/provider/nil/NullProviders.java index d95943b4d8b..be0f753539a 100644 --- a/providers/null/src/main/java/org/onosproject/provider/nil/NullProviders.java +++ b/providers/null/src/main/java/org/onosproject/provider/nil/NullProviders.java @@ -135,6 +135,7 @@ public class NullProviders { private final NullGroupProvider groupProvider = new NullGroupProvider(); private final NullPacketProvider packetProvider = new NullPacketProvider(); private final TopologyMutationDriver topologyMutationDriver = new TopologyMutationDriver(); + private final PortStatsDriver portStatsDriver = new PortStatsDriver(); private DeviceProviderService deviceProviderService; private HostProviderService hostProviderService; @@ -429,6 +430,19 @@ private void rejectMastership() { NONE)); } + /** + * Enables or disables simulated port statistics. + * + * @param on true to enable + */ + public void enablePortStats(boolean on) { + if (on) { + portStatsDriver.start(deviceService, deviceProviderService); + } else { + portStatsDriver.stop(); + } + } + // Null provider base class. abstract static class AbstractNullProvider extends AbstractProvider { protected AbstractNullProvider() { diff --git a/providers/null/src/main/java/org/onosproject/provider/nil/PortStatsDriver.java b/providers/null/src/main/java/org/onosproject/provider/nil/PortStatsDriver.java new file mode 100644 index 00000000000..81ebdae5882 --- /dev/null +++ b/providers/null/src/main/java/org/onosproject/provider/nil/PortStatsDriver.java @@ -0,0 +1,103 @@ +/* + * Copyright 2015-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onosproject.provider.nil; + +import org.onosproject.net.Device; +import org.onosproject.net.Port; +import org.onosproject.net.device.DefaultPortStatistics; +import org.onosproject.net.device.DeviceProviderService; +import org.onosproject.net.device.DeviceService; +import org.onosproject.net.device.PortStatistics; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.security.SecureRandom; +import java.util.HashSet; +import java.util.Random; +import java.util.Set; +import java.util.concurrent.ExecutorService; + +import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; +import static org.onlab.util.Tools.delay; +import static org.onlab.util.Tools.groupedThreads; + +/** + * Drives port statistics simulation using random generator. + */ +class PortStatsDriver implements Runnable { + + private final Logger log = LoggerFactory.getLogger(getClass()); + + private static final int WAIT_DELAY = 2_000; + + private final Random random = new SecureRandom(); + + private volatile boolean stopped = true; + + private DeviceService deviceService; + private DeviceProviderService deviceProviderService; + + private final ExecutorService executor = + newSingleThreadScheduledExecutor(groupedThreads("onos/null", "port-stats-mutator", log)); + + /** + * Starts the mutation process. + * + * @param deviceService device service + * @param deviceProviderService device provider service + */ + void start(DeviceService deviceService, + DeviceProviderService deviceProviderService) { + if (stopped) { + stopped = false; + this.deviceService = deviceService; + this.deviceProviderService = deviceProviderService; + executor.execute(this); + } + } + + /** + * Stops the mutation process. + */ + void stop() { + stopped = true; + } + + @Override + public void run() { + while (!stopped) { + delay(WAIT_DELAY); + deviceService.getAvailableDevices().forEach(this::updatePorts); + } + } + + public void updatePorts(Device device) { + Set portStats = new HashSet<>(); + for (Port port : deviceService.getPorts(device.id())) { + portStats.add(DefaultPortStatistics.builder() + .setBytesReceived(Math.abs(random.nextInt())) + .setBytesSent(Math.abs(random.nextInt())) + .setPacketsReceived(Math.abs(random.nextInt())) + .setPacketsSent(Math.abs(random.nextInt())) + .setDurationSec(2) + .setDeviceId(device.id()) + .setPort(port.number()) + .build()); + } + deviceProviderService.updatePortStatistics(device.id(), portStats); + } + +} diff --git a/providers/null/src/main/java/org/onosproject/provider/nil/cli/NullPortStatsControlCommand.java b/providers/null/src/main/java/org/onosproject/provider/nil/cli/NullPortStatsControlCommand.java new file mode 100644 index 00000000000..109d0cfc7e8 --- /dev/null +++ b/providers/null/src/main/java/org/onosproject/provider/nil/cli/NullPortStatsControlCommand.java @@ -0,0 +1,49 @@ +/* + * Copyright 2015-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onosproject.provider.nil.cli; + +import org.apache.karaf.shell.api.action.Argument; +import org.apache.karaf.shell.api.action.Command; +import org.apache.karaf.shell.api.action.Completion; +import org.apache.karaf.shell.api.action.lifecycle.Service; +import org.onosproject.cfg.ComponentConfigService; +import org.onosproject.cli.AbstractShellCommand; +import org.onosproject.cli.StartStopCompleter; +import org.onosproject.provider.nil.NullProviders; + +import static org.onosproject.cli.StartStopCompleter.START; + +/** + * Starts or stops topology simulation. + */ +@Service +@Command(scope = "onos", name = "null-port-stats", + description = "Starts or stops port statistics simulation") +public class NullPortStatsControlCommand extends AbstractShellCommand { + + @Argument(index = 0, name = "cmd", description = "Control command: start/stop", + required = true) + @Completion(StartStopCompleter.class) + String cmd = null; + + @Override + protected void doExecute() { + ComponentConfigService service = get(ComponentConfigService.class); + NullProviders npService = get(NullProviders.class); + npService.enablePortStats(cmd.equals(START)); + } + +} diff --git a/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java b/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java index cb389e34bad..fdc3ff36eb8 100644 --- a/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java +++ b/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java @@ -797,6 +797,10 @@ public void switchAdded(Dpid dpid) { .set(AnnotationKeys.CHANNEL_ID, sw.channelId()) .set(AnnotationKeys.MANAGEMENT_ADDRESS, sw.channelId().split(":")[0]); + if (sw.datapathDescription() != null && !sw.datapathDescription().isEmpty()) { + annotationsBuilder.set(AnnotationKeys.DATAPATH_DESCRIPTION, sw.datapathDescription()); + } + // FIXME following ignores driver specified by name Driver driver = driverService.getDriver(sw.manufacturerDescription(), sw.hardwareDescription(), diff --git a/providers/openflow/meter/src/main/java/org/onosproject/provider/of/meter/impl/OpenFlowMeterProvider.java b/providers/openflow/meter/src/main/java/org/onosproject/provider/of/meter/impl/OpenFlowMeterProvider.java index f186ef6d405..e14a949d876 100644 --- a/providers/openflow/meter/src/main/java/org/onosproject/provider/of/meter/impl/OpenFlowMeterProvider.java +++ b/providers/openflow/meter/src/main/java/org/onosproject/provider/of/meter/impl/OpenFlowMeterProvider.java @@ -23,12 +23,16 @@ import com.google.common.cache.RemovalNotification; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; +import org.osgi.service.component.ComponentContext; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Deactivate; import org.osgi.service.component.annotations.Reference; +import org.osgi.service.component.annotations.Modified; import org.osgi.service.component.annotations.ReferenceCardinality; import org.onlab.util.ItemNotFoundException; +import org.onlab.util.Tools; +import org.onosproject.cfg.ComponentConfigService; import org.onosproject.core.CoreService; import org.onosproject.net.driver.Driver; import org.onosproject.net.driver.DriverService; @@ -72,23 +76,31 @@ import org.slf4j.Logger; import java.util.Collection; +import java.util.Dictionary; import java.util.EnumSet; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Properties; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Collectors; import java.util.concurrent.ConcurrentHashMap; +import static org.onlab.util.Tools.getIntegerProperty; import static org.onosproject.net.DeviceId.deviceId; import static org.onosproject.openflow.controller.Dpid.uri; +import static org.onosproject.provider.of.meter.impl.OsgiPropertyConstants.*; import static org.slf4j.LoggerFactory.getLogger; /** * Provider which uses an OpenFlow controller to handle meters. */ -@Component(immediate = true, enabled = true) +@Component(immediate = true, enabled = true, property = { + FORCE_STATS_AFTER_METER_REMOVAL + ":Boolean=" + FORCE_STATS_AFTER_METER_REMOVAL_ENABLED_DEFAULT, + METER_STATS_POLL_INTERVAL + ":Integer=" + METER_STATS_POLL_INTERVAL_DEFAULT, +}) + public class OpenFlowMeterProvider extends AbstractProvider implements MeterProvider { private final Logger log = getLogger(getClass()); @@ -105,16 +117,21 @@ public class OpenFlowMeterProvider extends AbstractProvider implements MeterProv @Reference(cardinality = ReferenceCardinality.MANDATORY) protected DriverService driverService; + @Reference(cardinality = ReferenceCardinality.MANDATORY) + protected ComponentConfigService cfgService; + private MeterProviderService providerService; + private boolean forceStatsAfterMeterRemoval = FORCE_STATS_AFTER_METER_REMOVAL_ENABLED_DEFAULT; + + private int meterStatsPollInterval = METER_STATS_POLL_INTERVAL_DEFAULT; + private static final AtomicLong XID_COUNTER = new AtomicLong(1); - static final int POLL_INTERVAL = 10; static final long TIMEOUT = 30; private Cache pendingOperations; - private InternalMeterListener listener = new InternalMeterListener(); private Map collectors = new ConcurrentHashMap<>(); @@ -134,7 +151,8 @@ public OpenFlowMeterProvider() { } @Activate - public void activate() { + public void activate(ComponentContext context) { + cfgService.registerProperties(getClass()); providerService = providerRegistry.register(this); pendingOperations = CacheBuilder.newBuilder() @@ -151,11 +169,16 @@ public void activate() { controller.addEventListener(listener); controller.addListener(listener); - controller.getSwitches().forEach((sw -> createStatsCollection(sw))); + modified(context); + + if (collectors.isEmpty()) { + controller.getSwitches().forEach((sw -> createStatsCollection(sw))); + } } @Deactivate public void deactivate() { + cfgService.unregisterProperties(getClass(), false); providerRegistry.unregister(this); collectors.values().forEach(MeterStatsCollector::stop); collectors.clear(); @@ -164,6 +187,41 @@ public void deactivate() { providerService = null; } + @Modified + public void modified(ComponentContext context) { + Dictionary properties = context != null ? context.getProperties() : new Properties(); + + // update FORCE_STATS_AFTER_METER_REMOVAL if needed + Boolean forceStatsAfterMeterRemovalEnabled = + Tools.isPropertyEnabled(properties, FORCE_STATS_AFTER_METER_REMOVAL); + if (forceStatsAfterMeterRemovalEnabled == null) { + log.info("forceStatsAfterMeterRemoval is not configured, " + + "using current value of {}", forceStatsAfterMeterRemoval); + } else { + forceStatsAfterMeterRemoval = forceStatsAfterMeterRemovalEnabled; + log.info("Configured. forceStatsAfterMeterRemoval is {}", + forceStatsAfterMeterRemovalEnabled ? "enabled" : "disabled"); + } + + // update METER_STATS_POLL_INTERVAL if needed + Integer newMeterPollInterval = getIntegerProperty(properties, METER_STATS_POLL_INTERVAL); + if (newMeterPollInterval != null && newMeterPollInterval > 0 + && newMeterPollInterval != meterStatsPollInterval) { + meterStatsPollInterval = newMeterPollInterval; + // restart meter stats collectors, old instances will be automatically purged before creation + // in the call to createStatsCollection + controller.getSwitches().forEach((sw -> { + createStatsCollection(sw); + })); + log.info("Configured. meterStatsPollInterval to {}", newMeterPollInterval); + } else if (newMeterPollInterval != null && newMeterPollInterval <= 0) { + log.warn("meterStatsPollInterval must be greater than 0"); + // Reset property with the old value + cfgService.setProperty(getClass().getName(), METER_STATS_POLL_INTERVAL, + Integer.toString(meterStatsPollInterval)); + } + } + @Override public void performMeterOperation(DeviceId deviceId, MeterOperations meterOps) { Dpid dpid = Dpid.dpid(deviceId.uri()); @@ -193,7 +251,7 @@ public void performMeterOperation(DeviceId deviceId, MeterOperation meterOp) { performOperation(sw, meterOp); - if (meterOp.type().equals(MeterOperation.Type.REMOVE)) { + if (forceStatsAfterMeterRemoval && meterOp.type().equals(MeterOperation.Type.REMOVE)) { forceMeterStats(deviceId); } @@ -242,7 +300,7 @@ private void performOperation(OpenFlowSwitch sw, MeterOperation op) { private void createStatsCollection(OpenFlowSwitch sw) { if (sw != null && isMeterSupported(sw)) { - MeterStatsCollector msc = new MeterStatsCollector(sw, POLL_INTERVAL); + MeterStatsCollector msc = new MeterStatsCollector(sw, meterStatsPollInterval); stopCollectorIfNeeded(collectors.put(new Dpid(sw.getId()), msc)); msc.start(); } diff --git a/providers/openflow/meter/src/main/java/org/onosproject/provider/of/meter/impl/OsgiPropertyConstants.java b/providers/openflow/meter/src/main/java/org/onosproject/provider/of/meter/impl/OsgiPropertyConstants.java new file mode 100644 index 00000000000..da8f9ebd9ca --- /dev/null +++ b/providers/openflow/meter/src/main/java/org/onosproject/provider/of/meter/impl/OsgiPropertyConstants.java @@ -0,0 +1,40 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.provider.of.meter.impl; + +/** + * Name/Value constants for properties. + */ + +public final class OsgiPropertyConstants { + + private OsgiPropertyConstants() { + } + // Meter stats are used to reconcile the controller internal MeterStore with the information available + // from the switch. This property defines the poll interval for the meter stats request. + public static final String METER_STATS_POLL_INTERVAL = "meterStatsPollInterval"; + public static final int METER_STATS_POLL_INTERVAL_DEFAULT = 10; + + // Defines if the controller should force request the meter stats after a meter has been removed to + // sync the MeterStore as soon as possible with the switch meters while avoid waiting for the next + // meter stats poll cycle. + public static final String FORCE_STATS_AFTER_METER_REMOVAL = "forceStatsAfterMeterRemoval"; + public static final boolean FORCE_STATS_AFTER_METER_REMOVAL_ENABLED_DEFAULT = true; + + + +} diff --git a/providers/openflow/meter/src/main/java/org/onosproject/provider/of/meter/util/MeterFeaturesBuilder.java b/providers/openflow/meter/src/main/java/org/onosproject/provider/of/meter/util/MeterFeaturesBuilder.java index 35f9ddea5a3..9e7963dfa0b 100644 --- a/providers/openflow/meter/src/main/java/org/onosproject/provider/of/meter/util/MeterFeaturesBuilder.java +++ b/providers/openflow/meter/src/main/java/org/onosproject/provider/of/meter/util/MeterFeaturesBuilder.java @@ -53,6 +53,8 @@ public class MeterFeaturesBuilder { private final OFMeterFeatures ofMeterFeatures; private DeviceId deviceId; + private static final long OF_METER_START_INDEX = 1L; + public MeterFeaturesBuilder(OFMeterFeatures features, DeviceId deviceId) { this.ofMeterFeatures = checkNotNull(features); this.deviceId = deviceId; @@ -71,8 +73,15 @@ public MeterFeatures build() { MeterFeatures.Builder builder = DefaultMeterFeatures.builder() .forDevice(deviceId) .withMaxBands(ofMeterFeatures.getMaxBands()) - .withMaxColors(ofMeterFeatures.getMaxColor()) - .withMaxMeters(ofMeterFeatures.getMaxMeter()); + .withMaxColors(ofMeterFeatures.getMaxColor()); + + /* + * We extract the number of supported meters. + */ + if (ofMeterFeatures.getMaxMeter() > 0) { + builder.withStartIndex(OF_METER_START_INDEX) + .withEndIndex(ofMeterFeatures.getMaxMeter()); + } /* * We extract the supported band types. */ diff --git a/providers/ovsdb/device/src/main/java/org/onosproject/ovsdb/providers/device/OvsdbDeviceProvider.java b/providers/ovsdb/device/src/main/java/org/onosproject/ovsdb/providers/device/OvsdbDeviceProvider.java index 5fbf3044f94..dbe7bae42b2 100644 --- a/providers/ovsdb/device/src/main/java/org/onosproject/ovsdb/providers/device/OvsdbDeviceProvider.java +++ b/providers/ovsdb/device/src/main/java/org/onosproject/ovsdb/providers/device/OvsdbDeviceProvider.java @@ -53,6 +53,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import static org.onlab.util.Tools.groupedThreads; +import static org.onosproject.net.MastershipRole.NONE; import static org.slf4j.LoggerFactory.getLogger; /** @@ -121,7 +122,12 @@ public void triggerProbe(DeviceId deviceId) { @Override public void roleChanged(DeviceId deviceId, MastershipRole newRole) { - // TODO: This will be implemented later. + // for OVSDB there is no Mastership concept, simulating here a fake + // Mastership handshake to be compliant with the ONOS core + if (newRole != null && newRole != NONE) { + final MastershipRole role = mastershipService.getLocalRole(deviceId); + providerService.receivedRoleReply(deviceId, role, role); + } } @Override @@ -149,7 +155,6 @@ public void nodeAdded(OvsdbNodeId nodeId) { cid, annotations); providerService.deviceConnected(deviceId, deviceDescription); - } @Override diff --git a/providers/p4runtime/packet/src/main/java/org/onosproject/provider/p4runtime/packet/impl/OsgiPropertyConstants.java b/providers/p4runtime/packet/src/main/java/org/onosproject/provider/p4runtime/packet/impl/OsgiPropertyConstants.java new file mode 100644 index 00000000000..9dadb40eb0e --- /dev/null +++ b/providers/p4runtime/packet/src/main/java/org/onosproject/provider/p4runtime/packet/impl/OsgiPropertyConstants.java @@ -0,0 +1,30 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.provider.p4runtime.packet.impl; + +/** + * Constants for default values of configurable properties. + */ +public final class OsgiPropertyConstants { + + private OsgiPropertyConstants() {} + + public static final String P4RUNTIME_PACKET_PROVIDER_WORKERS = "workers"; + + public static final int P4RUNTIME_PACKET_PROVIDER_WORKERS_DEFAULT = 4; + +} diff --git a/providers/p4runtime/packet/src/main/java/org/onosproject/provider/p4runtime/packet/impl/P4RuntimePacketProvider.java b/providers/p4runtime/packet/src/main/java/org/onosproject/provider/p4runtime/packet/impl/P4RuntimePacketProvider.java index 2fa7493d870..edf95de36aa 100644 --- a/providers/p4runtime/packet/src/main/java/org/onosproject/provider/p4runtime/packet/impl/P4RuntimePacketProvider.java +++ b/providers/p4runtime/packet/src/main/java/org/onosproject/provider/p4runtime/packet/impl/P4RuntimePacketProvider.java @@ -16,8 +16,9 @@ package org.onosproject.provider.p4runtime.packet.impl; - import org.onlab.packet.EthType; +import org.onlab.util.PredictableExecutor; +import org.onosproject.cfg.ComponentConfigService; import org.onosproject.mastership.MastershipService; import org.onosproject.net.Device; import org.onosproject.net.DeviceId; @@ -40,22 +41,34 @@ import org.onosproject.p4runtime.api.P4RuntimeEvent; import org.onosproject.p4runtime.api.P4RuntimeEventListener; import org.onosproject.p4runtime.api.P4RuntimePacketIn; +import org.osgi.service.component.ComponentContext; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Deactivate; +import org.osgi.service.component.annotations.Modified; import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality; import org.slf4j.Logger; import java.nio.ByteBuffer; +import java.util.Dictionary; +import java.util.concurrent.ExecutorService; +import static com.google.common.base.Strings.isNullOrEmpty; +import static org.onlab.util.Tools.get; +import static org.onlab.util.Tools.groupedThreads; import static org.onosproject.net.flow.DefaultTrafficTreatment.emptyTreatment; +import static org.onosproject.provider.p4runtime.packet.impl.OsgiPropertyConstants.P4RUNTIME_PACKET_PROVIDER_WORKERS; +import static org.onosproject.provider.p4runtime.packet.impl.OsgiPropertyConstants.P4RUNTIME_PACKET_PROVIDER_WORKERS_DEFAULT; import static org.slf4j.LoggerFactory.getLogger; /** * Implementation of a packet provider for P4Runtime device. */ -@Component(immediate = true) +@Component(immediate = true, + property = { + P4RUNTIME_PACKET_PROVIDER_WORKERS + ":Integer=" + P4RUNTIME_PACKET_PROVIDER_WORKERS_DEFAULT, + }) public class P4RuntimePacketProvider extends AbstractProvider implements PacketProvider { private final Logger log = getLogger(getClass()); @@ -72,10 +85,18 @@ public class P4RuntimePacketProvider extends AbstractProvider implements PacketP @Reference(cardinality = ReferenceCardinality.MANDATORY) protected MastershipService mastershipService; + @Reference(cardinality = ReferenceCardinality.MANDATORY) + protected ComponentConfigService cfgService; + private PacketProviderService providerService; private InternalPacketListener packetListener = new InternalPacketListener(); + /** Number of P4Runtime packet provider workers. */ + private int workers = P4RUNTIME_PACKET_PROVIDER_WORKERS_DEFAULT; + // Predictable executor to stitch the packet processing always to the same thread + private PredictableExecutor packetWorkers; + /** * Creates a new P4Runtime packet provider. */ @@ -84,20 +105,48 @@ public P4RuntimePacketProvider() { } @Activate - protected void activate() { + protected void activate(ComponentContext context) { + cfgService.registerProperties(getClass()); providerService = providerRegistry.register(this); + modified(context); controller.addListener(packetListener); log.info("Started"); } @Deactivate public void deactivate() { + cfgService.unregisterProperties(getClass(), false); controller.removeListener(packetListener); providerRegistry.unregister(this); providerService = null; + stopWorkersIfNeeded(); log.info("Stopped"); } + @Modified + protected void modified(ComponentContext context) { + if (context != null) { + Dictionary properties = context.getProperties(); + int newWorkers; + try { + String s = get(properties, P4RUNTIME_PACKET_PROVIDER_WORKERS); + newWorkers = isNullOrEmpty(s) ? workers : Integer.parseInt(s.trim()); + } catch (NumberFormatException | ClassCastException e) { + newWorkers = workers; + } + + // Stop previous executor and start a new one when there are changes in the config + // OR during the start up of the service + if (newWorkers != workers || packetWorkers == null) { + workers = newWorkers; + stopWorkersIfNeeded(); + packetWorkers = new PredictableExecutor(workers, groupedThreads("onos/p4rt", + "packet-worker-%d", log)); + log.info("Settings: p4RuntimePacketProviderWorkers={}", workers); + } + } + } + @Override public void emit(OutboundPacket packet) { if (packet != null) { @@ -112,6 +161,14 @@ public void emit(OutboundPacket packet) { } } + private void stopWorkersIfNeeded() { + if (packetWorkers != null) { + ExecutorService oldWorkerExecutor = packetWorkers; + oldWorkerExecutor.shutdown(); + packetWorkers = null; + } + } + private EthType.EtherType getEtherType(ByteBuffer data) { final short shortEthType = data.getShort(12); data.rewind(); @@ -151,62 +208,68 @@ public void send() { } } - /** - * Internal packet listener to handle packet-in events received from the P4Runtime controller. - */ - private class InternalPacketListener implements P4RuntimeEventListener { + private void handleP4RuntimeEvent(P4RuntimeEvent event) { + //Mastership message is sent to everybody but picked up only by master. + //FIXME we need the device ID into p4RuntimeEvnetSubject to check for mastsership + if (!(event.subject() instanceof P4RuntimePacketIn) || event.type() != P4RuntimeEvent.Type.PACKET_IN) { + log.debug("Unrecognized event type {}, discarding", event.type()); + // Not a packet-in event, ignore it. + return; + } + P4RuntimePacketIn eventSubject = (P4RuntimePacketIn) event.subject(); + DeviceId deviceId = eventSubject.deviceId(); - @Override - public void event(P4RuntimeEvent event) { - //Masterhip message is sent to everybody but picked up only by master. - //FIXME we need the device ID into p4RuntimeEvnetSubject to check for mastsership - if (!(event.subject() instanceof P4RuntimePacketIn) || event.type() != P4RuntimeEvent.Type.PACKET_IN) { - log.debug("Unrecognized event type {}, discarding", event.type()); - // Not a packet-in event, ignore it. - return; - } - P4RuntimePacketIn eventSubject = (P4RuntimePacketIn) event.subject(); - DeviceId deviceId = eventSubject.deviceId(); + Device device = deviceService.getDevice(eventSubject.deviceId()); + if (device == null) { + log.warn("Unable to process packet-in from {}, device is null in the core", deviceId); + return; + } - Device device = deviceService.getDevice(eventSubject.deviceId()); - if (device == null) { - log.warn("Unable to process packet-in from {}, device is null in the core", deviceId); - return; - } + if (!device.is(PiPipelineInterpreter.class)) { + log.warn("Unable to process packet-in from {}, device has no PiPipelineInterpreter behaviour", + deviceId); + return; + } - if (!device.is(PiPipelineInterpreter.class)) { - log.warn("Unable to process packet-in from {}, device has no PiPipelineInterpreter behaviour", - deviceId); - return; - } + PiPacketOperation operation = eventSubject.packetOperation(); + InboundPacket inPkt; + try { + inPkt = device.as(PiPipelineInterpreter.class).mapInboundPacket(operation, deviceId); + } catch (PiPipelineInterpreter.PiInterpreterException e) { + log.warn("Unable to interpret inbound packet from {}: {}", deviceId, e.getMessage()); + return; + } - PiPacketOperation operation = eventSubject.packetOperation(); - InboundPacket inPkt; - try { - inPkt = device.as(PiPipelineInterpreter.class).mapInboundPacket(operation, deviceId); - } catch (PiPipelineInterpreter.PiInterpreterException e) { - log.warn("Unable to interpret inbound packet from {}: {}", deviceId, e.getMessage()); - return; - } + if (log.isTraceEnabled()) { + final EthType.EtherType etherType = getEtherType(inPkt.unparsed()); + log.trace("Received PACKET-IN <<< device={} ingress_port={} eth_type={}", + inPkt.receivedFrom().deviceId(), inPkt.receivedFrom().port(), + etherType.ethType().toString()); + } - if (log.isTraceEnabled()) { - final EthType.EtherType etherType = getEtherType(inPkt.unparsed()); - log.trace("Received PACKET-IN <<< device={} ingress_port={} eth_type={}", - inPkt.receivedFrom().deviceId(), inPkt.receivedFrom().port(), - etherType.ethType().toString()); - } + if (inPkt == null) { + log.debug("Received null inbound packet. Ignoring."); + return; + } - if (inPkt == null) { - log.debug("Received null inbound packet. Ignoring."); - return; - } + OutboundPacket outPkt = new DefaultOutboundPacket(eventSubject.deviceId(), null, + operation.data().asReadOnlyBuffer()); + PacketContext pktCtx = new P4RuntimePacketContext(System.currentTimeMillis(), inPkt, outPkt, false); - OutboundPacket outPkt = new DefaultOutboundPacket(eventSubject.deviceId(), null, - operation.data().asReadOnlyBuffer()); - PacketContext pktCtx = new P4RuntimePacketContext(System.currentTimeMillis(), inPkt, outPkt, false); + // Pushing the packet context up for processing. + providerService.processPacket(pktCtx); + } - // Pushing the packet context up for processing. - providerService.processPacket(pktCtx); + /** + * Internal packet listener to handle packet-in events received from the P4Runtime controller. + */ + private class InternalPacketListener implements P4RuntimeEventListener { + + @Override + public void event(P4RuntimeEvent event) { + // Offload to another executor to prevent the ejection of the listener - it uses + // the device id to stitch the packets coming from a device always to the same worker + packetWorkers.execute(() -> handleP4RuntimeEvent(event), event.subject().deviceId().hashCode()); } } } diff --git a/providers/rest/BUILD b/providers/rest/BUILD index 6f53c196e0e..c5ba1533681 100644 --- a/providers/rest/BUILD +++ b/providers/rest/BUILD @@ -1,6 +1,7 @@ BUNDLES = [ "@jersey_client//jar", "@jersey_security//jar", + "@jersey_media_sse//jar", "@commons_io//jar", "@httpclient_osgi//jar", "@httpcore_osgi//jar", diff --git a/tools/build/bazel/angular_workspace.bzl b/tools/build/bazel/angular_workspace.bzl index 6369a0142c1..a1c4efe71e2 100644 --- a/tools/build/bazel/angular_workspace.bzl +++ b/tools/build/bazel/angular_workspace.bzl @@ -1,9 +1,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("@npm_bazel_protractor//:package.bzl", "npm_bazel_protractor_dependencies") -load("@npm_bazel_karma//:package.bzl", "npm_bazel_karma_dependencies") +load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies") +load("@npm//@bazel/karma:package.bzl", "npm_bazel_karma_dependencies") load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories") load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories") -load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace") load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories") def load_angular(): @@ -18,6 +17,4 @@ def load_angular(): firefox = True, ) - ts_setup_workspace() - sass_repositories() diff --git a/tools/build/bazel/dependencies_pom_generator.py b/tools/build/bazel/dependencies_pom_generator.py index f2df0c2e920..8c6483f6a36 100755 --- a/tools/build/bazel/dependencies_pom_generator.py +++ b/tools/build/bazel/dependencies_pom_generator.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2019-present Open Networking Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,7 +20,7 @@ def resolve(mvn_coord): mvn_pieces = mvn_coord.split(":") if mvn_pieces[0] != "mvn": - raise ("Invalid Maven coordinate: %s" % mvn_coord) + raise ValueError("Invalid Maven coordinate: %s" % mvn_coord) return dict( groupId=mvn_pieces[1], artifactId=mvn_pieces[2], @@ -79,7 +79,7 @@ def generate_pom(out_file, template_file, provided_deps, test_deps, deps, var_di dep_template.format(scope='test', **deps[x]) for x in test_deps]) else: - for old, new in var_dict.items(): + for old, new in list(var_dict.items()): line = line.replace(old, new) new_lines.append(line) @@ -111,7 +111,7 @@ def generate_pom(out_file, template_file, provided_deps, test_deps, deps, var_di for var in args.vars: pieces = var.split('=') if len(pieces) != 2: - raise ("Invalid var '%s'" % var) + raise ValueError("Invalid var '%s'" % var) processed_vars["" % pieces[0]] = pieces[1] generate_pom( diff --git a/tools/build/bazel/deps_files.bzl b/tools/build/bazel/deps_files.bzl index 24c65ca048c..b24b3c2c309 100644 --- a/tools/build/bazel/deps_files.bzl +++ b/tools/build/bazel/deps_files.bzl @@ -9,7 +9,7 @@ def _impl(ctx): "echo %s >> %s" % (",".join(dep_list), output.path), ] - ctx.action( + ctx.actions.run_shell( inputs = ctx.files.deps, outputs = [output], progress_message = "Generating deps file paths for %s" % ctx.attr.name, diff --git a/tools/build/bazel/generate_workspace.bzl b/tools/build/bazel/generate_workspace.bzl index ae2d9b569af..7a3420176d8 100644 --- a/tools/build/bazel/generate_workspace.bzl +++ b/tools/build/bazel/generate_workspace.bzl @@ -1,4 +1,4 @@ -# ***** This file was auto-generated at Thu, 19 Nov 2020 22:25:03 GMT. Do not edit this file manually. ***** +# ***** This file was auto-generated at Thu, 9 Jun 2022 15:04:07 GMT. Do not edit this file manually. ***** # ***** Use onos-lib-gen ***** load("//tools/build/bazel:variables.bzl", "ONOS_GROUP_ID", "ONOS_VERSION") @@ -145,45 +145,45 @@ def generated_maven_jars(): if "atomix" not in native.existing_rules(): java_import_external( name = "atomix", - jar_sha256 = "967a951e5b11fed0c08bb2290cc2c7583fe786069ce896b70588a20b3a0af65f", + jar_sha256 = "d5163b005977b5da5f27835af528fce4a71127a1c795f5350f05a5767324e019", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix/3.1.5/atomix-3.1.5.jar"], ) + jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix/3.1.12/atomix-3.1.12.jar"], ) if "atomix_cluster" not in native.existing_rules(): java_import_external( name = "atomix_cluster", - jar_sha256 = "bcf815de1efb668df25e7c5293f2a4352e96073ef7c82fe92272b3adfc4a0cd5", + jar_sha256 = "4e3cbd01f23414934ffe5ccfafa0b16d4009c3d497390fcf8711236f6055fda2", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix-cluster/3.1.5/atomix-cluster-3.1.5.jar"], ) + jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix-cluster/3.1.12/atomix-cluster-3.1.12.jar"], ) if "atomix_primary_backup" not in native.existing_rules(): java_import_external( name = "atomix_primary_backup", - jar_sha256 = "814a5378bbe5190d717492d843e6aaa04a7a996315721a27291c207b30706d29", + jar_sha256 = "afa5191c3a1ab79e007c208c9ef44f4b7c6e0904a1d7f576200d3cacd90c3f4b", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix-primary-backup/3.1.5/atomix-primary-backup-3.1.5.jar"], ) + jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix-primary-backup/3.1.12/atomix-primary-backup-3.1.12.jar"], ) if "atomix_primitive" not in native.existing_rules(): java_import_external( name = "atomix_primitive", - jar_sha256 = "f78516e007f6faa9788f198a20aebe5150808a6b7779984a59530991be36c7c8", + jar_sha256 = "a2a4002824db7b80308f8cedd83a5abe67ebdb9723b6c50fa99ab935c49c2641", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix-primitive/3.1.5/atomix-primitive-3.1.5.jar"], ) + jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix-primitive/3.1.12/atomix-primitive-3.1.12.jar"], ) if "atomix_raft" not in native.existing_rules(): java_import_external( name = "atomix_raft", - jar_sha256 = "57f91b4ed8281a5d26739491d317fd2b2d6788323d8eebca696f0b619d1b1b87", + jar_sha256 = "9583123d7cfc60edb786964087b92f568aafdf00be1b52d4e4737a6cf9d4ca31", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix-raft/3.1.5/atomix-raft-3.1.5.jar"], ) + jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix-raft/3.1.12/atomix-raft-3.1.12.jar"], ) if "atomix_storage" not in native.existing_rules(): java_import_external( name = "atomix_storage", - jar_sha256 = "c751e133b9d8ac00b652ffc9169cf1cbff97c825103ef794a6e065ab3bbe6e99", + jar_sha256 = "d81895846ca70202f38a13c9627b8fc3674e363a3670f7f1221e5444188bbaf3", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix-storage/3.1.5/atomix-storage-3.1.5.jar"], ) + jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix-storage/3.1.12/atomix-storage-3.1.12.jar"], ) if "atomix_utils" not in native.existing_rules(): java_import_external( name = "atomix_utils", - jar_sha256 = "492b1b0515518dc2003e28e0c42316e532cd2d9478256d6812d7f0b92fd7ef9d", + jar_sha256 = "8d8b177488bf7665e008e892b33a5fbde92d6233dc83cf350d51f6bc3f5344d8", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix-utils/3.1.5/atomix-utils-3.1.5.jar"], ) + jar_urls = ["https://repo1.maven.org/maven2/io/atomix/atomix-utils/3.1.12/atomix-utils-3.1.12.jar"], ) if "classgraph" not in native.existing_rules(): java_import_external( name = "classgraph", @@ -871,27 +871,27 @@ def generated_maven_jars(): if "org_apache_karaf_bundle_core" not in native.existing_rules(): java_import_external( name = "org_apache_karaf_bundle_core", - jar_sha256 = "1b494b5c596e1b5fe81136c69a7b0e3ad8e86134207c46bf4cbb029b5414aaf8", + jar_sha256 = "e4b1d099c21c03308855055c9df9993fbdba826d4b5301a5fb75f9d194fbef93", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/org/apache/karaf/bundle/org.apache.karaf.bundle.core/4.2.9/org.apache.karaf.bundle.core-4.2.9.jar"], ) + jar_urls = ["https://repo1.maven.org/maven2/org/apache/karaf/bundle/org.apache.karaf.bundle.core/4.2.14/org.apache.karaf.bundle.core-4.2.14.jar"], ) if "org_apache_karaf_features_core" not in native.existing_rules(): java_import_external( name = "org_apache_karaf_features_core", - jar_sha256 = "0b9baf7a41e95d184f26d59cd923431900699b6bf55e09b883300d43fa97aa18", + jar_sha256 = "98273471d25ad9b01c8d2bee22c99f01f5f0763aed66d0fc79a1910ab0faf3b9", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/org/apache/karaf/features/org.apache.karaf.features.core/4.2.9/org.apache.karaf.features.core-4.2.9.jar"], ) + jar_urls = ["https://repo1.maven.org/maven2/org/apache/karaf/features/org.apache.karaf.features.core/4.2.14/org.apache.karaf.features.core-4.2.14.jar"], ) if "org_apache_karaf_shell_console" not in native.existing_rules(): java_import_external( name = "org_apache_karaf_shell_console", - jar_sha256 = "8bb60748f6bf6498b8f2c13cf96919e6f8c361af97d9a373eade474841e85196", + jar_sha256 = "08bcab878989aec2ef352aebe99d6a03e490fd76cb6dbe43208a3eec78f3dcee", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/org/apache/karaf/shell/org.apache.karaf.shell.console/4.2.9/org.apache.karaf.shell.console-4.2.9.jar"], ) + jar_urls = ["https://repo1.maven.org/maven2/org/apache/karaf/shell/org.apache.karaf.shell.console/4.2.14/org.apache.karaf.shell.console-4.2.14.jar"], ) if "org_apache_karaf_shell_core" not in native.existing_rules(): java_import_external( name = "org_apache_karaf_shell_core", - jar_sha256 = "2b39bfcc5972271f697894364d7937a72317962248b6a6734614f656cb840459", + jar_sha256 = "e769595061487eeb143c298f4d01272cfc3f78ef6ef8c5e49ff8b0689a647e99", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/org/apache/karaf/shell/org.apache.karaf.shell.core/4.2.9/org.apache.karaf.shell.core-4.2.9.jar"], ) + jar_urls = ["https://repo1.maven.org/maven2/org/apache/karaf/shell/org.apache.karaf.shell.core/4.2.14/org.apache.karaf.shell.core-4.2.14.jar"], ) if "org_apache_httpcomponents_httpasyncclient_osgi" not in native.existing_rules(): java_import_external( name = "org_apache_httpcomponents_httpasyncclient_osgi", @@ -907,15 +907,15 @@ def generated_maven_jars(): if "org_apache_karaf_jaas" not in native.existing_rules(): java_import_external( name = "org_apache_karaf_jaas", - jar_sha256 = "a24b744898d9d1bafcd0c094270652896d1e4e4ebaacb35b638dd46b93e5c600", + jar_sha256 = "3434034496ee96593cb13c9461380f88c6868f3797b45464c931ff02441dc225", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/org/apache/karaf/jaas/org.apache.karaf.jaas.modules/4.2.9/org.apache.karaf.jaas.modules-4.2.9.jar"], ) + jar_urls = ["https://repo1.maven.org/maven2/org/apache/karaf/jaas/org.apache.karaf.jaas.modules/4.2.14/org.apache.karaf.jaas.modules-4.2.14.jar"], ) if "org_apache_karaf_system_core" not in native.existing_rules(): java_import_external( name = "org_apache_karaf_system_core", - jar_sha256 = "34d1f8057b7d2226cbd1a5219454d038c1799995e9ac9626baa35e284ddfa238", + jar_sha256 = "307ce836799a81562b9d181d89a049aebeae7c2961d1cb4feabf2b7f1165aaef", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/org/apache/karaf/system/org.apache.karaf.system.core/4.2.9/org.apache.karaf.system.core-4.2.9.jar"], ) + jar_urls = ["https://repo1.maven.org/maven2/org/apache/karaf/system/org.apache.karaf.system.core/4.2.14/org.apache.karaf.system.core-4.2.14.jar"], ) if "org_apache_servicemix_bundles_snmp4j" not in native.existing_rules(): java_import_external( name = "org_apache_servicemix_bundles_snmp4j", @@ -1009,9 +1009,9 @@ def generated_maven_jars(): if "apache_karaf" not in native.existing_rules(): java_import_external( name = "apache_karaf", - jar_sha256 = "ad1c15da75d9112537df09bef1e9fcadb11446619f38a22105592a9273061bf4", + jar_sha256 = "892241ce4b48406e7f66d6a4e40bfb039a2dfbf88760e6ff8a62a7df680bcaf9", licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/org/onosproject/apache-karaf-offline/4.2.9-offline-20200706/apache-karaf-4.2.9-offline-20200706.tar.gz"], ) + jar_urls = ["https://repo1.maven.org/maven2/org/onosproject/apache-karaf-offline/4.2.14-offline-20220105/apache-karaf-4.2.14-offline-20220105.tar.gz"], ) if "bndlib" not in native.existing_rules(): java_import_external( name = "bndlib", @@ -1060,12 +1060,6 @@ def generated_maven_jars(): jar_sha256 = "b5ccc73724f0d188ada06aff41c8bf60e0e5d4462e7980af203a20ea87bfa583", licenses = ["notice"], jar_urls = ["https://repo1.maven.org/maven2/io/socket/socket.io-client/0.8.3/socket.io-client-0.8.3.jar"], ) - if "json" not in native.existing_rules(): - java_import_external( - name = "json", - jar_sha256 = "055be110a570f9cda3eba8d70a006ff46c77a048bc67868524879211c48b330a", - licenses = ["notice"], - jar_urls = ["https://repo1.maven.org/maven2/org/json/json/20090211/json-20090211.jar"], ) if "engine_io_client" not in native.existing_rules(): java_import_external( name = "engine_io_client", @@ -1346,13 +1340,13 @@ artifact_map = {} artifact_map["@aopalliance_repackaged//:aopalliance_repackaged"] = "mvn:org.glassfish.hk2.external:aopalliance-repackaged:jar:2.5.0-b42" artifact_map["@amqp_client//:amqp_client"] = "mvn:com.rabbitmq:amqp-client:jar:3.6.1" artifact_map["@asm//:asm"] = "mvn:org.ow2.asm:asm:jar:5.2" -artifact_map["@atomix//:atomix"] = "mvn:io.atomix:atomix:jar:3.1.5" -artifact_map["@atomix_cluster//:atomix_cluster"] = "mvn:io.atomix:atomix-cluster:jar:3.1.5" -artifact_map["@atomix_primary_backup//:atomix_primary_backup"] = "mvn:io.atomix:atomix-primary-backup:jar:3.1.5" -artifact_map["@atomix_primitive//:atomix_primitive"] = "mvn:io.atomix:atomix-primitive:jar:3.1.5" -artifact_map["@atomix_raft//:atomix_raft"] = "mvn:io.atomix:atomix-raft:jar:3.1.5" -artifact_map["@atomix_storage//:atomix_storage"] = "mvn:io.atomix:atomix-storage:jar:3.1.5" -artifact_map["@atomix_utils//:atomix_utils"] = "mvn:io.atomix:atomix-utils:jar:3.1.5" +artifact_map["@atomix//:atomix"] = "mvn:io.atomix:atomix:jar:3.1.12" +artifact_map["@atomix_cluster//:atomix_cluster"] = "mvn:io.atomix:atomix-cluster:jar:3.1.12" +artifact_map["@atomix_primary_backup//:atomix_primary_backup"] = "mvn:io.atomix:atomix-primary-backup:jar:3.1.12" +artifact_map["@atomix_primitive//:atomix_primitive"] = "mvn:io.atomix:atomix-primitive:jar:3.1.12" +artifact_map["@atomix_raft//:atomix_raft"] = "mvn:io.atomix:atomix-raft:jar:3.1.12" +artifact_map["@atomix_storage//:atomix_storage"] = "mvn:io.atomix:atomix-storage:jar:3.1.12" +artifact_map["@atomix_utils//:atomix_utils"] = "mvn:io.atomix:atomix-utils:jar:3.1.12" artifact_map["@classgraph//:classgraph"] = "mvn:io.github.classgraph:classgraph:jar:4.2.3" artifact_map["@commons_codec//:commons_codec"] = "mvn:commons-codec:commons-codec:jar:1.10" artifact_map["@commons_cli//:commons_cli"] = "mvn:commons-cli:commons-cli:jar:1.3" @@ -1467,14 +1461,14 @@ artifact_map["@org_osgi_service_component_annotations//:org_osgi_service_compone artifact_map["@org_osgi_service_metatype_annotations//:org_osgi_service_metatype_annotations"] = "mvn:org.osgi:org.osgi.service.metatype.annotations:jar:1.4.0" artifact_map["@org_osgi_service_cm//:org_osgi_service_cm"] = "mvn:org.osgi:org.osgi.service.cm:jar:1.6.0" artifact_map["@org_apache_felix_scr_bnd//:org_apache_felix_scr_bnd"] = "mvn:org.apache.felix:org.apache.felix.scr.bnd:jar:NON-OSGI:1.9.0" -artifact_map["@org_apache_karaf_bundle_core//:org_apache_karaf_bundle_core"] = "mvn:org.apache.karaf.bundle:org.apache.karaf.bundle.core:jar:4.2.9" -artifact_map["@org_apache_karaf_features_core//:org_apache_karaf_features_core"] = "mvn:org.apache.karaf.features:org.apache.karaf.features.core:jar:4.2.9" -artifact_map["@org_apache_karaf_shell_console//:org_apache_karaf_shell_console"] = "mvn:org.apache.karaf.shell:org.apache.karaf.shell.console:jar:4.2.9" -artifact_map["@org_apache_karaf_shell_core//:org_apache_karaf_shell_core"] = "mvn:org.apache.karaf.shell:org.apache.karaf.shell.core:jar:4.2.9" +artifact_map["@org_apache_karaf_bundle_core//:org_apache_karaf_bundle_core"] = "mvn:org.apache.karaf.bundle:org.apache.karaf.bundle.core:jar:4.2.14" +artifact_map["@org_apache_karaf_features_core//:org_apache_karaf_features_core"] = "mvn:org.apache.karaf.features:org.apache.karaf.features.core:jar:4.2.14" +artifact_map["@org_apache_karaf_shell_console//:org_apache_karaf_shell_console"] = "mvn:org.apache.karaf.shell:org.apache.karaf.shell.console:jar:4.2.14" +artifact_map["@org_apache_karaf_shell_core//:org_apache_karaf_shell_core"] = "mvn:org.apache.karaf.shell:org.apache.karaf.shell.core:jar:4.2.14" artifact_map["@org_apache_httpcomponents_httpasyncclient_osgi//:org_apache_httpcomponents_httpasyncclient_osgi"] = "mvn:org.apache.httpcomponents:httpasyncclient-osgi:jar:4.1.2" artifact_map["@org_apache_httpcomponents_httpcore_nio//:org_apache_httpcomponents_httpcore_nio"] = "mvn:org.apache.httpcomponents:httpcore-nio:jar:NON-OSGI:4.4.4" -artifact_map["@org_apache_karaf_jaas//:org_apache_karaf_jaas"] = "mvn:org.apache.karaf.jaas:org.apache.karaf.jaas.modules:jar:4.2.9" -artifact_map["@org_apache_karaf_system_core//:org_apache_karaf_system_core"] = "mvn:org.apache.karaf.system:org.apache.karaf.system.core:jar:4.2.9" +artifact_map["@org_apache_karaf_jaas//:org_apache_karaf_jaas"] = "mvn:org.apache.karaf.jaas:org.apache.karaf.jaas.modules:jar:4.2.14" +artifact_map["@org_apache_karaf_system_core//:org_apache_karaf_system_core"] = "mvn:org.apache.karaf.system:org.apache.karaf.system.core:jar:4.2.14" artifact_map["@org_apache_servicemix_bundles_snmp4j//:org_apache_servicemix_bundles_snmp4j"] = "mvn:org.apache.servicemix.bundles:org.apache.servicemix.bundles.snmp4j:jar:2.3.4_1" artifact_map["@org_osgi_cmpn//:org_osgi_cmpn"] = "mvn:org.osgi:osgi.cmpn:jar:6.0.0" artifact_map["@osgi_core//:osgi_core"] = "mvn:org.osgi:org.osgi.core:jar:6.0.0" @@ -1490,7 +1484,7 @@ artifact_map["@slf4j_nop//:slf4j_nop"] = "mvn:org.slf4j:slf4j-nop:jar:1.7.25" artifact_map["@typesafe_config//:typesafe_config"] = "mvn:com.typesafe:config:jar:1.3.2" artifact_map["@validation_api//:validation_api"] = "mvn:javax.validation:validation-api:jar:2.0.1.Final" artifact_map["@checkstyle//:checkstyle"] = "mvn:com.puppycrawl.tools:checkstyle:jar:NON-OSGI:8.10" -artifact_map["@apache_karaf//:apache_karaf"] = "https://repo1.maven.org/maven2/org/onosproject/apache-karaf-offline/4.2.9-offline-20200706/apache-karaf-4.2.9-offline-20200706.tar.gz" +artifact_map["@apache_karaf//:apache_karaf"] = "https://repo1.maven.org/maven2/org/onosproject/apache-karaf-offline/4.2.14-offline-20220105/apache-karaf-4.2.14-offline-20220105.tar.gz" artifact_map["@bndlib//:bndlib"] = "mvn:biz.aQute.bnd:biz.aQute.bndlib:jar:4.1.0" artifact_map["@bndexe//:bndexe"] = "mvn:biz.aQute.bnd:biz.aQute.bnd:jar:4.1.0" artifact_map["@libthrift//:libthrift"] = "mvn:org.apache.thrift:libthrift:jar:0.11.0" @@ -1499,7 +1493,6 @@ artifact_map["@snmp_core//:snmp_core"] = "mvn:org.onosproject:snmp-core:jar:1.3- artifact_map["@mibs_net_snmp//:mibs_net_snmp"] = "mvn:org.onosproject:mibbler-mibs-net-snmp:jar:1.0-20151221.1" artifact_map["@mibs_rfc//:mibs_rfc"] = "mvn:org.onosproject:mibbler-mibs-rfc:jar:1.0-20151221.1" artifact_map["@io_socket_client//:io_socket_client"] = "mvn:io.socket:socket.io-client:jar:NON-OSGI:0.8.3" -artifact_map["@json//:json"] = "mvn:org.json:json:jar:NON-OSGI:20090211" artifact_map["@engine_io_client//:engine_io_client"] = "mvn:io.socket:engine.io-client:jar:NON-OSGI:0.8.3" artifact_map["@org_codehaus_mojo_animal_sniffer_annotations//:org_codehaus_mojo_animal_sniffer_annotations"] = "mvn:org.codehaus.mojo:animal-sniffer-annotations:jar:NON-OSGI:1.17" artifact_map["@com_google_api_grpc_proto_google_common_protos//:com_google_api_grpc_proto_google_common_protos"] = "mvn:com.google.api.grpc:proto-google-common-protos:jar:NON-OSGI:1.12.0" diff --git a/tools/build/bazel/grpc_workspace.bzl b/tools/build/bazel/grpc_workspace.bzl index f2f3dfc8be2..1a680da6ce5 100644 --- a/tools/build/bazel/grpc_workspace.bzl +++ b/tools/build/bazel/grpc_workspace.bzl @@ -1,7 +1,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") GRPC_JAVA_VERSION = "1.22.1" -GRPC_SHA = "e6915ea60ab8a6e17de86bd94a8db320b0115cc214db19bef8f2ba4af2dab430" +GRPC_SHA = "073395219d611c21a460d21dfe5cb77550030d6396b400f796e568b5175c2ec0" GAPIS_COMMIT = "37cc0e5acae50ee91f00827a7010c3b07dfa5311" GAPIS_SHA = "17d023f48ea290f25edaf25a967973b5a42ce6d71b1570862f302d95aa8b9f77" @@ -10,9 +10,9 @@ def generate_grpc(): # grpc-java fork that fixes the OSGi split brain problem. http_archive( name = "io_grpc_grpc_java", - urls = ["https://github.com/opennetworkinglab/grpc-java/archive/v%s-patched.zip" % GRPC_JAVA_VERSION], + urls = ["https://github.com/opennetworkinglab/grpc-java/archive/v%s-fix-host_javabase.zip" % GRPC_JAVA_VERSION], sha256 = GRPC_SHA, - strip_prefix = "grpc-java-%s-patched" % GRPC_JAVA_VERSION, + strip_prefix = "grpc-java-%s-fix-host_javabase" % GRPC_JAVA_VERSION, ) # Google APIs protos (status.proto, etc.) diff --git a/tools/build/bazel/java_sources.bzl b/tools/build/bazel/java_sources.bzl index 1381a057dcf..0220919f89f 100644 --- a/tools/build/bazel/java_sources.bzl +++ b/tools/build/bazel/java_sources.bzl @@ -29,7 +29,7 @@ def _impl(ctx): "[ -n \"$dir\" -a -d \"$dir\" ] && %s cf %s -C $dir ." % (jar_path, outjar.path), ] - ctx.action( + ctx.actions.run_shell( inputs = ctx.files.srcs, outputs = [outjar], progress_message = "Generating source jar for %s" % ctx.attr.name, diff --git a/tools/build/bazel/javadoc.bzl b/tools/build/bazel/javadoc.bzl index 64931602a83..b9f514c1d56 100644 --- a/tools/build/bazel/javadoc.bzl +++ b/tools/build/bazel/javadoc.bzl @@ -36,7 +36,7 @@ def _impl(ctx): "%s cf %s -C %s ." % (jar_exe_path, outjar.path, dir), ] - ctx.action( + ctx.actions.run_shell( inputs = ctx.files.srcs + ctx.files.deps, outputs = [outjar], progress_message = "Generating javadocs jar for %s" % ctx.attr.name, diff --git a/tools/build/bazel/minimal_jar.bzl b/tools/build/bazel/minimal_jar.bzl index 6615ec91839..2ee40e21948 100644 --- a/tools/build/bazel/minimal_jar.bzl +++ b/tools/build/bazel/minimal_jar.bzl @@ -22,7 +22,7 @@ def _impl(ctx): "mkdir readme && touch readme/README && %s cf %s readme/README" % (jar_exe_path, outjar.path), ] - ctx.action( + ctx.actions.run_shell( outputs = [outjar], progress_message = "Generating minimal jar for %s" % ctx.attr.name, command = ";\n".join(cmd), diff --git a/tools/build/bazel/modules.bzl b/tools/build/bazel/modules.bzl index d774d5076e9..129c3015785 100644 --- a/tools/build/bazel/modules.bzl +++ b/tools/build/bazel/modules.bzl @@ -77,10 +77,10 @@ PROTOCOL_MAP = { } PROTOCOL_APP_MAP = { - "//protocols/grpc:onos-protocols-grpc-oar": ["stratum", "tost", "sona"], - "//protocols/gnmi:onos-protocols-gnmi-oar": ["stratum", "tost", "sona"], - "//protocols/gnoi:onos-protocols-gnoi-oar": ["stratum", "tost"], - "//protocols/p4runtime:onos-protocols-p4runtime-oar": ["stratum", "tost"], + "//protocols/grpc:onos-protocols-grpc-oar": ["stratum", "sdfabric", "sona"], + "//protocols/gnmi:onos-protocols-gnmi-oar": ["stratum", "sdfabric", "sona"], + "//protocols/gnoi:onos-protocols-gnoi-oar": ["stratum", "sdfabric"], + "//protocols/p4runtime:onos-protocols-p4runtime-oar": ["stratum", "sdfabric"], "//protocols/restconf/server:onos-protocols-restconf-server-oar": [], "//protocols/xmpp/core:onos-protocols-xmpp-core-oar": [], "//protocols/xmpp/pubsub:onos-protocols-xmpp-pubsub-oar": [], @@ -103,12 +103,12 @@ PROVIDER_MAP = { } PROVIDER_APP_MAP = { - "//providers/general:onos-providers-general-oar": ["stratum", "tost", "sona"], - "//providers/host:onos-providers-host-oar": ["seba", "stratum", "tost", "sona"], - "//providers/hostprobing:onos-providers-hostprobing-oar": ["seba", "stratum", "tost", "sona"], + "//providers/general:onos-providers-general-oar": ["stratum", "sdfabric", "sona"], + "//providers/host:onos-providers-host-oar": ["seba", "stratum", "sdfabric", "sona"], + "//providers/hostprobing:onos-providers-hostprobing-oar": ["seba", "stratum", "sdfabric", "sona"], "//providers/link:onos-providers-link-oar": ["stratum"], - "//providers/lldp:onos-providers-lldp-oar": ["seba", "stratum", "tost", "sona"], - "//providers/netcfghost:onos-providers-netcfghost-oar": ["seba", "stratum", "tost", "sona"], + "//providers/lldp:onos-providers-lldp-oar": ["seba", "stratum", "sdfabric", "sona"], + "//providers/netcfghost:onos-providers-netcfghost-oar": ["seba", "stratum", "sdfabric", "sona"], "//providers/netcfglinks:onos-providers-netcfglinks-oar": ["stratum"], "//providers/netconf:onos-providers-netconf-oar": [], "//providers/null:onos-providers-null-oar": [], @@ -118,7 +118,7 @@ PROVIDER_APP_MAP = { "//providers/ovsdb:onos-providers-ovsdb-oar": ["sona"], "//providers/ovsdb/host:onos-providers-ovsdb-host-oar": ["sona"], "//providers/ovsdb/base:onos-providers-ovsdb-base-oar": ["sona"], - "//providers/p4runtime:onos-providers-p4runtime-oar": ["stratum", "tost"], + "//providers/p4runtime:onos-providers-p4runtime-oar": ["stratum", "sdfabric"], "//providers/rest:onos-providers-rest-oar": [], "//providers/snmp:onos-providers-snmp-oar": [], "//providers/lisp:onos-providers-lisp-oar": [], @@ -131,10 +131,10 @@ PROVIDER_APP_MAP = { # DRIVER_MAP = { - "//drivers/default:onos-drivers-default-oar": ["minimal", "seba", "stratum", "tost", "sona"], + "//drivers/default:onos-drivers-default-oar": ["minimal", "seba", "stratum", "sdfabric", "sona"], "//drivers/arista:onos-drivers-arista-oar": [], - "//drivers/bmv2:onos-drivers-bmv2-oar": ["stratum", "tost"], - "//drivers/barefoot:onos-drivers-barefoot-oar": ["stratum", "tost"], + "//drivers/bmv2:onos-drivers-bmv2-oar": ["stratum", "sdfabric"], + "//drivers/barefoot:onos-drivers-barefoot-oar": ["stratum", "sdfabric"], "//drivers/ciena/waveserver:onos-drivers-ciena-waveserver-oar": [], "//drivers/ciena/c5162:onos-drivers-ciena-c5162-oar": [], "//drivers/ciena/c5170:onos-drivers-ciena-c5170-oar": [], @@ -145,8 +145,8 @@ DRIVER_MAP = { "//drivers/czechlight:onos-drivers-czechlight-oar": [], "//drivers/flowspec:onos-drivers-flowspec-oar": [], "//drivers/fujitsu:onos-drivers-fujitsu-oar": [], - "//drivers/gnmi:onos-drivers-gnmi-oar": ["stratum", "tost", "sona"], - "//drivers/gnoi:onos-drivers-gnoi-oar": ["stratum", "tost"], + "//drivers/gnmi:onos-drivers-gnmi-oar": ["stratum", "sdfabric", "sona"], + "//drivers/gnoi:onos-drivers-gnoi-oar": ["stratum", "sdfabric"], "//drivers/hp:onos-drivers-hp-oar": [], "//drivers/juniper:onos-drivers-juniper-oar": [], "//drivers/lisp:onos-drivers-lisp-oar": [], @@ -157,11 +157,11 @@ DRIVER_MAP = { "//drivers/oplink:onos-drivers-oplink-oar": [], "//drivers/optical:onos-drivers-optical-oar": [], "//drivers/ovsdb:onos-drivers-ovsdb-oar": ["sona"], - "//drivers/p4runtime:onos-drivers-p4runtime-oar": ["stratum", "tost"], + "//drivers/p4runtime:onos-drivers-p4runtime-oar": ["stratum", "sdfabric"], "//drivers/polatis/netconf:onos-drivers-polatis-netconf-oar": [], "//drivers/polatis/openflow:onos-drivers-polatis-openflow-oar": [], "//drivers/server:onos-drivers-server-oar": [], - "//drivers/stratum:onos-drivers-stratum-oar": ["stratum", "tost"], + "//drivers/stratum:onos-drivers-stratum-oar": ["stratum", "sdfabric"], "//drivers/stratum-odtn:onos-drivers-stratum-odtn-oar": [], "//drivers/zte:onos-drivers-zte-oar": [], } @@ -195,7 +195,7 @@ APP_MAP = { "//apps/cord-support:onos-apps-cord-support-oar": [], "//apps/cpman/app:onos-apps-cpman-app-oar": [], "//apps/dhcp:onos-apps-dhcp-oar": [], - "//apps/dhcprelay:onos-apps-dhcprelay-oar": ["tost"], + "//apps/dhcprelay:onos-apps-dhcprelay-oar": ["sdfabric"], "//apps/drivermatrix:onos-apps-drivermatrix-oar": [], "//apps/events:onos-apps-events-oar": [], "//apps/faultmanagement:onos-apps-faultmanagement-oar": [], @@ -205,7 +205,7 @@ APP_MAP = { "//apps/gangliametrics:onos-apps-gangliametrics-oar": [], "//apps/graphitemetrics:onos-apps-graphitemetrics-oar": [], "//apps/imr:onos-apps-imr-oar": [], - "//apps/inbandtelemetry:onos-apps-inbandtelemetry-oar": ["tost"], + "//apps/inbandtelemetry:onos-apps-inbandtelemetry-oar": ["sdfabric"], "//apps/influxdbmetrics:onos-apps-influxdbmetrics-oar": [], "//apps/intentsync:onos-apps-intentsync-oar": [], "//apps/k8s-networking:onos-apps-k8s-networking-oar": ["sona"], @@ -214,10 +214,10 @@ APP_MAP = { "//apps/layout:onos-apps-layout-oar": [], "//apps/linkprops:onos-apps-linkprops-oar": [], "//apps/mappingmanagement:onos-apps-mappingmanagement-oar": [], - "//apps/mcast:onos-apps-mcast-oar": ["seba", "tost"], + "//apps/mcast:onos-apps-mcast-oar": ["seba", "sdfabric"], "//apps/metrics:onos-apps-metrics-oar": [], "//apps/mfwd:onos-apps-mfwd-oar": [], - "//apps/mlb:onos-apps-mlb-oar": [], + "//apps/mlb:onos-apps-mlb-oar": ["sdfabric"], "//apps/mobility:onos-apps-mobility-oar": [], "//apps/network-troubleshoot:onos-apps-network-troubleshoot-oar": [], "//apps/newoptical:onos-apps-newoptical-oar": [], @@ -243,18 +243,18 @@ APP_MAP = { "//apps/packet-throttle:onos-apps-packet-throttle-oar": [], "//apps/pathpainter:onos-apps-pathpainter-oar": [], "//apps/pim:onos-apps-pim-oar": [], - "//apps/portloadbalancer:onos-apps-portloadbalancer-oar": ["seba", "tost"], + "//apps/portloadbalancer:onos-apps-portloadbalancer-oar": ["seba", "sdfabric"], "//apps/powermanagement:onos-apps-powermanagement-oar": [], "//apps/proxyarp:onos-apps-proxyarp-oar": [], "//apps/rabbitmq:onos-apps-rabbitmq-oar": [], "//apps/reactive-routing:onos-apps-reactive-routing-oar": [], "//apps/restconf:onos-apps-restconf-oar": [], "//apps/roadm:onos-apps-roadm-oar": [], - "//apps/route-service:onos-apps-route-service-oar": ["seba", "tost"], - "//apps/routeradvertisement:onos-apps-routeradvertisement-oar": ["tost"], + "//apps/route-service:onos-apps-route-service-oar": ["seba", "sdfabric"], + "//apps/routeradvertisement:onos-apps-routeradvertisement-oar": ["sdfabric"], "//apps/routing/cpr:onos-apps-routing-cpr-oar": [], "//apps/routing/fibinstaller:onos-apps-routing-fibinstaller-oar": [], - "//apps/routing/fpm:onos-apps-routing-fpm-oar": ["tost"], + "//apps/routing/fpm:onos-apps-routing-fpm-oar": ["sdfabric"], "//apps/scalablegateway:onos-apps-scalablegateway-oar": [], "//apps/sdnip:onos-apps-sdnip-oar": [], "//apps/simplefabric:onos-apps-simplefabric-oar": [], @@ -279,8 +279,8 @@ APP_MAP = { "//apps/workflow:onos-apps-workflow-oar": [], "//apps/yang-gui:onos-apps-yang-gui-oar": [], "//apps/yang:onos-apps-yang-oar": [], - "//web/gui:onos-web-gui-oar": ["sona", "tost"], - "//web/gui2:onos-web-gui2-oar": ["stratum", "tost"], + "//web/gui:onos-web-gui-oar": ["sona", "sdfabric"], + "//web/gui2:onos-web-gui2-oar": ["stratum", "sdfabric"], } # @@ -288,8 +288,8 @@ APP_MAP = { # PIPELINE_MAP = { - "//pipelines/basic:onos-pipelines-basic-oar": ["stratum", "tost"], - "//pipelines/fabric:onos-pipelines-fabric-oar": ["stratum", "tost"], + "//pipelines/basic:onos-pipelines-basic-oar": ["stratum", "sdfabric"], + "//pipelines/fabric:onos-pipelines-fabric-oar": ["stratum", "sdfabric"], } MODELS_MAP = { diff --git a/tools/build/bazel/onos_app_bundler.py b/tools/build/bazel/onos_app_bundler.py index 6c4ca68716e..5aa77a066ab 100755 --- a/tools/build/bazel/onos_app_bundler.py +++ b/tools/build/bazel/onos_app_bundler.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Copyright 2018-present Open Networking Foundation @@ -60,5 +60,5 @@ def generateOar(output, files=[]): print('There must be an even number of args: file mvn_coords') sys.exit(2) - files = zip(*[iter(args)]*2) + files = list(zip(*[iter(args)]*2)) generateOar(output, files) diff --git a/tools/build/bazel/onos_app_tools.py b/tools/build/bazel/onos_app_tools.py index 9979ab516c6..43cab17e27e 100755 --- a/tools/build/bazel/onos_app_tools.py +++ b/tools/build/bazel/onos_app_tools.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Copyright 2018-present Open Networking Foundation @@ -207,7 +207,7 @@ def write(name, msg): values['category'] = options.category values['url'] = options.url elif options.write_app: - sys.stderr.write('ERROR: Feature Name, Version, and Title are required\n') + sys.stderr.write('ERROR: App Name, Origin, Category and URL are required\n') sys.stderr.flush() sys.exit(1) diff --git a/tools/build/bazel/osgi_feature_bundler.py b/tools/build/bazel/osgi_feature_bundler.py index a4550e08fd5..f390c88eeca 100755 --- a/tools/build/bazel/osgi_feature_bundler.py +++ b/tools/build/bazel/osgi_feature_bundler.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Copyright 2018-present Open Networking Foundation @@ -56,5 +56,5 @@ def writeFeatureBundle(output, files=[]): print('There must be an even number of args: file mvn_coords') sys.exit(2) - files = zip(*[iter(args)]*2) + files = list(zip(*[iter(args)]*2)) writeFeatureBundle(output, files) diff --git a/tools/build/bazel/osgi_features.bzl b/tools/build/bazel/osgi_features.bzl index a15618956d7..e83df6822da 100644 --- a/tools/build/bazel/osgi_features.bzl +++ b/tools/build/bazel/osgi_features.bzl @@ -102,7 +102,7 @@ FEATURES_HEADER = '''\ - mvn:org.apache.karaf.features/standard/4.2.9/xml/features + mvn:org.apache.karaf.features/standard/4.2.14/xml/features ''' % ONOS_VERSION FEATURES_FOOTER = "" diff --git a/tools/build/bazel/osgi_java_library.bzl b/tools/build/bazel/osgi_java_library.bzl index 491444f4413..0236db43487 100644 --- a/tools/build/bazel/osgi_java_library.bzl +++ b/tools/build/bazel/osgi_java_library.bzl @@ -124,6 +124,8 @@ def _bnd_impl(ctx): bundle_classpath, karaf_commands, fragment_host, + # enable/disable osgi-wrap logging + "false", ] ctx.actions.run( @@ -507,7 +509,7 @@ def osgi_jar_with_tests( native.java_library( name = name + "-native", srcs = native_srcs, - resource_jars = resource_jars + [name + "_cfgdef_jar"], + resources = resource_jars + [name + "_cfgdef_jar"], deps = deps, visibility = visibility, javacopts = javacopts, @@ -516,13 +518,14 @@ def osgi_jar_with_tests( native.java_library( name = name + "-native", srcs = native_srcs, - resource_jars = [name + "_cfgdef_jar"], - resources = native_resources, + resources = native_resources + [name + "_cfgdef_jar"], deps = deps, visibility = visibility, javacopts = javacopts, ) + # NOTE that the additional resource_jars are modified by + # osgi-wrap because java_library does not decompress them. karaf_command_packages_string = ",".join(karaf_command_packages) _bnd( name = name, diff --git a/tools/build/bazel/pom_generator.py b/tools/build/bazel/pom_generator.py index 2e16f4984a3..1ad54ec9be5 100755 --- a/tools/build/bazel/pom_generator.py +++ b/tools/build/bazel/pom_generator.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Copyright 2018-present Open Networking Foundation @@ -49,7 +49,7 @@ def write(name, msg): with open(name, "w") as file: file.write(msg) else: - print msg + print(msg) def write_pom(output, coords, deps): @@ -70,7 +70,7 @@ def write_pom(output, coords, deps): import sys if len(sys.argv) < 3: - print 'usage: pom_generator pom.xml maven_coords dep_coords1 dep_coords2 ...' + print('usage: pom_generator pom.xml maven_coords dep_coords1 dep_coords2 ...') sys.exit(1) output = sys.argv[1] diff --git a/tools/build/bazel/topo_BUILD b/tools/build/bazel/topo_BUILD index 9a42836a575..a3418b2c611 100644 --- a/tools/build/bazel/topo_BUILD +++ b/tools/build/bazel/topo_BUILD @@ -16,6 +16,6 @@ genrule( name = "topo_device_proto_sed", srcs = [":device/device.proto"], outs = ["new/device/device.proto"], - cmd = "sed -e 's:import \"gogoproto.*;::g;s: ..gogoproto\..*:;:g;s:import \"%s:import \":g;s:^syntax = \"proto3\";:&\\\n option java_package = \"org.onosproject.uonos\";:g' $(location :device/device.proto) >> \"$@\"" + cmd = "sed -e 's:import \"gogoproto.*;::g;s: ..gogoproto\\..*:;:g;s:import \"%s:import \":g;s:^syntax = \"proto3\";:&\\\n option java_package = \"org.onosproject.uonos\";:g' $(location :device/device.proto) >> \"$@\"" % IMPORT_PREFIX, ) diff --git a/tools/build/bazel/variables.bzl b/tools/build/bazel/variables.bzl index 744df59aba7..4fd695dd86a 100644 --- a/tools/build/bazel/variables.bzl +++ b/tools/build/bazel/variables.bzl @@ -1,4 +1,4 @@ -ONOS_VERSION = "2.5.0-SNAPSHOT" +ONOS_VERSION = "2.5.10-SNAPSHOT" ONOS_ARTIFACT_BASE = "onos-" ONOS_GROUP_ID = "org.onosproject" ONOS_ORIGIN = "ONOS Community" diff --git a/tools/build/build-offline-karaf b/tools/build/build-offline-karaf index 3563c490882..f5aa56067d4 100755 --- a/tools/build/build-offline-karaf +++ b/tools/build/build-offline-karaf @@ -1,7 +1,6 @@ #!/bin/bash -KARAF_RELEASE_VERSION="4.2.9" -KARAF_BASE_PACKAGE_VERSION="4.2.9" +KARAF_BASE_PACKAGE_VERSION="$KARAF_RELEASE_VERSION" KARAF_TARFILE_NAME="apache-karaf-${KARAF_RELEASE_VERSION}.tar" ADDED_BOOT_FEATURES="kar/${KARAF_RELEASE_VERSION},webconsole/${KARAF_RELEASE_VERSION},scr/${KARAF_RELEASE_VERSION},war/${KARAF_RELEASE_VERSION}" @@ -9,13 +8,14 @@ ADDED_BOOT_FEATURES="kar/${KARAF_RELEASE_VERSION},webconsole/${KARAF_RELEASE_VER rm -f /tmp/${KARAF_TARFILE_NAME} curl -o /tmp/${KARAF_TARFILE_NAME}.gz https://repo1.maven.org/maven2/org/onosproject/apache-karaf-offline/${KARAF_BASE_PACKAGE_VERSION}/apache-karaf-${KARAF_BASE_PACKAGE_VERSION}.tar.gz -# get a small cell source ${ONOS_ROOT}/tools/dev/bash_profile -cell borrow 60 1+0 scp /tmp/${KARAF_TARFILE_NAME}.gz sdn@[${OC1}]:/tmp/${KARAF_TARFILE_NAME}.gz ssh sdn@${OC1} " + # clear out the existing maven cache + rm -rf ~/.m2/repository + # unroll the base karaf rm -rf karaf mkdir karaf @@ -53,9 +53,8 @@ ssh sdn@${OC1} " # fetch the new offline karaf tar ball BUILD_NUMBER="${KARAF_RELEASE_VERSION}-offline-$(date +'%Y%m%d')" -scp sdn@[${OC1}]:karaf-offline.tar.gz /tmp/${BUILD_NUMBER}.tar.gz +scp sdn@[${OC1}]:karaf-offline.tar.gz ./apache-karaf-${BUILD_NUMBER}.tar.gz -cell return diff --git a/tools/build/conf/src/main/resources/onos/suppressions.xml b/tools/build/conf/src/main/resources/onos/suppressions.xml index 3cd63b1de52..c972216a012 100644 --- a/tools/build/conf/src/main/resources/onos/suppressions.xml +++ b/tools/build/conf/src/main/resources/onos/suppressions.xml @@ -34,6 +34,7 @@ + diff --git a/tools/build/envDefaults b/tools/build/envDefaults index 89eba4606d9..16e093f0a8b 100644 --- a/tools/build/envDefaults +++ b/tools/build/envDefaults @@ -5,7 +5,7 @@ export ONOS_ROOT=${ONOS_ROOT:-~/onos} # M2 repository and Karaf gold bits export M2_REPO=${M2_REPO:-~/.m2/repository} -export KARAF_VERSION=4.2.9 +export KARAF_VERSION=4.2.14 export KARAF_ZIP=${KARAF_ZIP:-~/Downloads/apache-karaf-$KARAF_VERSION.zip} export KARAF_TAR=${KARAF_TAR:-~/Downloads/apache-karaf-$KARAF_VERSION.tar.gz} export KARAF_DIST=$(basename $KARAF_ZIP .zip) @@ -18,8 +18,8 @@ export PATH="$ONOS_ROOT/tools/build:$PATH" export BUILD_NUMBER=${BUILD_NUMBER:-$(id -un)} # ONOS Version and onos.tar.gz staging environment -export ONOS_POM_VERSION="2.5.0-SNAPSHOT" -export ONOS_VERSION=${ONOS_VERSION:-2.5.0.$BUILD_NUMBER} +export ONOS_POM_VERSION="2.5.10-SNAPSHOT" +export ONOS_VERSION=${ONOS_VERSION:-2.5.10.$BUILD_NUMBER} # ONOS production bits (onos.tar.gz, onos.zip, onos.deb, onos.rpm) staging environment export ONOS_BITS=onos-${ONOS_VERSION%~*} diff --git a/tools/build/jdk/BUILD b/tools/build/jdk/BUILD index 00550315f4e..c99f398289e 100644 --- a/tools/build/jdk/BUILD +++ b/tools/build/jdk/BUILD @@ -1,24 +1,3 @@ -# This is where we define the JDK used to build ONOS, as well as the language -# source and target values passed to javac. The :default_toolchain and -# :default_jdk are expected to be passed as arguments when invoking bazel build -# (see onos/.bazelrc) - -load("//tools/build/bazel:variables.bzl", "DEFAULT_JAVA_VERSION") -load("@bazel_tools//tools/jdk:default_java_toolchain.bzl", "default_java_toolchain") - -default_java_toolchain( - name = "default_toolchain", - source_version = DEFAULT_JAVA_VERSION, - target_version = DEFAULT_JAVA_VERSION, - visibility = ["//visibility:public"], -) - -alias( - name = "default_jdk", - actual = "@bazel_tools//tools/jdk:remote_jdk11", - visibility = ["//visibility:public"], -) - # We use the following rule to package the same JDK used for building and make # it available for external scripts as their JAVA_HOME, such as for `bazel run # onos-local`. diff --git a/tools/build/onos-build-and-upload b/tools/build/onos-build-and-upload index 1d6697303a6..fdf3f9294cc 100755 --- a/tools/build/onos-build-and-upload +++ b/tools/build/onos-build-and-upload @@ -19,8 +19,8 @@ fi onos-release $VERSION $DRY_RUN if [ $dryRun -eq 0 ]; then - # upload docs - onos-upload-docs ${WIKI_USER} + # prepare docs + onos-prepare-docs # spot check that uploaded artifacts are correct # TODO - implement this for bazel diff --git a/tools/build/onos-build-and-upload-snapshot b/tools/build/onos-build-and-upload-snapshot new file mode 100755 index 00000000000..006f131b8bd --- /dev/null +++ b/tools/build/onos-build-and-upload-snapshot @@ -0,0 +1,39 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# Builds the snapshot artifacts and uploads them. +# ----------------------------------------------------------------------------- + +[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 +# shellcheck disable=SC1090 +. "$ONOS_ROOT"/tools/build/envDefaults + +set -ex -o pipefail + +DRY_RUN=${1:-""} +dryRun=0 +if [ "${DRY_RUN}" == "--dry-run" ]; then + dryRun=1 +fi + +[[ ! "$ONOS_POM_VERSION" =~ "SNAPSHOT" ]] && echo "Version is not a SNAPSHOT" && exit 1; + +cd "$ONOS_ROOT" + +# Build ONOS +bazel build onos + +if [ $dryRun -eq 0 ]; then + publish_url="https://oss.sonatype.org/content/repositories/snapshots/" +else + publish_url="" +fi + +# Create artifact catalog +onos-publish-catalog publishing-catalog-snapshot + +# publish artifacts with Maven +if [ $dryRun -eq 0 ]; then + onos-maven-upload.py publishing-catalog-snapshot "${publish_url}" +else + onos-maven-upload.py publishing-catalog-snapshot "${publish_url}" --dry_run +fi \ No newline at end of file diff --git a/tools/build/onos-close-staging b/tools/build/onos-close-staging index e70d1194c15..1e37ef39565 100755 --- a/tools/build/onos-close-staging +++ b/tools/build/onos-close-staging @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # This script finds an open staging repository, checks that it contains an # expected artifact, attemps to close the repository, and checks that it is closed. @@ -29,7 +29,7 @@ def get(url): resp.raise_for_status() return resp except requests.exceptions.HTTPError as e: - print 'Encountered error:', e + print('Encountered error:', e) error = e time.sleep(1) if error: @@ -46,7 +46,7 @@ def post(url, data): resp.raise_for_status() return resp except requests.exceptions.HTTPError as e: - print 'Encountered error:', e + print('Encountered error:', e) error = e time.sleep(1) if error: @@ -64,11 +64,11 @@ def getStagingRepo(groupId): repos.append(( entry['repositoryId'], entry['profileId'] )) if len(repos) > 1: - print 'Aborting... too many open staging repos' - print repos + print('Aborting... too many open staging repos') + print(repos) sys.exit(1) elif len(repos) == 0: - print 'Aborting... there are no open staging repos' + print('Aborting... there are no open staging repos') sys.exit(1) return repos[0] @@ -131,8 +131,8 @@ def checkClose(repositoryId): if event['name'] == 'repositoryClosed': return True elif event['name'] == 'repositoryCloseFailed': - print 'Aborting... repository failed to close' - print json.dumps(activity, sort_keys=True, indent=2, separators=(',', ': ')) + print('Aborting... repository failed to close') + print(json.dumps(activity, sort_keys=True, indent=2, separators=(',', ': '))) sys.exit(1) return False @@ -144,12 +144,12 @@ def waitClosed(repositoryId): sys.stdout.write('.') sys.stdout.flush() time.sleep(2) - print ' Closed.' + print(' Closed.') if __name__ == '__main__': repositoryId, profileId = getStagingRepo(GROUP_ID) - print 'Repository Id:', repositoryId - print 'Profile Id:', profileId + print('Repository Id:', repositoryId) + print('Profile Id:', profileId) checkStagingRepo(repositoryId, ARTIFACT, GROUP_ID, VERSION) @@ -158,5 +158,5 @@ if __name__ == '__main__': waitClosed(repositoryId) if '-d' in sys.argv: - print 'Dropping repo %s' % repositoryId + print('Dropping repo %s' % repositoryId) dropRepo(repositoryId, profileId) diff --git a/tools/build/onos-maven-upload.py b/tools/build/onos-maven-upload.py new file mode 100755 index 00000000000..fb80094330b --- /dev/null +++ b/tools/build/onos-maven-upload.py @@ -0,0 +1,158 @@ +#!/usr/bin/env python3 +""" + Copyright 2021-present Open Networking Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + +from subprocess import call +import requests, os +import argparse +import sys + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='Upload artifacts with Maven.') + parser.add_argument('catalog_file_name', type=str, help="Catalog File Name") + parser.add_argument('destination_repo_url', type=str, nargs="?", default="", + help="Nexus complete URL") + parser.add_argument('--local_settings', type=str, required=False, default=None, + help="Use a local settings.xml instead of the default one") + parser.add_argument('--repo_id', type=str, required=False, default="ossrh", + help="ID to map on the under section of settings.xml") + parser.add_argument('--group_id', type=str, required=False, default="org.onosproject", + help="GroupId of the artifacts to be deployed") + parser.add_argument('--dry_run', action="store_true", required=False, default=False) + args = parser.parse_args() + + input_list_file = args.catalog_file_name + destination_repo_url = args.destination_repo_url + local_settings_file = args.local_settings + repo_id = args.repo_id + group_id = args.group_id + dry_run = args.dry_run + + with open(input_list_file, "r") as list_file: + lines = list_file.readlines() + + artifacts_to_upload = {} + for line in lines: + s = line.split() + src = s[0] + dest = s[1] + artifactId = dest.split("/")[2] + info = artifacts_to_upload.get(artifactId, {}) + version = dest.split("/")[3] + if info.get("version", None) is not None: + if info["version"] != version: + print("ERROR: Version mismatch: " + artifactId + ", Version: " + + info["version"], ", New Version: " + version) + sys.exit(1) + else: + info['version'] = version + artifacts = info.get("artifacts", {}) + src_and_extension = [src, os.path.splitext(src)[1].replace(".", '')] + if "-sources" in src: + artifacts["sources"] = src_and_extension + elif "-javadoc" in src: + artifacts["javadoc"] = src_and_extension + elif "-oar" in src: + artifacts["oar"] = src_and_extension + elif "-tests" in src: + artifacts["tests"] = src_and_extension + elif "-pom" in src: + artifacts["pom"] = src_and_extension + elif src.endswith(".jar"): + artifacts["jar"] = src_and_extension + # Exclude archives for now + # elif src.endswith(".tar.gz"): + # artifacts["tar"] = [src, "targz"] + else: + print("WARNING: artifact " + dest + " not supported, skipping") + info["artifacts"] = artifacts + artifacts_to_upload[artifactId] = info + + if dry_run: + print("------- Artifacts dictionary ---------") + print(artifacts_to_upload) + print("--------------------------------------") + print() + + # Upload the artifacts to the remote Nexus repository + for artifact_id, info in artifacts_to_upload.items(): + artifacts = info["artifacts"] + call_funct = ["mvn", + "-B", # Run in batch mode + "-q", # Run in quiet mode, will report only warning or errors + "deploy:deploy-file", + "-Durl=" + destination_repo_url, + "-DrepositoryId=" + repo_id, + "-DgroupId=" + group_id, + "-DartifactId=" + artifact_id, + "-Dversion=" + info["version"]] + if local_settings_file is not None: + call_funct.insert(1, "-s") + call_funct.insert(2, local_settings_file) + + if artifact_id == "onos-dependencies": + # Special case for onos-dependencies, the JAR is a fake empty jar. + # For this case, upload only the pom. + if "pom" in artifacts.keys(): + call_funct.append("-Dfile=" + artifacts["pom"][0]) + call_funct.append("-DgeneratePom=false") + del artifacts["pom"] + if "jar" in artifacts.keys(): + del artifacts["jar"] + else: + # If we have a pom, use it, otherwise do not let Maven generate one + if "pom" in artifacts.keys(): + call_funct.append("-DpomFile=" + artifacts["pom"][0]) + del artifacts["pom"] + else: + call_funct.append("-DgeneratePom=false") + + # Find the main artifact, it can be a JAR or a OAR + if "jar" in artifacts.keys(): + call_funct.append("-Dfile=" + artifacts["jar"][0]) + del artifacts["jar"] + elif "oar" in artifacts.keys(): + call_funct.append("-Dfile=" + artifacts["oar"][0]) + del artifacts["oar"] + else: + print("WARNING: Skipping, no main artifact for artifact ID: " + artifact_id) + continue + + if "javadoc" in artifacts.keys(): + call_funct.append("-Djavadoc=" + artifacts["javadoc"][0]) + del artifacts["javadoc"] + if "sources" in artifacts.keys(): + call_funct.append("-Dsources=" + artifacts["sources"][0]) + del artifacts["sources"] + + # Build the list of the other files to upload together with the main artifact + other_files = [] + other_files_types = [] + other_files_classifier = [] + for key, val in artifacts.items(): + other_files.append(val[0]) + other_files_types.append(val[1]) + other_files_classifier.append(key) + if len(other_files) > 0: + call_funct.append("-Dfiles=" + ",".join(other_files)) + call_funct.append("-Dtypes=" + ",".join(other_files_types)) + call_funct.append("-Dclassifiers=" + ",".join(other_files_classifier)) + if dry_run: + print(artifact_id + "\n" + " ".join(call_funct)) + print() + else: + call(call_funct) diff --git a/tools/build/onos-prepare-docs b/tools/build/onos-prepare-docs new file mode 100755 index 00000000000..b062264738b --- /dev/null +++ b/tools/build/onos-prepare-docs @@ -0,0 +1,21 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# Uploads ONOS Java API docs. +# ----------------------------------------------------------------------------- + +set -e + +[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 +. $ONOS_ROOT/tools/build/envDefaults + +docs="bazel-bin/docs/external.jar" +docs_path="bazel-bin/docs/tmp" +mkdir -p ${docs_path} + +ONOS_VERSION_STRING=${ONOS_VERSION} +if echo ${ONOS_VERSION_STRING} | grep -- '-b'; then + echo "ONOS version ${ONOS_VERSION_STRING} is a beta. Skipping" + exit 0 +fi + +unzip ${docs} -d ${docs_path} diff --git a/tools/build/onos-release-prerequisites b/tools/build/onos-release-prerequisites index 92e201deb21..c1605ac2724 100755 --- a/tools/build/onos-release-prerequisites +++ b/tools/build/onos-release-prerequisites @@ -50,7 +50,7 @@ function testJavaVersion { # Tests availability of the required tools function testToolchain { - for tool in bash python git java javac mvn tar; do + for tool in bash python3 git java javac mvn tar; do testTool $tool; done testGerritTool diff --git a/tools/build/onos-upload-artifacts.py b/tools/build/onos-upload-artifacts.py index a9b24c55db9..d5f007957f7 100755 --- a/tools/build/onos-upload-artifacts.py +++ b/tools/build/onos-upload-artifacts.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Copyright 2018-present Open Networking Foundation @@ -147,8 +147,8 @@ def stage_file(file, repo_id, dest): with open(file, 'rb') as f: r = requests.post(url, data=f.read(), headers=headers, auth=(SONATYPE_USER, SONATYPE_PASSWORD)) if r.status_code != 201: - print (r.status_code) - print (r.text) + print((r.status_code)) + print((r.text)) sys.exit(1) else: # deploy to local repo @@ -165,7 +165,7 @@ def stage_files(files, dest): def upload_file(src, dest): - print ("publishing: " + dest.replace("org/onosproject", "")) + print(("publishing: " + dest.replace("org/onosproject", ""))) files = generate_metadata_files(src, dest) stage_files(files, dest) @@ -174,7 +174,7 @@ def upload_file(src, dest): import sys if len(sys.argv) < 2: - print 'USAGE: upload-maven-artifacts catalog-file-name [nexus root url]' + print('USAGE: upload-maven-artifacts catalog-file-name [nexus root url]') sys.exit(1) input_list_file = sys.argv[1] @@ -191,20 +191,20 @@ def upload_file(src, dest): if destination_repo_url is not None: if SONATYPE_USER is None: - print "Environment variable SONATYPE_USER must be set" + print("Environment variable SONATYPE_USER must be set") sys.exit(1) if SONATYPE_PASSWORD is None: - print "Environment variable SONATYPE_PASSWORD must be set" + print("Environment variable SONATYPE_PASSWORD must be set") sys.exit(1) if SONATYPE_PROFILE is None: - print "Environment variable SONATYPE_PROFILE must be set" + print("Environment variable SONATYPE_PROFILE must be set") sys.exit(1) - print ("Uploading to remote repo: " + destination_repo_url) + print(("Uploading to remote repo: " + destination_repo_url)) else: - print ("Installing in local repo: " + local_maven_repo) + print(("Installing in local repo: " + local_maven_repo)) list_file = open(input_list_file, "r") lines = list_file.readlines() diff --git a/tools/build/onos-upload-docs b/tools/build/onos-upload-docs deleted file mode 100755 index 0e4320c10cf..00000000000 --- a/tools/build/onos-upload-docs +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# ----------------------------------------------------------------------------- -# Uploads ONOS Java API docs. -# ----------------------------------------------------------------------------- - -set -e - -[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 -. $ONOS_ROOT/tools/build/envDefaults - -user=${1:-${WIKI_USER:-$USER}} -remote=$user@api.onosproject.org - -docs="bazel-bin/docs/external.jar" - -ONOS_VERSION_STRING=$ONOS_VERSION -if echo $ONOS_VERSION_STRING | grep -- '-b'; then - echo "ONOS version $ONOS_VERSION_STRING is a beta. Skipping" - exit 0 -fi - -scp $docs $remote:/tmp/onos-apidocs-$ONOS_VERSION.tar.gz -ssh $remote " - mkdir -p /var/www/api/$ONOS_VERSION - cd /var/www/api/$ONOS_VERSION - unzip /tmp/onos-apidocs-$ONOS_VERSION.tar.gz -" diff --git a/tools/build/publish-target-list b/tools/build/publish-target-list index 50d46f8acdb..09490fb200b 100644 --- a/tools/build/publish-target-list +++ b/tools/build/publish-target-list @@ -26,6 +26,7 @@ //protocols/bgp/bgpio:onos-protocols-bgp-bgpio //protocols/grpc/api:onos-protocols-grpc-api //protocols/p4runtime/api:onos-protocols-p4runtime-api + //protocols/p4runtime/utils:onos-protocols-p4runtime-utils //protocols/p4runtime/model:onos-protocols-p4runtime-model //protocols/p4runtime/proto:onos-protocols-p4runtime-proto //protocols/grpc/utils:onos-protocols-grpc-utils diff --git a/tools/build/push-karaf b/tools/build/push-karaf new file mode 100755 index 00000000000..7d74a74187d --- /dev/null +++ b/tools/build/push-karaf @@ -0,0 +1,50 @@ +#!/bin/bash +# Copyright 2020-present Open Networking Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eu -o pipefail + +if [ $# != 2 ]; then + echo Usage: push-karaf version directory + exit 1 +fi + +PLUGIN_VERSION=$1 +DIRECTORY=$2 +SONATYPE_USER=${SONATYPE_USER:-""} +SONATYPE_PASSWORD=${SONATYPE_PASSWORD:-""} + +if [ "$SONATYPE_USER" == "" -o "$SONATYPE_PASSWORD" == "" ]; then + echo SONATYPE_USER and SONATYPE_PASSWORD must be set + exit 1 +fi + +PLUGIN_FILE="$DIRECTORY/apache-karaf-${PLUGIN_VERSION}.tar.gz" +BASE_ARTIFACT_NAME="apache-karaf" + +UPLOAD_BASE="https://oss.sonatype.org/service/local/staging/deploy/maven2/org/onosproject/apache-karaf-offline/$PLUGIN_VERSION" + +# Make the signature file +gpg --armor --detach-sig $PLUGIN_FILE + +# Make the MD5 checksum file +md5 -q $PLUGIN_FILE >$PLUGIN_FILE.md5 + +# Make the SHA1 checksum file +( shasum $PLUGIN_FILE | cut -d' ' -f1 ) > $PLUGIN_FILE.sha1 + +curl -v -u "$SONATYPE_USER:$SONATYPE_PASSWORD" --upload-file $PLUGIN_FILE $UPLOAD_BASE/$BASE_ARTIFACT_NAME-$PLUGIN_VERSION.tar.gz +curl -v -u "$SONATYPE_USER:$SONATYPE_PASSWORD" --upload-file $PLUGIN_FILE.asc $UPLOAD_BASE/$BASE_ARTIFACT_NAME-$PLUGIN_VERSION.tar.gz.asc +curl -v -u "$SONATYPE_USER:$SONATYPE_PASSWORD" --upload-file $PLUGIN_FILE.md5 $UPLOAD_BASE/$BASE_ARTIFACT_NAME-$PLUGIN_VERSION.tar.gz.md5 +curl -v -u "$SONATYPE_USER:$SONATYPE_PASSWORD" --upload-file $PLUGIN_FILE.sha1 $UPLOAD_BASE/$BASE_ARTIFACT_NAME-$PLUGIN_VERSION.tar.gz.sha1 diff --git a/tools/build/uploadToS3.py b/tools/build/uploadToS3.py index 720878c288d..c5dc8410846 100755 --- a/tools/build/uploadToS3.py +++ b/tools/build/uploadToS3.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Upload a file to S3 """ @@ -20,7 +20,7 @@ def uploadFile( filename, dest=None, bucket=None, overwrite=False ): key = basename( filename ) else: key = dest + basename( filename ) #FIXME add the / - print '* Uploading', filename, 'to bucket', bucket, 'as', key + print('* Uploading', filename, 'to bucket', bucket, 'as', key) stdout.flush() start = time() def callback( transmitted, size ): @@ -28,9 +28,9 @@ def callback( transmitted, size ): elapsed = time() - start percent = 100.0 * transmitted / size kbps = .001 * transmitted / elapsed - print ( '\r%d bytes transmitted of %d (%.2f%%),' + print(( '\r%d bytes transmitted of %d (%.2f%%),' ' %.2f KB/sec ' % - ( transmitted, size, percent, kbps ) ), + ( transmitted, size, percent, kbps ) ), end='\n') stdout.flush() conn = S3Connection() bucket = conn.get_bucket( bucket ) @@ -38,11 +38,11 @@ def callback( transmitted, size ): k.key = key if overwrite or not k.exists(): k.set_contents_from_filename( filename, cb=callback, num_cb=100 ) - print + print() elapsed = time() - start - print "* elapsed time: %.2f seconds" % elapsed + print("* elapsed time: %.2f seconds" % elapsed) else: - print 'file', basename( filename ), 'already exists in', bucket.name + print('file', basename( filename ), 'already exists in', bucket.name) def testAccess( bucket=None ): "Verify access to a bucket" @@ -51,7 +51,7 @@ def testAccess( bucket=None ): conn = S3Connection() bucket = conn.get_bucket( bucket ) - print bucket.get_acl() + print(bucket.get_acl()) if __name__ == '__main__': diff --git a/tools/dev/Dockerfile-bazel b/tools/dev/Dockerfile-bazel new file mode 100644 index 00000000000..1eae2dfacdb --- /dev/null +++ b/tools/dev/Dockerfile-bazel @@ -0,0 +1,65 @@ +# Copyright 2020-present Open Networking Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# With this dockerfile you can build a ONOS Docker container from the output of +# a local build with Bazel. +# The container must be build from the bazel-bin folder (due to symlink and +# COPY command incompatibilities). +# e.g. docker build -t onosproject/onos:latest -f $ONOS_ROOT/tools/dev/Dockerfile-bazel $ONOS_ROOT/bazel-bin + +ARG TAG=11.0.13-11.52.13 +ARG JAVA_PATH=/usr/lib/jvm/zulu11 + +# Firts stage to copy and untar ONOS archive inside the container. +FROM bitnami/minideb:jessie as untar + +COPY ./onos.tar.gz / +RUN mkdir /output/ +RUN tar -xf /onos.tar.gz -C /output/ --strip-components=1 + +# Second and final stage is the runtime environment. +FROM azul/zulu-openjdk:${TAG} + +LABEL org.label-schema.name="ONOS" \ + org.label-schema.description="SDN Controller" \ + org.label-schema.usage="http://wiki.onosproject.org" \ + org.label-schema.url="http://onosproject.org" \ + org.label-scheme.vendor="Open Networking Foundation" \ + org.label-schema.schema-version="1.0" \ + maintainer="onos-dev@onosproject.org" + +RUN apt-get update && apt-get install -y curl && \ + rm -rf /var/lib/apt/lists/* + +# Copy ONOS in /root/onos +COPY --from=untar /output /root/onos + +WORKDIR /root/onos + +# Set JAVA_HOME (by default not exported by zulu images) +ARG JAVA_PATH +ENV JAVA_HOME ${JAVA_PATH} + +# Ports +# 6653 - OpenFlow +# 6640 - OVSDB +# 8181 - GUI +# 8101 - ONOS CLI +# 9876 - ONOS intra-cluster communication +EXPOSE 6653 6640 8181 8101 9876 + +# Run ONOS +ENTRYPOINT ["./bin/onos-service"] +CMD ["server"] diff --git a/tools/dev/Dockerfile-bazel.dockerignore b/tools/dev/Dockerfile-bazel.dockerignore new file mode 100644 index 00000000000..47ba258907a --- /dev/null +++ b/tools/dev/Dockerfile-bazel.dockerignore @@ -0,0 +1,3 @@ +# Ignore everything and allow only the ONOS tar +* +!onos.tar.gz \ No newline at end of file diff --git a/tools/dev/Dockerfile-yourkit b/tools/dev/Dockerfile-yourkit new file mode 100644 index 00000000000..61fbe4f2018 --- /dev/null +++ b/tools/dev/Dockerfile-yourkit @@ -0,0 +1,114 @@ +# Copyright 2021-present Open Networking Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# With this dockerfile you can build a ONOS Docker container +# with YourKit profiler agent enabled + +ARG JOBS=2 +ARG PROFILE=default +ARG TAG=11.0.13-11.52.13 +ARG JAVA_PATH=/usr/lib/jvm/zulu11 + +# First stage is the build environment. +# zulu-openjdk images are based on Ubuntu. +FROM azul/zulu-openjdk:${TAG} as builder + +# Define the profiler version to be used +ARG ONOS_YOURKIT + +ENV BUILD_DEPS \ + ca-certificates \ + zip \ + python3 \ + git \ + bzip2 \ + build-essential \ + curl \ + unzip +RUN apt-get update && apt-get install -y ${BUILD_DEPS} + +# Install Bazelisk, which will download the version of bazel specified in +# .bazelversion +RUN curl -L -o bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64 +RUN chmod +x bazelisk && mv bazelisk /usr/bin + +# Build-stage environment variables +ENV ONOS_ROOT /src/onos +ENV BUILD_NUMBER docker +ENV JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 + +# Copy in the sources +COPY . ${ONOS_ROOT} +WORKDIR ${ONOS_ROOT} + +# Build ONOS using the JDK pre-installed in the base image, instead of the +# Bazel-provided remote one. By doing wo we make sure to build with the most +# updated JDK, including bug and security fixes, independently of the Bazel +# version. NOTE that WORKSPACE-docker file defines dockerjdk +ARG JOBS +ARG JAVA_PATH +ARG PROFILE +RUN cat WORKSPACE-docker >> WORKSPACE && bazelisk build onos \ + --jobs ${JOBS} \ + --verbose_failures \ + --java_runtime_version=dockerjdk_11 \ + --tool_java_runtime_version=dockerjdk_11 \ + --define profile=${PROFILE} + +# We extract the tar in the build environment to avoid having to put the tar in +# the runtime stage. This saves a lot of space. +RUN mkdir /output +RUN tar -xf bazel-bin/onos.tar.gz -C /output --strip-components=1 +# Get yourkit profiler and extract in the ONOS temp folder +RUN curl -L -o yourkit.zip https://www.yourkit.com/download/YourKit-JavaProfiler-$ONOS_YOURKIT.zip && \ + unzip -o yourkit.zip && \ + rm yourkit.zip && \ + mv YourKit-JavaProfiler-$(echo $ONOS_YOURKIT | sed 's/\(.*\)-.*/\1/')/bin/linux-x86-64/libyjpagent.so /output/libyjpagent.so + +# Second and final stage is the runtime environment. +FROM azul/zulu-openjdk:${TAG} + +LABEL org.label-schema.name="ONOS" \ + org.label-schema.description="SDN Controller" \ + org.label-schema.usage="http://wiki.onosproject.org" \ + org.label-schema.url="http://onosproject.org" \ + org.label-scheme.vendor="Open Networking Foundation" \ + org.label-schema.schema-version="1.0" \ + maintainer="onos-dev@onosproject.org" + +RUN apt-get update && apt-get install -y curl && \ + rm -rf /var/lib/apt/lists/* + +# Install ONOS in /root/onos +COPY --from=builder /output/ /root/onos/ +WORKDIR /root/onos + +# Set JAVA_HOME (by default not exported by zulu images) +ARG JAVA_PATH +ENV JAVA_HOME ${JAVA_PATH} +# Set ONOS_YOURKIT to enable the profiler agent +ENV ONOS_YOURKIT true + +# Ports +# 6653 - OpenFlow +# 6640 - OVSDB +# 8181 - GUI +# 8101 - ONOS CLI +# 9876 - ONOS intra-cluster communication +# 10001-10010 - YourKit profiler +EXPOSE 6653 6640 8181 8101 9876 10001-10010 + +# Run ONOS +ENTRYPOINT ["./bin/onos-service"] +CMD ["server"] diff --git a/tools/dev/bash_profile b/tools/dev/bash_profile index eaff4b38844..f6a954341af 100644 --- a/tools/dev/bash_profile +++ b/tools/dev/bash_profile @@ -77,7 +77,7 @@ alias olo='filterLog' alias ole='olo "ERROR|WARN|Exception|Error"' # Pretty-print JSON output -alias pp='python -m json.tool' +alias pp='python3 -m json.tool' # Short-hand to launch Java API docs, REST API docs and ONOS GUI alias docs='open $ONOS_ROOT/docs/target/site/apidocs/index.html' diff --git a/tools/dev/bin/onos-gen-bazel-project b/tools/dev/bin/onos-gen-bazel-project index 355193a39be..007a13a95ee 100755 --- a/tools/dev/bin/onos-gen-bazel-project +++ b/tools/dev/bin/onos-gen-bazel-project @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python3 import os import subprocess @@ -31,8 +31,9 @@ test_sources: def get_library_targets(): this_dir = os.path.dirname(os.path.realpath(__file__)) + # NOTE that here we depends on bazel generating utf-8 bytes out = subprocess.check_output([ - "bazel", "query", "kind(\"java_library\", //...:all)"], cwd=this_dir) + "bazel", "query", "kind(\"java_library\", //...:all)"], cwd=this_dir, encoding='UTF-8') return out.strip().split("\n") @@ -43,12 +44,12 @@ def gen_project(): "script_name": os.path.basename(__file__), "language_level": JAVA_LANGUAGE_LEVEL, "exclude_dirs": "\n".join( - map(lambda x: " -" + x, EXCLUDE_DIRECTORIES)), - "targets": "\n".join(map(lambda x: " " + x, all_targets)), - "test_sources": "\n".join(map(lambda x: " " + x, TEST_SOURCES)), + [" -" + x for x in EXCLUDE_DIRECTORIES]), + "targets": "\n".join([" " + x for x in all_targets]), + "test_sources": "\n".join([" " + x for x in TEST_SOURCES]), } return TEMPLATE.format(**data) if __name__ == "__main__": - print gen_project() + print(gen_project()) diff --git a/tools/dev/docker/Dockerfile-sshd b/tools/dev/docker/Dockerfile-sshd index 0a9703d923c..6f0c00c3c86 100644 --- a/tools/dev/docker/Dockerfile-sshd +++ b/tools/dev/docker/Dockerfile-sshd @@ -2,9 +2,9 @@ FROM ubuntu:18.04 LABEL maintainer="Eric Tang " ARG ATOMIX_VERSION -ENV ENV_ATOMIX_VERSION=${ATOMIX_VERSION:-3.1.5} +ENV ENV_ATOMIX_VERSION=${ATOMIX_VERSION:-3.1.12} -RUN apt-get update +RUN apt-get update RUN DEBIAN_FRONTEND=noninteractive apt-get -y install \ --no-install-recommends \ openjdk-11-jre \ @@ -66,7 +66,7 @@ RUN set -eux; \ # Install Atomix RUN set -eux; \ -# curl -o /tmp/atomix.tar.gz -XGET https://oss.sonatype.org/content/repositories/releases/io/atomix/atomix-dist/3.1.5/atomix-dist-3.1.5.tar.gz; \ +# curl -o /tmp/atomix.tar.gz -XGET https://oss.sonatype.org/content/repositories/releases/io/atomix/atomix-dist/3.1.12/atomix-dist-3.1.12.tar.gz; \ curl -o /tmp/atomix.tar.gz https://repo1.maven.org/maven2/io/atomix/atomix-dist/$ENV_ATOMIX_VERSION/atomix-dist-$ENV_ATOMIX_VERSION.tar.gz; \ mkdir /opt/atomix; \ tar zxmf /tmp/atomix.tar.gz -C /opt/atomix; \ diff --git a/tools/gui/BUILD b/tools/gui/BUILD index 0cec9eaa1d9..feadcb528b9 100644 --- a/tools/gui/BUILD +++ b/tools/gui/BUILD @@ -12,6 +12,6 @@ genrule( name = "tools-gui-gulp", srcs = [":_tools-gui-gulp-files"], outs = ["tools-gui-gulp.jar"], - cmd = "cd tools/gui && find . -type f -exec touch -t 201806280000 {} \; && jar Mcf ../../$@ .", + cmd = "cd tools/gui && find . -type f -exec touch -t 201806280000 {} \\; && jar Mcf ../../$@ .", visibility = ["//visibility:public"], ) diff --git a/tools/gui/package-lock.json b/tools/gui/package-lock.json index 88c041de401..a1fab13d02b 100755 --- a/tools/gui/package-lock.json +++ b/tools/gui/package-lock.json @@ -1201,49 +1201,6 @@ "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true }, - "bl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.0.3.tgz", - "integrity": "sha1-/FQhoo/UImA2w7OJGmaiW8ZNIm4=", - "dev": true, - "requires": { - "readable-stream": "~2.0.5" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, "blob": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", @@ -1323,15 +1280,6 @@ } } }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "requires": { - "hoek": "2.x.x" - } - }, "bower": { "version": "1.8.8", "resolved": "https://registry.npmjs.org/bower/-/bower-1.8.8.tgz", @@ -1850,15 +1798,6 @@ "which": "^1.2.9" } }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "requires": { - "boom": "2.x.x" - } - }, "css": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", @@ -3682,24 +3621,6 @@ "globule": "~0.1.0" } }, - "generate-function": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", - "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", - "dev": true, - "requires": { - "is-property": "^1.0.2" - } - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", - "dev": true, - "requires": { - "is-property": "^1.0.0" - } - }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -4801,24 +4722,6 @@ "pinkie-promise": "^2.0.0" } }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -5308,25 +5211,6 @@ "is-extglob": "^2.1.1" } }, - "is-my-ip-valid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", - "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", - "dev": true - }, - "is-my-json-valid": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.20.0.tgz", - "integrity": "sha512-XTHBZSIIxNsIsZXg7XB5l8z/OBFosl1Wao4tXLpeC7eKU4Vm/kdop2azkPqULwnfGQjmeDIyey9g7afMMtdWAA==", - "dev": true, - "requires": { - "generate-function": "^2.0.0", - "generate-object-property": "^1.1.0", - "is-my-ip-valid": "^1.0.0", - "jsonpointer": "^4.0.0", - "xtend": "^4.0.0" - } - }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -5371,12 +5255,6 @@ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true - }, "is-relative": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", @@ -5707,12 +5585,6 @@ "graceful-fs": "^4.1.6" } }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", - "dev": true - }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -7267,131 +7139,34 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, - "phantomjs": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/phantomjs/-/phantomjs-2.1.7.tgz", - "integrity": "sha1-xpEPZ5NcNyhbYRQyn8LyfV8+MTQ=", + "phantomjs-prebuilt": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz", + "integrity": "sha1-79ISpKOWbTZHaE6ouniFSb4q7+8=", "dev": true, "requires": { - "extract-zip": "~1.5.0", - "fs-extra": "~0.26.4", + "es6-promise": "^4.0.3", + "extract-zip": "^1.6.5", + "fs-extra": "^1.0.0", "hasha": "^2.2.0", - "kew": "~0.7.0", - "progress": "~1.1.8", - "request": "~2.67.0", - "request-progress": "~2.0.1", - "which": "~1.2.2" + "kew": "^0.7.0", + "progress": "^1.1.8", + "request": "^2.81.0", + "request-progress": "^2.0.1", + "which": "^1.2.10" }, "dependencies": { - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true - }, - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true - }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", - "dev": true - }, - "concat-stream": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.0.tgz", - "integrity": "sha1-U/fUPFHF5D+ByP3QMyHGMb5o1hE=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "~2.0.0", - "typedarray": "~0.0.5" - } - }, - "debug": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", - "integrity": "sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk=", - "dev": true - }, - "extract-zip": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.5.0.tgz", - "integrity": "sha1-ksz22B73Cp+kwXRxFMzvbYaIpsQ=", - "dev": true, - "requires": { - "concat-stream": "1.5.0", - "debug": "0.7.4", - "mkdirp": "0.5.0", - "yauzl": "2.4.1" - } - }, - "form-data": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.1.tgz", - "integrity": "sha1-rjFduaSQf6BlUCMEpm13M0de43w=", - "dev": true, - "requires": { - "async": "^2.0.1", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.11" - } - }, "fs-extra": { - "version": "0.26.7", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", - "integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz", + "integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=", "dev": true, "requires": { "graceful-fs": "^4.1.2", "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "dev": true, - "requires": { - "chalk": "^1.1.1", - "commander": "^2.9.0", - "is-my-json-valid": "^2.12.4", - "pinkie-promise": "^2.0.0" - } - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "klaw": "^1.0.0" } }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, "jsonfile": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", @@ -7401,113 +7176,11 @@ "graceful-fs": "^4.1.6" } }, - "mkdirp": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", - "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "node-uuid": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", - "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=", - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, "progress": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", "dev": true - }, - "qs": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.1.tgz", - "integrity": "sha1-gB/uAw4LlFDWOFrcSKTMVbRK7fw=", - "dev": true - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "request": { - "version": "2.67.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.67.0.tgz", - "integrity": "sha1-ivdHgOK/EeoK6aqWXBHxGv0nJ0I=", - "dev": true, - "requires": { - "aws-sign2": "~0.6.0", - "bl": "~1.0.0", - "caseless": "~0.11.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~1.0.0-rc3", - "har-validator": "~2.0.2", - "hawk": "~3.1.0", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "node-uuid": "~1.4.7", - "oauth-sign": "~0.8.0", - "qs": "~5.2.0", - "stringstream": "~0.0.4", - "tough-cookie": "~2.2.0", - "tunnel-agent": "~0.4.1" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "tough-cookie": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz", - "integrity": "sha1-yDoYMPTl7wuT7yo0iOck+N4Basc=", - "dev": true - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", - "dev": true - }, - "which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } } } }, @@ -8408,15 +8081,6 @@ } } }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, - "requires": { - "hoek": "2.x.x" - } - }, "socket.io": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz", @@ -8817,12 +8481,6 @@ "safe-buffer": "~5.1.0" } }, - "stringstream": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", - "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", - "dev": true - }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", diff --git a/tools/gui/package.json b/tools/gui/package.json index a2eab71f890..dd02d79129e 100644 --- a/tools/gui/package.json +++ b/tools/gui/package.json @@ -38,7 +38,7 @@ "karma-mocha-reporter": "^2.2.5", "karma-ng-html2js-preprocessor": "^1.0.0", "karma-phantomjs-launcher": "^1.0.4", - "phantomjs": "^2.1.7", + "phantomjs-prebuilt": "^2.1.16", "@bazel/hide-bazel-files": "0.40.0" }, "babel": { diff --git a/tools/package/archetypes/api/pom.xml b/tools/package/archetypes/api/pom.xml index 8d7033609f4..cfa81b3e1cf 100644 --- a/tools/package/archetypes/api/pom.xml +++ b/tools/package/archetypes/api/pom.xml @@ -20,7 +20,7 @@ org.onosproject onos-archetypes - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT onos-api-archetype diff --git a/tools/package/archetypes/api/src/main/resources/META-INF/maven/archetype-metadata.xml b/tools/package/archetypes/api/src/main/resources/META-INF/maven/archetype-metadata.xml index 9fe225a5e6c..eaf873cb3e9 100644 --- a/tools/package/archetypes/api/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/tools/package/archetypes/api/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -29,7 +29,7 @@ - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT diff --git a/tools/package/archetypes/bundle/pom.xml b/tools/package/archetypes/bundle/pom.xml index dc32a7c2897..7cbb24d19c6 100644 --- a/tools/package/archetypes/bundle/pom.xml +++ b/tools/package/archetypes/bundle/pom.xml @@ -22,7 +22,7 @@ org.onosproject onos-archetypes - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT onos-bundle-archetype diff --git a/tools/package/archetypes/bundle/src/main/resources/META-INF/maven/archetype-metadata.xml b/tools/package/archetypes/bundle/src/main/resources/META-INF/maven/archetype-metadata.xml index 2fd1b77ed55..5b701f528e5 100644 --- a/tools/package/archetypes/bundle/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/tools/package/archetypes/bundle/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -35,7 +35,7 @@ - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT diff --git a/tools/package/archetypes/cli/pom.xml b/tools/package/archetypes/cli/pom.xml index 77df4963aac..d79025decba 100644 --- a/tools/package/archetypes/cli/pom.xml +++ b/tools/package/archetypes/cli/pom.xml @@ -20,7 +20,7 @@ org.onosproject onos-archetypes - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT onos-cli-archetype diff --git a/tools/package/archetypes/cli/src/main/resources/META-INF/maven/archetype-metadata.xml b/tools/package/archetypes/cli/src/main/resources/META-INF/maven/archetype-metadata.xml index efa25098122..e0df630b5de 100644 --- a/tools/package/archetypes/cli/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/tools/package/archetypes/cli/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -35,7 +35,7 @@ - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT diff --git a/tools/package/archetypes/pom.xml b/tools/package/archetypes/pom.xml index f78ada57e55..14c62876b78 100644 --- a/tools/package/archetypes/pom.xml +++ b/tools/package/archetypes/pom.xml @@ -28,7 +28,7 @@ org.onosproject onos-archetypes - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT pom ONOS archetypes project diff --git a/tools/package/archetypes/rest/pom.xml b/tools/package/archetypes/rest/pom.xml index 601b5a97dd7..6d744fa3373 100644 --- a/tools/package/archetypes/rest/pom.xml +++ b/tools/package/archetypes/rest/pom.xml @@ -20,7 +20,7 @@ org.onosproject onos-archetypes - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT onos-rest-archetype diff --git a/tools/package/archetypes/rest/src/main/resources/META-INF/maven/archetype-metadata.xml b/tools/package/archetypes/rest/src/main/resources/META-INF/maven/archetype-metadata.xml index a8a3fffb66c..a132e8068f8 100644 --- a/tools/package/archetypes/rest/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/tools/package/archetypes/rest/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -35,7 +35,7 @@ - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT diff --git a/tools/package/archetypes/ui/pom.xml b/tools/package/archetypes/ui/pom.xml index 4f94d6a9d2e..4792c1ce6ad 100644 --- a/tools/package/archetypes/ui/pom.xml +++ b/tools/package/archetypes/ui/pom.xml @@ -20,7 +20,7 @@ org.onosproject onos-archetypes - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT onos-ui-archetype diff --git a/tools/package/archetypes/ui/src/main/resources/META-INF/maven/archetype-metadata.xml b/tools/package/archetypes/ui/src/main/resources/META-INF/maven/archetype-metadata.xml index beca1893b23..7b001a95cd9 100644 --- a/tools/package/archetypes/ui/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/tools/package/archetypes/ui/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -37,7 +37,7 @@ - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT diff --git a/tools/package/archetypes/ui2/pom.xml b/tools/package/archetypes/ui2/pom.xml index 5212c9f77db..f103aec03bc 100644 --- a/tools/package/archetypes/ui2/pom.xml +++ b/tools/package/archetypes/ui2/pom.xml @@ -20,7 +20,7 @@ org.onosproject onos-archetypes - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT onos-ui2-archetype diff --git a/tools/package/archetypes/ui2/src/main/resources/META-INF/maven/archetype-metadata.xml b/tools/package/archetypes/ui2/src/main/resources/META-INF/maven/archetype-metadata.xml index 5fe62076d0a..e84b95001f3 100644 --- a/tools/package/archetypes/ui2/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/tools/package/archetypes/ui2/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -75,7 +75,7 @@ - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT diff --git a/tools/package/archetypes/ui2/src/main/resources/archetype-resources/web/__artifactId__-gui/WORKSPACE b/tools/package/archetypes/ui2/src/main/resources/archetype-resources/web/__artifactId__-gui/WORKSPACE index dfb2138d329..44d301e17be 100644 --- a/tools/package/archetypes/ui2/src/main/resources/archetype-resources/web/__artifactId__-gui/WORKSPACE +++ b/tools/package/archetypes/ui2/src/main/resources/archetype-resources/web/__artifactId__-gui/WORKSPACE @@ -15,9 +15,9 @@ workspace( load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -RULES_NODEJS_VERSION = "1.0.1" +RULES_NODEJS_VERSION = "3.0.0" -RULES_NODEJS_SHA256 = "e1a0d6eb40ec89f61a13a028e7113aa3630247253bcb1406281b627e44395145" +RULES_NODEJS_SHA256 = "6142e9586162b179fdd570a55e50d1332e7d9c030efd853453438d607569721d" http_archive( name = "build_bazel_rules_nodejs", @@ -26,12 +26,14 @@ http_archive( ) # Rules for compiling sass -RULES_SASS_VERSION = "1.24.0" +RULES_SASS_VERSION = "1.30.0" -RULES_SASS_SHA256 = "77e241148f26d5dbb98f96fe0029d8f221c6cb75edbb83e781e08ac7f5322c5f" +RULES_SASS_SHA256 = "8392cf8910db2b1dc3b488ea18113bfe4fd666037bf8ec30d2a3f08fc602a6d8" http_archive( name = "io_bazel_rules_sass", + patch_args = ["-p1"], + patches = ["@build_bazel_rules_nodejs//:rules_sass.issue127.patch"], sha256 = RULES_SASS_SHA256, strip_prefix = "rules_sass-%s" % RULES_SASS_VERSION, urls = [ @@ -66,6 +68,7 @@ Try running `yarn bazel` instead. # TODO: remove the custom repositories once "rules_nodejs" supports v10.16.0 by default. node_repositories( node_repositories = { + "10.16.0-linux_arm64": ("node-v10.16.0-linux-arm64.tar.gz", "node-v10.16.0-linux-arm64", "2d84a777318bc95dd2a201ab8d700aea7e20641b3ece0c048399398dc645cbd7"), "10.16.0-darwin_amd64": ("node-v10.16.0-darwin-x64.tar.gz", "node-v10.16.0-darwin-x64", "6c009df1b724026d84ae9a838c5b382662e30f6c5563a0995532f2bece39fa9c"), "10.16.0-linux_amd64": ("node-v10.16.0-linux-x64.tar.xz", "node-v10.16.0-linux-x64", "1827f5b99084740234de0c506f4dd2202a696ed60f76059696747c34339b9d48"), "10.16.0-windows_amd64": ("node-v10.16.0-win-x64.zip", "node-v10.16.0-win-x64", "aa22cb357f0fb54ccbc06b19b60e37eefea5d7dd9940912675d3ed988bf9a059"), @@ -83,11 +86,11 @@ load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies") install_bazel_dependencies() -load("@npm_bazel_protractor//:package.bzl", "npm_bazel_protractor_dependencies") +load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies") npm_bazel_protractor_dependencies() -load("@npm_bazel_karma//:package.bzl", "npm_bazel_karma_dependencies") +load("@npm//@bazel/karma:package.bzl", "npm_bazel_karma_dependencies") npm_bazel_karma_dependencies() @@ -101,7 +104,7 @@ browser_repositories( firefox = True, ) -load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace") +load("@npm//@bazel/typescript:index.bzl", "ts_setup_workspace") ts_setup_workspace() diff --git a/tools/package/archetypes/ui2/src/main/resources/archetype-resources/web/__artifactId__-gui/e2e/BUILD.rename b/tools/package/archetypes/ui2/src/main/resources/archetype-resources/web/__artifactId__-gui/e2e/BUILD.rename index 296b97e2f6e..d47f88a36dd 100755 --- a/tools/package/archetypes/ui2/src/main/resources/archetype-resources/web/__artifactId__-gui/e2e/BUILD.rename +++ b/tools/package/archetypes/ui2/src/main/resources/archetype-resources/web/__artifactId__-gui/e2e/BUILD.rename @@ -1,5 +1,5 @@ -load("@npm_bazel_protractor//:index.bzl", "protractor_web_test_suite") -load("@npm_bazel_typescript//:index.bzl", "ts_library") +load("@npm//@bazel/protractor:index.bzl", "protractor_web_test_suite") +load("@npm//@bazel/typescript:index.bzl", "ts_library") ts_library( name = "e2e_lib", diff --git a/tools/package/archetypes/ui2/src/main/resources/archetype-resources/web/__artifactId__-gui/src/BUILD.rename b/tools/package/archetypes/ui2/src/main/resources/archetype-resources/web/__artifactId__-gui/src/BUILD.rename index 6c391e270da..b33b098fad0 100755 --- a/tools/package/archetypes/ui2/src/main/resources/archetype-resources/web/__artifactId__-gui/src/BUILD.rename +++ b/tools/package/archetypes/ui2/src/main/resources/archetype-resources/web/__artifactId__-gui/src/BUILD.rename @@ -16,13 +16,11 @@ package(default_visibility = ["//visibility:public"]) -load("@npm_angular_bazel//:index.bzl", "ng_module") -load("@npm_bazel_karma//:index.bzl", "karma_web_test_suite") load("@build_bazel_rules_nodejs//:index.bzl", "pkg_web") load("@npm//history-server:index.bzl", "history_server") -load("@npm_bazel_rollup//:index.bzl", "rollup_bundle") -load("@npm_bazel_terser//:index.bzl", "terser_minified") -load("@npm_bazel_typescript//:index.bzl", "ts_devserver", "ts_library") +load("@npm//@bazel/rollup:index.bzl", "rollup_bundle") +load("@npm//@bazel/terser:index.bzl", "terser_minified") +load("@npm//@bazel/typescript:index.bzl", "ts_devserver", "ts_library") load("@io_bazel_rules_sass//:defs.bzl", "multi_sass_binary", "sass_binary") sass_binary( @@ -42,7 +40,7 @@ multi_sass_binary( ), ) -ng_module( +ts_library( name = "src", srcs = glob( include = ["**/*.ts"], @@ -53,13 +51,17 @@ ng_module( "initialize_testbed.ts", ], ), - assets = glob([ - "**/*.css", - "**/*.html", + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ + "**/*.css", + "**/*.html", ]) + ([":styles"] if len(glob(["**/*.scss"])) else []), generate_ve_shims = True, + use_angular_plugin = True, deps = [ "@npm//@angular/core", + "@npm//@angular/common", "@npm//@angular/platform-browser", "@npm//@angular/router", "@npm//@types", @@ -152,25 +154,4 @@ ts_library( ], ) -karma_web_test_suite( - name = "test", - srcs = [ - "@npm//:node_modules/tslib/tslib.js", - ], - # do not sort - bootstrap = [ - "@npm//:node_modules/zone.js/dist/zone-testing-bundle.js", - "@npm//:node_modules/reflect-metadata/Reflect.js", - ], - browsers = [ - "@io_bazel_rules_webtesting//browsers:firefox-local", - ], - tags = ["native"], - runtime_deps = [ - ":initialize_testbed", - ], - deps = [ - ":rxjs_umd_modules", - ":test_lib", - ], -) + diff --git a/tools/package/archetypes/uitab/pom.xml b/tools/package/archetypes/uitab/pom.xml index d400e0afcef..36ceee6a64c 100644 --- a/tools/package/archetypes/uitab/pom.xml +++ b/tools/package/archetypes/uitab/pom.xml @@ -20,7 +20,7 @@ org.onosproject onos-archetypes - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT onos-uitab-archetype diff --git a/tools/package/archetypes/uitab/src/main/resources/META-INF/maven/archetype-metadata.xml b/tools/package/archetypes/uitab/src/main/resources/META-INF/maven/archetype-metadata.xml index a579ea71778..ea77f191cdc 100644 --- a/tools/package/archetypes/uitab/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/tools/package/archetypes/uitab/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -38,7 +38,7 @@ - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT diff --git a/tools/package/archetypes/uitopo/pom.xml b/tools/package/archetypes/uitopo/pom.xml index 9a248b83b84..707916b07e7 100644 --- a/tools/package/archetypes/uitopo/pom.xml +++ b/tools/package/archetypes/uitopo/pom.xml @@ -20,7 +20,7 @@ org.onosproject onos-archetypes - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT onos-uitopo-archetype diff --git a/tools/package/archetypes/uitopo/src/main/resources/META-INF/maven/archetype-metadata.xml b/tools/package/archetypes/uitopo/src/main/resources/META-INF/maven/archetype-metadata.xml index be4d2d9e206..fdc0699b25e 100644 --- a/tools/package/archetypes/uitopo/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/tools/package/archetypes/uitopo/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -38,7 +38,7 @@ - 2.5.0-SNAPSHOT + 2.5.10-SNAPSHOT diff --git a/tools/package/bin/onos-backup b/tools/package/bin/onos-backup index 6a1af049e72..3def6454240 100755 --- a/tools/package/bin/onos-backup +++ b/tools/package/bin/onos-backup @@ -5,7 +5,7 @@ ONOS_HOME=${ONOS_HOME:-$(cd $(dirname $0)/.. >/dev/null 2>&1 && pwd)} ONOS_DEFAULT_ARCHIVE=$(dirname $ONOS_HOME)/onos-data.tar.gz -ONOS_KARAF=$ONOS_HOME/apache-karaf-4.2.9 +ONOS_KARAF=$ONOS_HOME/apache-karaf-4.2.14 # Fetch the name of the archive or use a default if none is specified archive=${1:-$ONOS_DEFAULT_ARCHIVE} diff --git a/tools/package/bin/onos-restore b/tools/package/bin/onos-restore index 790032768c5..987b1b44c99 100755 --- a/tools/package/bin/onos-restore +++ b/tools/package/bin/onos-restore @@ -5,7 +5,7 @@ ONOS_HOME=${ONOS_HOME:-$(cd $(dirname $0)/.. >/dev/null 2>&1 && pwd)} ONOS_DEFAULT_ARCHIVE=$(dirname $ONOS_HOME)/onos-data.tar.gz -ONOS_KARAF=$ONOS_HOME/apache-karaf-4.2.9 +ONOS_KARAF=$ONOS_HOME/apache-karaf-4.2.14 # Fetch the name of the archive or use a default if none is specified archive=${1:-$ONOS_DEFAULT_ARCHIVE} diff --git a/tools/package/bin/onos-service b/tools/package/bin/onos-service index d465a0d95b5..b0ef25f14dd 100755 --- a/tools/package/bin/onos-service +++ b/tools/package/bin/onos-service @@ -10,15 +10,20 @@ # Do modify the keystore location/password and truststore location/password accordingly #export JAVA_OPTS="${JAVA_OPTS:--Dio.atomix.enableNettyTLS=true -Djavax.net.ssl.keyStore=/home/ubuntu/onos.jks -Djavax.net.ssl.keyStorePassword=222222 -Djavax.net.ssl.trustStore=/home/ubuntu/onos.jks -Djavax.net.ssl.trustStorePassword=222222}" -export JAVA_OPTS=${JAVA_OPTS:--XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Dkaraf.log.console=INFO -Dds.lock.timeout.milliseconds=10000} - -set -e # exit on error -set -u # exit on undefined variable - # If ONOS_HOME is set, respect its value. # If ONOS_HOME is not set (e.g. in the init or service environment), # set it based on this script's path. ONOS_HOME=${ONOS_HOME:-$(cd $(dirname $0)/.. >/dev/null 2>&1 && pwd)} + +JAVA_OPTS="${JAVA_OPTS:--XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Dkaraf.log.console=INFO -Dds.lock.timeout.milliseconds=10000}" +if [ ! -z "$ONOS_YOURKIT" ]; then + JAVA_OPTS+=" -agentpath:$ONOS_HOME/libyjpagent.so=listen=all" +fi +export JAVA_OPTS=${JAVA_OPTS} + +set -e # exit on error +set -u # exit on undefined variable + KARAF_ARGS=server SYS_APPS=drivers ONOS_APPS=${ONOS_APPS:-gui2} # Activate GUI2 unless specific apps were named diff --git a/tools/package/deb/prerm b/tools/package/deb/prerm index c688faaedc4..dc21de912b6 100755 --- a/tools/package/deb/prerm +++ b/tools/package/deb/prerm @@ -14,7 +14,7 @@ # Clean up onos runtime directories # TODO don't hardcode karaf version -rm -rf /opt/onos/apache-karaf-4.2.9/ +rm -rf /opt/onos/apache-karaf-4.2.14/ rm -rf /opt/onos/var/* rm -rf /opt/onos/config rm -rf /opt/onos/options diff --git a/tools/package/dependencies/template.pom b/tools/package/dependencies/template.pom index a5aac3a1164..e0a94b07367 100644 --- a/tools/package/dependencies/template.pom +++ b/tools/package/dependencies/template.pom @@ -33,7 +33,7 @@ UTF-8 - 4.2.9 + 4.2.14 3.3.9 @@ -274,7 +274,7 @@ onos-maven-plugin - 2.2.1 + 2.4.0 cfg diff --git a/tools/package/etc/org.apache.karaf.features.cfg b/tools/package/etc/org.apache.karaf.features.cfg index 863bdc5b22f..beab9a1e4b8 100644 --- a/tools/package/etc/org.apache.karaf.features.cfg +++ b/tools/package/etc/org.apache.karaf.features.cfg @@ -20,38 +20,38 @@ # # Comma separated list of features repositories to register by default # -featuresRepositories = \ mvn:org.apache.karaf.features/standard/4.2.9/xml/features, \ +featuresRepositories = \ mvn:org.apache.karaf.features/standard/4.2.14/xml/features, \ mvn:org.onosproject/onos-features/$ONOS_VERSION/xml/features, \ - mvn:org.apache.karaf.features/enterprise/4.2.9/xml/features, \ - mvn:org.apache.karaf.features/spring/4.2.9/xml/features, \ - mvn:org.apache.karaf.features/standard/4.2.9/xml/features, \ - mvn:org.apache.karaf.features/framework/4.2.9/xml/features + mvn:org.apache.karaf.features/enterprise/4.2.14/xml/features, \ + mvn:org.apache.karaf.features/spring/4.2.14/xml/features, \ + mvn:org.apache.karaf.features/standard/4.2.14/xml/features, \ + mvn:org.apache.karaf.features/framework/4.2.14/xml/features # # Comma separated list of features to install at startup # featuresBoot = \ - (instance/4.2.9, \ - package/4.2.9, \ - log/4.2.9, \ - ssh/4.2.9, \ - framework/4.2.9, \ - system/4.2.9, \ - eventadmin/4.2.9, \ - feature/4.2.9, \ - shell/4.2.9, \ - management/4.2.9, \ - service/4.2.9, \ - jaas/4.2.9, \ - deployer/4.2.9, \ - diagnostic/4.2.9, \ - wrap/2.6.2, \ - bundle/4.2.9, \ - config/4.2.9, \ - kar/4.2.9, \ - webconsole/4.2.9, \ - scr/4.2.9, \ - war/4.2.9), \ + (instance/4.2.14, \ + package/4.2.14, \ + log/4.2.14, \ + ssh/4.2.14, \ + framework/4.2.14, \ + system/4.2.14, \ + eventadmin/4.2.14, \ + feature/4.2.14, \ + shell/4.2.14, \ + management/4.2.14, \ + service/4.2.14, \ + jaas/4.2.14, \ + deployer/4.2.14, \ + diagnostic/4.2.14, \ + wrap/2.6.7, \ + bundle/4.2.14, \ + config/4.2.14, \ + kar/4.2.14, \ + webconsole/4.2.14, \ + scr/4.2.14, \ + war/4.2.14), \ (onos-thirdparty-base/$ONOS_VERSION), \ (onos-api/$ONOS_VERSION, \ onos-core/$ONOS_VERSION, \ diff --git a/tools/package/etc/startup.properties b/tools/package/etc/startup.properties index 996b47b1903..ddcfcbfe526 100644 --- a/tools/package/etc/startup.properties +++ b/tools/package/etc/startup.properties @@ -1,21 +1,17 @@ -# Valid for Karaf 4.2.9. If updating Karaf version in ONOS, make sure to -# copy-paste here the content of apache-karaf-*/etc/startup.properties in, and -# update the Kafka and log4j2 additions at the end if needed - -# Standard startup.properties file # Bundles to be started on startup, with startlevel -mvn\:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.9 = 1 -mvn\:org.ops4j.pax.url/pax-url-aether/2.6.2 = 5 -mvn\:org.apache.karaf.services/org.apache.karaf.services.eventadmin/4.2.9 = 5 -mvn\:org.apache.felix/org.apache.felix.metatype/1.2.2 = 5 -mvn\:org.ops4j.pax.logging/pax-logging-api/1.11.6 = 8 -mvn\:org.ops4j.pax.logging/pax-logging-log4j2/1.11.6 = 8 +mvn\:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.14 = 1 +mvn\:org.apache.karaf.services/org.apache.karaf.services.eventadmin/4.2.14 = 5 +mvn\:org.apache.felix/org.apache.felix.metatype/1.2.4 = 5 +mvn\:org.ops4j.pax.url/pax-url-aether/2.6.7 = 5 +mvn\:org.ops4j.pax.logging/pax-logging-log4j2/1.11.12 = 8 +mvn\:org.ops4j.pax.logging/pax-logging-api/1.11.12 = 8 mvn\:org.fusesource.jansi/jansi/1.18 = 8 +mvn\:org.osgi/org.osgi.util.promise/1.1.1 = 9 mvn\:org.apache.felix/org.apache.felix.coordinator/1.0.2 = 9 -mvn\:org.apache.felix/org.apache.felix.configadmin/1.9.16 = 10 -mvn\:org.apache.felix/org.apache.felix.fileinstall/3.6.6 = 11 -mvn\:org.apache.karaf.features/org.apache.karaf.features.core/4.2.9 = 15 - +mvn\:org.osgi/org.osgi.util.function/1.1.0 = 9 +mvn\:org.apache.felix/org.apache.felix.configadmin/1.9.22 = 10 +mvn\:org.apache.felix/org.apache.felix.fileinstall/3.7.2 = 11 +mvn\:org.apache.karaf.features/org.apache.karaf.features.core/4.2.14 = 15 # Added part to enable Kafka log4j2 appender # N.B.: kafka-clients should have startlevel lower than onos-tools-package-log4j2-extra diff --git a/tools/package/maven-plugin/pom.xml b/tools/package/maven-plugin/pom.xml index 488c806fa22..8b2da91abed 100644 --- a/tools/package/maven-plugin/pom.xml +++ b/tools/package/maven-plugin/pom.xml @@ -26,7 +26,7 @@ org.onosproject onos-maven-plugin - 2.4-SNAPSHOT + 2.5.0-SNAPSHOT maven-plugin Maven plugin for packaging ONOS applications or generating diff --git a/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosCfgMojo.java b/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosCfgMojo.java index 60d5f63c538..43973572098 100644 --- a/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosCfgMojo.java +++ b/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosCfgMojo.java @@ -174,7 +174,11 @@ private String description(JavaClass javaClass, String name) { } JavaField field = javaClass.getFieldByName(name); if (field != null) { + // make sure that the new lines are removed from the comment, they will break the property loading. String comment = field.getComment(); + if (comment != null) { + comment = comment.replace("\n", " ").replace("\r", " "); + } return comment != null ? comment : NO_DESCRIPTION; } throw new IllegalStateException("cfgdef could not find a variable named " + name + " in " + javaClass.getName()); diff --git a/tools/package/onos-prep-karaf b/tools/package/onos-prep-karaf index c707206e008..f81634b16d6 100755 --- a/tools/package/onos-prep-karaf +++ b/tools/package/onos-prep-karaf @@ -13,7 +13,7 @@ KARAF_PATCHES=$5 LOG4J2_EXTRA=$6 SANDBOX=${7:-.} -KARAF_VERSION="4.2.9" +KARAF_VERSION="4.2.14" ONOS_SECURITY_MODE="false" PREFIX="onos-$ONOS_VERSION" diff --git a/tools/package/onos_stage.py b/tools/package/onos_stage.py index 9dc1973ae0e..ac669065ec6 100755 --- a/tools/package/onos_stage.py +++ b/tools/package/onos_stage.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Copyright 2017-present Open Networking Foundation @@ -27,7 +27,7 @@ written_files = set() now = time.time() -karaf_version = "4.2.9" +karaf_version = "4.2.14" karaf_system = "apache-karaf-" + karaf_version + "/system/" def addFile(tar, dest, file, file_size): diff --git a/tools/package/runtime/bin/_check-json b/tools/package/runtime/bin/_check-json index 1eef25ba971..0ebaf2caa53 100644 --- a/tools/package/runtime/bin/_check-json +++ b/tools/package/runtime/bin/_check-json @@ -22,7 +22,7 @@ # ----------------------------------------------------------------------------- checkJson() { - cat ${1} | python -m json.tool >> /dev/null + cat ${1} | python3 -m json.tool >> /dev/null if [ "$?" -ne "0" ]; then echo "Not valid JSON File" && exit 1 fi diff --git a/tools/package/runtime/bin/onos-cfg b/tools/package/runtime/bin/onos-cfg index abb3be60170..ad86718b57e 100755 --- a/tools/package/runtime/bin/onos-cfg +++ b/tools/package/runtime/bin/onos-cfg @@ -48,7 +48,7 @@ case $cmd in ${curl} -X GET ${URL} && echo;; post|delete) checkJson "$file" - $curl -X $cmd -H 'Content-Type:application/json' ${URL} -d@$file && echo;; + $curl -X $(echo ${cmd} | tr '[:lower:]' '[:upper:]') -H 'Content-Type:application/json' ${URL} -d@$file && echo;; *) usage && exit 1;; esac diff --git a/tools/test/bin/atomix-gen-config b/tools/test/bin/atomix-gen-config index c3c89ac32b0..d32ca98c753 100755 --- a/tools/test/bin/atomix-gen-config +++ b/tools/test/bin/atomix-gen-config @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ usage: atomix-gen-config [-h] [-s PARTITION_SIZE] [-n NUM_PARTITIONS] [node_ip] [filename] [node_ip [node_ip ...]] @@ -112,7 +112,7 @@ if __name__ == '__main__': args = parser.parse_args() filename = args.filename partition_size = args.partition_size - local_member_id = get_local_node(args.node) + local_member_id = get_local_node(args.node, args.nodes) local_member_address = get_local_address(args.node, args.nodes) nodes = get_nodes(args.nodes) num_partitions = args.num_partitions @@ -158,4 +158,4 @@ if __name__ == '__main__': with open(filename, 'w') as f: f.write(output) else: - print output + print(output) diff --git a/tools/test/bin/atomix-install b/tools/test/bin/atomix-install index b059e12d0f1..92ec60fff9d 100755 --- a/tools/test/bin/atomix-install +++ b/tools/test/bin/atomix-install @@ -48,6 +48,15 @@ ssh -tt $remote " sudo mkdir -p $ATOMIX_INSTALL_DIR && sudo chown ${ONOS_USER}:${ONOS_GROUP} $ATOMIX_INSTALL_DIR tar -xvf /tmp/atomix.tar.gz -C $ATOMIX_INSTALL_DIR + + if [ ! -z "$ONOS_YOURKIT" ]; then + sudo apt-get install unzip + cd /tmp + wget -N https://www.yourkit.com/download/YourKit-JavaProfiler-${ONOS_YOURKIT}.zip + unzip -o YourKit-JavaProfiler-${ONOS_YOURKIT}.zip + rm YourKit-JavaProfiler-${ONOS_YOURKIT}.zip + mv /tmp/YourKit-JavaProfiler-$(echo $ONOS_YOURKIT | sed 's/\(.*\)-.*/\1/')/bin/linux-x86-64/libyjpagent.so $ATOMIX_INSTALL_DIR/libyjpagent.so + fi " # Configure the ONOS installation diff --git a/tools/test/bin/atomix-push-bits b/tools/test/bin/atomix-push-bits index e0375bd0455..5eb91917d39 100755 --- a/tools/test/bin/atomix-push-bits +++ b/tools/test/bin/atomix-push-bits @@ -26,7 +26,7 @@ set -e . $ONOS_ROOT/tools/build/envDefaults -ATOMIX_VERSION=${ATOMIX_VERSION:-3.1.5} +ATOMIX_VERSION=${ATOMIX_VERSION:-3.1.12} ATOMIX_MAVEN=~/.m2/repository/io/atomix/atomix-dist/$ATOMIX_VERSION/atomix-dist-$ATOMIX_VERSION.tar.gz ATOMIX_LOCAL=/tmp/atomix-$ATOMIX_VERSION.tar.gz ATOMIX_REMOTE=https://oss.sonatype.org/content/repositories/releases/io/atomix/atomix-dist/$ATOMIX_VERSION/atomix-dist-$ATOMIX_VERSION.tar.gz diff --git a/tools/test/bin/atomix-service b/tools/test/bin/atomix-service index 7b60d93aa0f..8eb6a5ec9fa 100755 --- a/tools/test/bin/atomix-service +++ b/tools/test/bin/atomix-service @@ -39,11 +39,17 @@ else nodes=$(find_node ${1:-$OCI}) fi +# Define the java options for atomix +JAVA_OPTS="${JAVA_OPTS:--XX:+UseG1GC -XX:MaxGCPauseMillis=200}" +if [ ! -z "$ONOS_YOURKIT" ]; then + JAVA_OPTS+=" -agentpath:$ATOMIX_INSTALL_DIR/libyjpagent.so=listen=all" +fi + case $2 in start) # Execute the remote commands for node in $nodes; do - ssh $ONOS_USER@${node} "nohup $ATOMIX_INSTALL_DIR/bin/atomix-agent -c $ATOMIX_INSTALL_DIR/atomix.json >/dev/null 2>&1 &" + ssh $ONOS_USER@${node} "JAVA_OPTS=\"${JAVA_OPTS}\" nohup $ATOMIX_INSTALL_DIR/bin/atomix-agent -c $ATOMIX_INSTALL_DIR/atomix.json >/dev/null 2>&1 &" done ;; stop) diff --git a/tools/test/bin/onos-archetypes-test b/tools/test/bin/onos-archetypes-test index 0a476c719ed..0a883b96896 100755 --- a/tools/test/bin/onos-archetypes-test +++ b/tools/test/bin/onos-archetypes-test @@ -19,7 +19,7 @@ _EOF_ set -e export AROOT=${ONOS_STAGE_ROOT:-/tmp}/foo -export ARCHETYPE_OPTS="-DarchetypeGroupId=org.onosproject -DarchetypeVersion=2.5.0-SNAPSHOT" +export ARCHETYPE_OPTS="-DarchetypeGroupId=org.onosproject -DarchetypeVersion=2.5.10-SNAPSHOT" rm -fr $AROOT 2>/dev/null mkdir -p $AROOT diff --git a/tools/test/bin/onos-check-bits b/tools/test/bin/onos-check-bits index 71f897eb93f..865abd2dbaf 100755 --- a/tools/test/bin/onos-check-bits +++ b/tools/test/bin/onos-check-bits @@ -32,7 +32,7 @@ if [ $? -ne 0 ]; then echo "ONOS archive does not contain the proper version file" && exit 1 fi -tar tzf ${ONOS_TAR} | grep -q apache-karaf-4.2.9 +tar tzf ${ONOS_TAR} | grep -q apache-karaf-4.2.14 if [ $? -ne 0 ]; then echo "ONOS archive does not contain karaf" && exit 1 fi diff --git a/tools/test/bin/onos-gen-config b/tools/test/bin/onos-gen-config index b73df39335f..e214d2fc5d6 100755 --- a/tools/test/bin/onos-gen-config +++ b/tools/test/bin/onos-gen-config @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ usage: onos-gen-config [-h] [-s PARTITION_SIZE] [-n NUM_PARTITIONS] [filename] [node_ip [node_ip ...]] @@ -87,7 +87,7 @@ if __name__ == '__main__': args = parser.parse_args() node = args.node - print node + print(node) filename = args.filename nodes = get_nodes(args.nodes) @@ -106,4 +106,4 @@ if __name__ == '__main__': with open(filename, 'w') as f: f.write(output) else: - print output + print(output) diff --git a/tools/test/bin/onos-install b/tools/test/bin/onos-install index 391640c63ab..df220e390a4 100755 --- a/tools/test/bin/onos-install +++ b/tools/test/bin/onos-install @@ -88,7 +88,7 @@ ssh -tt $remote " unzip -o YourKit-JavaProfiler-${ONOS_YOURKIT}.zip rm YourKit-JavaProfiler-${ONOS_YOURKIT}.zip mv /tmp/YourKit-JavaProfiler-$(echo $ONOS_YOURKIT | sed 's/\(.*\)-.*/\1/')/bin/linux-x86-64/libyjpagent.so $ONOS_INSTALL_DIR/libyjpagent.so - echo -e 'export JAVA_OPTS="${JAVA_OPTS:--agentpath:$ONOS_INSTALL_DIR/libyjpagent.so}=listen=all"' >> $ONOS_INSTALL_DIR/options + echo -e 'export ONOS_YOURKIT=$ONOS_YOURKIT' >> $ONOS_INSTALL_DIR/options fi # Set up correct user to run onos-service diff --git a/tools/test/scenarios/odtn/createOdtnCell.sh b/tools/test/scenarios/odtn/createOdtnCell.sh index 91f91973710..fcb81ba7c73 100755 --- a/tools/test/scenarios/odtn/createOdtnCell.sh +++ b/tools/test/scenarios/odtn/createOdtnCell.sh @@ -16,7 +16,7 @@ FULL_SSH_KEY=$(cat ~/.ssh/id_rsa.pub) echo "The public key in local host is: $SSH_KEY" # Create Atomix cluster using Atomix docker image -ATOMIX_IMAGE=atomix/atomix:3.1.5 +ATOMIX_IMAGE=atomix/atomix:3.1.12 for i in {1..3}; do echo "Setting up atomix-$i..." docker container run --detach --name atomix-$i --hostname atomix-$i \ diff --git a/utils/misc/src/main/java/org/onlab/packet/EthType.java b/utils/misc/src/main/java/org/onlab/packet/EthType.java index c69ed145ec5..3affb9a0661 100644 --- a/utils/misc/src/main/java/org/onlab/packet/EthType.java +++ b/utils/misc/src/main/java/org/onlab/packet/EthType.java @@ -38,6 +38,7 @@ public enum EtherType { MPLS_UNICAST(0x8847, "mpls_unicast", org.onlab.packet.MPLS.deserializer()), MPLS_MULTICAST(0x8848, "mpls_multicast", org.onlab.packet.MPLS.deserializer()), EAPOL(0x888e, "eapol", org.onlab.packet.EAPOL.deserializer()), + PPPoED(0x8863, "pppoed", org.onlab.packet.PPPoED.deserializer()), SLOW(0x8809, "slow", org.onlab.packet.Slow.deserializer()), UNKNOWN(0, "unknown", null); diff --git a/utils/misc/src/main/java/org/onlab/packet/Ethernet.java b/utils/misc/src/main/java/org/onlab/packet/Ethernet.java index fb249a9985b..e3af9601d86 100644 --- a/utils/misc/src/main/java/org/onlab/packet/Ethernet.java +++ b/utils/misc/src/main/java/org/onlab/packet/Ethernet.java @@ -49,6 +49,7 @@ public class Ethernet extends BasePacket { public static final short TYPE_VLAN = EthType.EtherType.VLAN.ethType().toShort(); public static final short TYPE_QINQ = EthType.EtherType.QINQ.ethType().toShort(); public static final short TYPE_BSN = EthType.EtherType.BDDP.ethType().toShort(); + public static final short TYPE_PPPOED = EthType.EtherType.PPPoED.ethType().toShort(); public static final short MPLS_UNICAST = EthType.EtherType.MPLS_UNICAST.ethType().toShort(); public static final short MPLS_MULTICAST = EthType.EtherType.MPLS_MULTICAST.ethType().toShort(); @@ -703,6 +704,8 @@ public String toString() { sb.append("\nllc packet"); } else if (pkt instanceof EAPOL) { sb.append("\neapol"); + } else if (pkt instanceof PPPoED) { + sb.append("\npppoed packet"); } else { sb.append("\nunknown packet"); } diff --git a/utils/misc/src/main/java/org/onlab/packet/PPPoED.java b/utils/misc/src/main/java/org/onlab/packet/PPPoED.java new file mode 100644 index 00000000000..181db7d0e8c --- /dev/null +++ b/utils/misc/src/main/java/org/onlab/packet/PPPoED.java @@ -0,0 +1,220 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onlab.packet; + +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Stream; + +import static org.onlab.packet.PacketUtils.checkInput; + +public class PPPoED extends BasePacket { + protected byte version; + protected byte type; + protected byte code; + protected short sessionId; + protected short payloadLength; + protected List tags = new ArrayList<>(); + + // PPPoED packet types + public static final byte PPPOED_CODE_PADI = (byte) 0x09; + public static final byte PPPOED_CODE_PADO = (byte) 0x07; + public static final byte PPPOED_CODE_PADR = (byte) 0x19; + public static final byte PPPOED_CODE_PADS = (byte) 0x65; + public static final byte PPPOED_CODE_PADT = (byte) 0xa7; + + private static final int HEADER_LENGTH = 6; + private static final int TAG_HEADER_LENGTH = 4; + + public PPPoED() { + } + + public byte getVersion() { + return version; + } + + public void setVersion(byte version) { + this.version = version; + } + + public byte getType() { + return type; + } + + public void setType(byte type) { + this.type = type; + } + + public byte getCode() { + return code; + } + + public void setCode(byte code) { + this.code = code; + } + + public short getSessionId() { + return sessionId; + } + + public void setSessionId(short sessionId) { + this.sessionId = sessionId; + } + + public short getPayloadLength() { + return payloadLength; + } + + public void setPayloadLength(short payloadLength) { + this.payloadLength = payloadLength; + } + + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + /** + * Gets a list of tags from the packet. + * + * @param tagType the type field of the required tags + * @return List of the tags that match the type or an empty list if there is none + */ + public ArrayList getTagList(short tagType) { + ArrayList tagList = new ArrayList<>(); + for (int i = 0; i < this.tags.size(); i++) { + if (this.tags.get(i).getType() == tagType) { + tagList.add(this.tags.get(i)); + } + } + return tagList; + } + + /** + * Gets a tag from the packet. + * + * @param tagType the type field of the required tag + * @return the first tag that matches the type or null if does not exist + */ + public PPPoEDTag getTag(short tagType) { + for (int i = 0; i < this.tags.size(); i++) { + if (this.tags.get(i).getType() == tagType) { + return this.tags.get(i); + } + } + return null; + } + + /** + * Sets a tag in the packet. + * + * @param tagType the type field of the tag to set + * @param value value to be set + * @return reference to the tag object + */ + public PPPoEDTag setTag(short tagType, byte[] value) { + short tagLength = (short) (value.length); + PPPoEDTag newTag = new PPPoEDTag(tagType, tagLength, value); + this.tags.add(newTag); + this.payloadLength += TAG_HEADER_LENGTH + tagLength; + return newTag; + } + + /** + * Deserializer for PPPoED packets. + * + * @return deserializer + */ + public static Deserializer deserializer() { + return (data, offset, length) -> { + checkInput(data, offset, length, HEADER_LENGTH); + + final ByteBuffer bb = ByteBuffer.wrap(data, offset, length); + PPPoED pppoed = new PPPoED(); + byte versionByte = bb.get(); + pppoed.setVersion((byte) (versionByte >> 4 & 0xf)); + pppoed.setType((byte) (versionByte & 0xf)); + pppoed.setCode(bb.get()); + pppoed.setSessionId(bb.getShort()); + pppoed.setPayloadLength(bb.getShort()); + int remainingLength = pppoed.payloadLength; + while (remainingLength > 0 && bb.hasRemaining()) { + PPPoEDTag tag = new PPPoEDTag(); + tag.setType(bb.getShort()); + tag.setLength(bb.getShort()); + tag.value = new byte[tag.length]; + bb.get(tag.value, 0, tag.length); + pppoed.tags.add(tag); + remainingLength -= tag.length + TAG_HEADER_LENGTH; + } + return pppoed; + }; + } + + @Override + public byte[] serialize() { + final byte[] data = new byte[this.payloadLength + HEADER_LENGTH]; + final ByteBuffer bb = ByteBuffer.wrap(data); + bb.put((byte) ((this.version & 0xf) << 4 | this.type & 0xf)); + bb.put(this.code); + bb.putShort(this.sessionId); + bb.putShort(this.payloadLength); + for (int i = 0; i < this.tags.size(); i++) { + PPPoEDTag tag = this.tags.get(i); + bb.putShort(tag.getType()); + bb.putShort(tag.getLength()); + bb.put(tag.getValue()); + } + return data; + } + + @Override + public String toString() { + return "PPPoED{" + + "version=" + version + + ", type=" + type + + ", code=" + code + + ", session_id=" + sessionId + + ", payload_length=" + payloadLength + + ", tags=" + tags + + '}'; + } + + public enum Type { + PADI(PPPOED_CODE_PADI), + PADO(PPPOED_CODE_PADO), + PADR(PPPOED_CODE_PADR), + PADS(PPPOED_CODE_PADS), + PADT(PPPOED_CODE_PADT); + + public int value; + + Type(int value) { + this.value = value; + } + + public static Type getTypeByValue(int value) { + return Stream.of(values()) + .filter(el -> el.value == value) + .findFirst() + .orElse(null); + } + } +} diff --git a/utils/misc/src/main/java/org/onlab/packet/PPPoEDTag.java b/utils/misc/src/main/java/org/onlab/packet/PPPoEDTag.java new file mode 100644 index 00000000000..15f6f2626fe --- /dev/null +++ b/utils/misc/src/main/java/org/onlab/packet/PPPoEDTag.java @@ -0,0 +1,89 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onlab.packet; + +import java.util.Arrays; + +public class PPPoEDTag { + protected short type; + protected short length; + protected byte[] value; + + // PPPoED tag types + public static final short PPPOED_TAG_END_OF_LIST = 0x0000; + public static final short PPPOED_TAG_SERVICE_NAME = 0x0101; + public static final short PPPOED_TAG_AC_NAME = 0x0102; + public static final short PPPOED_TAG_HOST_UNIQ = 0x0103; + public static final short PPPOED_TAG_AC_COOKIE = 0x0104; + public static final short PPPOED_TAG_VENDOR_SPECIFIC = 0x0105; + public static final short PPPOED_TAG_RELAY_SESSION_ID = 0x0110; + public static final short PPPOED_TAG_SERVICE_NAME_ERROR = 0x0201; + public static final short PPPOED_TAG_AC_SYSTEM_ERROR = 0x0202; + public static final short PPPOED_TAG_GENERIC_ERROR = 0x0203; + + /** + * Default constructor. + */ + public PPPoEDTag() { + } + + /** + * Constructs a PPPoED tag with type, length and value. + * + * @param type type + * @param length length + * @param value value + */ + public PPPoEDTag(final short type, final short length, final byte[] value) { + this.type = type; + this.length = length; + this.value = value; + } + + public short getType() { + return type; + } + + public void setType(short type) { + this.type = type; + } + + public short getLength() { + return length; + } + + public void setLength(short length) { + this.length = length; + } + + public byte[] getValue() { + return value; + } + + public void setValue(byte[] value) { + this.value = value; + } + + @Override + public String toString() { + return "PPPoEDTag{" + + "type=" + type + + ", length=" + length + + ", value=" + Arrays.toString(value) + + '}'; + } +} diff --git a/utils/misc/src/main/java/org/onlab/packet/dhcp/CircuitId.java b/utils/misc/src/main/java/org/onlab/packet/dhcp/CircuitId.java index 1b53a5b9dcc..22342465ab7 100644 --- a/utils/misc/src/main/java/org/onlab/packet/dhcp/CircuitId.java +++ b/utils/misc/src/main/java/org/onlab/packet/dhcp/CircuitId.java @@ -17,7 +17,6 @@ package org.onlab.packet.dhcp; import com.google.common.collect.Lists; -import com.google.common.primitives.UnsignedLongs; import org.onlab.packet.VlanId; import java.nio.charset.StandardCharsets; @@ -32,7 +31,6 @@ public class CircuitId { private static final String SEPARATOR = ":"; private static final String CIRCUIT_ID_FORMAT = "%s" + SEPARATOR + "%s"; - private static final String DEVICE_PORT_SEPARATOR = "/"; private String connectPoint; private VlanId vlanId; @@ -72,16 +70,26 @@ public static CircuitId deserialize(byte[] circuitId) { // remove last element (vlan id) String vlanId = splittedCircuitId.remove(splittedCircuitId.size() - 1); - // Reconstruct device Id + // Reconstruct the connect point string String connectPoint = String.join(SEPARATOR, splittedCircuitId); - String[] splittedConnectPoint = connectPoint.split(DEVICE_PORT_SEPARATOR); - // Check connect point is valid or not - checkArgument(splittedConnectPoint.length == 2, - "Connect point must be in \"deviceUri/portNumber\" format"); - - // Check the port number is a number or not - UnsignedLongs.decode(splittedConnectPoint[1]); + /* + * As device IDs may have a path component, we are expecting one + * of: + * - scheme:ip:port/cp + * - scheme:ip:port/path/cp + * + * The assumption is the last `/` will separate the device ID + * from the connection point number. Please note that we are + * not actually checking here the content of the strings + */ + int idx = connectPoint.lastIndexOf("/"); + checkArgument(idx != -1, "Connect point not specified, " + + "Connect point must be in \"deviceUri/portNumber\" format"); + + String cp = connectPoint.substring(idx + 1); + checkArgument(!cp.isEmpty(), "Connect point separator specified, " + + "but no port number included, connect point must be in \"deviceUri/portNumber\" format"); return new CircuitId(connectPoint, VlanId.vlanId(vlanId)); } diff --git a/utils/misc/src/main/java/org/onlab/util/ImmutableByteSequence.java b/utils/misc/src/main/java/org/onlab/util/ImmutableByteSequence.java index 4794a2414f7..41c6ba5da8d 100644 --- a/utils/misc/src/main/java/org/onlab/util/ImmutableByteSequence.java +++ b/utils/misc/src/main/java/org/onlab/util/ImmutableByteSequence.java @@ -51,6 +51,7 @@ private enum BitwiseOp { The order of a newly-created byte buffer is always BIG_ENDIAN. */ private ByteBuffer value; + private boolean isAscii = false; /** * Private constructor. Creates a new byte sequence object backed by the @@ -65,6 +66,11 @@ private ImmutableByteSequence(ByteBuffer value) { this.value.rewind(); } + private ImmutableByteSequence(ByteBuffer value, boolean isAscii) { + this(value); + this.isAscii = isAscii; + } + /** * Creates a new immutable byte sequence with the same content and order of * the passed byte array. @@ -125,6 +131,20 @@ public static ImmutableByteSequence copyFrom(ByteBuffer original) { return new ImmutableByteSequence(ByteBuffer.wrap(bytes)); } + /** + * Creates a new immutable byte sequence from the given string. + * + * @param original a string + * @return a new byte buffer object + */ + public static ImmutableByteSequence copyFrom(String original) { + checkArgument(original != null && original.length() > 0, + "Cannot copy from an empty or null string"); + return new ImmutableByteSequence(ByteBuffer.allocate(original.length()) + .put(original.getBytes()), + true); + } + /** * Creates a new byte sequence of 8 bytes containing the given long value. * @@ -169,6 +189,53 @@ public static ImmutableByteSequence copyFrom(byte original) { ByteBuffer.allocate(Byte.BYTES).put(original)); } + /** + * Creates a new immutable byte sequence while trimming or expanding the + * content of the given byte buffer to fit the given bit-width. Calling this + * method has the same behavior as + * {@code ImmutableByteSequence.copyFrom(original).fit(bitWidth)}. + * + * @param original a byte buffer value + * @param bitWidth a non-zero positive integer + * @return a new immutable byte sequence + * @throws ByteSequenceTrimException if the byte buffer cannot be fitted + */ + public static ImmutableByteSequence copyAndFit(ByteBuffer original, int bitWidth) + throws ByteSequenceTrimException { + checkArgument(original != null && original.capacity() > 0, + "Cannot copy from an empty or null byte buffer"); + checkArgument(bitWidth > 0, + "bit-width must be a non-zero positive integer"); + if (original.order() == ByteOrder.LITTLE_ENDIAN) { + // FIXME: this can be improved, e.g. read bytes in reverse order from original + byte[] newBytes = new byte[original.capacity()]; + original.get(newBytes); + reverse(newBytes); + return internalCopyAndFit(ByteBuffer.wrap(newBytes), bitWidth); + } else { + return internalCopyAndFit(original.duplicate(), bitWidth); + } + } + + private static ImmutableByteSequence internalCopyAndFit(ByteBuffer byteBuf, int bitWidth) + throws ByteSequenceTrimException { + final int byteWidth = (bitWidth + 7) / 8; + final ByteBuffer newByteBuffer = ByteBuffer.allocate(byteWidth); + byteBuf.rewind(); + if (byteWidth >= byteBuf.capacity()) { + newByteBuffer.position(byteWidth - byteBuf.capacity()); + newByteBuffer.put(byteBuf); + } else { + for (int i = 0; i < byteBuf.capacity() - byteWidth; i++) { + if (byteBuf.get(i) != 0) { + throw new ByteSequenceTrimException(byteBuf, bitWidth); + } + } + newByteBuffer.put(byteBuf.position(byteBuf.capacity() - byteWidth)); + } + return new ImmutableByteSequence(newByteBuffer); + } + /** * Creates a new byte sequence of the given size where all bits are 0. * @@ -259,7 +326,7 @@ public ByteBuffer asReadOnlyBuffer() { * @return an integer value */ public int size() { - return this.value.capacity(); + return this.value.limit() - this.value.position(); } /** @@ -394,19 +461,34 @@ public int msbIndex() { } /** - * Returns a hexadecimal representation of this byte sequence, e.g. - * 0xbeef. The length of the returned string is not representative of the - * length of the byte sequence, as all padding zeros are removed. + * Returns the ASCII representation of the byte sequence if the content can + * be interpreted as an ASCII string, otherwise returns the hexadecimal + * representation of this byte sequence, e.g.0xbeef. The length of the + * returned string is not representative of the length of the byte sequence, + * as all padding zeros are removed. * * @return hexadecimal representation */ @Override public String toString() { - final String hexValue = HexString - .toHexString(value.array(), "") - // Remove leading zeros, but leave one if string is all zeros. - .replaceFirst("^0+(?!$)", ""); - return "0x" + hexValue; + if (this.isAscii()) { + return new String(value.array()); + } else { + return "0x" + HexString + .toHexString(value.array(), "") + // Remove leading zeros, but leave one if string is all zeros. + .replaceFirst("^0+(?!$)", ""); + } + } + + /** + * Checks if the content can be interpreted as an ASCII printable string. + * + * @return True if the content can be interpreted as an ASCII printable + * string, false otherwise + */ + public boolean isAscii() { + return isAscii; } /** @@ -432,7 +514,7 @@ private static ImmutableByteSequence doFit(ImmutableByteSequence original, checkNotNull(original, "byte sequence cannot be null"); checkArgument(bitWidth > 0, "bit-width must be a non-zero positive integer"); - int newByteWidth = (int) Math.ceil((double) bitWidth / 8); + int newByteWidth = (bitWidth + 7) / 8; if (bitWidth == original.size() * 8) { // No need to fit. @@ -465,12 +547,33 @@ private static ImmutableByteSequence doFit(ImmutableByteSequence original, } /** - * Signals that a byte sequence cannot be trimmed. + * Returns a new ImmutableByteSequence with same content as this one, but with leading zero bytes stripped. + * + * @return new ImmutableByteSequence + */ + public ImmutableByteSequence canonical() { + ByteBuffer newByteBuffer = this.value.duplicate(); + ImmutableByteSequence canonicalBs = new ImmutableByteSequence(newByteBuffer); + canonicalBs.value.rewind(); + while (canonicalBs.value.hasRemaining() && canonicalBs.value.get() == 0) { + // Make style check happy + } + canonicalBs.value.position(canonicalBs.value.position() - 1); + return canonicalBs; + } + + /** + * Signals a trim exception during byte sequence creation. */ public static class ByteSequenceTrimException extends Exception { ByteSequenceTrimException(ImmutableByteSequence original, int bitWidth) { super(format("cannot trim %s into a %d bits long value", original, bitWidth)); } + + ByteSequenceTrimException(ByteBuffer original, int bitWidth) { + super(format("cannot trim %s (ByteBuffer) into a %d bits long value", + original, bitWidth)); + } } } diff --git a/utils/misc/src/main/java/org/onlab/util/SharedExecutors.java b/utils/misc/src/main/java/org/onlab/util/SharedExecutors.java index 6d92ce6feff..cc99bcce341 100644 --- a/utils/misc/src/main/java/org/onlab/util/SharedExecutors.java +++ b/utils/misc/src/main/java/org/onlab/util/SharedExecutors.java @@ -108,12 +108,14 @@ public static void setMetricsService(MetricsService metricsService) { */ public static void shutdown() { synchronized (SHARED_TIMER_LOCK) { - sharedTimer.shutdown(); - singleThreadExecutor.backingExecutor().shutdown(); - poolThreadExecutor.backingExecutor().shutdown(); - sharedTimer = null; - singleThreadExecutor = null; - poolThreadExecutor = null; + if (sharedTimer != null) { + sharedTimer.shutdown(); + singleThreadExecutor.backingExecutor().shutdown(); + poolThreadExecutor.backingExecutor().shutdown(); + sharedTimer = null; + singleThreadExecutor = null; + poolThreadExecutor = null; + } } } diff --git a/utils/misc/src/main/java/org/onlab/util/SharedScheduledExecutors.java b/utils/misc/src/main/java/org/onlab/util/SharedScheduledExecutors.java index cfba06d6846..9141438c818 100644 --- a/utils/misc/src/main/java/org/onlab/util/SharedScheduledExecutors.java +++ b/utils/misc/src/main/java/org/onlab/util/SharedScheduledExecutors.java @@ -116,10 +116,12 @@ public static void setPoolSize(int poolSize) { */ public static void shutdown() { synchronized (EXECUTORS_LOCK) { - singleThreadExecutor.backingExecutor().shutdown(); - singleThreadExecutor = null; - poolThreadExecutor.backingExecutor().shutdown(); - poolThreadExecutor = null; + if (singleThreadExecutor != null) { + singleThreadExecutor.backingExecutor().shutdown(); + singleThreadExecutor = null; + poolThreadExecutor.backingExecutor().shutdown(); + poolThreadExecutor = null; + } } } } diff --git a/utils/misc/src/main/java/org/onlab/util/Tools.java b/utils/misc/src/main/java/org/onlab/util/Tools.java index 596e34bdb45..2dd43a05cd4 100644 --- a/utils/misc/src/main/java/org/onlab/util/Tools.java +++ b/utils/misc/src/main/java/org/onlab/util/Tools.java @@ -188,6 +188,7 @@ public static boolean isNullOrEmpty(Collection collection) { */ public static T nullIsNotFound(T item, String message) { if (item == null) { + log.error(message); throw new ItemNotFoundException(message); } return item; @@ -205,6 +206,7 @@ public static T nullIsNotFound(T item, String message) { */ public static Set emptyIsNotFound(Set item, String message) { if (item == null || item.isEmpty()) { + log.error(message); throw new ItemNotFoundException(message); } return item; @@ -222,6 +224,7 @@ public static Set emptyIsNotFound(Set item, String message) { */ public static T nullIsIllegal(T item, String message) { if (item == null) { + log.error(message); throw new IllegalArgumentException(message); } return item; diff --git a/utils/misc/src/test/java/org/onlab/packet/PPPoEDTest.java b/utils/misc/src/test/java/org/onlab/packet/PPPoEDTest.java new file mode 100644 index 00000000000..c2ca05bf043 --- /dev/null +++ b/utils/misc/src/test/java/org/onlab/packet/PPPoEDTest.java @@ -0,0 +1,147 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onlab.packet; + +import com.google.common.io.Resources; + +import java.nio.ByteBuffer; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Unit tests for PPPoED class. + */ +public class PPPoEDTest { + + private static final byte VERSION = (byte) 1; + private static final byte TYPE = (byte) 1; + private static final short NO_SESSION = (short) 0; + private static final short SESSION = (short) 0x02e2; + + private static final String AC_NAME = "pfSense.localdomain"; + private static final long AC_COOKIE = 32098554083868671L; + private static final String SERVICE_NAME = "*"; + + private static final String PADI = "pppoed/padi.bin"; + private static final String PADO = "pppoed/pado.bin"; + private static final String PADR = "pppoed/padr.bin"; + private static final String PADS = "pppoed/pads.bin"; + private static final String PADT = "pppoed/padt.bin"; + + @Test + public void testDeserializeBadInput() throws Exception { + PacketTestUtils.testDeserializeBadInput(PPPoED.deserializer()); + } + + @Test + public void testTruncatedPacket() throws Exception { + byte[] byteHeader = ByteBuffer.allocate(6) + .put((byte) 0x11) // version/type + .put((byte) 0x09) // code + .putShort((short) 0x0000) // transaction id + .putShort((short) 0x0000) // payload length + .array(); + + PacketTestUtils.testDeserializeTruncated(PPPoED.deserializer(), byteHeader); + } + + @Test + public void testDeserializePadi() throws Exception { + byte[] data = Resources.toByteArray(PPPoEDTest.class.getResource(PADI)); + Ethernet eth = Ethernet.deserializer().deserialize(data, 0, data.length); + PPPoED pppoed = (PPPoED) eth.getPayload(); + assertPPPoEDHeader(pppoed, PPPoED.PPPOED_CODE_PADI); + assertEquals(NO_SESSION, pppoed.getSessionId()); + assertEquals(0, pppoed.getTags().size()); + } + + @Test + public void testDeserializePado() throws Exception { + byte[] data = Resources.toByteArray(PPPoEDTest.class.getResource(PADO)); + Ethernet eth = Ethernet.deserializer().deserialize(data, 0, data.length); + + PPPoED pppoed = (PPPoED) eth.getPayload(); + assertPPPoEDHeader(pppoed, PPPoED.PPPOED_CODE_PADO); + assertEquals(NO_SESSION, pppoed.getSessionId()); + + assertEquals(3, pppoed.getTags().size()); + + PPPoEDTag acName = pppoed.getTag(PPPoEDTag.PPPOED_TAG_AC_NAME); + assertArrayEquals(AC_NAME.getBytes(), acName.value); + + PPPoEDTag serviceName = pppoed.getTag(PPPoEDTag.PPPOED_TAG_SERVICE_NAME); + assertArrayEquals(SERVICE_NAME.getBytes(), serviceName.value); + + PPPoEDTag acCookie = pppoed.getTag(PPPoEDTag.PPPOED_TAG_AC_COOKIE); + assertEquals(AC_COOKIE, ByteBuffer.wrap(acCookie.value).getLong()); + } + + @Test + public void testDeserializePadr() throws Exception { + byte[] data = Resources.toByteArray(PPPoEDTest.class.getResource(PADR)); + Ethernet eth = Ethernet.deserializer().deserialize(data, 0, data.length); + + PPPoED pppoed = (PPPoED) eth.getPayload(); + assertPPPoEDHeader(pppoed, PPPoED.PPPOED_CODE_PADR); + assertEquals(NO_SESSION, pppoed.getSessionId()); + + assertEquals(1, pppoed.getTags().size()); + + PPPoEDTag acCookie = pppoed.getTag(PPPoEDTag.PPPOED_TAG_AC_COOKIE); + assertEquals(AC_COOKIE, ByteBuffer.wrap(acCookie.value).getLong()); + } + + @Test + public void testDeserializePads() throws Exception { + byte[] data = Resources.toByteArray(PPPoEDTest.class.getResource(PADS)); + Ethernet eth = Ethernet.deserializer().deserialize(data, 0, data.length); + + PPPoED pppoed = (PPPoED) eth.getPayload(); + assertPPPoEDHeader(pppoed, PPPoED.PPPOED_CODE_PADS); + assertEquals(SESSION, pppoed.getSessionId()); + + assertEquals(2, pppoed.getTags().size()); + PPPoEDTag acName = pppoed.getTag(PPPoEDTag.PPPOED_TAG_AC_NAME); + assertArrayEquals(AC_NAME.getBytes(), acName.value); + + PPPoEDTag acCookie = pppoed.getTag(PPPoEDTag.PPPOED_TAG_AC_COOKIE); + assertEquals(AC_COOKIE, ByteBuffer.wrap(acCookie.value).getLong()); + } + + @Test + public void testDeserializePadt() throws Exception { + byte[] data = Resources.toByteArray(PPPoEDTest.class.getResource(PADT)); + Ethernet eth = Ethernet.deserializer().deserialize(data, 0, data.length); + + PPPoED pppoed = (PPPoED) eth.getPayload(); + assertPPPoEDHeader(pppoed, PPPoED.PPPOED_CODE_PADT); + assertEquals(SESSION, pppoed.getSessionId()); + + assertEquals(1, pppoed.getTags().size()); + PPPoEDTag acCookie = pppoed.getTag(PPPoEDTag.PPPOED_TAG_AC_COOKIE); + assertEquals(AC_COOKIE, ByteBuffer.wrap(acCookie.value).getLong()); + } + + private void assertPPPoEDHeader(PPPoED pppoed, byte code) { + assertNotNull(pppoed); + assertEquals(VERSION, pppoed.getVersion()); + assertEquals(TYPE, pppoed.getType()); + assertEquals(code, pppoed.getCode()); + } + +} diff --git a/utils/misc/src/test/java/org/onlab/util/ImmutableByteSequenceTest.java b/utils/misc/src/test/java/org/onlab/util/ImmutableByteSequenceTest.java index 7e74328a198..f9c2a0ba538 100644 --- a/utils/misc/src/test/java/org/onlab/util/ImmutableByteSequenceTest.java +++ b/utils/misc/src/test/java/org/onlab/util/ImmutableByteSequenceTest.java @@ -25,6 +25,7 @@ import java.nio.ByteBuffer; import java.nio.ByteOrder; +import java.util.Arrays; import java.util.Random; import static java.lang.Integer.max; @@ -80,6 +81,107 @@ public void testCopy() throws Exception { assertThat(errStr, bsBuffer.asArray()[63], is(equalTo(byteValue))); } + @Test + public void testCopyAndFit() throws Exception { + int originalByteWidth = 3; + int paddedByteWidth = 4; + int trimmedByteWidth = 2; + int indexFirstNonZeroByte = 1; + + byte byteValue = (byte) 1; + byte[] arrayValue = new byte[originalByteWidth]; + arrayValue[indexFirstNonZeroByte] = byteValue; + ByteBuffer bufferValue = ByteBuffer.allocate(originalByteWidth).put(arrayValue); + + ImmutableByteSequence bsBuffer = ImmutableByteSequence.copyAndFit( + bufferValue, originalByteWidth * 8); + ImmutableByteSequence bsBufferTrimmed = ImmutableByteSequence.copyAndFit( + bufferValue, trimmedByteWidth * 8); + ImmutableByteSequence bsBufferPadded = ImmutableByteSequence.copyAndFit( + bufferValue, paddedByteWidth * 8); + + assertThat("byte sequence of the byte buffer must be 3 bytes long", + bsBuffer.size(), is(equalTo(originalByteWidth))); + assertThat("byte sequence of the byte buffer must be 3 bytes long", + bsBufferTrimmed.size(), is(equalTo(trimmedByteWidth))); + assertThat("byte sequence of the byte buffer must be 3 bytes long", + bsBufferPadded.size(), is(equalTo(paddedByteWidth))); + + String errStr = "incorrect byte sequence value"; + + assertThat(errStr, bsBuffer.asArray()[indexFirstNonZeroByte], is(equalTo(byteValue))); + assertThat(errStr, bsBufferTrimmed.asArray()[indexFirstNonZeroByte - 1], is(equalTo(byteValue))); + assertThat(errStr, bsBufferPadded.asArray()[indexFirstNonZeroByte + 1], is(equalTo(byteValue))); + assertThat(errStr, bsBufferPadded.asArray()[paddedByteWidth - 1], is(equalTo((byte) 0x00))); + } + + @Test + public void testCopyAndFitEndianness() throws Exception { + int originalByteWidth = 4; + int indexByteNonZeroBig = 1; + int indexByteNonZeroLittle = 2; + byte byteValue = (byte) 1; + + ByteBuffer bbBigEndian = ByteBuffer + .allocate(originalByteWidth) + .order(ByteOrder.BIG_ENDIAN); + bbBigEndian.put(indexByteNonZeroBig, byteValue); + ImmutableByteSequence bsBufferCopyBigEndian = + ImmutableByteSequence.copyAndFit(bbBigEndian, originalByteWidth * 8); + + ByteBuffer bbLittleEndian = ByteBuffer + .allocate(originalByteWidth) + .order(ByteOrder.LITTLE_ENDIAN); + bbLittleEndian.put(indexByteNonZeroLittle, byteValue); + ImmutableByteSequence bsBufferCopyLittleEndian = + ImmutableByteSequence.copyAndFit(bbLittleEndian, originalByteWidth * 8); + + // creates a new sequence from primitive type + byte[] arrayValue = new byte[originalByteWidth]; + arrayValue[indexByteNonZeroBig] = byteValue; + ImmutableByteSequence bsArrayCopy = + ImmutableByteSequence.copyFrom(arrayValue); + + new EqualsTester() + // big-endian byte array cannot be equal to little-endian array + .addEqualityGroup(bbBigEndian.array()) + .addEqualityGroup(bbLittleEndian.array()) + // all byte sequences must be equal + .addEqualityGroup(bsBufferCopyBigEndian, + bsBufferCopyLittleEndian, + bsArrayCopy) + // byte buffer views of all sequences must be equal + .addEqualityGroup(bsBufferCopyBigEndian.asReadOnlyBuffer(), + bsBufferCopyLittleEndian.asReadOnlyBuffer(), + bsArrayCopy.asReadOnlyBuffer()) + // byte buffer orders of all sequences must be ByteOrder.BIG_ENDIAN + .addEqualityGroup(bsBufferCopyBigEndian.asReadOnlyBuffer().order(), + bsBufferCopyLittleEndian.asReadOnlyBuffer().order(), + bsArrayCopy.asReadOnlyBuffer().order(), + ByteOrder.BIG_ENDIAN) + .testEquals(); + } + + @Test + public void testIllegalCopyAndFit() throws Exception { + int originalByteWidth = 3; + int trimmedByteWidth = 1; + int indexFirstNonZeroByte = 1; + + byte byteValue = (byte) 1; + byte[] arrayValue = new byte[originalByteWidth]; + arrayValue[indexFirstNonZeroByte] = byteValue; + ByteBuffer bufferValue = ByteBuffer.allocate(originalByteWidth).put(arrayValue); + + try { + ImmutableByteSequence.copyAndFit(bufferValue, trimmedByteWidth * 8); + Assert.fail(format("Expect ByteSequenceTrimException due to value = %s and bitWidth %d", + Arrays.toString(arrayValue), trimmedByteWidth * 8)); + } catch (ImmutableByteSequence.ByteSequenceTrimException e) { + // We expect this. + } + } + @Test public void testEndianness() throws Exception { @@ -274,4 +376,52 @@ public void testBitwiseOperations() { assertThat("Invalid bitwise XOR result", xorBs.asReadOnlyBuffer().getLong(), is(long1 ^ long2)); } + + @Test + public void testCanonical() { + ImmutableByteSequence bs = ImmutableByteSequence.copyFrom(0x000000ff); + ImmutableByteSequence canonicalBs = bs.canonical(); + assertThat("Incorrect size", canonicalBs.size(), is(1)); + ByteBuffer bb = canonicalBs.asReadOnlyBuffer(); + assertThat("Incorrect byte buffer position", bb.position(), is(3)); + + bs = ImmutableByteSequence.copyFrom(0x100000ff); + canonicalBs = bs.canonical(); + assertThat("Incorrect size", canonicalBs.size(), is(4)); + bb = canonicalBs.asReadOnlyBuffer(); + assertThat("Incorrect byte buffer position", bb.position(), is(0)); + + bs = ImmutableByteSequence.copyFrom(0x00000000ff0000ffL); + canonicalBs = bs.canonical(); + assertThat("Incorrect size", canonicalBs.size(), is(4)); + bb = canonicalBs.asReadOnlyBuffer(); + assertThat("Incorrect byte buffer position", bb.position(), is(4)); + + bs = ImmutableByteSequence.copyFrom(0); + canonicalBs = bs.canonical(); + assertThat("Incorrect size", canonicalBs.size(), is(1)); + bb = canonicalBs.asReadOnlyBuffer(); + assertThat("Incorrect byte buffer position", bb.position(), is(3)); + + bs = ImmutableByteSequence.copyFrom(0L); + canonicalBs = bs.canonical(); + assertThat("Incorrect size", canonicalBs.size(), is(1)); + bb = canonicalBs.asReadOnlyBuffer(); + assertThat("Incorrect byte buffer position", bb.position(), is(7)); + + new EqualsTester() + .addEqualityGroup( + ImmutableByteSequence.copyFrom(0x000000ff).canonical(), + ImmutableByteSequence.copyFrom((short) 0x00ff).canonical()) + .addEqualityGroup( + ImmutableByteSequence.copyFrom(0x000001ff).canonical(), + ImmutableByteSequence.copyFrom(0x00000000000001ffL).canonical()) + .addEqualityGroup( + ImmutableByteSequence.copyFrom(0xc00001ff).canonical(), + ImmutableByteSequence.copyFrom(0x00000000c00001ffL).canonical()) + .addEqualityGroup( + ImmutableByteSequence.copyFrom(0).canonical(), + ImmutableByteSequence.copyFrom(0L).canonical()) + .testEquals(); + } } diff --git a/utils/misc/src/test/resources/org/onlab/packet/pppoed/padi.bin b/utils/misc/src/test/resources/org/onlab/packet/pppoed/padi.bin new file mode 100644 index 00000000000..46daf26df9a Binary files /dev/null and b/utils/misc/src/test/resources/org/onlab/packet/pppoed/padi.bin differ diff --git a/utils/misc/src/test/resources/org/onlab/packet/pppoed/pado.bin b/utils/misc/src/test/resources/org/onlab/packet/pppoed/pado.bin new file mode 100644 index 00000000000..c40ec4610c5 Binary files /dev/null and b/utils/misc/src/test/resources/org/onlab/packet/pppoed/pado.bin differ diff --git a/utils/misc/src/test/resources/org/onlab/packet/pppoed/padr.bin b/utils/misc/src/test/resources/org/onlab/packet/pppoed/padr.bin new file mode 100644 index 00000000000..7b742cee85c Binary files /dev/null and b/utils/misc/src/test/resources/org/onlab/packet/pppoed/padr.bin differ diff --git a/utils/misc/src/test/resources/org/onlab/packet/pppoed/pads.bin b/utils/misc/src/test/resources/org/onlab/packet/pppoed/pads.bin new file mode 100644 index 00000000000..0709d805d45 Binary files /dev/null and b/utils/misc/src/test/resources/org/onlab/packet/pppoed/pads.bin differ diff --git a/utils/misc/src/test/resources/org/onlab/packet/pppoed/padt.bin b/utils/misc/src/test/resources/org/onlab/packet/pppoed/padt.bin new file mode 100644 index 00000000000..9ecf018e833 Binary files /dev/null and b/utils/misc/src/test/resources/org/onlab/packet/pppoed/padt.bin differ diff --git a/utils/osgiwrap/src/main/java/org/onlab/osgiwrap/OSGiWrapper.java b/utils/osgiwrap/src/main/java/org/onlab/osgiwrap/OSGiWrapper.java index 2bdc2b360ff..aaba624c8fb 100644 --- a/utils/osgiwrap/src/main/java/org/onlab/osgiwrap/OSGiWrapper.java +++ b/utils/osgiwrap/src/main/java/org/onlab/osgiwrap/OSGiWrapper.java @@ -26,13 +26,12 @@ import com.google.common.base.Joiner; import com.google.common.base.MoreObjects; import com.google.common.collect.Lists; -import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.google.common.io.ByteStreams; -import org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin; import java.io.File; import java.io.FileInputStream; +import java.io.FileOutputStream; import java.io.IOException; import java.nio.file.FileVisitResult; import java.nio.file.FileVisitor; @@ -48,6 +47,7 @@ import java.util.Set; import java.util.jar.JarEntry; import java.util.jar.JarInputStream; +import java.util.jar.JarOutputStream; import java.util.jar.Manifest; import static com.google.common.io.Files.createParentDirs; @@ -55,9 +55,14 @@ import static java.nio.file.Files.walkFileTree; /** - * BND-based wrapper to convert Buck JARs to OSGi-compatible JARs. + * BND-based wrapper to convert Buck/Bazel JARs to OSGi-compatible JARs. */ public class OSGiWrapper { + // Resources that need to be modified in the original jar + private static final String _CFGDEF_JAR = "_cfgdef.jar"; + private static final String MODEL_SRCJAR = "model.srcjar"; + private static final String SCHEMA_JAR = "schema.jar"; + private static final String NONE = "NONE"; private String inputJar; @@ -87,10 +92,11 @@ public class OSGiWrapper { private String karafCommands; private String fragmentHost; + private boolean debug; // FIXME should consider using Commons CLI, etc. public static void main(String[] args) { - if (args.length < 17) { + if (args.length < 18) { System.err.println("Not enough args"); System.exit(1); } @@ -112,7 +118,8 @@ public static void main(String[] args) { String bundleClasspath = args[14]; String karafCommands = args[15]; String fragmentHost = args[16]; - String desc = Joiner.on(' ').join(Arrays.copyOfRange(args, 17, args.length)); + String debug = args[17]; + String desc = Joiner.on(' ').join(Arrays.copyOfRange(args, 18, args.length)); OSGiWrapper wrapper = new OSGiWrapper(jar, output, cp, name, group, @@ -126,7 +133,8 @@ public static void main(String[] args) { destdir, bundleClasspath, karafCommands, - fragmentHost); + fragmentHost, + debug); wrapper.log(wrapper + "\n"); if (!wrapper.execute()) { System.err.printf("Error generating %s\n", name); @@ -152,7 +160,8 @@ public OSGiWrapper(String inputJar, String destdir, String bundleClasspath, String karafCommands, - String fragmentHost) { + String fragmentHost, + String debug) { this.inputJar = inputJar; this.classpath = Lists.newArrayList(classpath.split(":")); if (!this.classpath.contains(inputJar)) { @@ -186,6 +195,7 @@ public OSGiWrapper(String inputJar, this.karafCommands = karafCommands; this.fragmentHost = fragmentHost; + this.debug = Boolean.parseBoolean(debug); } private void setProperties(Analyzer analyzer) { @@ -228,8 +238,8 @@ private void setProperties(Analyzer analyzer) { public boolean execute() { Analyzer analyzer = new Builder(); try { - // Extract the input jar contents into the specified output directory - expandJar(inputJar, new File(destdir)); + // Sanitize the input jar content + inputJar = modifyJar(inputJar); Jar jar = new Jar(new File(inputJar)); // where our data is analyzer.setJar(jar); // give bnd the contents @@ -246,15 +256,6 @@ public boolean execute() { // Analyze the target JAR first analyzer.analyze(); - //// Scan the JAR for Felix SCR annotations and generate XML files - //Map properties = Maps.newHashMap(); - //// destdir hack - //properties.put("destdir", destdir); - //SCRDescriptorBndPlugin scrDescriptorBndPlugin = new SCRDescriptorBndPlugin(); - //scrDescriptorBndPlugin.setProperties(properties); - //scrDescriptorBndPlugin.setReporter(analyzer); - //scrDescriptorBndPlugin.analyzeJar(analyzer); - if (includeResources != null) { doIncludeResources(analyzer); } @@ -287,24 +288,64 @@ public boolean execute() { } } - // Expands the specified jar file into the given directory - private void expandJar(String inputJar, File intoDir) throws IOException { - try (JarInputStream jis = new JarInputStream(new FileInputStream(inputJar))) { + // Extract the jar and melds its content with the jar produced by Bazel + private void addJarToJar(JarEntry entryJar, JarInputStream jis, JarOutputStream jos) throws IOException { + File file = new File(new File(destdir), entryJar.getName()); + byte[] data = ByteStreams.toByteArray(jis); + createParentDirs(file); + write(data, file); + // Entry jar input stream which points to the inner jar resources (cfgdef, model,...) + try (JarInputStream innerJis = new JarInputStream(new FileInputStream(file))) { JarEntry entry; + byte[] byteBuff = new byte[1024]; + while ((entry = innerJis.getNextJarEntry()) != null) { + if (!entry.isDirectory()) { + if (!entry.getName().contains("..")) { + jos.putNextEntry(entry); + for (int bytesRead; (bytesRead = innerJis.read(byteBuff)) != -1; ) { + jos.write(byteBuff, 0, bytesRead); + } + } else { + throw new IOException("Jar " + entryJar + " is corrupted"); + } + } + innerJis.closeEntry(); + } + } + } + + // Modify the specified jar to fix the resource_jars loaded by Bazel. + // Starting from Bazel 5, resource_jars are no longer supported and + // we have to load them as resources. This means that we expand them + // and we set the right path in OSGi-compatible JAR. + private String modifyJar(String inputJar) throws IOException { + // libonos-xxx input and libonos-xxx-new which is the sanitized final jar + try (JarInputStream jis = new JarInputStream(new FileInputStream(inputJar)); + JarOutputStream jos = new JarOutputStream(new FileOutputStream(inputJar + "new"))) { + JarEntry entry; + byte[] byteBuff = new byte[1024]; while ((entry = jis.getNextJarEntry()) != null) { if (!entry.isDirectory()) { - byte[] data = ByteStreams.toByteArray(jis); - jis.closeEntry(); if (!entry.getName().contains("..")) { - File file = new File(intoDir, entry.getName()); - createParentDirs(file); - write(data, file); + // We add the content but we don't write them again in the new jar + if (entry.getName().contains(bundleName + OSGiWrapper._CFGDEF_JAR) || + entry.getName().contains(SCHEMA_JAR) || + entry.getName().contains(MODEL_SRCJAR)) { + addJarToJar(entry, jis, jos); + } else { + jos.putNextEntry(entry); + for (int bytesRead; (bytesRead = jis.read(byteBuff)) != -1; ) { + jos.write(byteBuff, 0, bytesRead); + } + } } else { - throw new IOException("Corrupt jar file"); + throw new IOException("Jar " + inputJar + " is corrupted"); } } + jis.closeEntry(); } } + return inputJar + "new"; } private boolean isWab() { @@ -399,10 +440,10 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO } } - private boolean addFileToJar(Jar jar, String destination, String sourceAbsPath) throws IOException { + private void addFileToJar(Jar jar, String destination, String sourceAbsPath) throws IOException { if (includedResources.contains(sourceAbsPath)) { log("Skipping already included resource: %s\n", sourceAbsPath); - return false; + return; } File file = new File(sourceAbsPath); if (!file.isFile()) { @@ -412,16 +453,17 @@ private boolean addFileToJar(Jar jar, String destination, String sourceAbsPath) Resource resource = new FileResource(file); if (jar.getResource(destination) != null) { warn("Skipping duplicate resource: %s\n", destination); - return false; + return; } jar.putResource(destination, resource); includedResources.add(sourceAbsPath); log("Adding resource: %s\n", destination); - return true; } private void log(String format, Object... objects) { - //System.err.printf(format, objects); + if (debug) { + System.out.printf(format, objects); + } } private void warn(String format, Object... objects) { diff --git a/web/api/src/main/java/org/onosproject/rest/resources/ApplicationsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/ApplicationsWebResource.java index b2ee977ff8d..3787113dd9c 100644 --- a/web/api/src/main/java/org/onosproject/rest/resources/ApplicationsWebResource.java +++ b/web/api/src/main/java/org/onosproject/rest/resources/ApplicationsWebResource.java @@ -39,7 +39,9 @@ import java.io.InputStream; import java.net.URL; import java.util.Set; +import org.slf4j.Logger; +import static org.slf4j.LoggerFactory.getLogger; import static org.onlab.util.Tools.nullIsNotFound; import static org.onlab.util.Tools.readTreeFromStream; @@ -49,6 +51,9 @@ @Path("applications") public class ApplicationsWebResource extends AbstractWebResource { + private static final Logger log = getLogger(ApplicationsWebResource.class); + + private static final String APP_ID_NOT_FOUND = "Application ID is not found"; private static final String APP_NOT_FOUND = "Application is not found"; private static final String APP_READY = "ready"; @@ -83,7 +88,7 @@ public Response getApps() { @Path("{name}") public Response getApp(@PathParam("name") String name) { ApplicationAdminService service = get(ApplicationAdminService.class); - ApplicationId appId = nullIsNotFound(service.getId(name), APP_NOT_FOUND); + ApplicationId appId = nullIsNotFound(service.getId(name), APP_NOT_FOUND + ":" + name); return response(service, appId); } @@ -97,10 +102,14 @@ public Response getApp(@PathParam("name") String name) { @Path("{name}/health") public Response health(@PathParam("name") String name) { ApplicationAdminService service = get(ApplicationAdminService.class); - ApplicationId appId = nullIsNotFound(service.getId(name), APP_NOT_FOUND); + ApplicationId appId = service.getId(name); + nullIsNotFound(appId, APP_ID_NOT_FOUND + ": " + name); + + Application app = service.getApplication(appId); + nullIsNotFound(app, APP_NOT_FOUND + ": " + appId); ComponentsMonitorService componentsMonitorService = get(ComponentsMonitorService.class); - boolean ready = componentsMonitorService.isFullyStarted(service.getApplication(appId).features()); + boolean ready = componentsMonitorService.isFullyStarted(app.features()); return Response.ok(mapper().createObjectNode().put("message", ready ? APP_READY : APP_PENDING)).build(); } @@ -193,7 +202,7 @@ public Response uninstallApp(@PathParam("name") String name) { @Path("{name}/active") public Response activateApp(@PathParam("name") String name) { ApplicationAdminService service = get(ApplicationAdminService.class); - ApplicationId appId = nullIsNotFound(service.getId(name), APP_NOT_FOUND); + ApplicationId appId = nullIsNotFound(service.getId(name), APP_NOT_FOUND + ": " + name); service.activate(appId); return response(service, appId); } @@ -245,7 +254,7 @@ public Response registerAppId(@PathParam("name") String name) { @Path("{name}/bits") public Response getAppBits(@PathParam("name") String name) { ApplicationAdminService service = get(ApplicationAdminService.class); - ApplicationId appId = nullIsNotFound(service.getId(name), APP_ID_NOT_FOUND); + ApplicationId appId = nullIsNotFound(service.getId(name), APP_ID_NOT_FOUND + ": " + name); InputStream bits = service.getApplicationArchive(appId); return ok(bits).build(); } @@ -290,12 +299,13 @@ public Response getAppIds() { } private Response response(ApplicationAdminService service, ApplicationId appId) { - Application app = nullIsNotFound(service.getApplication(appId), APP_NOT_FOUND); + Application app = nullIsNotFound(service.getApplication(appId), + APP_NOT_FOUND + ": " + appId); return ok(codec(Application.class).encode(app, this)).build(); } private Response response(ApplicationId appId) { - ApplicationId checkedAppId = nullIsNotFound(appId, APP_ID_NOT_FOUND); + ApplicationId checkedAppId = nullIsNotFound(appId, APP_ID_NOT_FOUND + ": " + appId); return ok(codec(ApplicationId.class).encode(checkedAppId, this)).build(); } } diff --git a/web/api/src/main/java/org/onosproject/rest/resources/IntentsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/IntentsWebResource.java index 297f70e5181..4a76749afe2 100644 --- a/web/api/src/main/java/org/onosproject/rest/resources/IntentsWebResource.java +++ b/web/api/src/main/java/org/onosproject/rest/resources/IntentsWebResource.java @@ -17,14 +17,11 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; +import org.onosproject.codec.JsonCodec; import org.onosproject.core.ApplicationId; import org.onosproject.core.CoreService; import org.onosproject.net.flow.FlowEntry; import org.onosproject.net.flow.FlowRuleService; -import org.onosproject.net.intent.SinglePointToMultiPointIntent; -import org.onosproject.net.intent.MultiPointToSinglePointIntent; -import org.onosproject.net.intent.PointToPointIntent; -import org.onosproject.net.intent.HostToHostIntent; import org.onosproject.net.intent.Intent; import org.onosproject.net.intent.IntentState; import org.onosproject.net.intent.IntentEvent; @@ -43,6 +40,7 @@ import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @@ -53,6 +51,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.Optional; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -72,14 +71,7 @@ public class IntentsWebResource extends AbstractWebResource { private static final int WITHDRAW_EVENT_TIMEOUT_SECONDS = 5; private static final String APP_ID_NOT_FOUND = "Application Id not found"; - private static final String HOST_TO_HOST_INTENT = "HostToHostIntent"; - private static final String POINT_TO_POINT_INTENT = "PointToPointIntent"; - private static final String SINGLE_TO_MULTI_POINT_INTENT = - "SinglePointToMultiPointIntent"; - private static final String MULTI_TO_SINGLE_POINT_INTENT = - "MultiPointToSinglePointIntent"; - - private static final String INTENT = "Intent"; + private static final String INTENTS = "intents"; private static final String APP_ID = "appId"; private static final String ID = "id"; private static final String INTENT_PATHS = "paths"; @@ -89,18 +81,38 @@ public class IntentsWebResource extends AbstractWebResource { @Context private UriInfo uriInfo; + /** + * Returns the JSON codec for the specified intent. + * + * @param intent the intent instance + * @return JSON codec + */ + public JsonCodec codec(Intent intent) { + return Optional.ofNullable((JsonCodec) codec(intent.getClass())) + .orElse(codec(Intent.class)); + } + /** * Gets all intents. * Returns array containing all the intents in the system. + * @param detail flag to return full details of intents in list. * * @return 200 OK with array of all the intents in the system * @onos.rsModel Intents */ @GET @Produces(MediaType.APPLICATION_JSON) - public Response getIntents() { + public Response getIntents(@QueryParam("detail") boolean detail) { + ObjectNode root = null; final Iterable intents = get(IntentService.class).getIntents(); - final ObjectNode root = encodeArray(Intent.class, "intents", intents); + if (detail) { + root = mapper().createObjectNode(); + ArrayNode intentsNode = root.putArray(INTENTS); + intents.forEach(intent -> intentsNode.add(codec(intent).encode(intent, this))); + } else { + root = encodeArray(Intent.class, INTENTS, intents); + } + return ok(root).build(); } @@ -179,18 +191,37 @@ public Response getIntentById(@PathParam("appId") String appId, } nullIsNotFound(intent, INTENT_NOT_FOUND); - final ObjectNode root; - if (intent instanceof HostToHostIntent) { - root = codec(HostToHostIntent.class).encode((HostToHostIntent) intent, this); - } else if (intent instanceof PointToPointIntent) { - root = codec(PointToPointIntent.class).encode((PointToPointIntent) intent, this); - } else if (intent instanceof SinglePointToMultiPointIntent) { - root = codec(SinglePointToMultiPointIntent.class).encode((SinglePointToMultiPointIntent) intent, this); - } else if (intent instanceof MultiPointToSinglePointIntent) { - root = codec(MultiPointToSinglePointIntent.class).encode((MultiPointToSinglePointIntent) intent, this); + final ObjectNode root = codec(intent).encode(intent, this); + + return ok(root).build(); + } + + /** + * Gets intents by application. + * Returns the intents specified by the application id. + * @param detail flag to return full details of intents in list. + * + * @param appId application identifier + * @return 200 OK with a collection of intents of given application id + * @onos.rsModel Intents + */ + @GET + @Produces(MediaType.APPLICATION_JSON) + @Path("application/{appId}") + public Response getIntentsByAppId(@PathParam("appId") String appId, @QueryParam("detail") boolean detail) { + final ApplicationId app = get(CoreService.class).getAppId(appId); + nullIsNotFound(app, APP_ID_NOT_FOUND); + + final Iterable intents = get(IntentService.class).getIntentsByAppId(app); + ObjectNode root = null; + if (detail) { + root = mapper().createObjectNode(); + ArrayNode intentsNode = root.putArray(INTENTS); + intents.forEach(intent -> intentsNode.add(codec(intent).encode(intent, this))); } else { - root = codec(Intent.class).encode(intent, this); + root = encodeArray(Intent.class, INTENTS, intents); } + return ok(root).build(); } @@ -230,17 +261,7 @@ public Response getIntentFlowsById(@PathParam("appId") String appId, List installables = intentService.getInstallableIntents(intent.key()); - if (intent instanceof HostToHostIntent) { - root.put(INTENT_TYPE, HOST_TO_HOST_INTENT); - } else if (intent instanceof PointToPointIntent) { - root.put(INTENT_TYPE, POINT_TO_POINT_INTENT); - } else if (intent instanceof SinglePointToMultiPointIntent) { - root.put(INTENT_TYPE, SINGLE_TO_MULTI_POINT_INTENT); - } else if (intent instanceof MultiPointToSinglePointIntent) { - root.put(INTENT_TYPE, MULTI_TO_SINGLE_POINT_INTENT); - } else { - root.put(INTENT_TYPE, INTENT); - } + root.put(INTENT_TYPE, intent.getClass().getSimpleName()); ArrayNode pathsNode = root.putArray(INTENT_PATHS); diff --git a/web/api/src/main/java/org/onosproject/rest/resources/MetersWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/MetersWebResource.java index 93d924af067..0f423a4e6e2 100644 --- a/web/api/src/main/java/org/onosproject/rest/resources/MetersWebResource.java +++ b/web/api/src/main/java/org/onosproject/rest/resources/MetersWebResource.java @@ -18,15 +18,20 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; +import org.onosproject.core.ApplicationId; +import org.onosproject.core.CoreService; import org.onosproject.net.DeviceId; import org.onosproject.net.device.DeviceService; import org.onosproject.net.meter.DefaultMeterRequest; import org.onosproject.net.meter.Meter; +import org.onosproject.net.meter.MeterCellId; import org.onosproject.net.meter.MeterId; import org.onosproject.net.meter.MeterRequest; +import org.onosproject.net.meter.MeterScope; import org.onosproject.net.meter.MeterService; +import org.onosproject.net.pi.model.PiMeterId; +import org.onosproject.net.pi.runtime.PiMeterCellId; import org.onosproject.rest.AbstractWebResource; -import org.slf4j.Logger; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; @@ -45,7 +50,6 @@ import static org.onlab.util.Tools.nullIsNotFound; import static org.onlab.util.Tools.readTreeFromStream; -import static org.slf4j.LoggerFactory.getLogger; /** * Query and program meter rules. @@ -56,13 +60,15 @@ public class MetersWebResource extends AbstractWebResource { @Context private UriInfo uriInfo; - private final Logger log = getLogger(getClass()); private static final String DEVICE_INVALID = "Invalid deviceId in meter creation request"; private static final String METER_NOT_FOUND = "Meter is not found for "; private final ObjectNode root = mapper().createObjectNode(); private final ArrayNode metersNode = root.putArray("meters"); + private static final String REST_APP_ID = "org.onosproject.rest"; + private ApplicationId applicationId; + /** * Returns all meters of all devices. * @@ -114,15 +120,71 @@ public Response getMetersByDeviceId(@PathParam("deviceId") String deviceId) { public Response getMeterByDeviceIdAndMeterId(@PathParam("deviceId") String deviceId, @PathParam("meterId") String meterId) { DeviceId did = DeviceId.deviceId(deviceId); - MeterId mid = MeterId.meterId(Long.valueOf(meterId)); + MeterCellId mid = MeterId.meterId(Long.valueOf(meterId)); MeterService meterService = get(MeterService.class); final Meter meter = nullIsNotFound(meterService.getMeter(did, mid), - METER_NOT_FOUND + mid.id()); + METER_NOT_FOUND + mid); + + metersNode.add(codec(Meter.class).encode(meter, this)); + return ok(root).build(); + } + + /** + * Returns a meter by the meter cell id. + * + * @param deviceId device identifier + * @param scope scope identifier + * @param index index + * @return 200 OK with a meter, return 404 if no entry has been found + * @onos.rsModel Meter + */ + @GET + @Produces(MediaType.APPLICATION_JSON) + @Path("{deviceId}/{scope}/{index}") + public Response getMeterByDeviceIdAndMeterCellId(@PathParam("deviceId") String deviceId, + @PathParam("scope") String scope, + @PathParam("index") String index) { + DeviceId did = DeviceId.deviceId(deviceId); + MeterScope meterScope = MeterScope.of(scope); + long meterIndex = Long.parseLong(index); + MeterCellId meterCellId; + if (meterScope.equals(MeterScope.globalScope())) { + meterCellId = MeterId.meterId(meterIndex); + } else { + meterCellId = PiMeterCellId.ofIndirect(PiMeterId.of(meterScope.id()), meterIndex); + } + + MeterService meterService = get(MeterService.class); + final Meter meter = nullIsNotFound(meterService.getMeter(did, meterCellId), + METER_NOT_FOUND + meterCellId); metersNode.add(codec(Meter.class).encode(meter, this)); return ok(root).build(); } + /** + * Returns a collection of meters by the device id and meter scope. + * + * @param deviceId device identifier + * @param scope scope identifier + * @return 200 OK with array of meters which belongs to specified device + * @onos.rsModel Meters + */ + @GET + @Produces(MediaType.APPLICATION_JSON) + @Path("scope/{deviceId}/{scope}") + public Response getMetersByDeviceIdAndScope(@PathParam("deviceId") String deviceId, + @PathParam("scope") String scope) { + DeviceId did = DeviceId.deviceId(deviceId); + MeterScope meterScope = MeterScope.of(scope); + MeterService meterService = get(MeterService.class); + final Iterable meters = meterService.getMeters(did, meterScope); + if (meters != null) { + meters.forEach(meter -> metersNode.add(codec(Meter.class).encode(meter, this))); + } + return ok(root).build(); + } + /** * Creates new meter rule. Creates and installs a new meter rule for the * specified device. @@ -170,7 +232,7 @@ public Response createMeter(@PathParam("deviceId") String deviceId, } /** - * Removes the specified meter. + * Removes the meter by device id and meter id. * * @param deviceId device identifier * @param meterId meter identifier @@ -179,65 +241,56 @@ public Response createMeter(@PathParam("deviceId") String deviceId, @DELETE @Path("{deviceId}/{meterId}") public Response deleteMeterByDeviceIdAndMeterId(@PathParam("deviceId") String deviceId, - @PathParam("meterId") String meterId) { + @PathParam("meterId") String meterId) { DeviceId did = DeviceId.deviceId(deviceId); - MeterId mid = MeterId.meterId(Long.valueOf(meterId)); + MeterCellId mid = MeterId.meterId(Long.valueOf(meterId)); + MeterRequest meterRequest = deleteRequest(did); MeterService meterService = get(MeterService.class); - final Meter tmpMeter = meterService.getMeter(did, mid); - if (tmpMeter != null) { - final MeterRequest meterRequest = meterToMeterRequest(tmpMeter, "REMOVE"); - if (meterRequest != null) { - meterService.withdraw(meterRequest, tmpMeter.id()); - } - } else { - log.warn("Meter {}, is not present", tmpMeter); - } + meterService.withdraw(meterRequest, mid); + return Response.noContent().build(); } /** - * Converts a meter instance to meterRequest instance with a certain operation. + * Removes the meter by the device id and meter cell id. * - * @param meter meter instance - * @param operation operation - * @return converted meterRequest instance + * @param deviceId device identifier + * @param scope scope identifier + * @param index index + * @return 204 NO CONTENT */ - private MeterRequest meterToMeterRequest(Meter meter, String operation) { - MeterRequest.Builder builder; - MeterRequest meterRequest; - - if (meter == null) { - return null; - } - - if (meter.isBurst()) { - builder = DefaultMeterRequest.builder() - .fromApp(meter.appId()) - .forDevice(meter.deviceId()) - .withUnit(meter.unit()) - .withBands(meter.bands()) - .burst(); + @DELETE + @Path("{deviceId}/{scope}/{index}") + public Response deleteMeterByDeviceIdAndMeterCellId(@PathParam("deviceId") String deviceId, + @PathParam("scope") String scope, + @PathParam("index") String index) { + DeviceId did = DeviceId.deviceId(deviceId); + MeterScope meterScope = MeterScope.of(scope); + long meterIndex = Long.parseLong(index); + MeterCellId meterCellId; + if (meterScope.equals(MeterScope.globalScope())) { + meterCellId = MeterId.meterId(meterIndex); } else { - builder = DefaultMeterRequest.builder() - .fromApp(meter.appId()) - .forDevice(meter.deviceId()) - .withUnit(meter.unit()) - .withBands(meter.bands()); + meterCellId = PiMeterCellId.ofIndirect(PiMeterId.of(meterScope.id()), meterIndex); } + MeterRequest meterRequest = deleteRequest(did); + + MeterService meterService = get(MeterService.class); + meterService.withdraw(meterRequest, meterCellId); + + return Response.noContent().build(); + } - switch (operation) { - case "ADD": - meterRequest = builder.add(); - break; - case "REMOVE": - meterRequest = builder.remove(); - break; - default: - log.warn("Invalid operation {}.", operation); - return null; + private MeterRequest deleteRequest(DeviceId did) { + CoreService coreService = getService(CoreService.class); + if (applicationId == null) { + applicationId = coreService.registerApplication(REST_APP_ID); } - return meterRequest; + return DefaultMeterRequest.builder() + .forDevice(did) + .fromApp(applicationId) + .remove(); } } diff --git a/web/api/src/test/java/org/onosproject/rest/resources/IntentsResourceTest.java b/web/api/src/test/java/org/onosproject/rest/resources/IntentsResourceTest.java index 318f90d36ce..7867ab6a41f 100644 --- a/web/api/src/test/java/org/onosproject/rest/resources/IntentsResourceTest.java +++ b/web/api/src/test/java/org/onosproject/rest/resources/IntentsResourceTest.java @@ -39,6 +39,8 @@ import org.onosproject.net.ConnectPoint; import org.onosproject.net.DefaultLink; import org.onosproject.net.DeviceId; +import org.onosproject.net.FilteredConnectPoint; +import org.onosproject.net.HostId; import org.onosproject.net.Link; import org.onosproject.net.NetworkResource; import org.onosproject.net.PortNumber; @@ -54,14 +56,17 @@ import org.onosproject.net.flow.TrafficTreatment; import org.onosproject.net.flow.criteria.Criterion; import org.onosproject.net.flow.instructions.Instruction; +import org.onosproject.net.intent.ConnectivityIntent; import org.onosproject.net.intent.FakeIntentManager; import org.onosproject.net.intent.FlowRuleIntent; +import org.onosproject.net.intent.HostToHostIntent; import org.onosproject.net.intent.Intent; import org.onosproject.net.intent.IntentService; import org.onosproject.net.intent.IntentState; import org.onosproject.net.intent.Key; import org.onosproject.net.intent.MockIdGenerator; import org.onosproject.net.intent.PathIntent; +import org.onosproject.net.intent.PointToPointIntent; import org.onosproject.net.provider.ProviderId; @@ -85,6 +90,7 @@ import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; +import static org.onosproject.net.NetTestTools.hid; import static org.onosproject.net.intent.IntentTestsMocks.MockIntent; /** @@ -116,6 +122,10 @@ public class IntentsResourceTest extends ResourceTest { final HashSet intents = new HashSet<>(); final List installableIntents = new ArrayList<>(); private static final ApplicationId APP_ID = new DefaultApplicationId(1, "test"); + private static final ApplicationId APP_ID_2 = new DefaultApplicationId(2, "test2"); + + private final HostId hostId1 = hid("12:34:56:78:91:ab/1"); + private final HostId hostId2 = hid("12:34:56:78:92:ab/1"); final DeviceId deviceId1 = DeviceId.deviceId("1"); final DeviceId deviceId2 = DeviceId.deviceId("2"); @@ -364,12 +374,18 @@ public boolean exactMatch(FlowRule rule) { */ public static class IntentJsonMatcher extends TypeSafeMatcher { private final Intent intent; + private boolean detail = false; private String reason = ""; public IntentJsonMatcher(Intent intentValue) { intent = intentValue; } + public IntentJsonMatcher(Intent intentValue, boolean detailValue) { + intent = intentValue; + detail = detailValue; + } + @Override public boolean matchesSafely(JsonObject jsonIntent) { // check id @@ -449,9 +465,139 @@ public boolean matchesSafely(JsonObject jsonIntent) { reason = "resources array empty"; return false; } + + if (intent instanceof ConnectivityIntent && detail) { + return matchConnectivityIntent(jsonIntent); + } + + return true; + } + + public boolean matchesConnectPoint(ConnectPoint connectPoint, JsonObject jsonConnectPoint) { + // check device + final String jsonDevice = jsonConnectPoint.get("device").asString(); + final String device = connectPoint.deviceId().toString(); + if (!jsonDevice.equals(device)) { + reason = "device was " + jsonDevice; + return false; + } + + // check port + final String jsonPort = jsonConnectPoint.get("port").asString(); + final String port = connectPoint.port().toString(); + if (!jsonPort.equals(port)) { + reason = "port was " + jsonPort; + return false; + } + + return true; + } + + private boolean matchHostToHostIntent(JsonObject jsonIntent) { + final HostToHostIntent hostToHostIntent = (HostToHostIntent) intent; + + // check host one + final String host1 = hostToHostIntent.one().toString(); + final String jsonHost1 = jsonIntent.get("one").asString(); + if (!host1.equals(jsonHost1)) { + reason = "host one was " + jsonHost1; + return false; + } + + // check host 2 + final String host2 = hostToHostIntent.two().toString(); + final String jsonHost2 = jsonIntent.get("two").asString(); + if (!host2.equals(jsonHost2)) { + reason = "host two was " + jsonHost2; + return false; + } return true; } + /** + * Matches the JSON representation of a point to point intent. + * + * @param jsonIntent JSON representation of the intent + * @return true if the JSON matches the intent, false otherwise + */ + private boolean matchPointToPointIntent(JsonObject jsonIntent) { + final PointToPointIntent pointToPointIntent = (PointToPointIntent) intent; + + // check ingress connection + final ConnectPoint ingress = pointToPointIntent.filteredIngressPoint().connectPoint(); + final JsonObject jsonIngress = jsonIntent.get("ingressPoint").asObject(); + final boolean ingressMatches = matchesConnectPoint(ingress, jsonIngress); + + if (!ingressMatches) { + reason = "ingress was " + jsonIngress; + return false; + } + + // check egress connection + final ConnectPoint egress = pointToPointIntent.filteredEgressPoint().connectPoint(); + final JsonObject jsonEgress = jsonIntent.get("egressPoint").asObject(); + final boolean egressMatches = matchesConnectPoint(egress, jsonEgress); + + if (!egressMatches) { + reason = "egress was " + jsonEgress; + return false; + } + + return true; + } + + /** + * Matches the JSON representation of a connectivity intent. Calls the + * matcher for the connectivity intent subtype. + * + * @param jsonIntent JSON representation of the intent + * @return true if the JSON matches the intent, false otherwise + */ + private boolean matchConnectivityIntent(JsonObject jsonIntent) { + final ConnectivityIntent connectivityIntent = (ConnectivityIntent) intent; + + // check selector + final JsonObject jsonSelector = jsonIntent.get("selector").asObject(); + final TrafficSelector selector = connectivityIntent.selector(); + final Set criteria = selector.criteria(); + final JsonArray jsonCriteria = jsonSelector.get("criteria").asArray(); + if (jsonCriteria.size() != criteria.size()) { + reason = "size of criteria array is " + Integer.toString(jsonCriteria.size()); + return false; + } + + // check treatment + final JsonObject jsonTreatment = jsonIntent.get("treatment").asObject(); + final TrafficTreatment treatment = connectivityIntent.treatment(); + final List instructions = treatment.immediate(); + final JsonArray jsonInstructions = jsonTreatment.get("instructions").asArray(); + if (jsonInstructions.size() != instructions.size()) { + reason = "size of instructions array is " + Integer.toString(jsonInstructions.size()); + return false; + } + + // Check constraints + final JsonArray jsonConstraints = jsonIntent.get("constraints").asArray(); + if (connectivityIntent.constraints() != null) { + if (connectivityIntent.constraints().size() != jsonConstraints.size()) { + reason = "constraints array size was " + Integer.toString(jsonConstraints.size()); + return false; + } + } else if (jsonConstraints.size() != 0) { + reason = "constraint array not empty"; + return false; + } + + if (connectivityIntent instanceof HostToHostIntent) { + return matchHostToHostIntent(jsonIntent); + } else if (connectivityIntent instanceof PointToPointIntent) { + return matchPointToPointIntent(jsonIntent); + } else { + reason = "class of connectivity intent is unknown"; + return false; + } + } + @Override public void describeTo(Description description) { description.appendText(reason); @@ -462,10 +608,11 @@ public void describeTo(Description description) { * Factory to allocate an intent matcher. * * @param intent intent object we are looking for + * @param detail flag to verify if JSON contains detailed attributes for the intent's implementation class. * @return matcher */ - private static IntentJsonMatcher matchesIntent(Intent intent) { - return new IntentJsonMatcher(intent); + private static IntentJsonMatcher matchesIntent(Intent intent, boolean detail) { + return new IntentJsonMatcher(intent, detail); } /** @@ -668,10 +815,12 @@ public void describeTo(Description description) { */ public static class IntentJsonArrayMatcher extends TypeSafeMatcher { private final Intent intent; + private boolean detail = false; private String reason = ""; - public IntentJsonArrayMatcher(Intent intentValue) { + public IntentJsonArrayMatcher(Intent intentValue, boolean detailValue) { intent = intentValue; + detail = detailValue; } @Override @@ -683,7 +832,7 @@ public boolean matchesSafely(JsonArray json) { final JsonObject jsonIntent = json.get(jsonIntentIndex).asObject(); - if (jsonIntent.names().size() != expectedAttributes) { + if (jsonIntent.names().size() != expectedAttributes && !detail) { reason = "Found an intent with the wrong number of attributes"; return false; } @@ -693,7 +842,7 @@ public boolean matchesSafely(JsonArray json) { intentFound = true; // We found the correct intent, check attribute values - assertThat(jsonIntent, matchesIntent(intent)); + assertThat(jsonIntent, matchesIntent(intent, detail)); } } if (!intentFound) { @@ -714,10 +863,11 @@ public void describeTo(Description description) { * Factory to allocate an intent array matcher. * * @param intent intent object we are looking for + * @param detail flag to verify if JSON contains detailed attributes for the intent's implementation class. * @return matcher */ - private static IntentJsonArrayMatcher hasIntent(Intent intent) { - return new IntentJsonArrayMatcher(intent); + private static IntentJsonArrayMatcher hasIntent(Intent intent, boolean detail) { + return new IntentJsonArrayMatcher(intent, detail); } /** @@ -793,8 +943,8 @@ public void testIntentsArray() { final JsonArray jsonIntents = result.get("intents").asArray(); assertThat(jsonIntents, notNullValue()); - assertThat(jsonIntents, hasIntent(intent1)); - assertThat(jsonIntents, hasIntent(intent2)); + assertThat(jsonIntents, hasIntent(intent1, false)); + assertThat(jsonIntents, hasIntent(intent2, false)); } /** @@ -832,13 +982,282 @@ public void testIntentsSingle() { final String response = wt.path("intents/" + APP_ID.name() + "/0").request().get(String.class); final JsonObject result = Json.parse(response).asObject(); - assertThat(result, matchesIntent(intent)); + assertThat(result, matchesIntent(intent, true)); // Test get using numeric value final String responseNumeric = wt.path("intents/" + APP_ID.name() + "/0x0").request().get(String.class); final JsonObject resultNumeric = Json.parse(responseNumeric).asObject(); - assertThat(resultNumeric, matchesIntent(intent)); + assertThat(resultNumeric, matchesIntent(intent, true)); + } + + /** + * Tests the result of the rest api GET when intents are defined and the detail flag is false. + */ + @Test + public void testIntentsArrayWithoutDetail() { + replay(mockIntentService); + + final PointToPointIntent intent1 = + PointToPointIntent.builder() + .appId(APP_ID) + .selector(selector1) + .treatment(treatment1) + .filteredIngressPoint(new FilteredConnectPoint(connectPoint1)) + .filteredEgressPoint(new FilteredConnectPoint(connectPoint2)) + .build(); + + final HashSet resources = new HashSet<>(); + resources.add(new MockResource(1)); + resources.add(new MockResource(2)); + resources.add(new MockResource(3)); + + final HostToHostIntent intent2 = + HostToHostIntent.builder() + .appId(APP_ID) + .selector(selector2) + .treatment(treatment2) + .one(hostId1) + .two(hostId2) + .build(); + + intents.add(intent1); + intents.add(intent2); + + final WebTarget wt = target(); + final String response = wt.path("intents").queryParam("detail", false).request().get(String.class); + assertThat(response, containsString("{\"intents\":[")); + + final JsonObject result = Json.parse(response).asObject(); + assertThat(result, notNullValue()); + + assertThat(result.names(), hasSize(1)); + assertThat(result.names().get(0), is("intents")); + + final JsonArray jsonIntents = result.get("intents").asArray(); + assertThat(jsonIntents, notNullValue()); + + assertThat(jsonIntents, hasIntent(intent1, false)); + } + + /** + * Tests the result of the rest api GET when intents are defined and the detail flag is true. + */ + @Test + public void testIntentsArrayWithDetail() { + replay(mockIntentService); + + final PointToPointIntent intent1 = + PointToPointIntent.builder() + .appId(APP_ID) + .selector(selector1) + .treatment(treatment1) + .filteredIngressPoint(new FilteredConnectPoint(connectPoint1)) + .filteredEgressPoint(new FilteredConnectPoint(connectPoint2)) + .build(); + + final HashSet resources = new HashSet<>(); + resources.add(new MockResource(1)); + resources.add(new MockResource(2)); + resources.add(new MockResource(3)); + + final HostToHostIntent intent2 = + HostToHostIntent.builder() + .appId(APP_ID) + .selector(selector2) + .treatment(treatment2) + .one(hostId1) + .two(hostId2) + .build(); + + intents.add(intent1); + intents.add(intent2); + + final WebTarget wt = target(); + final String response = wt.path("intents").queryParam("detail", true).request().get(String.class); + assertThat(response, containsString("{\"intents\":[")); + + final JsonObject result = Json.parse(response).asObject(); + assertThat(result, notNullValue()); + + assertThat(result.names(), hasSize(1)); + assertThat(result.names().get(0), is("intents")); + + final JsonArray jsonIntents = result.get("intents").asArray(); + assertThat(jsonIntents, notNullValue()); + + assertThat(jsonIntents, hasIntent(intent1, true)); + } + + /** + * Tests the result of the rest api GET when intents are defined. + */ + @Test + public void testIntentsForApplicationWithoutDetail() { + final Intent intent1 = + PointToPointIntent.builder() + .key(Key.of(0, APP_ID)) + .appId(APP_ID) + .selector(selector1) + .treatment(treatment1) + .filteredIngressPoint(new FilteredConnectPoint(connectPoint1)) + .filteredEgressPoint(new FilteredConnectPoint(connectPoint2)) + .build(); + + final HostToHostIntent intent2 = + HostToHostIntent.builder() + .key(Key.of(1, APP_ID_2)) + .appId(APP_ID_2) + .selector(selector2) + .treatment(treatment2) + .one(hostId1) + .two(hostId2) + .build(); + + intents.add(intent1); + List appIntents1 = new ArrayList<>(); + appIntents1.add(intent1); + + intents.add(intent2); + List appIntents2 = new ArrayList<>(); + appIntents2.add(intent2); + + expect(mockIntentService.getIntentsByAppId(APP_ID)) + .andReturn(appIntents1) + .anyTimes(); + expect(mockIntentService.getIntentsByAppId(APP_ID_2)) + .andReturn(appIntents2) + .anyTimes(); + replay(mockIntentService); + + expect(mockCoreService.getAppId(APP_ID.name())) + .andReturn(APP_ID).anyTimes(); + expect(mockCoreService.getAppId(APP_ID_2.name())) + .andReturn(APP_ID_2).anyTimes(); + replay(mockCoreService); + + + final WebTarget wt = target(); + // Verify intents for app_id + final String response1 = wt.path("intents/application/" + APP_ID.name()).request().get(String.class); + assertThat(response1, containsString("{\"intents\":[")); + + final JsonObject result1 = Json.parse(response1).asObject(); + assertThat(result1, notNullValue()); + + assertThat(result1.names(), hasSize(1)); + assertThat(result1.names().get(0), is("intents")); + + final JsonArray jsonIntents1 = result1.get("intents").asArray(); + assertThat(jsonIntents1, notNullValue()); + assertThat(jsonIntents1.size(), is(1)); + + assertThat(jsonIntents1, hasIntent(intent1, false)); + assertThat(jsonIntents1, is(not(hasIntent(intent2, false)))); + + // Verify intents for app_id_2 with detail = false + final String response2 = wt.path("intents/application/" + APP_ID_2.name()) + .queryParam("detail", false).request().get(String.class); + assertThat(response2, containsString("{\"intents\":[")); + + final JsonObject result2 = Json.parse(response2).asObject(); + assertThat(result2, notNullValue()); + + assertThat(result2.names(), hasSize(1)); + assertThat(result2.names().get(0), is("intents")); + + final JsonArray jsonIntents2 = result2.get("intents").asArray(); + assertThat(jsonIntents2, notNullValue()); + assertThat(jsonIntents2.size(), is(1)); + + assertThat(jsonIntents2, hasIntent(intent2, false)); + assertThat(jsonIntents2, is(not(hasIntent(intent1, false)))); + } + + /** + * Tests the result of the rest api GET when intents are defined and the detail flag is true. + */ + @Test + public void testIntentsForApplicationWithDetail() { + final Intent intent1 = + PointToPointIntent.builder() + .key(Key.of(0, APP_ID)) + .appId(APP_ID) + .selector(selector1) + .treatment(treatment1) + .filteredIngressPoint(new FilteredConnectPoint(connectPoint1)) + .filteredEgressPoint(new FilteredConnectPoint(connectPoint2)) + .build(); + + final HostToHostIntent intent2 = + HostToHostIntent.builder() + .key(Key.of(1, APP_ID_2)) + .appId(APP_ID_2) + .selector(selector2) + .treatment(treatment2) + .one(hostId1) + .two(hostId2) + .build(); + + intents.add(intent1); + List appIntents1 = new ArrayList<>(); + appIntents1.add(intent1); + + intents.add(intent2); + List appIntents2 = new ArrayList<>(); + appIntents2.add(intent2); + + expect(mockIntentService.getIntentsByAppId(APP_ID)) + .andReturn(appIntents1) + .anyTimes(); + expect(mockIntentService.getIntentsByAppId(APP_ID_2)) + .andReturn(appIntents2) + .anyTimes(); + replay(mockIntentService); + + expect(mockCoreService.getAppId(APP_ID.name())) + .andReturn(APP_ID).anyTimes(); + expect(mockCoreService.getAppId(APP_ID_2.name())) + .andReturn(APP_ID_2).anyTimes(); + replay(mockCoreService); + + + final WebTarget wt = target(); + // Verify intents for app_id + final String response1 = wt.path("intents/application/" + APP_ID.name()) + .queryParam("detail", true).request().get(String.class); + assertThat(response1, containsString("{\"intents\":[")); + + final JsonObject result1 = Json.parse(response1).asObject(); + assertThat(result1, notNullValue()); + + assertThat(result1.names(), hasSize(1)); + assertThat(result1.names().get(0), is("intents")); + + final JsonArray jsonIntents1 = result1.get("intents").asArray(); + assertThat(jsonIntents1, notNullValue()); + assertThat(jsonIntents1.size(), is(1)); + + assertThat(jsonIntents1, hasIntent(intent1, true)); + assertThat(jsonIntents1, is(not(hasIntent(intent2, true)))); + + // Verify intents for app_id_2 + final String response2 = wt.path("intents/application/" + APP_ID_2.name()) + .queryParam("detail", true).request().get(String.class); + assertThat(response2, containsString("{\"intents\":[")); + + final JsonObject result2 = Json.parse(response2).asObject(); + assertThat(result2, notNullValue()); + + assertThat(result2.names(), hasSize(1)); + assertThat(result2.names().get(0), is("intents")); + + final JsonArray jsonIntents2 = result2.get("intents").asArray(); + assertThat(jsonIntents2, notNullValue()); + assertThat(jsonIntents2.size(), is(1)); + + assertThat(jsonIntents2, hasIntent(intent2, true)); + assertThat(jsonIntents2, is(not(hasIntent(intent1, true)))); } /** @@ -975,13 +1394,13 @@ public void testIntentInstallables() { final String response = wt.path("intents/installables/" + APP_ID.name() + "/" + intentId).request().get(String.class); final JsonObject result = Json.parse(response).asObject(); - assertThat(result.get(INSTALLABLES).asArray(), hasIntent(flowRuleIntent)); + assertThat(result.get(INSTALLABLES).asArray(), hasIntent(flowRuleIntent, false)); // Test get using numeric value final String responseNumeric = wt.path("intents/installables/" + APP_ID.name() + "/" + Long.toHexString(intentId)).request().get(String.class); final JsonObject resultNumeric = Json.parse(responseNumeric).asObject(); - assertThat(resultNumeric.get(INSTALLABLES).asArray(), hasIntent(flowRuleIntent)); + assertThat(resultNumeric.get(INSTALLABLES).asArray(), hasIntent(flowRuleIntent, false)); } /** diff --git a/web/api/src/test/java/org/onosproject/rest/resources/MetersResourceTest.java b/web/api/src/test/java/org/onosproject/rest/resources/MetersResourceTest.java index 65b932d6c07..e9efb187194 100644 --- a/web/api/src/test/java/org/onosproject/rest/resources/MetersResourceTest.java +++ b/web/api/src/test/java/org/onosproject/rest/resources/MetersResourceTest.java @@ -34,6 +34,7 @@ import org.onosproject.core.ApplicationId; import org.onosproject.core.CoreService; import org.onosproject.core.DefaultApplicationId; +import org.onosproject.net.AbstractAnnotated; import org.onosproject.net.DefaultDevice; import org.onosproject.net.Device; import org.onosproject.net.DeviceId; @@ -104,7 +105,7 @@ public class MetersResourceTest extends ResourceTest { /** * Mock class for a meter. */ - private static class MockMeter implements Meter { + private static class MockMeter extends AbstractAnnotated implements Meter { final DeviceId deviceId; final ApplicationId appId; @@ -441,7 +442,7 @@ public void testMeterSingleDevice() { public void testMeterSingleDeviceWithId() { setupMockMeters(); - expect(mockMeterService.getMeter(anyObject(), anyObject())) + expect(mockMeterService.getMeter(anyObject(), anyObject(MeterCellId.class))) .andReturn(meter5).anyTimes(); replay(mockMeterService); replay(mockDeviceService); @@ -466,7 +467,7 @@ public void testMeterSingleDeviceWithId() { public void testMeterByDeviceIdAndMeterId() { setupMockMeters(); - expect(mockMeterService.getMeter(anyObject(), anyObject())) + expect(mockMeterService.getMeter(anyObject(), anyObject(MeterCellId.class))) .andReturn(null).anyTimes(); replay(mockMeterService); @@ -525,9 +526,7 @@ public void testPostWithWrongDevice() { @Test public void testDelete() { setupMockMeters(); - expect(mockMeterService.getMeter(anyObject(), anyObject())) - .andReturn(meter5).anyTimes(); - mockMeterService.withdraw(anyObject(), anyObject()); + mockMeterService.withdraw(anyObject(), anyObject(MeterCellId.class)); expectLastCall(); replay(mockMeterService); diff --git a/web/gui/BUILD b/web/gui/BUILD index 43c2a77b8a6..39da74a6fb2 100644 --- a/web/gui/BUILD +++ b/web/gui/BUILD @@ -117,7 +117,7 @@ genrule( " jar xf ../../$(location //tools/gui:tools-gui-gulp) &&" + " $$NPM $$NPM_ARGS install --no-cache --loglevel=error > $$ROOT/$(location onos-gui1-npm-install.log) 2>&1 &&" + " find . -name package.json | while read pjson; do egrep -v '/execroot/' $$pjson > ptmp; mv ptmp $$pjson; done &&" + - " find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; &&" + + " find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 202101010000 {} \\; &&" + " jar Mcf $$ROOT/$(location onos-gui-npm-install.jar) package.json gulpfile.babel.js node_modules gulp-tasks &&" + " touch $$ROOT/$(location onos-gui1-npm-install.log)", # to get the log always as the 2nd file ) @@ -150,7 +150,7 @@ genrule( " chmod a+x ./node_modules/gulp/bin/gulp.js &&" + " $$ROOT/$$NPM $$NPM_ARGS run build --no-cache --loglevel=error > $$ROOT/$(location onos-gui1-npm-build.log) &&" + " cd ../../web/gui/src/main/webapp &&" + - " find dist vendor data README.md _doc _dev app/fw app/*.css app/*.js app/*.txt -type f -exec touch -t 201806280000 {} \; &&" + + " find dist vendor data README.md _doc _dev app/fw app/*.css app/*.js app/*.txt -type f -exec touch -t 201806280000 {} \\; &&" + " jar Mcf $$ROOT/$(location onos-gui-npm-build.jar) dist vendor data README.md _doc _dev app/fw app/*.css app/*.js app/*.txt &&" + " touch $$ROOT/$(location onos-gui1-npm-build.log)", # to get the log always as the 2nd file ) @@ -176,7 +176,7 @@ genrule( ), outs = ["web_app_all.jar"], cmd = "cd web/gui &&" + - " find src/main/webapp -type f -exec touch -t 201806280000 {} \; &&" + + " find src/main/webapp -type f -exec touch -t 201806280000 {} \\; &&" + " jar Mcf ../../$@ src/main/webapp", ) @@ -190,7 +190,7 @@ genrule( outs = ["app_view_tar.jar"], cmd = " ROOT=`pwd` &&" + " cd web/gui/src/main/webapp/app/view &&" + - " find . -type f -exec touch -t 201806280000 {} \; &&" + + " find . -type f -exec touch -t 201806280000 {} \\; &&" + " jar Mcf $$ROOT/$@ .", ) @@ -260,7 +260,7 @@ genrule( " mkdir ./WEB-INF/classes/raw && " + " for i in $(locations :_raw_classes_files); do cp $$ROOT/$$i ./WEB-INF/classes/raw/; done &&" + " jar xf $$ROOT/$(location :onos-gui-jar) &&" + - " find . -type f -exec touch -t 201806280000 {} \; &&" + + " find . -type f -exec touch -t 201806280000 {} \\; &&" + " jar cmf META-INF/MANIFEST.MF $$ROOT/$@ .", output_to_bindir = 1, visibility = ["//visibility:public"], diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/ClusterViewMessageHandler.java b/web/gui/src/main/java/org/onosproject/ui/impl/ClusterViewMessageHandler.java index 980d7f69398..7243818bbe5 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/ClusterViewMessageHandler.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/ClusterViewMessageHandler.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.collect.ImmutableSet; +import org.onlab.packet.IpAddress; import org.onosproject.cluster.ClusterService; import org.onosproject.cluster.ControllerNode; import org.onosproject.cluster.NodeId; @@ -170,27 +171,31 @@ private ObjectNode deviceData(Device d) { @Override public void process(ObjectNode payload) { + ObjectNode rootNode = objectNode(); + ObjectNode data = objectNode(); + ArrayNode devices = arrayNode(); String id = string(payload, ID); ClusterService cs = get(ClusterService.class); ControllerNode node = cs.getNode(new NodeId(id)); + if (node != null) { + IpAddress nodeIp = node.ip(); + List deviceList = populateDevices(node); - ObjectNode data = objectNode(); - ArrayNode devices = arrayNode(); - List deviceList = populateDevices(node); + data.put(ID, node.id().toString()); + data.put(IP, nodeIp != null ? nodeIp.toString() : node.host()); - data.put(ID, node.id().toString()); - data.put(IP, node.ip().toString()); + for (Device d : deviceList) { + devices.add(deviceData(d)); + } - for (Device d : deviceList) { - devices.add(deviceData(d)); + } else { + data.put(ID, "NONE"); + data.put(IP, "NONE"); } - data.set(DEVICES, devices); //TODO put more detail info to data - - ObjectNode rootNode = objectNode(); rootNode.set(DETAILS, data); sendMessage(CLUSTER_DETAILS_RESP, rootNode); } diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/OsgiPropertyConstants.java b/web/gui/src/main/java/org/onosproject/ui/impl/OsgiPropertyConstants.java new file mode 100644 index 00000000000..9a03f1f8323 --- /dev/null +++ b/web/gui/src/main/java/org/onosproject/ui/impl/OsgiPropertyConstants.java @@ -0,0 +1,25 @@ +/* + * Copyright 2018-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onosproject.ui.impl; + +public final class OsgiPropertyConstants { + private OsgiPropertyConstants() { + } + + public static final String TRAFFIC_REFRESH_MS = "trafficRefreshMs"; + public static final int TRAFFIC_REFRESH_MS_DEFAULT = 5000; +} diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/PortViewMessageHandler.java b/web/gui/src/main/java/org/onosproject/ui/impl/PortViewMessageHandler.java index 311d44f9c8a..92a051c0d2c 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/PortViewMessageHandler.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/PortViewMessageHandler.java @@ -131,7 +131,7 @@ protected void populateTable(TableModel tm, ObjectNode payload) { } private void populateRow(TableModel.Row row, PortStatistics stat) { - row.cell(ID, stat.portNumber().toLong()) + row.cell(ID, stat.portNumber()) .cell(PKT_RX, stat.packetsReceived()) .cell(PKT_TX, stat.packetsSent()) .cell(BYTES_RX, stat.bytesReceived()) diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/ProtectedIntentMonitor.java b/web/gui/src/main/java/org/onosproject/ui/impl/ProtectedIntentMonitor.java index bb4e8ac8754..2fe3552d600 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/ProtectedIntentMonitor.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/ProtectedIntentMonitor.java @@ -96,7 +96,6 @@ public enum ProtectedMode { SELECTED_INTENT } - private final long trafficPeriod; private final ServicesBundle services; private final TopologyViewMessageHandler msgHandler; @@ -110,13 +109,11 @@ public enum ProtectedMode { /** * Constructs a protected intent monitor. * - * @param trafficPeriod traffic task period in ms * @param services bundle of services * @param msgHandler our message handler */ - public ProtectedIntentMonitor(long trafficPeriod, ServicesBundle services, + public ProtectedIntentMonitor(ServicesBundle services, TopologyViewMessageHandler msgHandler) { - this.trafficPeriod = trafficPeriod; this.services = services; this.msgHandler = msgHandler; } diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/SampleHighlighterFactory.java b/web/gui/src/main/java/org/onosproject/ui/impl/SampleHighlighterFactory.java new file mode 100644 index 00000000000..5a24b4a053f --- /dev/null +++ b/web/gui/src/main/java/org/onosproject/ui/impl/SampleHighlighterFactory.java @@ -0,0 +1,117 @@ +/* + * Copyright 2021-present Open Networking Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onosproject.ui.impl; + +import org.onosproject.net.EdgeLink; +import org.onosproject.net.Host; +import org.onosproject.net.Link; +import org.onosproject.net.host.HostService; +import org.onosproject.net.link.LinkService; +import org.onosproject.ui.UiExtensionService; +import org.onosproject.ui.UiTopoHighlighter; +import org.onosproject.ui.UiTopoHighlighterFactory; +import org.onosproject.ui.topo.BaseLink; +import org.onosproject.ui.topo.BaseLinkMap; +import org.onosproject.ui.topo.Highlights; +import org.onosproject.ui.topo.HostHighlight; +import org.onosproject.ui.topo.LinkHighlight; +import org.onosproject.ui.topo.Mod; +import org.onosproject.ui.topo.NodeBadge; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Deactivate; +import org.osgi.service.component.annotations.Reference; +import org.osgi.service.component.annotations.ReferenceCardinality; + +import static org.onosproject.net.DefaultEdgeLink.createEdgeLinks; +import static org.onosproject.ui.topo.NodeBadge.text; + +@Component(enabled = false) +public class SampleHighlighterFactory { + + @Reference(cardinality = ReferenceCardinality.MANDATORY) + protected UiExtensionService uiExtensionService; + + @Reference(cardinality = ReferenceCardinality.MANDATORY) + protected LinkService linkService; + + @Reference(cardinality = ReferenceCardinality.MANDATORY) + protected HostService hostService; + + private UiTopoHighlighterFactory foo = () -> + new TestHighlighter("foo", new Mod("style=\"stroke: #0ff; stroke-width: 10px;\"")); + private UiTopoHighlighterFactory bar = () -> + new TestHighlighter("bar", new Mod("style=\"stroke: #f0f; stroke-width: 4px; stroke-dasharray: 5 2;\"")); + + @Activate + protected void activate() { + uiExtensionService.register(foo); + uiExtensionService.register(bar); + } + + @Deactivate + protected void deactivate() { + uiExtensionService.unregister(foo); + uiExtensionService.unregister(bar); + } + + private final class TestHighlighter implements UiTopoHighlighter { + + private final String name; + private final Mod mod; + + private TestHighlighter(String name, Mod mod) { + this.name = name; + this.mod = mod; + } + + @Override + public String name() { + return name; + } + + @Override + public Highlights createHighlights() { + Highlights highlights = new Highlights(); + BaseLinkMap linkMap = new BaseLinkMap(); + + // Create a map of base bi-links from the set of active links first. + for (Link link : linkService.getActiveLinks()) { + linkMap.add(link); + } + + for (Host host : hostService.getHosts()) { + for (EdgeLink link : createEdgeLinks(host, false)) { + linkMap.add(link); + } + + // Also add a host badge for kicks. + HostHighlight hostHighlight = new HostHighlight(host.id().toString()); + hostHighlight.setBadge(text(NodeBadge.Status.WARN, name)); + highlights.add(hostHighlight); + } + + // Now scan through the links and annotate them with desired highlights + for (BaseLink link : linkMap.biLinks()) { + highlights.add(new LinkHighlight(link.linkId(), LinkHighlight.Flavor.PRIMARY_HIGHLIGHT) + .addMod(mod).setLabel(name + "-" + link.one().src().port())); + } + + return highlights; + } + } + +} diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandler.java b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandler.java index 455b0f334d1..c8680ba018b 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandler.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandler.java @@ -81,7 +81,7 @@ import static java.util.concurrent.Executors.newSingleThreadExecutor; import static org.onlab.util.Tools.groupedThreads; import static org.onosproject.cluster.ClusterEvent.Type.INSTANCE_ADDED; -import static org.onosproject.net.ConnectPoint.deviceConnectPoint; +import static org.onosproject.net.ConnectPoint.fromString; import static org.onosproject.net.DeviceId.deviceId; import static org.onosproject.net.HostId.hostId; import static org.onosproject.net.device.DeviceEvent.Type.DEVICE_ADDED; @@ -113,6 +113,7 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase { private static final String REQ_SEL_INTENT_TRAFFIC = "requestSelectedIntentTraffic"; private static final String SEL_INTENT = "selectIntent"; private static final String REQ_ALL_TRAFFIC = "requestAllTraffic"; + private static final String REQ_CUSTOM_TRAFFIC = "requestCustomTraffic"; private static final String REQ_DEV_LINK_FLOWS = "requestDeviceLinkFlows"; private static final String CANCEL_TRAFFIC = "cancelTraffic"; private static final String REQ_SUMMARY = "requestSummary"; @@ -172,7 +173,6 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase { private static final String SLASH = "/"; - private static final long TRAFFIC_PERIOD = 5000; private static final long SUMMARY_PERIOD = 30000; private static final Comparator NODE_COMPARATOR = @@ -213,8 +213,8 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase { public void init(UiConnection connection, ServiceDirectory directory) { super.init(connection, directory); appId = directory.get(CoreService.class).registerApplication(MY_APP_ID); - traffic = new TrafficMonitor(TRAFFIC_PERIOD, services, this); - protectedIntentMonitor = new ProtectedIntentMonitor(TRAFFIC_PERIOD, services, this); + traffic = new TrafficMonitor(services, this); + protectedIntentMonitor = new ProtectedIntentMonitor(services, this); } @Override @@ -246,6 +246,7 @@ protected Collection createRequestHandlers() { new RemoveIntents(), new ReqAllTraffic(), + new ReqCustomTraffic(), new ReqDevLinkFlows(), new ReqRelatedIntents(), new ReqNextIntent(), @@ -393,7 +394,7 @@ public void process(ObjectNode payload) { if (isEdgeLink) { HostId hid = hostId(srcId); String cpstr = tgtId + SLASH + string(payload, TARGET_PORT); - ConnectPoint cp = deviceConnectPoint(cpstr); + ConnectPoint cp = fromString(cpstr); pp = edgeLinkDetails(hid, cp); overlayCache.currentOverlay().modifyEdgeLinkDetails(pp, hid, cp); @@ -401,8 +402,8 @@ public void process(ObjectNode payload) { } else { String cpAstr = srcId + SLASH + string(payload, SOURCE_PORT); String cpBstr = tgtId + SLASH + string(payload, TARGET_PORT); - ConnectPoint cpA = deviceConnectPoint(cpAstr); - ConnectPoint cpB = deviceConnectPoint(cpBstr); + ConnectPoint cpA = fromString(cpAstr); + ConnectPoint cpB = fromString(cpBstr); pp = infraLinkDetails(cpA, cpB); overlayCache.currentOverlay().modifyInfraLinkDetails(pp, cpA, cpB); @@ -623,6 +624,17 @@ public void process(ObjectNode payload) { } } + private final class ReqCustomTraffic extends RequestHandler { + private ReqCustomTraffic() { + super(REQ_CUSTOM_TRAFFIC); + } + + @Override + public void process(ObjectNode payload) { + traffic.monitor((int) number(payload, "index")); + } + } + private NodeSelection makeNodeSelection(ObjectNode payload) { return new NodeSelection(payload, services.device(), services.host(), services.link()); @@ -910,7 +922,11 @@ private synchronized void removeListeners() { private class InternalClusterListener implements ClusterEventListener { @Override public void event(ClusterEvent event) { - msgSender.execute(() -> sendMessage(instanceMessage(event, null))); + msgSender.execute(() -> { + if (event.instanceType() == ClusterEvent.InstanceType.ONOS) { + sendMessage(instanceMessage(event, null)); + } + }); } } diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java index 93f41a6b5d4..79a335ff49d 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java @@ -261,10 +261,11 @@ private ObjectNode message(String severity, String message) { // Produces a cluster instance message to the client. protected ObjectNode instanceMessage(ClusterEvent event, String msgType) { ControllerNode node = event.subject(); + IpAddress nodeIp = node.ip(); int switchCount = services.mastership().getDevicesOf(node.id()).size(); ObjectNode payload = objectNode() .put("id", node.id().toString()) - .put("ip", node.ip().toString()) + .put("ip", nodeIp != null ? nodeIp.toString() : node.host()) .put("online", services.cluster().getState(node.id()).isActive()) .put("ready", services.cluster().getState(node.id()).isReady()) .put("uiAttached", node.equals(services.cluster().getLocalNode())) @@ -272,7 +273,7 @@ protected ObjectNode instanceMessage(ClusterEvent event, String msgType) { ArrayNode labels = arrayNode(); labels.add(node.id().toString()); - labels.add(node.ip().toString()); + labels.add(nodeIp != null ? nodeIp.toString() : node.host()); // Add labels, props and stuff the payload into envelope. payload.set("labels", labels); @@ -337,11 +338,13 @@ protected ObjectNode hostMessage(HostEvent event) { Host host = event.subject(); Host prevHost = event.prevSubject(); String hostType = host.annotations().value(AnnotationKeys.UI_TYPE); + String connectionType = host.annotations().value(AnnotationKeys.CONNECTION_TYPE); String ip = ip(host.ipAddresses()); ObjectNode payload = objectNode() .put("id", host.id().toString()) - .put("type", isNullOrEmpty(hostType) ? "endstation" : hostType); + .put("type", isNullOrEmpty(hostType) ? "endstation" : hostType) + .put("connectionType", isNullOrEmpty(connectionType) ? "wired" : connectionType); // set most recent connect point (and previous if we know it) payload.set("cp", hostConnect(host.location())); @@ -375,7 +378,7 @@ private void addAllCps(Set locations, ObjectNode payload) { private ObjectNode hostConnect(HostLocation location) { return objectNode() .put("device", location.deviceId().toString()) - .put("port", location.port().toLong()); + .put("port", location.port().toString()); } // Encodes the specified list of labels a JSON array. @@ -566,7 +569,7 @@ private String nameForHost(Host host) { private String glyphForHost(Annotations annot) { String uiType = annot.value(AnnotationKeys.UI_TYPE); - return isNullOrEmpty(uiType) ? DEFAULT_HOST_GLYPH : uiType; + return isNullOrEmpty(uiType) ? DEFAULT_HOST_GLYPH : "m_" + uiType; } // Generates a property panel model for a host details response @@ -637,7 +640,7 @@ private void addLinkCpAProps(PropertyPanel pp, ConnectPoint cp, LionBundle lion) pp.addProp(LPL_A_TYPE, lion.getSafe(LPL_A_TYPE), lion.getSafe(DEVICE)) .addProp(LPL_A_ID, lion.getSafe(LPL_A_ID), did.toString()) .addProp(LPL_A_FRIENDLY, lion.getSafe(LPL_A_FRIENDLY), friendlyDevice(did)) - .addProp(LPL_A_PORT, lion.getSafe(LPL_A_PORT), cp.port().toLong()) + .addProp(LPL_A_PORT, lion.getSafe(LPL_A_PORT), cp.port().toString()) .addSeparator(); } @@ -647,7 +650,7 @@ private void addLinkCpBProps(PropertyPanel pp, ConnectPoint cp, LionBundle lion) pp.addProp(LPL_B_TYPE, lion.getSafe(LPL_B_TYPE), lion.getSafe(DEVICE)) .addProp(LPL_B_ID, lion.getSafe(LPL_B_ID), did.toString()) .addProp(LPL_B_FRIENDLY, lion.getSafe(LPL_B_FRIENDLY), friendlyDevice(did)) - .addProp(LPL_B_PORT, lion.getSafe(LPL_B_PORT), cp.port().toLong()) + .addProp(LPL_B_PORT, lion.getSafe(LPL_B_PORT), cp.port().toString()) .addSeparator(); } diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/TrafficMonitor.java b/web/gui/src/main/java/org/onosproject/ui/impl/TrafficMonitor.java index 9d9b3c31fda..73bda39e82a 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/TrafficMonitor.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/TrafficMonitor.java @@ -59,13 +59,11 @@ public class TrafficMonitor extends TrafficMonitorBase { /** * Constructs a traffic monitor. * - * @param trafficPeriod traffic task period in ms * @param servicesBundle bundle of services * @param msgHandler our message handler */ - public TrafficMonitor(long trafficPeriod, ServicesBundle servicesBundle, - TopologyViewMessageHandler msgHandler) { - super(trafficPeriod, servicesBundle, msgHandler); + public TrafficMonitor(ServicesBundle servicesBundle, TopologyViewMessageHandler msgHandler) { + super(servicesBundle, msgHandler); this.msgHandler = msgHandler; } @@ -150,6 +148,14 @@ protected void sendSelectedIntentTraffic() { msgHandler.sendHighlights(intentTraffic()); } + @Override + protected void sendCustomTraffic() { + log.debug("sendCustomTraffic"); + if (topoHighlighter != null) { + msgHandler.sendHighlights(topoHighlighter.createHighlights()); + } + } + @Override protected void sendClearHighlights() { log.debug("sendClearHighlights"); diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/TrafficMonitorBase.java b/web/gui/src/main/java/org/onosproject/ui/impl/TrafficMonitorBase.java index 2f14ac407ef..c585d9216cc 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/TrafficMonitorBase.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/TrafficMonitorBase.java @@ -38,6 +38,9 @@ import org.onosproject.net.DeviceId; import org.onosproject.net.Link; import org.onosproject.net.statistic.Load; +import org.onosproject.ui.UiExtensionService; +import org.onosproject.ui.UiTopoHighlighter; +import org.onosproject.ui.UiTopoHighlighterFactory; import org.onosproject.ui.impl.topo.TopoologyTrafficMessageHandlerAbstract; import org.onosproject.ui.impl.topo.util.IntentSelection; import org.onosproject.ui.impl.topo.util.ServicesBundle; @@ -69,8 +72,7 @@ import static org.onosproject.net.statistic.PortStatisticsService.MetricType.BYTES; import static org.onosproject.net.statistic.PortStatisticsService.MetricType.PACKETS; import static org.onosproject.net.DefaultEdgeLink.createEdgeLinks; -import static org.onosproject.ui.impl.TrafficMonitorBase.Mode.IDLE; -import static org.onosproject.ui.impl.TrafficMonitorBase.Mode.SELECTED_INTENT; +import static org.onosproject.ui.impl.TrafficMonitorBase.Mode.*; /** * Base superclass for traffic monitor (both 'classic' and 'topo2' versions). @@ -85,6 +87,7 @@ public abstract class TrafficMonitorBase extends AbstractTopoMonitor { protected IntentSelection selectedIntents = null; protected final TopoologyTrafficMessageHandlerAbstract msgHandler; protected NodeSelection selectedNodes = null; + protected UiTopoHighlighter topoHighlighter = null; protected void sendSelectedIntents() { log.debug("sendSelectedIntents: {}", selectedIntents); @@ -285,13 +288,10 @@ public enum Mode { ALL_PORT_TRAFFIC_PKT_PS, DEV_LINK_FLOWS, RELATED_INTENTS, - SELECTED_INTENT + SELECTED_INTENT, + CUSTOM_TRAFFIC_MONITOR } - /** - * Number of milliseconds between invocations of sending traffic data. - */ - protected final long trafficPeriod; /** * Holds references to services. @@ -310,14 +310,11 @@ public enum Mode { * Constructs the monitor, initializing the task period and * services bundle reference. * - * @param trafficPeriod traffic task period in ms * @param servicesBundle bundle of services * @param msgHandler Traffic Message handler */ - protected TrafficMonitorBase(long trafficPeriod, - ServicesBundle servicesBundle, + protected TrafficMonitorBase(ServicesBundle servicesBundle, TopoologyTrafficMessageHandlerAbstract msgHandler) { - this.trafficPeriod = trafficPeriod; this.services = servicesBundle; this.msgHandler = msgHandler; timer = new Timer("uiTopo-" + getClass().getSimpleName()); @@ -375,6 +372,22 @@ public synchronized void monitor(Mode mode) { } } + + public synchronized void monitor(int index) { + mode = CUSTOM_TRAFFIC_MONITOR; + List factories = services.get(UiExtensionService.class) + .getTopoHighlighterFactories(); + if (factories.isEmpty()) { + return; + } + + UiTopoHighlighterFactory factory = factories.get(index % factories.size()); + topoHighlighter = factory.newTopoHighlighter(); + clearSelection(); + scheduleTask(); + sendCustomTraffic(); + } + /** * Monitor for traffic data to be sent back to the web client, under * the given mode, using the given selection of devices and hosts. @@ -473,6 +486,12 @@ public synchronized void monitor(Intent intent) { */ protected abstract void sendSelectedIntentTraffic(); + /** + * Subclass should compile and send appropriate highlights data showing + * custom traffic on links. + */ + protected abstract void sendCustomTraffic(); + /** * Subclass should send a "clear highlights" event. */ @@ -712,6 +731,9 @@ public void run() { case SELECTED_INTENT: sendSelectedIntentTraffic(); break; + case CUSTOM_TRAFFIC_MONITOR: + sendCustomTraffic(); + break; default: // RELATED_INTENTS and IDLE modes should never invoke diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java b/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java index 7d5c32484d6..d47367b6c7a 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/UiExtensionManager.java @@ -33,6 +33,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import org.onlab.util.Tools; +import org.onosproject.cfg.ComponentConfigService; import org.onosproject.mastership.MastershipService; import org.onosproject.store.serializers.KryoNamespaces; import org.onosproject.store.service.ConsistentMap; @@ -49,6 +50,7 @@ import org.onosproject.ui.UiSessionToken; import org.onosproject.ui.UiTokenService; import org.onosproject.ui.UiTopo2OverlayFactory; +import org.onosproject.ui.UiTopoHighlighterFactory; import org.onosproject.ui.UiTopoMap; import org.onosproject.ui.UiTopoMapFactory; import org.onosproject.ui.UiTopoOverlayFactory; @@ -60,9 +62,12 @@ import org.onosproject.ui.impl.topo.model.UiSharedTopologyModel; import org.onosproject.ui.lion.LionBundle; import org.onosproject.ui.lion.LionUtils; +import org.onosproject.ui.topo.AbstractTopoMonitor; +import org.osgi.service.component.ComponentContext; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Deactivate; +import org.osgi.service.component.annotations.Modified; import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality; import org.slf4j.Logger; @@ -70,6 +75,7 @@ import java.math.BigInteger; import java.security.SecureRandom; +import java.util.Dictionary; import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; @@ -87,13 +93,23 @@ import static org.onosproject.security.AppPermission.Type.UI_WRITE; import static org.onosproject.ui.UiView.Category.NETWORK; import static org.onosproject.ui.UiView.Category.PLATFORM; +import static org.onosproject.ui.impl.OsgiPropertyConstants.TRAFFIC_REFRESH_MS; +import static org.onosproject.ui.impl.OsgiPropertyConstants.TRAFFIC_REFRESH_MS_DEFAULT; import static org.onosproject.ui.impl.lion.BundleStitcher.generateBundles; /** * Manages the user interface extensions. */ -@Component(immediate = true, service = { UiExtensionService.class, UiPreferencesService.class, SpriteService.class, - UiTokenService.class }) +@Component(immediate = true, + service = { + UiExtensionService.class, + UiPreferencesService.class, + SpriteService.class, + UiTokenService.class + }, + property = { + TRAFFIC_REFRESH_MS + ":Integer=" + TRAFFIC_REFRESH_MS_DEFAULT, + }) public class UiExtensionManager implements UiExtensionService, UiPreferencesService, SpriteService, UiTokenService { @@ -140,6 +156,7 @@ public class UiExtensionManager private final List extensions = Lists.newArrayList(); private final List glyphs = Lists.newArrayList(); + private final List highlighterFactories = Lists.newArrayList(); // Map of views to extensions private final Map views = Maps.newHashMap(); @@ -153,6 +170,9 @@ public class UiExtensionManager @Reference(cardinality = ReferenceCardinality.MANDATORY) protected StorageService storageService; + @Reference(cardinality = ReferenceCardinality.MANDATORY) + protected ComponentConfigService cfgService; + @Reference(cardinality = ReferenceCardinality.MANDATORY) private UiSharedTopologyModel sharedModel; @@ -176,6 +196,7 @@ public class UiExtensionManager private LionBundle navLion; + protected int trafficRefreshMs = TRAFFIC_REFRESH_MS_DEFAULT; private String lionNavText(String id) { return navLion.getValue("nav_item_" + id); @@ -279,7 +300,7 @@ private UiExtension createCoreExtension() { @Activate - public void activate() { + public void activate(ComponentContext context) { Serializer serializer = Serializer.using(KryoNamespaces.API, ObjectNode.class, ArrayNode.class, JsonNodeFactory.class, LinkedHashMap.class, @@ -301,6 +322,7 @@ public void activate() { .withRelaxedReadConsistency() .build(); tokens = tokensConsistentMap.asJavaMap(); + cfgService.registerProperties(getClass()); register(core); @@ -308,7 +330,8 @@ public void activate() { } @Deactivate - public void deactivate() { + public void deactivate(ComponentContext context) { + cfgService.unregisterProperties(getClass(), false); prefsConsistentMap.removeListener(prefsListener); eventHandlingExecutor.shutdown(); UiWebSocketServlet.closeAll(); @@ -316,6 +339,20 @@ public void deactivate() { log.info("Stopped"); } + @Modified + protected void modified(ComponentContext context) { + Dictionary properties = context.getProperties(); + Integer trafficRefresh = Tools.getIntegerProperty(properties, TRAFFIC_REFRESH_MS); + + if (trafficRefresh != null && trafficRefresh > 10) { + AbstractTopoMonitor.setTrafficPeriod(trafficRefresh); + } else if (trafficRefresh != null) { + log.warn("trafficRefresh must be greater than 10"); + } + + log.info("Settings: trafficRefresh={}", trafficRefresh); + } + @Override public synchronized void register(UiExtension extension) { checkPermission(UI_WRITE); @@ -365,6 +402,22 @@ public synchronized void unregister(UiGlyphFactory glyphFactory) { } } + @Override + public synchronized void register(UiTopoHighlighterFactory factory) { + checkPermission(UI_WRITE); + if (!highlighterFactories.contains(factory)) { + highlighterFactories.add(factory); + UiWebSocketServlet.sendToAll(GUI_ADDED, null); + } + } + + @Override + public synchronized void unregister(UiTopoHighlighterFactory factory) { + checkPermission(UI_WRITE); + highlighterFactories.remove(factory); + UiWebSocketServlet.sendToAll(GUI_REMOVED, null); + } + @Override public synchronized List getExtensions() { checkPermission(UI_READ); @@ -377,6 +430,12 @@ public synchronized List getGlyphs() { return ImmutableList.copyOf(glyphs); } + @Override + public synchronized List getTopoHighlighterFactories() { + checkPermission(UI_READ); + return ImmutableList.copyOf(highlighterFactories); + } + @Override public synchronized UiExtension getViewExtension(String viewId) { checkPermission(UI_READ); diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/UiWebSocket.java b/web/gui/src/main/java/org/onosproject/ui/impl/UiWebSocket.java index 2e7e643ead6..0ed48ad6389 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/UiWebSocket.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/UiWebSocket.java @@ -22,6 +22,7 @@ import org.eclipse.jetty.websocket.api.WebSocketAdapter; import org.onlab.osgi.ServiceDirectory; import org.onlab.osgi.ServiceNotFoundException; +import org.onlab.packet.IpAddress; import org.onosproject.cluster.ClusterService; import org.onosproject.cluster.ControllerNode; import org.onosproject.ui.GlyphConstants; @@ -438,9 +439,10 @@ private void sendBootstrapData() { ArrayNode instances = arrayNode(); for (ControllerNode node : service.getNodes()) { + IpAddress nodeIp = node.ip(); ObjectNode instance = objectNode() .put(ID, node.id().toString()) - .put(IP, node.ip().toString()) + .put(IP, nodeIp != null ? nodeIp.toString() : node.host()) .put(GlyphConstants.UI_ATTACHED, node.equals(service.getLocalNode())); instances.add(instance); diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/topo/Topo2Jsonifier.java b/web/gui/src/main/java/org/onosproject/ui/impl/topo/Topo2Jsonifier.java index 0ef6fafb65a..8ae6e6d7e5e 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/topo/Topo2Jsonifier.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/topo/Topo2Jsonifier.java @@ -201,13 +201,7 @@ ObjectNode instances(List instances) { private ObjectNode json(UiClusterMember member, boolean isUiAttached) { int switchCount = mastershipService.getDevicesOf(member.id()).size(); - ControllerNode.State state = clusterService.getState(member.id()); - return objectNode() - .put("id", member.id().toString()) - .put("ip", member.ip().toString()) - .put("online", state.isActive()) - .put("ready", state.isReady()) - .put("uiAttached", isUiAttached) + return jsonCommon(member).put("uiAttached", isUiAttached) .put("switches", switchCount); } @@ -637,14 +631,26 @@ private ObjectNode json(UiLink link) { } private ObjectNode json(UiClusterMember member) { + return jsonCommon(member).put(GlyphConstants.UI_ATTACHED, + clusterService.getLocalNode().equals(member.backingNode())); + } + + private ObjectNode jsonCommon(UiClusterMember member) { ControllerNode.State state = clusterService.getState(member.id()); + ControllerNode node = member.backingNode(); + if (node != null) { + IpAddress nodeIp = member.backingNode().ip(); + return objectNode() + .put("id", member.idAsString()) + .put("ip", nodeIp != null ? nodeIp.toString() : node.host()) + .put("online", state.isActive()) + .put("ready", state.isReady()); + } return objectNode() .put("id", member.idAsString()) - .put("ip", member.ip().toString()) - .put("online", state.isActive()) - .put("ready", state.isReady()) - .put(GlyphConstants.UI_ATTACHED, - member.backingNode().equals(clusterService.getLocalNode())); + .put("ip", "NONE") + .put("online", false) + .put("ready", false); } private ObjectNode jsonClosedRegion(String ridStr, UiRegion region) { diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/topo/Topo2TrafficMessageHandler.java b/web/gui/src/main/java/org/onosproject/ui/impl/topo/Topo2TrafficMessageHandler.java index 5f5d84dd84e..9c84563b327 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/topo/Topo2TrafficMessageHandler.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/topo/Topo2TrafficMessageHandler.java @@ -80,9 +80,6 @@ public class Topo2TrafficMessageHandler extends TopoologyTrafficMessageHandlerAb private static final String SRC = "src"; private static final String DST = "dst"; - // configuration parameters - private static final long TRAFFIC_PERIOD = 5000; - protected ServicesBundle services; private static final String MY_APP_ID = "org.onosproject.gui"; private ApplicationId appId; @@ -96,10 +93,16 @@ public void init(UiConnection connection, ServiceDirectory directory) { super.init(connection, directory); appId = directory.get(CoreService.class).registerApplication(MY_APP_ID); services = new ServicesBundle(directory); - traffic2 = new Traffic2Monitor(TRAFFIC_PERIOD, services, this); + traffic2 = new Traffic2Monitor(services, this); topoSession = ((UiWebSocket) connection).topoSession(); } + @Override + public void destroy() { + super.destroy(); + traffic2.stopMonitoring(); + } + @Override protected Collection createRequestHandlers() { return ImmutableSet.of( diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/topo/Traffic2Monitor.java b/web/gui/src/main/java/org/onosproject/ui/impl/topo/Traffic2Monitor.java index 76b9dc53814..1c0fb81af31 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/topo/Traffic2Monitor.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/topo/Traffic2Monitor.java @@ -48,13 +48,12 @@ public class Traffic2Monitor extends TrafficMonitorBase { /** * Constructs a traffic monitor. * - * @param trafficPeriod traffic task period in ms * @param servicesBundle bundle of services * @param msgHandler our message handler */ - public Traffic2Monitor(long trafficPeriod, ServicesBundle servicesBundle, + public Traffic2Monitor(ServicesBundle servicesBundle, Topo2TrafficMessageHandler msgHandler) { - super(trafficPeriod, servicesBundle, msgHandler); + super(servicesBundle, msgHandler); this.msgHandler = msgHandler; } @@ -64,6 +63,10 @@ protected void sendAllFlowTraffic() { msgHandler.sendHighlights(trafficSummary(TrafficLink.StatsType.FLOW_STATS)); } + @Override + protected void sendCustomTraffic() { + } + @Override protected void sendAllPortTrafficBits() { log.debug("TOPO-2-TRAFFIC: sendAllPortTrafficBits"); diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/topo/model/UiSharedTopologyModel.java b/web/gui/src/main/java/org/onosproject/ui/impl/topo/model/UiSharedTopologyModel.java index 6f8a7061454..474bb4b85da 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/topo/model/UiSharedTopologyModel.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/topo/model/UiSharedTopologyModel.java @@ -380,23 +380,25 @@ public void event(ClusterEvent event) { } private void handleEvent(ClusterEvent event) { - ControllerNode cnode = event.subject(); + if (event.instanceType() == ClusterEvent.InstanceType.ONOS) { + ControllerNode cnode = event.subject(); - switch (event.type()) { + switch (event.type()) { - case INSTANCE_ADDED: - case INSTANCE_ACTIVATED: - case INSTANCE_READY: - case INSTANCE_DEACTIVATED: - cache.addOrUpdateClusterMember(cnode); - break; + case INSTANCE_ADDED: + case INSTANCE_ACTIVATED: + case INSTANCE_READY: + case INSTANCE_DEACTIVATED: + cache.addOrUpdateClusterMember(cnode); + break; - case INSTANCE_REMOVED: - cache.removeClusterMember(cnode); - break; + case INSTANCE_REMOVED: + cache.removeClusterMember(cnode); + break; - default: - break; + default: + break; + } } } } diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/topo/util/ServicesBundle.java b/web/gui/src/main/java/org/onosproject/ui/impl/topo/util/ServicesBundle.java index e58b0f223c1..15677184cdb 100644 --- a/web/gui/src/main/java/org/onosproject/ui/impl/topo/util/ServicesBundle.java +++ b/web/gui/src/main/java/org/onosproject/ui/impl/topo/util/ServicesBundle.java @@ -37,6 +37,8 @@ */ public class ServicesBundle { + private ServiceDirectory directory; + private ClusterService clusterService; private TopologyService topologyService; @@ -60,6 +62,7 @@ public class ServicesBundle { */ public ServicesBundle(ServiceDirectory directory) { checkNotNull(directory, "Directory cannot be null"); + this.directory = directory; clusterService = directory.get(ClusterService.class); @@ -184,4 +187,15 @@ public StatisticService flowStats() { public PortStatisticsService portStats() { return portStatsService; } + + /** + * Returns the implementation of the specified service class. + * + * @param serviceClass service class + * @param class of service + * @return implementation of the service class + */ + public T get(Class serviceClass) { + return directory.get(serviceClass); + } } diff --git a/web/gui/src/main/resources/org/onosproject/ui/lion/core/view/Topo.properties b/web/gui/src/main/resources/org/onosproject/ui/lion/core/view/Topo.properties index c2cdfaecdd1..8f9334eb0c2 100644 --- a/web/gui/src/main/resources/org/onosproject/ui/lion/core/view/Topo.properties +++ b/web/gui/src/main/resources/org/onosproject/ui/lion/core/view/Topo.properties @@ -103,6 +103,7 @@ tr_btn_show_device_flows=Show Device Flows tr_btn_show_related_traffic=Show Related Traffic tr_btn_cancel_monitoring=Cancel traffic monitoring tr_btn_monitor_all=Monitor all traffic +tr_btn_monitor_custom_all=Custom traffic monitor tr_btn_show_dev_link_flows=Show device link flows tr_btn_show_all_rel_intents=Show all related intents tr_btn_show_prev_rel_intent=Show previous related intent diff --git a/web/gui/src/main/webapp/_doc/view/topo/README.force.md b/web/gui/src/main/webapp/_doc/view/topo/README.force.md index bbdfc45226a..55dbad5d203 100644 --- a/web/gui/src/main/webapp/_doc/view/topo/README.force.md +++ b/web/gui/src/main/webapp/_doc/view/topo/README.force.md @@ -62,9 +62,8 @@ Force service API. * Will briefly highlight links for which there is only a single backing link * Also writes a summary of bad links to the console -`setNodeScale()` -* `scale`: the scale to use -* Rescales the nodes and links (and labels) based on the input parameter +`adjustNodeScale()` +* Rescales the nodes and links (and labels) based on the current zoomer state `resetAllLocations()` * Resets all nodes (hosts, devices) to the configured positions diff --git a/web/gui/src/main/webapp/app/fw/svg/glyphData.js b/web/gui/src/main/webapp/app/fw/svg/glyphData.js index 9667aeb45a2..4de13513278 100644 --- a/web/gui/src/main/webapp/app/fw/svg/glyphData.js +++ b/web/gui/src/main/webapp/app/fw/svg/glyphData.js @@ -991,7 +991,7 @@ 'c5,0,7.2,3.1,7.2,6.3s-1.6,5-3.7,7.5-2.6,4.1-2.5,6.3v1.1H47.2Z' + 'm-1,6a2.5,2.5,0,0,1,2.6-2.7A2.7,2.7,0,1,1,46.3,55.3Z', - m_endstation: 'M75,49.5H25a1.8,1.8,0,0,1-1.8-1.8V27.1' + + m_terminal: 'M75,49.5H25a1.8,1.8,0,0,1-1.8-1.8V27.1' + 'A1.8,1.8,0,0,1,25,25.3H75a1.8,1.8,0,0,1,1.8,1.8V47.7' + 'A1.8,1.8,0,0,1,75,49.5ZM26.9,45.8H73.1V28.9H26.9V45.8Z' + 'M35.5,43.2H30.7a1.8,1.8,0,1,1,0-3.7h4.8A1.8,1.8,0,1,1,35.5,43.2Z' + @@ -1016,6 +1016,15 @@ 'c-6.2-4.7-9.7-10.9-9.7-17.5,0-13.8,15.1-25,33.6-25' + 'S83.6,32,83.6,45.8Z', + m_endstation: 'M10 10H90V35H10ZM14 14V31H86V14ZM18 18H50V27H18ZM21 21V24H47V21ZM70 18H79V27H70ZM73 21V24H76V21ZM10 40M10 40H90V65H10ZM14 44V61H86V44ZM18 48H50V57H18ZM21 51V54H47V51ZM70 48H79V57H70ZM73 51V54H76V51ZM10 70M10 70H90V95H10ZM14 74V91H86V74ZM18 78H50V87H18ZM21 81V84H47V81ZM70 78H79V87H70ZM73 81V84H76V81ZM10 100', + m_endstation2: 'M75 49.5H25A1.8 1.8 0 0123.2 47.7V27.1A1.8 1.8 0 0125 25.3H75A1.8 1.8 0 0176.8 27.1V47.7A1.8 1.8 0 0175 49.5ZM26.9 45.8H73.1V28.9H26.9V45.8ZM35.5 43.2H30.7A1.8 1.8 0 1130.7 39.5H35.5A1.8 1.8 0 1135.5 43.2ZM35 35H30.7A1.8 1.8 0 1130.7 31.3H35.5A1.8 1.8 0 1136 35ZM40 78H25A1.8 1.8 0 0123.2 76.2V55.6A1.8 1.8 0 0125 53.8H75A1.8 1.8 0 0176.8 55.6V76.2A1.8 1.8 0 0175 78ZM26.9 74.3H73.1V57.4H26.9V74.3ZM35.5 71.7H30.7A1.8 1.8 0 1130.7 68H35.5A1.8 1.8 0 1135.5 71.7ZM35 63.5H30.7A1.8 1.8 0 1130.7 59.8H35.5A1.8 1.8 0 1136 63.5Z', + m_endstation1: 'M87.5 44.5H12.5A2.7 1.8 0 019.8 42.7V22.1A2.7 1.8 0 0112.5 20.3H87.5A2.7 1.8 0 0190.2 22.1V42.7A2.7 1.8 0 0187.5 44.5ZM15.35 40.8H84.65V23.9H15.35V40.8ZM28.25 38.2H21.05A2.7 1.8 0 1121.05 34.5H28.25A2.7 1.8 0 1128.25 38.2ZM27.5 30H21.05A2.7 1.8 0 1121.05 26.3H28.25A2.7 1.8 0 1129 30ZM35 73H12.449A2.7 1.8 0 019.8 71.2V50.6A2.7 1.8 0 0112.5 48.8H87.5A2.7 1.8 0 0190.2 50.6V71.2A2.7 1.8 0 0187.5 73ZM15.35 69.3H84.65V52.4H15.35V69.3ZM28.25 66.7H21.05A2.7 1.8 0 1121.05 63H28.25A2.7 1.8 0 1128.25 66.7ZM27.5 58.5H21.05A2.7 1.8 0 1121.05 54.8H28.25A2.7 1.8 0 1129 58.5Z', + + m_tower: 'M26 97.5L52 39L78 97.5H68.9L52 58.5L35.1 97.5ZM68.9 45.5A1.3 1.3 90 0035.1 45.5H39A1.3 1.3 90 0165 45.5ZM74.1 45.5L78 45.5A1.3 1.3 90 0026 45.5H29.9A1.3 1.3 90 0174.1 45.5L78 45.5ZM85.8 45.5A1.3 1.3 90 0016.9 45.5H20.8A1.3 1.3 90 0181.9 45.5ZM40 90L64 90L65 93H39ZM44 81H60L61 84H43ZM48 72H56L57 75H47Z', + m_slrCamera: 'M70 48A1 1 0 0030 48A1 1 0 0070 48M34 48A1 1 0 0166 48A1 1 0 0134 48M15 30A5 5 0 0120 25H30A5 5 0 0035 20A6 6 0 0140 15H60A6 6 0 0165 20A5 5 0 0070 25H80A5 5 0 0185 30V70A5 5 0 0180 75H20A5 5 0 0115 70V30M19 30V70L20 71H80L81 70V30L80 29H70A10 10 0 0160 20L60 20H40L40 20A10 10 0 0130 29H20ZM28 36A1 1 0 0023 36A1 1 0 0028 36', + m_videoCamera: 'M30 25A5 5 0 0135 20H80A5 5 0 0185 25V50A5 5 0 0180 55H35A5 5 0 0130 50ZM35 25V25V50H80V25ZM30 30L10 25V50L30 45V40L14 44V31L30 35M47 33A1 1 0 0040 33A1 1 0 0047 33M60 55V70A5 5 0 0065 75H90V70H65V55ZM55 55C55 58 57 60 60 60H60V55ZM65 60C68 60 70 58 70 55H65Z', + m_cellPhone: 'M20 15A5 5 0 0125 10H55A5 5 0 0160 15V80A5 5 0 0155 85H25A5 5 0 0120 80ZM24 15V80L25 81H55L56 80V15L55 14H25ZM35 16H45V18H35ZM43 77A1 1 0 0037 77A1 1 0 0043 77M26 20L54 20V73H26V73ZM28 22V71H52V22ZM65 35C73 42 73 53 65 60L65 55C69 51 69 44 65 40ZM65 30V25C83 40 83 55 65 70V65C78 53 78 42 65 30M65 20V15C95 30 95 65 65 80V75C89 60 89 35 65 20', + m_otn: m_otn_base, m_roadm_otn: m_otn_base + m_octagon, diff --git a/web/gui/src/main/webapp/app/view/topo/topo.js b/web/gui/src/main/webapp/app/view/topo/topo.js index ab803f6ff58..4c87f86aeaa 100644 --- a/web/gui/src/main/webapp/app/view/topo/topo.js +++ b/web/gui/src/main/webapp/app/view/topo/topo.js @@ -83,6 +83,7 @@ function uiDragTxt() { return topoLion('qh_gest_drag'); } function uiCmdScrTxt() { return topoLion('qh_gest_cmd_scroll'); } function uiCmdDragTxt() { return topoLion('qh_gest_cmd_drag'); } + function quiet() { return ""; } actionMap = { I: [toggleInstances, togInst], @@ -103,12 +104,16 @@ N: [fltr.clickAction, cycLayer], L: [tfs.cycleDeviceLabels, cycDev], 'shift-L': [tfs.cycleHostLabels, cycHost], + 'alt-L': [tfs.cycleLinkLabels, quiet], U: [tfs.unpin, unpin], R: [resetZoom, rzoom], dot: [ttbs.toggleToolbar, togtb], E: [equalizeMasters, eqmaster], + "shift-openBracket": [tfs.toggleHostTextSize, quiet], + "shift-closeBracket": [tfs.toggleHostIconSize, quiet], + // -- instance color palette debug // 9: function () { sus.cat7().testCard(svg); }, @@ -305,7 +310,7 @@ // keep the map lines constant width while zooming mapG.style('stroke-width', (2.0 / sc) + 'px'); - tfs.setNodeScale(sc); + tfs.adjustNodeScale(); } function setUpZoom() { diff --git a/web/gui/src/main/webapp/app/view/topo/topoD3.js b/web/gui/src/main/webapp/app/view/topo/topoD3.js index 1b73fbf2ed2..d969bb753cc 100644 --- a/web/gui/src/main/webapp/app/view/topo/topoD3.js +++ b/web/gui/src/main/webapp/app/view/topo/topoD3.js @@ -88,11 +88,11 @@ }; function mapDeviceTypeToGlyph(type) { - return remappedDeviceTypes[type] || type || 'unknown'; + return remappedDeviceTypes[type] || ('m_' + type) || 'unknown'; } function mapHostTypeToGlyph(type) { - return remappedHostTypes[type] || type || 'unknown'; + return remappedHostTypes[type] || ('m_' + type) || 'unknown'; } function badgeStatus(badge) { @@ -101,7 +101,8 @@ // internal state var deviceLabelIndex = 0, - hostLabelIndex = 0; + hostLabelIndex = 0, + linkLabelsEnabled = true; // note: these are the device icon colors without affinity (no master) var dColTheme = { @@ -173,6 +174,11 @@ return d.labels[idx]; } + function toggleLinkLabels() { + linkLabelsEnabled = !linkLabelsEnabled; + return linkLabelsEnabled; + } + function trimLabel(label) { return (label && label.trim()) || ''; } @@ -390,39 +396,49 @@ var entering; api.updateLinkLabelModel(); + if (linkLabelsEnabled) { + + // for elements already existing, we need to update the text + // and adjust the rectangle size to fit + api.linkLabel().each(function (d) { + var el = d3.select(this), + rect = el.select('rect'), + text = el.select('text'); + text.text(d.label); + rect.attr(rectAroundText(el)); + }); - // for elements already existing, we need to update the text - // and adjust the rectangle size to fit - api.linkLabel().each(function (d) { - var el = d3.select(this), - rect = el.select('rect'), - text = el.select('text'); - text.text(d.label); - rect.attr(rectAroundText(el)); - }); - - entering = api.linkLabel().enter().append('g') - .classed('linkLabel', true) - .attr('id', function (d) { return d.id; }); + entering = api.linkLabel().enter().append('g') + .classed('linkLabel', true) + .attr('id', function (d) { return d.id; }); - entering.each(function (d) { - var el = d3.select(this), - rect, - text; + entering.each(function (d) { + var el = d3.select(this), + rect, + text; - if (d.ldata.type() === 'hostLink') { - el.classed('hostLinkLabel', true); - sus.visible(el, api.showHosts()); - } + if (d.ldata.type() === 'hostLink') { + el.classed('hostLinkLabel', true); + sus.visible(el, api.showHosts()); + } - d.el = el; - rect = el.append('rect'); - text = el.append('text').text(d.label); - rect.attr(rectAroundText(el)); - text.attr('dy', linkLabelOffset); + d.el = el; + rect = el.append('rect'); + text = el.append('text').text(d.label); + rect.attr(rectAroundText(el)); + text.attr('dy', linkLabelOffset); - el.attr('transform', transformLabel(d.ldata.position, d.key)); - }); + el.attr('transform', transformLabel(d.ldata.position, d.key)); + }); + } else { + api.linkLabel().each(function (d) { + var el = d3.select(this), + rect = el.select('rect'), + text = el.select('text'); + text.text(''); + rect.attr(rectAroundText(el)); + }); + } // Remove any labels that are no longer required. api.linkLabel().exit().remove(); @@ -648,6 +664,7 @@ setHostLabIndex: setHostLabIndex, hostLabel: hostLabel, deviceLabel: deviceLabel, + toggleLinkLabels: toggleLinkLabels, trimLabel: trimLabel, updateDeviceLabel: updateDeviceRendering, diff --git a/web/gui/src/main/webapp/app/view/topo/topoForce.js b/web/gui/src/main/webapp/app/view/topo/topoForce.js index b7cc07cd3b8..912e851ccbc 100644 --- a/web/gui/src/main/webapp/app/view/topo/topoForce.js +++ b/web/gui/src/main/webapp/app/view/topo/topoForce.js @@ -71,7 +71,7 @@ linkNums = [], // array of link number labels devIconDim = 36, // node target dimension devIconDimMin = 20, // node minimum dimension when zoomed out - devIconDimMax = 40, // node maximum dimension when zoomed in + devIconDimMax = 70, // node maximum dimension when zoomed in portLabelDim = 30; // SVG elements; @@ -107,6 +107,7 @@ }, }; + var hostScaleFactor = {icon: 1.0, text: 1.0}; // ========================== // === EVENT HANDLERS @@ -216,7 +217,9 @@ }; model.links.push(linkData); - var lnk = tms.createHostLink(model.id, cp.device, cp.port); + // Make cell-phone devices default to wireless; others have to be annotated explicitly + var cType = model.type === 'cellPhone' ? "wireless" : model.connectionType + var lnk = tms.createHostLink(model.id, cp.device, cp.port, cType); if (lnk) { network.links.push(lnk); lu[linkData.key] = lnk; @@ -362,6 +365,7 @@ var th = ts.theme(), el = ldata.el, type = ldata.type(), + connectionType = ldata.connectionType, lw = ldata.linkWidth(), online = ldata.online(), modeCls = ldata.expected() ? 'inactive' : 'not-permitted', @@ -381,10 +385,19 @@ if (type) { el.classed(type, true); } - el.transition() - .duration(delay) - .attr('stroke-width', linkScale(lw)) - .attr('stroke', linkConfig[th].baseColor); + + if (connectionType === 'wireless') { + el.transition() + .duration(delay) + .attr('stroke-width', linkScale(lw)) + .attr('stroke', linkConfig[th].baseColor) + .attr('stroke-dasharray', '3 6'); + } else { + el.transition() + .duration(delay) + .attr('stroke-width', linkScale(lw)) + .attr('stroke', linkConfig[th].baseColor); + } } } @@ -550,6 +563,10 @@ }); } + function cycleLinkLabels() { + td3.toggleLinkLabels(); + } + function unpin() { var hov = tss.hovered(); if (hov) { @@ -626,8 +643,8 @@ $timeout(updateLinks, 2000); } - function deviceScale() { - var scale = uplink.zoomer().scale(), + function deviceScale(scaleFactor) { + var scale = uplink.zoomer().scale() * scaleFactor, dim = devIconDim, multiplier = 1; @@ -640,37 +657,54 @@ return multiplier; } - function linkWidthScale(scale) { + function linkWidthScale() { var scale = uplink.zoomer().scale(); return linkScale(widthRatio) / scale; } - function portLabelScale(scale) { + function portLabelScale() { var scale = uplink.zoomer().scale(); return portLabelDim / (portLabelDim * scale); } - function setNodeScale(scale) { + function adjustNodeScale() { // Scale the network nodes _.each(network.nodes, function (node) { if (node.class === 'host') { - node.el.selectAll('g').style('transform', 'scale(' + deviceScale(scale) + ')'); - node.el.selectAll('text').style('transform', 'scale(' + deviceScale(scale) + ')'); + node.el.selectAll('g').style('transform', 'scale(' + deviceScale(hostScaleFactor.icon) + ')'); + node.el.selectAll('text').style('transform', 'scale(' + deviceScale(hostScaleFactor.text) + ')'); return; } - node.el.selectAll('*') - .style('transform', 'scale(' + deviceScale(scale) + ')'); + node.el.selectAll('*').style('transform', 'scale(' + deviceScale(1.0) + ')'); }); // Scale the network links _.each(network.links, function (link) { - link.el.style('stroke-width', linkWidthScale(scale) + 'px'); + link.el.style('stroke-width', linkWidthScale() + 'px'); }); d3.select('#topo-portLabels') .selectAll('.portLabel') .selectAll('*') - .style('transform', 'scale(' + portLabelScale(scale) + ')'); + .style('transform', 'scale(' + portLabelScale() + ')'); + } + + + function toggleScale(scale) { + if (scale < 0.5) { + return 1.0 + } + return scale - 0.2; + } + + function toggleHostTextSize() { + hostScaleFactor.text = toggleScale(hostScaleFactor.text); + adjustNodeScale(); + } + + function toggleHostIconSize() { + hostScaleFactor.icon = toggleScale(hostScaleFactor.icon); + adjustNodeScale(); } function resetAllLocations() { @@ -989,6 +1023,7 @@ function clearLinkTrafficStyle() { link.style('stroke-width', null) + .style('stroke', null) .classed(allTrafficClasses, false); } @@ -1285,10 +1320,14 @@ toggleOffline: toggleOffline, cycleDeviceLabels: cycleDeviceLabels, cycleHostLabels: cycleHostLabels, + cycleLinkLabels: cycleLinkLabels, unpin: unpin, showMastership: showMastership, showBadLinks: showBadLinks, - setNodeScale: setNodeScale, + adjustNodeScale: adjustNodeScale, + + toggleHostTextSize: toggleHostTextSize, + toggleHostIconSize: toggleHostIconSize, resetAllLocations: resetAllLocations, addDevice: addDevice, diff --git a/web/gui/src/main/webapp/app/view/topo/topoModel.js b/web/gui/src/main/webapp/app/view/topo/topoModel.js index 1084b528be7..6454f5a4f33 100644 --- a/web/gui/src/main/webapp/app/view/topo/topoModel.js +++ b/web/gui/src/main/webapp/app/view/topo/topoModel.js @@ -178,7 +178,7 @@ return node; } - function createHostLink(hostId, devId, devPort) { + function createHostLink(hostId, devId, devPort, connectionType) { var linkKey = hostId + '/0-' + devId + '/' + devPort, lnk = linkEndPoints(hostId, devId); @@ -194,6 +194,7 @@ tgtPort: devPort, type: function () { return 'hostLink'; }, + connectionType: function () { return connectionType; }, expected: function () { return true; }, online: function () { // hostlink target is edge switch diff --git a/web/gui/src/main/webapp/app/view/topo/topoOverlay.js b/web/gui/src/main/webapp/app/view/topo/topoOverlay.js index 4e9133a1948..7cf47ffe384 100644 --- a/web/gui/src/main/webapp/app/view/topo/topoOverlay.js +++ b/web/gui/src/main/webapp/app/view/topo/topoOverlay.js @@ -398,6 +398,8 @@ } }); + const stylePattern = /style=\"[^\"]*\"/g; + data.links.forEach(function (link) { var ldata = api.findLinkById(link.id); @@ -405,6 +407,14 @@ if (!link.subdue) { api.unsupLink(ldata.key, less); } + var styleFound = link.css.match(stylePattern); + if (styleFound) { + link.css = link.css.replace(stylePattern, ''); + var style = styleFound[0].replace('style="', '').replace('"$', '') + ldata.el.attr('style', style); + } else { + ldata.el.attr('style', ''); + } ldata.el.classed(link.css, true); ldata.label = link.label; diff --git a/web/gui/src/main/webapp/app/view/topo/topoTraffic.js b/web/gui/src/main/webapp/app/view/topo/topoTraffic.js index 640a233e807..c643494132b 100644 --- a/web/gui/src/main/webapp/app/view/topo/topoTraffic.js +++ b/web/gui/src/main/webapp/app/view/topo/topoTraffic.js @@ -47,7 +47,8 @@ // internal state var trafficMode = null, hoverMode = null, - allTrafficIndex = 0; + allTrafficIndex = 0, + customTrafficIndex = 0; // === ----------------------------------------------------- @@ -137,6 +138,16 @@ allTrafficIndex = (allTrafficIndex + 1) % 3; } + function showCustomTraffic() { + trafficMode = 'allCustom'; + hoverMode = null; + wss.sendEvent('requestCustomTraffic', { + index: customTrafficIndex, + }); + flash.flash('Custom Traffic'); + customTrafficIndex = customTrafficIndex + 1; + } + function showDeviceLinkFlows() { trafficMode = hoverMode = 'flows'; requestDeviceLinkFlows(); @@ -270,6 +281,7 @@ showNextIntent: showNextIntent, showSelectedIntentTraffic: showSelectedIntentTraffic, selectIntent: selectIntent, + showCustomTraffic: showCustomTraffic, // invoked from mouseover/mouseout and selection change requestTrafficForMode: requestTrafficForMode, diff --git a/web/gui/src/main/webapp/app/view/topo/topoTrafficNew.js b/web/gui/src/main/webapp/app/view/topo/topoTrafficNew.js index 143aa300898..2057f7b708f 100644 --- a/web/gui/src/main/webapp/app/view/topo/topoTrafficNew.js +++ b/web/gui/src/main/webapp/app/view/topo/topoTrafficNew.js @@ -109,9 +109,14 @@ tt: function () { return topoLion('tr_btn_monitor_sel_intent'); }, gid: 'm_intentTraffic', }, + C: { + cb: function () { tts.showCustomTraffic(); }, + tt: function () { return topoLion('tr_btn_monitor_custom_all'); }, + gid: 'm_allTraffic', + }, _keyOrder: [ - '0', 'A', 'F', 'V', 'leftArrow', 'rightArrow', 'W', + '0', 'A', 'F', 'V', 'leftArrow', 'rightArrow', 'W', 'C' ], }, diff --git a/web/gui/src/main/webapp/tests/app/view/topo/topoForce-spec.js b/web/gui/src/main/webapp/tests/app/view/topo/topoForce-spec.js index 85e2f9e8b17..1d9f63cf309 100644 --- a/web/gui/src/main/webapp/tests/app/view/topo/topoForce-spec.js +++ b/web/gui/src/main/webapp/tests/app/view/topo/topoForce-spec.js @@ -42,7 +42,7 @@ describe('factory: view/topo/topoForce.js', function() { 'updateDeviceColors', 'toggleHosts', 'togglePorts', 'toggleOffline', 'cycleDeviceLabels', 'cycleHostLabels', 'unpin', - 'showMastership', 'showBadLinks', 'setNodeScale', + 'showMastership', 'showBadLinks', 'adjustNodeScale', 'resetAllLocations', 'addDevice', 'updateDevice', 'removeDevice', 'addHost', 'updateHost', 'moveHost', 'removeHost', diff --git a/web/gui2-fw-lib/BUILD.bazel b/web/gui2-fw-lib/BUILD.bazel index 30df3be8ea5..cbf7358d431 100644 --- a/web/gui2-fw-lib/BUILD.bazel +++ b/web/gui2-fw-lib/BUILD.bazel @@ -14,9 +14,8 @@ limitations under the License. """ -load("@npm_angular_bazel//:index.bzl", "ng_module", "ng_package") -load("@npm_bazel_typescript//:index.bzl", "ts_library") -load("@npm_bazel_karma//:index.bzl", "karma_web_test") +load("@npm//@bazel/typescript:index.bzl", "ts_library") +load("@npm//@bazel/karma:index.bzl", "karma_web_test") package(default_visibility = ["//:__subpackages__"]) @@ -28,7 +27,7 @@ NG_FACTORY_ADDED_IMPORTS = [ "@npm//@angular/forms", ] -ng_module( +ts_library( name = "gui2-fw-lib", srcs = glob( include = [ @@ -39,17 +38,22 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = glob([ "lib/**/*.css", "lib/**/*.html", ]), - entry_point = ":public_api.ts", + module_name = "org_onosproject_onos/web/gui2-fw-lib", + # entry_point = ":public_api.ts", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "@npm//@angular/animations", "@npm//@angular/common", + "@npm//@angular/compiler-cli", + "@npm//@angular/core", "@npm//@angular/platform-browser", "@npm//@angular/router", + "@npm//@bazel/typescript", "@npm//d3", "@npm//rxjs", ], @@ -105,18 +109,12 @@ karma_web_test( ], ) -# bazel run //web/gui2-fw-lib:npm_package.pack to create a tgz -ng_package( - name = "npm_package", - srcs = ["package.json"], - data = glob([ - "**/*.css", - "**/*.html", - ]), - entry_point = ":public_api.ts", - include_devmode_srcs = False, - readme_md = ":README.md", - deps = [ - ":gui2-fw-lib", +filegroup( + name = "extra_css", + srcs = [ + "lib/widget/panel.css", + "lib/widget/panel-theme.css", + "lib/widget/table.css", + "lib/widget/table.theme.css", ], ) diff --git a/web/gui2-fw-lib/lib/remote/websocket.service.ts b/web/gui2-fw-lib/lib/remote/websocket.service.ts index 93020f07370..c45e23fab42 100644 --- a/web/gui2-fw-lib/lib/remote/websocket.service.ts +++ b/web/gui2-fw-lib/lib/remote/websocket.service.ts @@ -187,7 +187,7 @@ export class WebSocketService { let ev: EventType; let h; try { - ev = JSON.parse(msgEvent.data); + ev = JSON.parse(msgEvent.data.toString()) as EventType; } catch (e) { this.log.error('Message.data is not valid JSON', msgEvent.data, e); return null; diff --git a/web/gui2-fw-lib/lib/widget/detailspanel.base.ts b/web/gui2-fw-lib/lib/widget/detailspanel.base.ts index 97efee6fe55..e61b1f27e5c 100644 --- a/web/gui2-fw-lib/lib/widget/detailspanel.base.ts +++ b/web/gui2-fw-lib/lib/widget/detailspanel.base.ts @@ -18,7 +18,7 @@ import { LogService } from '../log.service'; import { WebSocketService } from '../remote/websocket.service'; import { PanelBaseImpl } from './panel.base'; -import { Output, EventEmitter, Input } from '@angular/core'; +import { InjectionToken, Inject, Component, Output, EventEmitter, Input } from '@angular/core'; /** * A generic model of the data returned from the *DetailsResponse @@ -27,6 +27,8 @@ export interface DetailsResponse { details: any; } +export const TAG = new InjectionToken('tag'); + /** * Extends the PanelBase abstract class specifically for showing details * @@ -35,6 +37,9 @@ export interface DetailsResponse { * * This replaces the detailspanel service in the old gui */ +@Component({ + template: '' +}) export abstract class DetailsPanelBaseImpl extends PanelBaseImpl { @Input() id: string; @@ -51,7 +56,7 @@ export abstract class DetailsPanelBaseImpl extends PanelBaseImpl { protected fs: FnService, protected log: LogService, protected wss: WebSocketService, - protected tag: string, + @Inject(TAG) protected tag: string, ) { super(fs, log); this.root = tag + 's'; diff --git a/web/gui2-topo-lib/BUILD.bazel b/web/gui2-topo-lib/BUILD.bazel index f4349070ed0..d104636270a 100644 --- a/web/gui2-topo-lib/BUILD.bazel +++ b/web/gui2-topo-lib/BUILD.bazel @@ -1,6 +1,5 @@ -load("@npm_angular_bazel//:index.bzl", "ng_module") -load("@npm_bazel_typescript//:index.bzl", "ts_library") -load("@npm_bazel_karma//:index.bzl", "karma_web_test") +load("@npm//@bazel/typescript:index.bzl", "ts_library") +load("@npm//@bazel/karma:index.bzl", "karma_web_test") package(default_visibility = ["//:__subpackages__"]) @@ -10,7 +9,7 @@ NG_FACTORY_ADDED_IMPORTS = [ "@npm//@angular/forms", ] -ng_module( +ts_library( name = "gui2-topo-lib", srcs = glob( include = ["**/*.ts"], @@ -18,14 +17,18 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = NG_FACTORY_ADDED_IMPORTS + [ "//web/gui2-fw-lib", "@npm//@angular/core", + "@npm//@angular/common", "@npm//@angular/router", "@npm//@angular/platform-browser", "@npm//rxjs", @@ -42,7 +45,6 @@ ts_library( # TODO re-enable this test exclude = [ "lib/layer/backgroundsvg/backgroundsvg.component.spec.ts", - "lib/layer/forcesvg/forcesvg.component.spec.ts", "lib/layer/forcesvg/visuals/hostnodesvg/hostnodesvg.component.spec.ts", ], ), @@ -144,6 +146,9 @@ genrule( && echo '});' >> $@""", ) +# These tests are not run as part of CI because they require a browser to be installed +# Run them locally on your system if you are making a change to any of the TypeScript files +# bazel test //web/gui2-topo-lib:test-not-coverage karma_web_test( name = "test-not-coverage", # coverage is to avoid being picked up by 'ot' alias srcs = [ @@ -153,7 +158,7 @@ karma_web_test( "@npm//:node_modules/zone.js/dist/zone-testing-bundle.js", "@npm//:node_modules/reflect-metadata/Reflect.js", ], - config_file = "//web/gui2/src/main/webapp:karma.conf.js", + config_file = "//web/gui2/src/main/webapp:karma.conf.js", # Edit this file to set the Browsers needed tags = ["native"], runtime_deps = [ "//web/gui2/src/main/webapp:initialize_testbed", diff --git a/web/gui2-topo-lib/lib/layer/forcesvg/forcesvg.component.spec.ts b/web/gui2-topo-lib/lib/layer/forcesvg/forcesvg.component.spec.ts index ba9c996ab9f..96142af6889 100644 --- a/web/gui2-topo-lib/lib/layer/forcesvg/forcesvg.component.spec.ts +++ b/web/gui2-topo-lib/lib/layer/forcesvg/forcesvg.component.spec.ts @@ -30,11 +30,2121 @@ import {DeviceNodeSvgComponent} from './visuals/devicenodesvg/devicenodesvg.comp import {SubRegionNodeSvgComponent} from './visuals/subregionnodesvg/subregionnodesvg.component'; import {HostNodeSvgComponent} from './visuals/hostnodesvg/hostnodesvg.component'; import {LinkSvgComponent} from './visuals/linksvg/linksvg.component'; -import {Device, Host, Link, LinkType, LinkHighlight, Region} from './models'; +import {Device, Host, Link, LinkType, LinkHighlight, Region, Node} from './models'; import {ChangeDetectorRef, SimpleChange} from '@angular/core'; import {TopologyService} from '../../topology.service'; import {BadgeSvgComponent} from './visuals/badgesvg/badgesvg.component'; +export const test_module_topo2CurrentRegion = `{ + "event": "topo2CurrentRegion", + "payload": { + "id": "(root)", + "subregions": [], + "links": [ + { + "id": "00:AA:00:00:00:03/None~of:0000000000000205/6", + "epA": "00:AA:00:00:00:03/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "6", + "rollup": [ + { + "id": "00:AA:00:00:00:03/None~of:0000000000000205/6", + "epA": "00:AA:00:00:00:03/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "6" + } + ] + }, + { + "id": "of:0000000000000205/3~of:0000000000000227/5", + "epA": "of:0000000000000205/3", + "epB": "of:0000000000000227/5", + "type": "UiDeviceLink", + "portA": "3", + "portB": "5", + "rollup": [ + { + "id": "of:0000000000000205/3~of:0000000000000227/5", + "epA": "of:0000000000000205/3", + "epB": "of:0000000000000227/5", + "type": "UiDeviceLink", + "portA": "3", + "portB": "5" + } + ] + }, + { + "id": "of:0000000000000206/2~of:0000000000000226/8", + "epA": "of:0000000000000206/2", + "epB": "of:0000000000000226/8", + "type": "UiDeviceLink", + "portA": "2", + "portB": "8", + "rollup": [ + { + "id": "of:0000000000000206/2~of:0000000000000226/8", + "epA": "of:0000000000000206/2", + "epB": "of:0000000000000226/8", + "type": "UiDeviceLink", + "portA": "2", + "portB": "8" + } + ] + }, + { + "id": "00:BB:00:00:00:05/None~of:0000000000000203/7", + "epA": "00:BB:00:00:00:05/None", + "epB": "of:0000000000000203", + "type": "UiEdgeLink", + "portB": "7", + "rollup": [ + { + "id": "00:BB:00:00:00:05/None~of:0000000000000203/7", + "epA": "00:BB:00:00:00:05/None", + "epB": "of:0000000000000203", + "type": "UiEdgeLink", + "portB": "7" + } + ] + }, + { + "id": "00:DD:00:00:00:01/None~of:0000000000000207/3", + "epA": "00:DD:00:00:00:01/None", + "epB": "of:0000000000000207", + "type": "UiEdgeLink", + "portB": "3", + "rollup": [ + { + "id": "00:DD:00:00:00:01/None~of:0000000000000207/3", + "epA": "00:DD:00:00:00:01/None", + "epB": "of:0000000000000207", + "type": "UiEdgeLink", + "portB": "3" + } + ] + }, + { + "id": "of:0000000000000203/1~of:0000000000000226/1", + "epA": "of:0000000000000203/1", + "epB": "of:0000000000000226/1", + "type": "UiDeviceLink", + "portA": "1", + "portB": "1", + "rollup": [ + { + "id": "of:0000000000000203/1~of:0000000000000226/1", + "epA": "of:0000000000000203/1", + "epB": "of:0000000000000226/1", + "type": "UiDeviceLink", + "portA": "1", + "portB": "1" + } + ] + }, + { + "id": "of:0000000000000207/2~of:0000000000000247/1", + "epA": "of:0000000000000207/2", + "epB": "of:0000000000000247/1", + "type": "UiDeviceLink", + "portA": "2", + "portB": "1", + "rollup": [ + { + "id": "of:0000000000000207/2~of:0000000000000247/1", + "epA": "of:0000000000000207/2", + "epB": "of:0000000000000247/1", + "type": "UiDeviceLink", + "portA": "2", + "portB": "1" + } + ] + }, + { + "id": "00:99:66:00:00:01/None~of:0000000000000205/10", + "epA": "00:99:66:00:00:01/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "10", + "rollup": [ + { + "id": "00:99:66:00:00:01/None~of:0000000000000205/10", + "epA": "00:99:66:00:00:01/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "10" + } + ] + }, + { + "id": "of:0000000000000208/1~of:0000000000000246/2", + "epA": "of:0000000000000208/1", + "epB": "of:0000000000000246/2", + "type": "UiDeviceLink", + "portA": "1", + "portB": "2", + "rollup": [ + { + "id": "of:0000000000000208/1~of:0000000000000246/2", + "epA": "of:0000000000000208/1", + "epB": "of:0000000000000246/2", + "type": "UiDeviceLink", + "portA": "1", + "portB": "2" + } + ] + }, + { + "id": "of:0000000000000206/1~of:0000000000000226/7", + "epA": "of:0000000000000206/1", + "epB": "of:0000000000000226/7", + "type": "UiDeviceLink", + "portA": "1", + "portB": "7", + "rollup": [ + { + "id": "of:0000000000000206/1~of:0000000000000226/7", + "epA": "of:0000000000000206/1", + "epB": "of:0000000000000226/7", + "type": "UiDeviceLink", + "portA": "1", + "portB": "7" + } + ] + }, + { + "id": "of:0000000000000226/9~of:0000000000000246/3", + "epA": "of:0000000000000226/9", + "epB": "of:0000000000000246/3", + "type": "UiDeviceLink", + "portA": "9", + "portB": "3", + "rollup": [ + { + "id": "of:0000000000000226/9~of:0000000000000246/3", + "epA": "of:0000000000000226/9", + "epB": "of:0000000000000246/3", + "type": "UiDeviceLink", + "portA": "9", + "portB": "3" + } + ] + }, + { + "id": "00:AA:00:00:00:04/None~of:0000000000000205/7", + "epA": "00:AA:00:00:00:04/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "7", + "rollup": [ + { + "id": "00:AA:00:00:00:04/None~of:0000000000000205/7", + "epA": "00:AA:00:00:00:04/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "7" + } + ] + }, + { + "id": "00:88:00:00:00:03/110~of:0000000000000205/11", + "epA": "00:88:00:00:00:03/110", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "11", + "rollup": [ + { + "id": "00:88:00:00:00:03/110~of:0000000000000205/11", + "epA": "00:88:00:00:00:03/110", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "11" + } + ] + }, + { + "id": "of:0000000000000204/1~of:0000000000000226/3", + "epA": "of:0000000000000204/1", + "epB": "of:0000000000000226/3", + "type": "UiDeviceLink", + "portA": "1", + "portB": "3", + "rollup": [ + { + "id": "of:0000000000000204/1~of:0000000000000226/3", + "epA": "of:0000000000000204/1", + "epB": "of:0000000000000226/3", + "type": "UiDeviceLink", + "portA": "1", + "portB": "3" + } + ] + }, + { + "id": "of:0000000000000203/2~of:0000000000000226/2", + "epA": "of:0000000000000203/2", + "epB": "of:0000000000000226/2", + "type": "UiDeviceLink", + "portA": "2", + "portB": "2", + "rollup": [ + { + "id": "of:0000000000000203/2~of:0000000000000226/2", + "epA": "of:0000000000000203/2", + "epB": "of:0000000000000226/2", + "type": "UiDeviceLink", + "portA": "2", + "portB": "2" + } + ] + }, + { + "id": "00:88:00:00:00:01/None~of:0000000000000205/12", + "epA": "00:88:00:00:00:01/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "12", + "rollup": [ + { + "id": "00:88:00:00:00:01/None~of:0000000000000205/12", + "epA": "00:88:00:00:00:01/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "12" + } + ] + }, + { + "id": "00:88:00:00:00:04/160~of:0000000000000206/6", + "epA": "00:88:00:00:00:04/160", + "epB": "of:0000000000000206", + "type": "UiEdgeLink", + "portB": "6", + "rollup": [ + { + "id": "00:88:00:00:00:04/160~of:0000000000000206/6", + "epA": "00:88:00:00:00:04/160", + "epB": "of:0000000000000206", + "type": "UiEdgeLink", + "portB": "6" + } + ] + }, + { + "id": "00:DD:00:00:00:02/None~of:0000000000000208/3", + "epA": "00:DD:00:00:00:02/None", + "epB": "of:0000000000000208", + "type": "UiEdgeLink", + "portB": "3", + "rollup": [ + { + "id": "00:DD:00:00:00:02/None~of:0000000000000208/3", + "epA": "00:DD:00:00:00:02/None", + "epB": "of:0000000000000208", + "type": "UiEdgeLink", + "portB": "3" + } + ] + }, + { + "id": "of:0000000000000203/3~of:0000000000000227/1", + "epA": "of:0000000000000203/3", + "epB": "of:0000000000000227/1", + "type": "UiDeviceLink", + "portA": "3", + "portB": "1", + "rollup": [ + { + "id": "of:0000000000000203/3~of:0000000000000227/1", + "epA": "of:0000000000000203/3", + "epB": "of:0000000000000227/1", + "type": "UiDeviceLink", + "portA": "3", + "portB": "1" + } + ] + }, + { + "id": "of:0000000000000208/2~of:0000000000000247/2", + "epA": "of:0000000000000208/2", + "epB": "of:0000000000000247/2", + "type": "UiDeviceLink", + "portA": "2", + "portB": "2", + "rollup": [ + { + "id": "of:0000000000000208/2~of:0000000000000247/2", + "epA": "of:0000000000000208/2", + "epB": "of:0000000000000247/2", + "type": "UiDeviceLink", + "portA": "2", + "portB": "2" + } + ] + }, + { + "id": "of:0000000000000205/1~of:0000000000000226/5", + "epA": "of:0000000000000205/1", + "epB": "of:0000000000000226/5", + "type": "UiDeviceLink", + "portA": "1", + "portB": "5", + "rollup": [ + { + "id": "of:0000000000000205/1~of:0000000000000226/5", + "epA": "of:0000000000000205/1", + "epB": "of:0000000000000226/5", + "type": "UiDeviceLink", + "portA": "1", + "portB": "5" + } + ] + }, + { + "id": "of:0000000000000204/2~of:0000000000000226/4", + "epA": "of:0000000000000204/2", + "epB": "of:0000000000000226/4", + "type": "UiDeviceLink", + "portA": "2", + "portB": "4", + "rollup": [ + { + "id": "of:0000000000000204/2~of:0000000000000226/4", + "epA": "of:0000000000000204/2", + "epB": "of:0000000000000226/4", + "type": "UiDeviceLink", + "portA": "2", + "portB": "4" + } + ] + }, + { + "id": "00:AA:00:00:00:01/None~of:0000000000000204/6", + "epA": "00:AA:00:00:00:01/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "6", + "rollup": [ + { + "id": "00:AA:00:00:00:01/None~of:0000000000000204/6", + "epA": "00:AA:00:00:00:01/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "6" + } + ] + }, + { + "id": "00:BB:00:00:00:03/None~of:0000000000000205/8", + "epA": "00:BB:00:00:00:03/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "8", + "rollup": [ + { + "id": "00:BB:00:00:00:03/None~of:0000000000000205/8", + "epA": "00:BB:00:00:00:03/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "8" + } + ] + }, + { + "id": "of:0000000000000206/4~of:0000000000000227/8", + "epA": "of:0000000000000206/4", + "epB": "of:0000000000000227/8", + "type": "UiDeviceLink", + "portA": "4", + "portB": "8", + "rollup": [ + { + "id": "of:0000000000000206/4~of:0000000000000227/8", + "epA": "of:0000000000000206/4", + "epB": "of:0000000000000227/8", + "type": "UiDeviceLink", + "portA": "4", + "portB": "8" + } + ] + }, + { + "id": "00:AA:00:00:00:05/None~of:0000000000000203/6", + "epA": "00:AA:00:00:00:05/None", + "epB": "of:0000000000000203", + "type": "UiEdgeLink", + "portB": "6", + "rollup": [ + { + "id": "00:AA:00:00:00:05/None~of:0000000000000203/6", + "epA": "00:AA:00:00:00:05/None", + "epB": "of:0000000000000203", + "type": "UiEdgeLink", + "portB": "6" + } + ] + }, + { + "id": "of:0000000000000205/5~of:0000000000000206/5", + "epA": "of:0000000000000205/5", + "epB": "of:0000000000000206/5", + "type": "UiDeviceLink", + "portA": "5", + "portB": "5", + "rollup": [ + { + "id": "of:0000000000000205/5~of:0000000000000206/5", + "epA": "of:0000000000000205/5", + "epB": "of:0000000000000206/5", + "type": "UiDeviceLink", + "portA": "5", + "portB": "5" + } + ] + }, + { + "id": "00:BB:00:00:00:02/None~of:0000000000000204/9", + "epA": "00:BB:00:00:00:02/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "9", + "rollup": [ + { + "id": "00:BB:00:00:00:02/None~of:0000000000000204/9", + "epA": "00:BB:00:00:00:02/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "9" + } + ] + }, + { + "id": "of:0000000000000204/3~of:0000000000000227/3", + "epA": "of:0000000000000204/3", + "epB": "of:0000000000000227/3", + "type": "UiDeviceLink", + "portA": "3", + "portB": "3", + "rollup": [ + { + "id": "of:0000000000000204/3~of:0000000000000227/3", + "epA": "of:0000000000000204/3", + "epB": "of:0000000000000227/3", + "type": "UiDeviceLink", + "portA": "3", + "portB": "3" + } + ] + }, + { + "id": "00:EE:00:00:00:01/None~of:0000000000000207/4", + "epA": "00:EE:00:00:00:01/None", + "epB": "of:0000000000000207", + "type": "UiEdgeLink", + "portB": "4", + "rollup": [ + { + "id": "00:EE:00:00:00:01/None~of:0000000000000207/4", + "epA": "00:EE:00:00:00:01/None", + "epB": "of:0000000000000207", + "type": "UiEdgeLink", + "portB": "4" + } + ] + }, + { + "id": "of:0000000000000203/4~of:0000000000000227/2", + "epA": "of:0000000000000203/4", + "epB": "of:0000000000000227/2", + "type": "UiDeviceLink", + "portA": "4", + "portB": "2", + "rollup": [ + { + "id": "of:0000000000000203/4~of:0000000000000227/2", + "epA": "of:0000000000000203/4", + "epB": "of:0000000000000227/2", + "type": "UiDeviceLink", + "portA": "4", + "portB": "2" + } + ] + }, + { + "id": "of:0000000000000205/2~of:0000000000000226/6", + "epA": "of:0000000000000205/2", + "epB": "of:0000000000000226/6", + "type": "UiDeviceLink", + "portA": "2", + "portB": "6", + "rollup": [ + { + "id": "of:0000000000000205/2~of:0000000000000226/6", + "epA": "of:0000000000000205/2", + "epB": "of:0000000000000226/6", + "type": "UiDeviceLink", + "portA": "2", + "portB": "6" + } + ] + }, + { + "id": "00:99:00:00:00:01/None~of:0000000000000205/10", + "epA": "00:99:00:00:00:01/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "10", + "rollup": [ + { + "id": "00:99:00:00:00:01/None~of:0000000000000205/10", + "epA": "00:99:00:00:00:01/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "10" + } + ] + }, + { + "id": "of:0000000000000205/4~of:0000000000000227/6", + "epA": "of:0000000000000205/4", + "epB": "of:0000000000000227/6", + "type": "UiDeviceLink", + "portA": "4", + "portB": "6", + "rollup": [ + { + "id": "of:0000000000000205/4~of:0000000000000227/6", + "epA": "of:0000000000000205/4", + "epB": "of:0000000000000227/6", + "type": "UiDeviceLink", + "portA": "4", + "portB": "6" + } + ] + }, + { + "id": "of:0000000000000206/3~of:0000000000000227/7", + "epA": "of:0000000000000206/3", + "epB": "of:0000000000000227/7", + "type": "UiDeviceLink", + "portA": "3", + "portB": "7", + "rollup": [ + { + "id": "of:0000000000000206/3~of:0000000000000227/7", + "epA": "of:0000000000000206/3", + "epB": "of:0000000000000227/7", + "type": "UiDeviceLink", + "portA": "3", + "portB": "7" + } + ] + }, + { + "id": "00:BB:00:00:00:04/None~of:0000000000000205/9", + "epA": "00:BB:00:00:00:04/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "9", + "rollup": [ + { + "id": "00:BB:00:00:00:04/None~of:0000000000000205/9", + "epA": "00:BB:00:00:00:04/None", + "epB": "of:0000000000000205", + "type": "UiEdgeLink", + "portB": "9" + } + ] + }, + { + "id": "00:AA:00:00:00:02/None~of:0000000000000204/7", + "epA": "00:AA:00:00:00:02/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "7", + "rollup": [ + { + "id": "00:AA:00:00:00:02/None~of:0000000000000204/7", + "epA": "00:AA:00:00:00:02/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "7" + } + ] + }, + { + "id": "00:BB:00:00:00:01/None~of:0000000000000204/8", + "epA": "00:BB:00:00:00:01/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "8", + "rollup": [ + { + "id": "00:BB:00:00:00:01/None~of:0000000000000204/8", + "epA": "00:BB:00:00:00:01/None", + "epB": "of:0000000000000204", + "type": "UiEdgeLink", + "portB": "8" + } + ] + }, + { + "id": "of:0000000000000207/1~of:0000000000000246/1", + "epA": "of:0000000000000207/1", + "epB": "of:0000000000000246/1", + "type": "UiDeviceLink", + "portA": "1", + "portB": "1", + "rollup": [ + { + "id": "of:0000000000000207/1~of:0000000000000246/1", + "epA": "of:0000000000000207/1", + "epB": "of:0000000000000246/1", + "type": "UiDeviceLink", + "portA": "1", + "portB": "1" + } + ] + }, + { + "id": "00:88:00:00:00:02/None~of:0000000000000206/7", + "epA": "00:88:00:00:00:02/None", + "epB": "of:0000000000000206", + "type": "UiEdgeLink", + "portB": "7", + "rollup": [ + { + "id": "00:88:00:00:00:02/None~of:0000000000000206/7", + "epA": "00:88:00:00:00:02/None", + "epB": "of:0000000000000206", + "type": "UiEdgeLink", + "portB": "7" + } + ] + }, + { + "id": "00:EE:00:00:00:02/None~of:0000000000000208/4", + "epA": "00:EE:00:00:00:02/None", + "epB": "of:0000000000000208", + "type": "UiEdgeLink", + "portB": "4", + "rollup": [ + { + "id": "00:EE:00:00:00:02/None~of:0000000000000208/4", + "epA": "00:EE:00:00:00:02/None", + "epB": "of:0000000000000208", + "type": "UiEdgeLink", + "portB": "4" + } + ] + }, + { + "id": "of:0000000000000204/4~of:0000000000000227/4", + "epA": "of:0000000000000204/4", + "epB": "of:0000000000000227/4", + "type": "UiDeviceLink", + "portA": "4", + "portB": "4", + "rollup": [ + { + "id": "of:0000000000000204/4~of:0000000000000227/4", + "epA": "of:0000000000000204/4", + "epB": "of:0000000000000227/4", + "type": "UiDeviceLink", + "portA": "4", + "portB": "4" + } + ] + }, + { + "id": "of:0000000000000203/5~of:0000000000000204/5", + "epA": "of:0000000000000203/5", + "epB": "of:0000000000000204/5", + "type": "UiDeviceLink", + "portA": "5", + "portB": "5", + "rollup": [ + { + "id": "of:0000000000000203/5~of:0000000000000204/5", + "epA": "of:0000000000000203/5", + "epB": "of:0000000000000204/5", + "type": "UiDeviceLink", + "portA": "5", + "portB": "5" + } + ] + }, + { + "id": "of:0000000000000227/9~of:0000000000000247/3", + "epA": "of:0000000000000227/9", + "epB": "of:0000000000000247/3", + "type": "UiDeviceLink", + "portA": "9", + "portB": "3", + "rollup": [ + { + "id": "of:0000000000000227/9~of:0000000000000247/3", + "epA": "of:0000000000000227/9", + "epB": "of:0000000000000247/3", + "type": "UiDeviceLink", + "portA": "9", + "portB": "3" + } + ] + } + ], + "devices": [ + [], + [], + [ + { + "id": "of:0000000000000246", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "40.15", + "name": "s246", + "locType": "geo", + "channelId": "10.192.19.69:59980", + "longitude": "-121.679" + }, + "location": { + "locType": "geo", + "latOrY": 40.15, + "longOrX": -121.679 + } + }, + { + "id": "of:0000000000000206", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "36.766", + "name": "s206", + "locType": "geo", + "channelId": "10.192.19.69:59975", + "longitude": "-92.029" + }, + "location": { + "locType": "geo", + "latOrY": 36.766, + "longOrX": -92.029 + } + }, + { + "id": "of:0000000000000227", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "44.205", + "name": "s227", + "locType": "geo", + "channelId": "10.192.19.69:59979", + "longitude": "-96.359" + }, + "location": { + "locType": "geo", + "latOrY": 44.205, + "longOrX": -96.359 + } + }, + { + "id": "of:0000000000000208", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "36.766", + "name": "s208", + "locType": "geo", + "channelId": "10.192.19.69:59977", + "longitude": "-116.029" + }, + "location": { + "locType": "geo", + "latOrY": 36.766, + "longOrX": -116.029 + } + }, + { + "id": "of:0000000000000205", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "36.766", + "name": "s205", + "locType": "geo", + "channelId": "10.192.19.69:59974", + "longitude": "-96.89" + }, + "location": { + "locType": "geo", + "latOrY": 36.766, + "longOrX": -96.89 + } + }, + { + "id": "of:0000000000000247", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "40.205", + "name": "s247", + "locType": "geo", + "channelId": "10.192.19.69:59981", + "longitude": "-117.359" + }, + "location": { + "locType": "geo", + "latOrY": 40.205, + "longOrX": -117.359 + } + }, + { + "id": "of:0000000000000226", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "44.15", + "name": "s226", + "locType": "geo", + "channelId": "10.192.19.69:59978", + "longitude": "-107.679" + }, + "location": { + "locType": "geo", + "latOrY": 44.15, + "longOrX": -107.679 + } + }, + { + "id": "of:0000000000000203", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "36.766", + "name": "s203", + "locType": "geo", + "channelId": "10.192.19.69:59972", + "longitude": "-111.359" + }, + "location": { + "locType": "geo", + "latOrY": 36.766, + "longOrX": -111.359 + } + }, + { + "id": "of:0000000000000204", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "36.766", + "name": "s204", + "locType": "geo", + "channelId": "10.192.19.69:59973", + "longitude": "-106.359" + }, + "location": { + "locType": "geo", + "latOrY": 36.766, + "longOrX": -106.359 + } + }, + { + "id": "of:0000000000000207", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "10.192.19.68", + "layer": "def", + "props": { + "managementAddress": "10.192.19.69", + "protocol": "OF_13", + "driver": "ofdpa-ovs", + "latitude": "36.766", + "name": "s207", + "locType": "geo", + "channelId": "10.192.19.69:59976", + "longitude": "-122.359" + }, + "location": { + "locType": "geo", + "latOrY": 36.766, + "longOrX": -122.359 + } + } + ] + ], + "hosts": [ + [], + [], + [ + { + "id": "00:88:00:00:00:03/110", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::288:ff:fe00:3", + "2000::102", + "10.0.1.2" + ], + "props": {}, + "configured": false + }, + { + "id": "00:DD:00:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + }, + { + "id": "00:88:00:00:00:04/160", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::288:ff:fe00:4", + "10.0.6.2", + "2000::602" + ], + "props": {}, + "configured": false + }, + { + "id": "00:BB:00:00:00:02/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2bb:ff:fe00:2" + ], + "props": {}, + "configured": false + }, + { + "id": "00:AA:00:00:00:05/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + }, + { + "id": "00:88:00:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::288:ff:fe00:1", + "2000::101", + "10.0.1.1" + ], + "props": {}, + "configured": false + }, + { + "id": "00:AA:00:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + }, + { + "id": "00:AA:00:00:00:03/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + }, + { + "id": "00:BB:00:00:00:04/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2bb:ff:fe00:4" + ], + "props": {}, + "configured": false + }, + { + "id": "00:EE:00:00:00:02/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2ee:ff:fe00:2" + ], + "props": {}, + "configured": false + }, + { + "id": "00:99:00:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "10.0.3.253", + "fe80::299:ff:fe00:1" + ], + "props": {}, + "configured": false + }, + { + "id": "00:99:66:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::299:66ff:fe00:1", + "2000::3fd" + ], + "props": {}, + "configured": false + }, + { + "id": "00:EE:00:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2ee:ff:fe00:1" + ], + "props": {}, + "configured": false + }, + { + "id": "00:BB:00:00:00:01/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2bb:ff:fe00:1" + ], + "props": {}, + "configured": false + }, + { + "id": "00:BB:00:00:00:03/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2bb:ff:fe00:3" + ], + "props": {}, + "configured": false + }, + { + "id": "00:AA:00:00:00:04/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + }, + { + "id": "00:BB:00:00:00:05/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::2bb:ff:fe00:5" + ], + "props": {}, + "configured": false + }, + { + "id": "00:88:00:00:00:02/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "fe80::288:ff:fe00:2", + "2000::601", + "10.0.6.1" + ], + "props": {}, + "configured": false + }, + { + "id": "00:AA:00:00:00:02/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + }, + { + "id": "00:DD:00:00:00:02/None", + "nodeType": "host", + "layer": "def", + "ips": [], + "props": {}, + "configured": false + } + ] + ], + "layerOrder": [ + "opt", + "pkt", + "def" + ] + } +}`; + +const test_OdtnConfig_topo2CurrentRegion = `{ + "event": "topo2CurrentRegion", + "payload": { + "id": "(root)", + "subregions": [], + "links": [ + { + "id": "netconf:127.0.0.1:11002/201~netconf:127.0.0.1:11003/201", + "epA": "netconf:127.0.0.1:11002/201", + "epB": "netconf:127.0.0.1:11003/201", + "type": "UiDeviceLink", + "portA": "201", + "portB": "201", + "rollup": [ + { + "id": "netconf:127.0.0.1:11002/201~netconf:127.0.0.1:11003/201", + "epA": "netconf:127.0.0.1:11002/201", + "epB": "netconf:127.0.0.1:11003/201", + "type": "UiDeviceLink", + "portA": "201", + "portB": "201" + } + ] + }, + { + "id": "netconf:127.0.0.1:11002/202~netconf:127.0.0.1:11003/202", + "epA": "netconf:127.0.0.1:11002/202", + "epB": "netconf:127.0.0.1:11003/202", + "type": "UiDeviceLink", + "portA": "202", + "portB": "202", + "rollup": [ + { + "id": "netconf:127.0.0.1:11002/202~netconf:127.0.0.1:11003/202", + "epA": "netconf:127.0.0.1:11002/202", + "epB": "netconf:127.0.0.1:11003/202", + "type": "UiDeviceLink", + "portA": "202", + "portB": "202" + } + ] + }, + { + "id": "netconf:127.0.0.1:11002/203~netconf:127.0.0.1:11003/203", + "epA": "netconf:127.0.0.1:11002/203", + "epB": "netconf:127.0.0.1:11003/203", + "type": "UiDeviceLink", + "portA": "203", + "portB": "203", + "rollup": [ + { + "id": "netconf:127.0.0.1:11002/203~netconf:127.0.0.1:11003/203", + "epA": "netconf:127.0.0.1:11002/203", + "epB": "netconf:127.0.0.1:11003/203", + "type": "UiDeviceLink", + "portA": "203", + "portB": "203" + } + ] + }, + { + "id": "netconf:127.0.0.1:11002/204~netconf:127.0.0.1:11003/204", + "epA": "netconf:127.0.0.1:11002/204", + "epB": "netconf:127.0.0.1:11003/204", + "type": "UiDeviceLink", + "portA": "204", + "portB": "204", + "rollup": [ + { + "id": "netconf:127.0.0.1:11002/204~netconf:127.0.0.1:11003/204", + "epA": "netconf:127.0.0.1:11002/204", + "epB": "netconf:127.0.0.1:11003/204", + "type": "UiDeviceLink", + "portA": "204", + "portB": "204" + } + ] + }, + { + "id": "netconf:127.0.0.1:11002/205~netconf:127.0.0.1:11003/205", + "epA": "netconf:127.0.0.1:11002/205", + "epB": "netconf:127.0.0.1:11003/205", + "type": "UiDeviceLink", + "portA": "205", + "portB": "205", + "rollup": [ + { + "id": "netconf:127.0.0.1:11002/205~netconf:127.0.0.1:11003/205", + "epA": "netconf:127.0.0.1:11002/205", + "epB": "netconf:127.0.0.1:11003/205", + "type": "UiDeviceLink", + "portA": "205", + "portB": "205" + } + ] + }, + { + "id": "netconf:127.0.0.1:11002/206~netconf:127.0.0.1:11003/206", + "epA": "netconf:127.0.0.1:11002/206", + "epB": "netconf:127.0.0.1:11003/206", + "type": "UiDeviceLink", + "portA": "206", + "portB": "206", + "rollup": [ + { + "id": "netconf:127.0.0.1:11002/206~netconf:127.0.0.1:11003/206", + "epA": "netconf:127.0.0.1:11002/206", + "epB": "netconf:127.0.0.1:11003/206", + "type": "UiDeviceLink", + "portA": "206", + "portB": "206" + } + ] + } + ], + "devices": [ + [], + [], + [ + { + "id": "netconf:127.0.0.1:11002", + "nodeType": "device", + "type": "terminal_device", + "online": true, + "master": "127.0.0.1", + "layer": "def", + "props": { + "ipaddress": "127.0.0.1", + "protocol": "NETCONF", + "driver": "cassini-ocnos", + "port": "11002", + "name": "cassini2", + "locType": "none" + } + }, + { + "id": "netconf:127.0.0.1:11003", + "nodeType": "device", + "type": "terminal_device", + "online": true, + "master": "127.0.0.1", + "layer": "def", + "props": { + "ipaddress": "127.0.0.1", + "protocol": "NETCONF", + "driver": "cassini-ocnos", + "port": "11003", + "name": "cassini1", + "locType": "none" + } + } + ] + ], + "hosts": [ + [], + [], + [] + ], + "layerOrder": [ + "opt", + "pkt", + "def" + ] + } +}`; + +const topo2Highlights_base_data = `{ + "event": "topo2CurrentRegion", + "payload": { + "id": "(root)", + "subregions": [], + "links": [ + { + "id": "00:00:00:00:00:22/120~device:leaf4/[3/0](3)", + "epA": "00:00:00:00:00:22/120", + "epB": "device:leaf4", + "type": "UiEdgeLink", + "portB": "[3/0](3)", + "rollup": [ + { + "id": "00:00:00:00:00:22/120~device:leaf4/[3/0](3)", + "epA": "00:00:00:00:00:22/120", + "epB": "device:leaf4", + "type": "UiEdgeLink", + "portB": "[3/0](3)" + } + ] + }, + { + "id": "00:00:00:00:00:1E/None~device:leaf4/[2/0](2)", + "epA": "00:00:00:00:00:1E/None", + "epB": "device:leaf4", + "type": "UiEdgeLink", + "portB": "[2/0](2)", + "rollup": [ + { + "id": "00:00:00:00:00:1E/None~device:leaf4/[2/0](2)", + "epA": "00:00:00:00:00:1E/None", + "epB": "device:leaf4", + "type": "UiEdgeLink", + "portB": "[2/0](2)" + } + ] + }, + { + "id": "device:leaf4/[1/0](1)~device:spine1/[3/0](3)", + "epA": "device:leaf4/[1/0](1)", + "epB": "device:spine1/[3/0](3)", + "type": "UiDeviceLink", + "portA": "[1/0](1)", + "portB": "[3/0](3)", + "rollup": [ + { + "id": "device:leaf4/[1/0](1)~device:spine1/[3/0](3)", + "epA": "device:leaf4/[1/0](1)", + "epB": "device:spine1/[3/0](3)", + "type": "UiDeviceLink", + "portA": "[1/0](1)", + "portB": "[3/0](3)" + } + ] + }, + { + "id": "00:00:00:00:00:21/120~device:leaf3/[leaf3-eth3](3)", + "epA": "00:00:00:00:00:21/120", + "epB": "device:leaf3", + "type": "UiEdgeLink", + "portB": "[leaf3-eth3](3)", + "rollup": [ + { + "id": "00:00:00:00:00:21/120~device:leaf3/[leaf3-eth3](3)", + "epA": "00:00:00:00:00:21/120", + "epB": "device:leaf3", + "type": "UiEdgeLink", + "portB": "[leaf3-eth3](3)" + } + ] + }, + { + "id": "00:00:00:00:00:1D/None~device:leaf3/[leaf3-eth2](2)", + "epA": "00:00:00:00:00:1D/None", + "epB": "device:leaf3", + "type": "UiEdgeLink", + "portB": "[leaf3-eth2](2)", + "rollup": [ + { + "id": "00:00:00:00:00:1D/None~device:leaf3/[leaf3-eth2](2)", + "epA": "00:00:00:00:00:1D/None", + "epB": "device:leaf3", + "type": "UiEdgeLink", + "portB": "[leaf3-eth2](2)" + } + ] + }, + { + "id": "device:leaf3/[leaf3-eth1](1)~device:spine1/[spine1-eth3](3)", + "epA": "device:leaf3/[leaf3-eth1](1)", + "epB": "device:spine1/[spine1-eth3](3)", + "type": "UiDeviceLink", + "portA": "[leaf3-eth1](1)", + "portB": "[spine1-eth3](3)", + "rollup": [ + { + "id": "device:leaf3/[leaf3-eth1](1)~device:spine1/[spine1-eth3](3)", + "epA": "device:leaf3/[leaf3-eth1](1)", + "epB": "device:spine1/[spine1-eth3](3)", + "type": "UiDeviceLink", + "portA": "[leaf3-eth1](1)", + "portB": "[spine1-eth3](3)" + } + ] + }, + { + "id": "00:00:00:00:00:1F/120~device:leaf1/7", + "epA": "00:00:00:00:00:1F/120", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "7", + "rollup": [ + { + "id": "00:00:00:00:00:1F/120~device:leaf1/7", + "epA": "00:00:00:00:00:1F/120", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "7" + } + ] + }, + { + "id": "device:leaf1/1~device:spine1/1", + "epA": "device:leaf1/1", + "epB": "device:spine1/1", + "type": "UiDeviceLink", + "portA": "1", + "portB": "1", + "rollup": [ + { + "id": "device:leaf1/1~device:spine1/1", + "epA": "device:leaf1/1", + "epB": "device:spine1/1", + "type": "UiDeviceLink", + "portA": "1", + "portB": "1" + } + ] + }, + { + "id": "device:leaf2/2~device:spine2/2", + "epA": "device:leaf2/2", + "epB": "device:spine2/2", + "type": "UiDeviceLink", + "portA": "2", + "portB": "2", + "rollup": [ + { + "id": "device:leaf2/2~device:spine2/2", + "epA": "device:leaf2/2", + "epB": "device:spine2/2", + "type": "UiDeviceLink", + "portA": "2", + "portB": "2" + } + ] + }, + { + "id": "00:00:00:00:00:1A/None~device:leaf1/3", + "epA": "00:00:00:00:00:1A/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "3", + "rollup": [ + { + "id": "00:00:00:00:00:1A/None~device:leaf1/3", + "epA": "00:00:00:00:00:1A/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "3" + } + ] + }, + { + "id": "00:00:00:00:00:30/None~device:leaf2/3", + "epA": "00:00:00:00:00:30/None", + "epB": "device:leaf2", + "type": "UiEdgeLink", + "portB": "3", + "rollup": [ + { + "id": "00:00:00:00:00:30/None~device:leaf2/3", + "epA": "00:00:00:00:00:30/None", + "epB": "device:leaf2", + "type": "UiEdgeLink", + "portB": "3" + } + ] + }, + { + "id": "device:leaf1/2~device:spine2/1", + "epA": "device:leaf1/2", + "epB": "device:spine2/1", + "type": "UiDeviceLink", + "portA": "2", + "portB": "1", + "rollup": [ + { + "id": "device:leaf1/2~device:spine2/1", + "epA": "device:leaf1/2", + "epB": "device:spine2/1", + "type": "UiDeviceLink", + "portA": "2", + "portB": "1" + } + ] + }, + { + "id": "device:leaf2/1~device:spine1/2", + "epA": "device:leaf2/1", + "epB": "device:spine1/2", + "type": "UiDeviceLink", + "portA": "1", + "portB": "2", + "rollup": [ + { + "id": "device:leaf2/1~device:spine1/2", + "epA": "device:leaf2/1", + "epB": "device:spine1/2", + "type": "UiDeviceLink", + "portA": "1", + "portB": "2" + } + ] + }, + { + "id": "00:00:00:00:00:20/None~device:leaf1/6", + "epA": "00:00:00:00:00:20/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "6", + "rollup": [ + { + "id": "00:00:00:00:00:20/None~device:leaf1/6", + "epA": "00:00:00:00:00:20/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "6" + } + ] + }, + { + "id": "00:00:00:00:00:1C/None~device:leaf1/5", + "epA": "00:00:00:00:00:1C/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "5", + "rollup": [ + { + "id": "00:00:00:00:00:1C/None~device:leaf1/5", + "epA": "00:00:00:00:00:1C/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "5" + } + ] + }, + { + "id": "00:00:00:00:00:1B/None~device:leaf1/4", + "epA": "00:00:00:00:00:1B/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "4", + "rollup": [ + { + "id": "00:00:00:00:00:1B/None~device:leaf1/4", + "epA": "00:00:00:00:00:1B/None", + "epB": "device:leaf1", + "type": "UiEdgeLink", + "portB": "4" + } + ] + } + ], + "devices": [ + [], + [], + [ + { + "id": "device:leaf4", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "172.24.0.3", + "layer": "def", + "props": { + "managementAddress": "grpc://pippo:50003?device_id=1", + "protocol": "P4Runtime, gNMI, gNOI", + "gridX": "400.0", + "gridY": "400.0", + "driver": "stratum-tofino", + "name": "device:leaf4", + "p4DeviceId": "1", + "locType": "grid" + }, + "location": { + "locType": "grid", + "latOrY": 400.0, + "longOrX": 400.0 + } + }, + { + "id": "device:leaf3", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "172.24.0.3", + "layer": "def", + "props": { + "managementAddress": "grpc://mininet:50003?device_id=1", + "protocol": "P4Runtime, gNMI, gNOI", + "gridX": "400.0", + "gridY": "400.0", + "driver": "stratum-bmv2", + "name": "device:leaf3", + "p4DeviceId": "1", + "locType": "grid" + }, + "location": { + "locType": "grid", + "latOrY": 400.0, + "longOrX": 400.0 + } + }, + { + "id": "device:spine1", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "172.24.0.3", + "layer": "def", + "props": { + "managementAddress": "grpc://mininet:50003?device_id=1", + "protocol": "P4Runtime, gNMI, gNOI", + "gridX": "400.0", + "gridY": "400.0", + "driver": "stratum-bmv2", + "name": "device:spine1", + "p4DeviceId": "1", + "locType": "grid" + }, + "location": { + "locType": "grid", + "latOrY": 400.0, + "longOrX": 400.0 + } + }, + { + "id": "device:spine2", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "172.24.0.3", + "layer": "def", + "props": { + "managementAddress": "grpc://mininet:50004?device_id=1", + "protocol": "P4Runtime, gNMI, gNOI", + "gridX": "600.0", + "gridY": "400.0", + "driver": "stratum-bmv2", + "name": "device:spine2", + "p4DeviceId": "1", + "locType": "grid" + }, + "location": { + "locType": "grid", + "latOrY": 400.0, + "longOrX": 600.0 + } + }, + { + "id": "device:leaf2", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "172.24.0.3", + "layer": "def", + "props": { + "managementAddress": "grpc://mininet:50002?device_id=1", + "protocol": "P4Runtime, gNMI, gNOI", + "gridX": "800.0", + "gridY": "600.0", + "driver": "stratum-bmv2", + "name": "device:leaf2", + "p4DeviceId": "1", + "locType": "grid" + }, + "location": { + "locType": "grid", + "latOrY": 600.0, + "longOrX": 800.0 + } + }, + { + "id": "device:leaf1", + "nodeType": "device", + "type": "switch", + "online": true, + "master": "172.24.0.3", + "layer": "def", + "props": { + "managementAddress": "grpc://mininet:50001?device_id=1", + "protocol": "P4Runtime, gNMI, gNOI", + "gridX": "200.0", + "gridY": "600.0", + "driver": "stratum-bmv2", + "name": "device:leaf1", + "p4DeviceId": "1", + "locType": "grid" + }, + "location": { + "locType": "grid", + "latOrY": 600.0, + "longOrX": 200.0 + } + } + ] + ], + "hosts": [ + [], + [], + [ + { + "id": "00:00:00:00:00:22/120", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:2:3::1" + ], + "props": { + "gridX": "750.0", + "gridY": "700.0", + "latitude": null, + "name": "h3", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 700.0, + "longOrX": 750.0 + }, + "configured": false + }, + { + "id": "00:00:00:00:00:21/120", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:2:3::1" + ], + "props": { + "gridX": "750.0", + "gridY": "700.0", + "latitude": null, + "name": "h3", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 700.0, + "longOrX": 750.0 + }, + "configured": false + }, + { + "id": "00:00:00:00:00:1F/120", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:2:3::1" + ], + "props": { + "gridX": "750.0", + "gridY": "700.0", + "latitude": null, + "name": "h3", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 700.0, + "longOrX": 750.0 + }, + "configured": false + }, + { + "id": "00:00:00:00:00:1E/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:2:3::1" + ], + "props": { + "gridX": "750.0", + "gridY": "700.0", + "latitude": null, + "name": "h3", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 700.0, + "longOrX": 750.0 + }, + "configured": false + }, + { + "id": "00:00:00:00:00:1D/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:2:3::1" + ], + "props": { + "gridX": "750.0", + "gridY": "700.0", + "latitude": null, + "name": "h3", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 700.0, + "longOrX": 750.0 + }, + "configured": false + }, + { + "id": "00:00:00:00:00:30/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:2:3::1" + ], + "props": { + "gridX": "750.0", + "gridY": "700.0", + "latitude": null, + "name": "h3", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 700.0, + "longOrX": 750.0 + }, + "configured": false + }, + { + "id": "00:00:00:00:00:1A/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:1:1::a" + ], + "props": { + "gridX": "100.0", + "gridY": "700.0", + "latitude": null, + "name": "h1a", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 700.0, + "longOrX": 100.0 + }, + "configured": false + }, + { + "id": "00:00:00:00:00:1B/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:1:1::b" + ], + "props": { + "gridX": "100.0", + "gridY": "800.0", + "latitude": null, + "name": "h1b", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 800.0, + "longOrX": 100.0 + }, + "configured": false + }, + { + "id": "00:00:00:00:00:1C/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:1:1::c" + ], + "props": { + "gridX": "250.0", + "gridY": "800.0", + "latitude": null, + "name": "h1c", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 800.0, + "longOrX": 250.0 + }, + "configured": false + }, + { + "id": "00:00:00:00:00:20/None", + "nodeType": "host", + "layer": "def", + "ips": [ + "2001:1:2::1" + ], + "props": { + "gridX": "400.0", + "gridY": "700.0", + "latitude": null, + "name": "h2", + "locType": "grid", + "longitude": null + }, + "location": { + "locType": "grid", + "latOrY": 700.0, + "longOrX": 400.0 + }, + "configured": false + } + ] + ], + "layerOrder": [ + "opt", + "pkt", + "def" + ] + } +}`; + +const topo2Highlights_sample = ` +{ + "event": "topo2Highlights", + "payload": { + "devices": [], + "hosts": [], + "links": [ + { + "id": "00:00:00:00:00:22/120~device:leaf4/[3/0](3)", + "label": "964.91 Kbps", + "css": "secondary port-traffic-green" + }, + { + "id": "00:00:00:00:00:1E/None~device:leaf4/[2/0](2)", + "label": "964.91 Kbps", + "css": "secondary port-traffic-green" + }, + { + "id": "device:leaf4/[1/0](1)~device:spine1/[3/0](3)", + "label": "964.91 Kbps", + "css": "secondary port-traffic-green" + }, + { + "id": "00:00:00:00:00:21/120~device:leaf3/[leaf3-eth3](3)", + "label": "964.91 Kbps", + "css": "secondary port-traffic-green" + }, + { + "id": "00:00:00:00:00:1D/None~device:leaf3/[leaf3-eth2](2)", + "label": "964.91 Kbps", + "css": "secondary port-traffic-green" + }, + { + "id": "device:leaf3/[leaf3-eth1](1)~device:spine1/[spine1-eth3](3)", + "label": "964.91 Kbps", + "css": "secondary port-traffic-green" + }, + { + "id": "00:00:00:00:00:1F/120~device:leaf1/7", + "label": "964.91 Kbps", + "css": "secondary port-traffic-green" + }, + { + "id": "device:leaf2/2~device:spine2/2", + "label": "964.91 Kbps", + "css": "secondary port-traffic-green" + }, + { + "id": "device:leaf1/1~device:spine1/1", + "label": "3.92 Mbps", + "css": "secondary port-traffic-yellow" + }, + { + "id": "00:00:00:00:00:30/None~device:leaf2/3", + "label": "4.46 Mbps", + "css": "secondary port-traffic-yellow" + }, + { + "id": "device:leaf2/1~device:spine1/2", + "label": "3.53 Mbps", + "css": "secondary port-traffic-yellow" + }, + { + "id": "device:leaf1/2~device:spine2/1", + "label": "1.06 Mbps", + "css": "secondary port-traffic-yellow" + }, + { + "id": "00:00:00:00:00:20/None~device:leaf1/6", + "label": "4.98 Mbps", + "css": "secondary port-traffic-yellow" + } + ] + } +}`; + +const topo2Highlights_sample2 = ` +{ + "event": "topo2Highlights", + "payload": { + "devices": [], + "hosts": [], + "links": [] + } +}`; + class MockActivatedRoute extends ActivatedRoute { constructor(params: Params) { super(); @@ -96,16 +2206,16 @@ describe('ForceSvgComponent', () => { let logServiceSpy: jasmine.SpyObj; let component: ForceSvgComponent; let fixture: ComponentFixture; - const openflowSampleData = require('./tests/test-module-topo2CurrentRegion.json'); + const openflowSampleData = JSON.parse(test_module_topo2CurrentRegion); const openflowRegionData: Region = (openflowSampleData.payload); - const odtnSampleData = require('./tests/test-OdtnConfig-topo2CurrentRegion.json'); + const odtnSampleData = JSON.parse(test_OdtnConfig_topo2CurrentRegion); const odtnRegionData: Region = (odtnSampleData.payload); - const topo2BaseData = require('./tests/topo2Highlights-base-data.json'); + const topo2BaseData = JSON.parse(topo2Highlights_base_data); const topo2BaseRegionData: Region = (topo2BaseData.payload); - const highlightSampleData = require('./tests/topo2Highlights-sample.json'); + const highlightSampleData = JSON.parse(topo2Highlights_sample); const linkHightlights: LinkHighlight[] = (highlightSampleData.payload.links); const emptyRegion: Region = {devices: [ [], [], [] ], hosts: [ [], [], [] ], links: []}; @@ -278,6 +2388,23 @@ describe('ForceSvgComponent', () => { // Like epB of second example in sampleData file - endPtStr does not contain port number expect(ForceSvgComponent.extractNodeName('of:0000000000000206', '6')) .toEqual('of:0000000000000206'); + + // bmv2 case - no port in the endpoint + expect(ForceSvgComponent.extractNodeName('device:leaf1', '[leaf1-eth1](1)')) + .toEqual('device:leaf1'); + + // bmv2 case - port in the endpoint + expect(ForceSvgComponent.extractNodeName('device:leaf1/[leaf1-eth1](1)', '[leaf1-eth1](1)')) + .toEqual('device:leaf1'); + + // tofino case - no port in the endpoint + expect(ForceSvgComponent.extractNodeName('device:leaf1', '[1/0](1)')) + .toEqual('device:leaf1'); + + // tofino case - port in the endpoint + expect(ForceSvgComponent.extractNodeName('device:leaf1/[1/0](1)', '[1/0](1)')) + .toEqual('device:leaf1'); + }); it('should handle openflow regionData change - sample Region', () => { @@ -307,9 +2434,23 @@ describe('ForceSvgComponent', () => { component.ngOnChanges( {'regionData' : new SimpleChange({}, topo2BaseRegionData, true)}); - expect(component.graph.links.length).toBe(9); + expect(component.graph.links.length).toBe(16); + expect(component.graph.nodes.length).toBe(16) + expect(linkHightlights.length).toBe(13); - expect(linkHightlights.length).toBe(6); + // sanitize deviceNameFromEp + component.graph.links.forEach((l: Link) => { + if (LinkType[l.type] === LinkType.UiEdgeLink) { + // edge link has only one epoint valid (the other is not deviceId) + const foundNode = component.graph.nodes.find((n: Node) => n.id === Link.deviceNameFromEp(l.epB)); + expect(foundNode).toBeDefined(); + } else { + var foundNode = component.graph.nodes.find((n: Node) => n.id === Link.deviceNameFromEp(l.epA)); + expect(foundNode).toBeDefined(); + foundNode = component.graph.nodes.find((n: Node) => n.id === Link.deviceNameFromEp(l.epB)); + expect(foundNode).toBeDefined(); + } + }); // should be able to find all of the highlighted links in the original data set linkHightlights.forEach((lh: LinkHighlight) => { diff --git a/web/gui2-topo-lib/lib/layer/forcesvg/forcesvg.component.ts b/web/gui2-topo-lib/lib/layer/forcesvg/forcesvg.component.ts index dc67bc242d7..234f1e9cc13 100644 --- a/web/gui2-topo-lib/lib/layer/forcesvg/forcesvg.component.ts +++ b/web/gui2-topo-lib/lib/layer/forcesvg/forcesvg.component.ts @@ -123,6 +123,7 @@ export class ForceSvgComponent implements OnInit, OnDestroy, OnChanges { * In some cases - have to remove the port number from the end of a device * name * @param endPtStr The end point name + * @param portStr The port name */ static extractNodeName(endPtStr: string, portStr: string): string { if (portStr === undefined || endPtStr === undefined) { diff --git a/web/gui2-topo-lib/lib/layer/forcesvg/models/link.ts b/web/gui2-topo-lib/lib/layer/forcesvg/models/link.ts index d5ff2a797a9..f3b839c2113 100644 --- a/web/gui2-topo-lib/lib/layer/forcesvg/models/link.ts +++ b/web/gui2-topo-lib/lib/layer/forcesvg/models/link.ts @@ -55,7 +55,12 @@ export class Link implements UiElement, d3.SimulationLinkDatum { public static deviceNameFromEp(ep: string): string { if (ep !== undefined && ep.lastIndexOf('/') > 0) { - return ep.substr(0, ep.lastIndexOf('/')); + // named port format is [name](number) + if (ep.includes('[')) { + return ep.substr(0, ep.lastIndexOf('[') - 1); + } else { + return ep.substr(0, ep.lastIndexOf('/')); + } } return ep; } @@ -66,17 +71,47 @@ export class Link implements UiElement, d3.SimulationLinkDatum { * @param linkId The id of the link in either format */ public static linkIdFromShowHighlights(linkId: string) { - if (linkId.includes('-')) { - const parts: string[] = linkId.split('-'); + // Already in the right format + if (linkId.includes('~')) { + const parts: string[] = linkId.split('~'); + // remove host part if needed const part0 = Link.removeHostPortNum(parts[0]); const part1 = Link.removeHostPortNum(parts[1]); return part0 + '~' + part1; } + + // Custom traffic highlight + if (linkId.includes('-')) { + // "-" is used only as separator between the links + if (linkId.indexOf('-') === linkId.lastIndexOf('-')) { + const parts: string[] = linkId.split('-'); + const part0 = Link.removeHostPortNum(parts[0]); + const part1 = Link.removeHostPortNum(parts[1]); + return part0 + '~' + part1; + } else if (linkId.includes(')')) { + // "-" is used in the port name + var index = linkId.indexOf(')'); + // the format is [name](number) on both ends + if (linkId.charAt(index + 1) === '-') { + const part0 = Link.removeHostPortNum(linkId.substr(0, index + 1)); + const part1 = Link.removeHostPortNum(linkId.substr(index + 2, linkId.length)); + return part0 + '~' + part1; + } else { + index = linkId.indexOf('-'); + const part0 = Link.removeHostPortNum(linkId.substr(0, index)); + const part1 = Link.removeHostPortNum(linkId.substr(index + 1, linkId.length)); + return part0 + '~' + part1; + } + } + } + + // unknown format return linkId; } private static removeHostPortNum(hostStr: string) { - if (hostStr.includes('/None/')) { + // Regex is for the tagged hosts + if (hostStr.includes('/None/') || hostStr.match('/[+-]?[0-9]+/')) { const subparts = hostStr.split('/'); return subparts[0] + '/' + subparts[1]; } diff --git a/web/gui2-topo-lib/lib/layer/forcesvg/tests/test-OdtnConfig-topo2CurrentRegion.json b/web/gui2-topo-lib/lib/layer/forcesvg/tests/test-OdtnConfig-topo2CurrentRegion.json deleted file mode 100644 index 2087940f7d5..00000000000 --- a/web/gui2-topo-lib/lib/layer/forcesvg/tests/test-OdtnConfig-topo2CurrentRegion.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "event": "topo2CurrentRegion", - "payload": { - "id": "(root)", - "subregions": [], - "links": [ - { - "id": "netconf:127.0.0.1:11002/201~netconf:127.0.0.1:11003/201", - "epA": "netconf:127.0.0.1:11002/201", - "epB": "netconf:127.0.0.1:11003/201", - "type": "UiDeviceLink", - "portA": "201", - "portB": "201", - "rollup": [ - { - "id": "netconf:127.0.0.1:11002/201~netconf:127.0.0.1:11003/201", - "epA": "netconf:127.0.0.1:11002/201", - "epB": "netconf:127.0.0.1:11003/201", - "type": "UiDeviceLink", - "portA": "201", - "portB": "201" - } - ] - }, - { - "id": "netconf:127.0.0.1:11002/202~netconf:127.0.0.1:11003/202", - "epA": "netconf:127.0.0.1:11002/202", - "epB": "netconf:127.0.0.1:11003/202", - "type": "UiDeviceLink", - "portA": "202", - "portB": "202", - "rollup": [ - { - "id": "netconf:127.0.0.1:11002/202~netconf:127.0.0.1:11003/202", - "epA": "netconf:127.0.0.1:11002/202", - "epB": "netconf:127.0.0.1:11003/202", - "type": "UiDeviceLink", - "portA": "202", - "portB": "202" - } - ] - }, - { - "id": "netconf:127.0.0.1:11002/203~netconf:127.0.0.1:11003/203", - "epA": "netconf:127.0.0.1:11002/203", - "epB": "netconf:127.0.0.1:11003/203", - "type": "UiDeviceLink", - "portA": "203", - "portB": "203", - "rollup": [ - { - "id": "netconf:127.0.0.1:11002/203~netconf:127.0.0.1:11003/203", - "epA": "netconf:127.0.0.1:11002/203", - "epB": "netconf:127.0.0.1:11003/203", - "type": "UiDeviceLink", - "portA": "203", - "portB": "203" - } - ] - }, - { - "id": "netconf:127.0.0.1:11002/204~netconf:127.0.0.1:11003/204", - "epA": "netconf:127.0.0.1:11002/204", - "epB": "netconf:127.0.0.1:11003/204", - "type": "UiDeviceLink", - "portA": "204", - "portB": "204", - "rollup": [ - { - "id": "netconf:127.0.0.1:11002/204~netconf:127.0.0.1:11003/204", - "epA": "netconf:127.0.0.1:11002/204", - "epB": "netconf:127.0.0.1:11003/204", - "type": "UiDeviceLink", - "portA": "204", - "portB": "204" - } - ] - }, - { - "id": "netconf:127.0.0.1:11002/205~netconf:127.0.0.1:11003/205", - "epA": "netconf:127.0.0.1:11002/205", - "epB": "netconf:127.0.0.1:11003/205", - "type": "UiDeviceLink", - "portA": "205", - "portB": "205", - "rollup": [ - { - "id": "netconf:127.0.0.1:11002/205~netconf:127.0.0.1:11003/205", - "epA": "netconf:127.0.0.1:11002/205", - "epB": "netconf:127.0.0.1:11003/205", - "type": "UiDeviceLink", - "portA": "205", - "portB": "205" - } - ] - }, - { - "id": "netconf:127.0.0.1:11002/206~netconf:127.0.0.1:11003/206", - "epA": "netconf:127.0.0.1:11002/206", - "epB": "netconf:127.0.0.1:11003/206", - "type": "UiDeviceLink", - "portA": "206", - "portB": "206", - "rollup": [ - { - "id": "netconf:127.0.0.1:11002/206~netconf:127.0.0.1:11003/206", - "epA": "netconf:127.0.0.1:11002/206", - "epB": "netconf:127.0.0.1:11003/206", - "type": "UiDeviceLink", - "portA": "206", - "portB": "206" - } - ] - } - ], - "devices": [ - [], - [], - [ - { - "id": "netconf:127.0.0.1:11002", - "nodeType": "device", - "type": "terminal_device", - "online": true, - "master": "127.0.0.1", - "layer": "def", - "props": { - "ipaddress": "127.0.0.1", - "protocol": "NETCONF", - "driver": "cassini-ocnos", - "port": "11002", - "name": "cassini2", - "locType": "none" - } - }, - { - "id": "netconf:127.0.0.1:11003", - "nodeType": "device", - "type": "terminal_device", - "online": true, - "master": "127.0.0.1", - "layer": "def", - "props": { - "ipaddress": "127.0.0.1", - "protocol": "NETCONF", - "driver": "cassini-ocnos", - "port": "11003", - "name": "cassini1", - "locType": "none" - } - } - ] - ], - "hosts": [ - [], - [], - [] - ], - "layerOrder": [ - "opt", - "pkt", - "def" - ] - } -} diff --git a/web/gui2-topo-lib/lib/layer/forcesvg/tests/test-module-topo2CurrentRegion.json b/web/gui2-topo-lib/lib/layer/forcesvg/tests/test-module-topo2CurrentRegion.json deleted file mode 100644 index e8af22fc780..00000000000 --- a/web/gui2-topo-lib/lib/layer/forcesvg/tests/test-module-topo2CurrentRegion.json +++ /dev/null @@ -1,1204 +0,0 @@ -{ - "event": "topo2CurrentRegion", - "payload": { - "id": "(root)", - "subregions": [], - "links": [ - { - "id": "00:AA:00:00:00:03/None~of:0000000000000205/6", - "epA": "00:AA:00:00:00:03/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "6", - "rollup": [ - { - "id": "00:AA:00:00:00:03/None~of:0000000000000205/6", - "epA": "00:AA:00:00:00:03/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "6" - } - ] - }, - { - "id": "of:0000000000000205/3~of:0000000000000227/5", - "epA": "of:0000000000000205/3", - "epB": "of:0000000000000227/5", - "type": "UiDeviceLink", - "portA": "3", - "portB": "5", - "rollup": [ - { - "id": "of:0000000000000205/3~of:0000000000000227/5", - "epA": "of:0000000000000205/3", - "epB": "of:0000000000000227/5", - "type": "UiDeviceLink", - "portA": "3", - "portB": "5" - } - ] - }, - { - "id": "of:0000000000000206/2~of:0000000000000226/8", - "epA": "of:0000000000000206/2", - "epB": "of:0000000000000226/8", - "type": "UiDeviceLink", - "portA": "2", - "portB": "8", - "rollup": [ - { - "id": "of:0000000000000206/2~of:0000000000000226/8", - "epA": "of:0000000000000206/2", - "epB": "of:0000000000000226/8", - "type": "UiDeviceLink", - "portA": "2", - "portB": "8" - } - ] - }, - { - "id": "00:BB:00:00:00:05/None~of:0000000000000203/7", - "epA": "00:BB:00:00:00:05/None", - "epB": "of:0000000000000203", - "type": "UiEdgeLink", - "portB": "7", - "rollup": [ - { - "id": "00:BB:00:00:00:05/None~of:0000000000000203/7", - "epA": "00:BB:00:00:00:05/None", - "epB": "of:0000000000000203", - "type": "UiEdgeLink", - "portB": "7" - } - ] - }, - { - "id": "00:DD:00:00:00:01/None~of:0000000000000207/3", - "epA": "00:DD:00:00:00:01/None", - "epB": "of:0000000000000207", - "type": "UiEdgeLink", - "portB": "3", - "rollup": [ - { - "id": "00:DD:00:00:00:01/None~of:0000000000000207/3", - "epA": "00:DD:00:00:00:01/None", - "epB": "of:0000000000000207", - "type": "UiEdgeLink", - "portB": "3" - } - ] - }, - { - "id": "of:0000000000000203/1~of:0000000000000226/1", - "epA": "of:0000000000000203/1", - "epB": "of:0000000000000226/1", - "type": "UiDeviceLink", - "portA": "1", - "portB": "1", - "rollup": [ - { - "id": "of:0000000000000203/1~of:0000000000000226/1", - "epA": "of:0000000000000203/1", - "epB": "of:0000000000000226/1", - "type": "UiDeviceLink", - "portA": "1", - "portB": "1" - } - ] - }, - { - "id": "of:0000000000000207/2~of:0000000000000247/1", - "epA": "of:0000000000000207/2", - "epB": "of:0000000000000247/1", - "type": "UiDeviceLink", - "portA": "2", - "portB": "1", - "rollup": [ - { - "id": "of:0000000000000207/2~of:0000000000000247/1", - "epA": "of:0000000000000207/2", - "epB": "of:0000000000000247/1", - "type": "UiDeviceLink", - "portA": "2", - "portB": "1" - } - ] - }, - { - "id": "00:99:66:00:00:01/None~of:0000000000000205/10", - "epA": "00:99:66:00:00:01/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "10", - "rollup": [ - { - "id": "00:99:66:00:00:01/None~of:0000000000000205/10", - "epA": "00:99:66:00:00:01/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "10" - } - ] - }, - { - "id": "of:0000000000000208/1~of:0000000000000246/2", - "epA": "of:0000000000000208/1", - "epB": "of:0000000000000246/2", - "type": "UiDeviceLink", - "portA": "1", - "portB": "2", - "rollup": [ - { - "id": "of:0000000000000208/1~of:0000000000000246/2", - "epA": "of:0000000000000208/1", - "epB": "of:0000000000000246/2", - "type": "UiDeviceLink", - "portA": "1", - "portB": "2" - } - ] - }, - { - "id": "of:0000000000000206/1~of:0000000000000226/7", - "epA": "of:0000000000000206/1", - "epB": "of:0000000000000226/7", - "type": "UiDeviceLink", - "portA": "1", - "portB": "7", - "rollup": [ - { - "id": "of:0000000000000206/1~of:0000000000000226/7", - "epA": "of:0000000000000206/1", - "epB": "of:0000000000000226/7", - "type": "UiDeviceLink", - "portA": "1", - "portB": "7" - } - ] - }, - { - "id": "of:0000000000000226/9~of:0000000000000246/3", - "epA": "of:0000000000000226/9", - "epB": "of:0000000000000246/3", - "type": "UiDeviceLink", - "portA": "9", - "portB": "3", - "rollup": [ - { - "id": "of:0000000000000226/9~of:0000000000000246/3", - "epA": "of:0000000000000226/9", - "epB": "of:0000000000000246/3", - "type": "UiDeviceLink", - "portA": "9", - "portB": "3" - } - ] - }, - { - "id": "00:AA:00:00:00:04/None~of:0000000000000205/7", - "epA": "00:AA:00:00:00:04/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "7", - "rollup": [ - { - "id": "00:AA:00:00:00:04/None~of:0000000000000205/7", - "epA": "00:AA:00:00:00:04/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "7" - } - ] - }, - { - "id": "00:88:00:00:00:03/110~of:0000000000000205/11", - "epA": "00:88:00:00:00:03/110", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "11", - "rollup": [ - { - "id": "00:88:00:00:00:03/110~of:0000000000000205/11", - "epA": "00:88:00:00:00:03/110", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "11" - } - ] - }, - { - "id": "of:0000000000000204/1~of:0000000000000226/3", - "epA": "of:0000000000000204/1", - "epB": "of:0000000000000226/3", - "type": "UiDeviceLink", - "portA": "1", - "portB": "3", - "rollup": [ - { - "id": "of:0000000000000204/1~of:0000000000000226/3", - "epA": "of:0000000000000204/1", - "epB": "of:0000000000000226/3", - "type": "UiDeviceLink", - "portA": "1", - "portB": "3" - } - ] - }, - { - "id": "of:0000000000000203/2~of:0000000000000226/2", - "epA": "of:0000000000000203/2", - "epB": "of:0000000000000226/2", - "type": "UiDeviceLink", - "portA": "2", - "portB": "2", - "rollup": [ - { - "id": "of:0000000000000203/2~of:0000000000000226/2", - "epA": "of:0000000000000203/2", - "epB": "of:0000000000000226/2", - "type": "UiDeviceLink", - "portA": "2", - "portB": "2" - } - ] - }, - { - "id": "00:88:00:00:00:01/None~of:0000000000000205/12", - "epA": "00:88:00:00:00:01/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "12", - "rollup": [ - { - "id": "00:88:00:00:00:01/None~of:0000000000000205/12", - "epA": "00:88:00:00:00:01/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "12" - } - ] - }, - { - "id": "00:88:00:00:00:04/160~of:0000000000000206/6", - "epA": "00:88:00:00:00:04/160", - "epB": "of:0000000000000206", - "type": "UiEdgeLink", - "portB": "6", - "rollup": [ - { - "id": "00:88:00:00:00:04/160~of:0000000000000206/6", - "epA": "00:88:00:00:00:04/160", - "epB": "of:0000000000000206", - "type": "UiEdgeLink", - "portB": "6" - } - ] - }, - { - "id": "00:DD:00:00:00:02/None~of:0000000000000208/3", - "epA": "00:DD:00:00:00:02/None", - "epB": "of:0000000000000208", - "type": "UiEdgeLink", - "portB": "3", - "rollup": [ - { - "id": "00:DD:00:00:00:02/None~of:0000000000000208/3", - "epA": "00:DD:00:00:00:02/None", - "epB": "of:0000000000000208", - "type": "UiEdgeLink", - "portB": "3" - } - ] - }, - { - "id": "of:0000000000000203/3~of:0000000000000227/1", - "epA": "of:0000000000000203/3", - "epB": "of:0000000000000227/1", - "type": "UiDeviceLink", - "portA": "3", - "portB": "1", - "rollup": [ - { - "id": "of:0000000000000203/3~of:0000000000000227/1", - "epA": "of:0000000000000203/3", - "epB": "of:0000000000000227/1", - "type": "UiDeviceLink", - "portA": "3", - "portB": "1" - } - ] - }, - { - "id": "of:0000000000000208/2~of:0000000000000247/2", - "epA": "of:0000000000000208/2", - "epB": "of:0000000000000247/2", - "type": "UiDeviceLink", - "portA": "2", - "portB": "2", - "rollup": [ - { - "id": "of:0000000000000208/2~of:0000000000000247/2", - "epA": "of:0000000000000208/2", - "epB": "of:0000000000000247/2", - "type": "UiDeviceLink", - "portA": "2", - "portB": "2" - } - ] - }, - { - "id": "of:0000000000000205/1~of:0000000000000226/5", - "epA": "of:0000000000000205/1", - "epB": "of:0000000000000226/5", - "type": "UiDeviceLink", - "portA": "1", - "portB": "5", - "rollup": [ - { - "id": "of:0000000000000205/1~of:0000000000000226/5", - "epA": "of:0000000000000205/1", - "epB": "of:0000000000000226/5", - "type": "UiDeviceLink", - "portA": "1", - "portB": "5" - } - ] - }, - { - "id": "of:0000000000000204/2~of:0000000000000226/4", - "epA": "of:0000000000000204/2", - "epB": "of:0000000000000226/4", - "type": "UiDeviceLink", - "portA": "2", - "portB": "4", - "rollup": [ - { - "id": "of:0000000000000204/2~of:0000000000000226/4", - "epA": "of:0000000000000204/2", - "epB": "of:0000000000000226/4", - "type": "UiDeviceLink", - "portA": "2", - "portB": "4" - } - ] - }, - { - "id": "00:AA:00:00:00:01/None~of:0000000000000204/6", - "epA": "00:AA:00:00:00:01/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "6", - "rollup": [ - { - "id": "00:AA:00:00:00:01/None~of:0000000000000204/6", - "epA": "00:AA:00:00:00:01/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "6" - } - ] - }, - { - "id": "00:BB:00:00:00:03/None~of:0000000000000205/8", - "epA": "00:BB:00:00:00:03/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "8", - "rollup": [ - { - "id": "00:BB:00:00:00:03/None~of:0000000000000205/8", - "epA": "00:BB:00:00:00:03/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "8" - } - ] - }, - { - "id": "of:0000000000000206/4~of:0000000000000227/8", - "epA": "of:0000000000000206/4", - "epB": "of:0000000000000227/8", - "type": "UiDeviceLink", - "portA": "4", - "portB": "8", - "rollup": [ - { - "id": "of:0000000000000206/4~of:0000000000000227/8", - "epA": "of:0000000000000206/4", - "epB": "of:0000000000000227/8", - "type": "UiDeviceLink", - "portA": "4", - "portB": "8" - } - ] - }, - { - "id": "00:AA:00:00:00:05/None~of:0000000000000203/6", - "epA": "00:AA:00:00:00:05/None", - "epB": "of:0000000000000203", - "type": "UiEdgeLink", - "portB": "6", - "rollup": [ - { - "id": "00:AA:00:00:00:05/None~of:0000000000000203/6", - "epA": "00:AA:00:00:00:05/None", - "epB": "of:0000000000000203", - "type": "UiEdgeLink", - "portB": "6" - } - ] - }, - { - "id": "of:0000000000000205/5~of:0000000000000206/5", - "epA": "of:0000000000000205/5", - "epB": "of:0000000000000206/5", - "type": "UiDeviceLink", - "portA": "5", - "portB": "5", - "rollup": [ - { - "id": "of:0000000000000205/5~of:0000000000000206/5", - "epA": "of:0000000000000205/5", - "epB": "of:0000000000000206/5", - "type": "UiDeviceLink", - "portA": "5", - "portB": "5" - } - ] - }, - { - "id": "00:BB:00:00:00:02/None~of:0000000000000204/9", - "epA": "00:BB:00:00:00:02/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "9", - "rollup": [ - { - "id": "00:BB:00:00:00:02/None~of:0000000000000204/9", - "epA": "00:BB:00:00:00:02/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "9" - } - ] - }, - { - "id": "of:0000000000000204/3~of:0000000000000227/3", - "epA": "of:0000000000000204/3", - "epB": "of:0000000000000227/3", - "type": "UiDeviceLink", - "portA": "3", - "portB": "3", - "rollup": [ - { - "id": "of:0000000000000204/3~of:0000000000000227/3", - "epA": "of:0000000000000204/3", - "epB": "of:0000000000000227/3", - "type": "UiDeviceLink", - "portA": "3", - "portB": "3" - } - ] - }, - { - "id": "00:EE:00:00:00:01/None~of:0000000000000207/4", - "epA": "00:EE:00:00:00:01/None", - "epB": "of:0000000000000207", - "type": "UiEdgeLink", - "portB": "4", - "rollup": [ - { - "id": "00:EE:00:00:00:01/None~of:0000000000000207/4", - "epA": "00:EE:00:00:00:01/None", - "epB": "of:0000000000000207", - "type": "UiEdgeLink", - "portB": "4" - } - ] - }, - { - "id": "of:0000000000000203/4~of:0000000000000227/2", - "epA": "of:0000000000000203/4", - "epB": "of:0000000000000227/2", - "type": "UiDeviceLink", - "portA": "4", - "portB": "2", - "rollup": [ - { - "id": "of:0000000000000203/4~of:0000000000000227/2", - "epA": "of:0000000000000203/4", - "epB": "of:0000000000000227/2", - "type": "UiDeviceLink", - "portA": "4", - "portB": "2" - } - ] - }, - { - "id": "of:0000000000000205/2~of:0000000000000226/6", - "epA": "of:0000000000000205/2", - "epB": "of:0000000000000226/6", - "type": "UiDeviceLink", - "portA": "2", - "portB": "6", - "rollup": [ - { - "id": "of:0000000000000205/2~of:0000000000000226/6", - "epA": "of:0000000000000205/2", - "epB": "of:0000000000000226/6", - "type": "UiDeviceLink", - "portA": "2", - "portB": "6" - } - ] - }, - { - "id": "00:99:00:00:00:01/None~of:0000000000000205/10", - "epA": "00:99:00:00:00:01/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "10", - "rollup": [ - { - "id": "00:99:00:00:00:01/None~of:0000000000000205/10", - "epA": "00:99:00:00:00:01/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "10" - } - ] - }, - { - "id": "of:0000000000000205/4~of:0000000000000227/6", - "epA": "of:0000000000000205/4", - "epB": "of:0000000000000227/6", - "type": "UiDeviceLink", - "portA": "4", - "portB": "6", - "rollup": [ - { - "id": "of:0000000000000205/4~of:0000000000000227/6", - "epA": "of:0000000000000205/4", - "epB": "of:0000000000000227/6", - "type": "UiDeviceLink", - "portA": "4", - "portB": "6" - } - ] - }, - { - "id": "of:0000000000000206/3~of:0000000000000227/7", - "epA": "of:0000000000000206/3", - "epB": "of:0000000000000227/7", - "type": "UiDeviceLink", - "portA": "3", - "portB": "7", - "rollup": [ - { - "id": "of:0000000000000206/3~of:0000000000000227/7", - "epA": "of:0000000000000206/3", - "epB": "of:0000000000000227/7", - "type": "UiDeviceLink", - "portA": "3", - "portB": "7" - } - ] - }, - { - "id": "00:BB:00:00:00:04/None~of:0000000000000205/9", - "epA": "00:BB:00:00:00:04/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "9", - "rollup": [ - { - "id": "00:BB:00:00:00:04/None~of:0000000000000205/9", - "epA": "00:BB:00:00:00:04/None", - "epB": "of:0000000000000205", - "type": "UiEdgeLink", - "portB": "9" - } - ] - }, - { - "id": "00:AA:00:00:00:02/None~of:0000000000000204/7", - "epA": "00:AA:00:00:00:02/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "7", - "rollup": [ - { - "id": "00:AA:00:00:00:02/None~of:0000000000000204/7", - "epA": "00:AA:00:00:00:02/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "7" - } - ] - }, - { - "id": "00:BB:00:00:00:01/None~of:0000000000000204/8", - "epA": "00:BB:00:00:00:01/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "8", - "rollup": [ - { - "id": "00:BB:00:00:00:01/None~of:0000000000000204/8", - "epA": "00:BB:00:00:00:01/None", - "epB": "of:0000000000000204", - "type": "UiEdgeLink", - "portB": "8" - } - ] - }, - { - "id": "of:0000000000000207/1~of:0000000000000246/1", - "epA": "of:0000000000000207/1", - "epB": "of:0000000000000246/1", - "type": "UiDeviceLink", - "portA": "1", - "portB": "1", - "rollup": [ - { - "id": "of:0000000000000207/1~of:0000000000000246/1", - "epA": "of:0000000000000207/1", - "epB": "of:0000000000000246/1", - "type": "UiDeviceLink", - "portA": "1", - "portB": "1" - } - ] - }, - { - "id": "00:88:00:00:00:02/None~of:0000000000000206/7", - "epA": "00:88:00:00:00:02/None", - "epB": "of:0000000000000206", - "type": "UiEdgeLink", - "portB": "7", - "rollup": [ - { - "id": "00:88:00:00:00:02/None~of:0000000000000206/7", - "epA": "00:88:00:00:00:02/None", - "epB": "of:0000000000000206", - "type": "UiEdgeLink", - "portB": "7" - } - ] - }, - { - "id": "00:EE:00:00:00:02/None~of:0000000000000208/4", - "epA": "00:EE:00:00:00:02/None", - "epB": "of:0000000000000208", - "type": "UiEdgeLink", - "portB": "4", - "rollup": [ - { - "id": "00:EE:00:00:00:02/None~of:0000000000000208/4", - "epA": "00:EE:00:00:00:02/None", - "epB": "of:0000000000000208", - "type": "UiEdgeLink", - "portB": "4" - } - ] - }, - { - "id": "of:0000000000000204/4~of:0000000000000227/4", - "epA": "of:0000000000000204/4", - "epB": "of:0000000000000227/4", - "type": "UiDeviceLink", - "portA": "4", - "portB": "4", - "rollup": [ - { - "id": "of:0000000000000204/4~of:0000000000000227/4", - "epA": "of:0000000000000204/4", - "epB": "of:0000000000000227/4", - "type": "UiDeviceLink", - "portA": "4", - "portB": "4" - } - ] - }, - { - "id": "of:0000000000000203/5~of:0000000000000204/5", - "epA": "of:0000000000000203/5", - "epB": "of:0000000000000204/5", - "type": "UiDeviceLink", - "portA": "5", - "portB": "5", - "rollup": [ - { - "id": "of:0000000000000203/5~of:0000000000000204/5", - "epA": "of:0000000000000203/5", - "epB": "of:0000000000000204/5", - "type": "UiDeviceLink", - "portA": "5", - "portB": "5" - } - ] - }, - { - "id": "of:0000000000000227/9~of:0000000000000247/3", - "epA": "of:0000000000000227/9", - "epB": "of:0000000000000247/3", - "type": "UiDeviceLink", - "portA": "9", - "portB": "3", - "rollup": [ - { - "id": "of:0000000000000227/9~of:0000000000000247/3", - "epA": "of:0000000000000227/9", - "epB": "of:0000000000000247/3", - "type": "UiDeviceLink", - "portA": "9", - "portB": "3" - } - ] - } - ], - "devices": [ - [], - [], - [ - { - "id": "of:0000000000000246", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "40.15", - "name": "s246", - "locType": "geo", - "channelId": "10.192.19.69:59980", - "longitude": "-121.679" - }, - "location": { - "locType": "geo", - "latOrY": 40.15, - "longOrX": -121.679 - } - }, - { - "id": "of:0000000000000206", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "36.766", - "name": "s206", - "locType": "geo", - "channelId": "10.192.19.69:59975", - "longitude": "-92.029" - }, - "location": { - "locType": "geo", - "latOrY": 36.766, - "longOrX": -92.029 - } - }, - { - "id": "of:0000000000000227", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "44.205", - "name": "s227", - "locType": "geo", - "channelId": "10.192.19.69:59979", - "longitude": "-96.359" - }, - "location": { - "locType": "geo", - "latOrY": 44.205, - "longOrX": -96.359 - } - }, - { - "id": "of:0000000000000208", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "36.766", - "name": "s208", - "locType": "geo", - "channelId": "10.192.19.69:59977", - "longitude": "-116.029" - }, - "location": { - "locType": "geo", - "latOrY": 36.766, - "longOrX": -116.029 - } - }, - { - "id": "of:0000000000000205", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "36.766", - "name": "s205", - "locType": "geo", - "channelId": "10.192.19.69:59974", - "longitude": "-96.89" - }, - "location": { - "locType": "geo", - "latOrY": 36.766, - "longOrX": -96.89 - } - }, - { - "id": "of:0000000000000247", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "40.205", - "name": "s247", - "locType": "geo", - "channelId": "10.192.19.69:59981", - "longitude": "-117.359" - }, - "location": { - "locType": "geo", - "latOrY": 40.205, - "longOrX": -117.359 - } - }, - { - "id": "of:0000000000000226", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "44.15", - "name": "s226", - "locType": "geo", - "channelId": "10.192.19.69:59978", - "longitude": "-107.679" - }, - "location": { - "locType": "geo", - "latOrY": 44.15, - "longOrX": -107.679 - } - }, - { - "id": "of:0000000000000203", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "36.766", - "name": "s203", - "locType": "geo", - "channelId": "10.192.19.69:59972", - "longitude": "-111.359" - }, - "location": { - "locType": "geo", - "latOrY": 36.766, - "longOrX": -111.359 - } - }, - { - "id": "of:0000000000000204", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "36.766", - "name": "s204", - "locType": "geo", - "channelId": "10.192.19.69:59973", - "longitude": "-106.359" - }, - "location": { - "locType": "geo", - "latOrY": 36.766, - "longOrX": -106.359 - } - }, - { - "id": "of:0000000000000207", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "10.192.19.68", - "layer": "def", - "props": { - "managementAddress": "10.192.19.69", - "protocol": "OF_13", - "driver": "ofdpa-ovs", - "latitude": "36.766", - "name": "s207", - "locType": "geo", - "channelId": "10.192.19.69:59976", - "longitude": "-122.359" - }, - "location": { - "locType": "geo", - "latOrY": 36.766, - "longOrX": -122.359 - } - } - ] - ], - "hosts": [ - [], - [], - [ - { - "id": "00:88:00:00:00:03/110", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::288:ff:fe00:3", - "2000::102", - "10.0.1.2" - ], - "props": {}, - "configured": false - }, - { - "id": "00:DD:00:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - }, - { - "id": "00:88:00:00:00:04/160", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::288:ff:fe00:4", - "10.0.6.2", - "2000::602" - ], - "props": {}, - "configured": false - }, - { - "id": "00:BB:00:00:00:02/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2bb:ff:fe00:2" - ], - "props": {}, - "configured": false - }, - { - "id": "00:AA:00:00:00:05/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - }, - { - "id": "00:88:00:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::288:ff:fe00:1", - "2000::101", - "10.0.1.1" - ], - "props": {}, - "configured": false - }, - { - "id": "00:AA:00:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - }, - { - "id": "00:AA:00:00:00:03/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - }, - { - "id": "00:BB:00:00:00:04/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2bb:ff:fe00:4" - ], - "props": {}, - "configured": false - }, - { - "id": "00:EE:00:00:00:02/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2ee:ff:fe00:2" - ], - "props": {}, - "configured": false - }, - { - "id": "00:99:00:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "10.0.3.253", - "fe80::299:ff:fe00:1" - ], - "props": {}, - "configured": false - }, - { - "id": "00:99:66:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::299:66ff:fe00:1", - "2000::3fd" - ], - "props": {}, - "configured": false - }, - { - "id": "00:EE:00:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2ee:ff:fe00:1" - ], - "props": {}, - "configured": false - }, - { - "id": "00:BB:00:00:00:01/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2bb:ff:fe00:1" - ], - "props": {}, - "configured": false - }, - { - "id": "00:BB:00:00:00:03/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2bb:ff:fe00:3" - ], - "props": {}, - "configured": false - }, - { - "id": "00:AA:00:00:00:04/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - }, - { - "id": "00:BB:00:00:00:05/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::2bb:ff:fe00:5" - ], - "props": {}, - "configured": false - }, - { - "id": "00:88:00:00:00:02/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "fe80::288:ff:fe00:2", - "2000::601", - "10.0.6.1" - ], - "props": {}, - "configured": false - }, - { - "id": "00:AA:00:00:00:02/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - }, - { - "id": "00:DD:00:00:00:02/None", - "nodeType": "host", - "layer": "def", - "ips": [], - "props": {}, - "configured": false - } - ] - ], - "layerOrder": [ - "opt", - "pkt", - "def" - ] - } -} diff --git a/web/gui2-topo-lib/lib/layer/forcesvg/tests/topo2Highlights-base-data.json b/web/gui2-topo-lib/lib/layer/forcesvg/tests/topo2Highlights-base-data.json deleted file mode 100644 index ae1b9f257d3..00000000000 --- a/web/gui2-topo-lib/lib/layer/forcesvg/tests/topo2Highlights-base-data.json +++ /dev/null @@ -1,380 +0,0 @@ -{ - "event": "topo2CurrentRegion", - "payload": { - "id": "(root)", - "subregions": [], - "links": [ - { - "id": "device:leaf1/1~device:spine1/1", - "epA": "device:leaf1/1", - "epB": "device:spine1/1", - "type": "UiDeviceLink", - "portA": "1", - "portB": "1", - "rollup": [ - { - "id": "device:leaf1/1~device:spine1/1", - "epA": "device:leaf1/1", - "epB": "device:spine1/1", - "type": "UiDeviceLink", - "portA": "1", - "portB": "1" - } - ] - }, - { - "id": "device:leaf2/2~device:spine2/2", - "epA": "device:leaf2/2", - "epB": "device:spine2/2", - "type": "UiDeviceLink", - "portA": "2", - "portB": "2", - "rollup": [ - { - "id": "device:leaf2/2~device:spine2/2", - "epA": "device:leaf2/2", - "epB": "device:spine2/2", - "type": "UiDeviceLink", - "portA": "2", - "portB": "2" - } - ] - }, - { - "id": "00:00:00:00:00:1A/None~device:leaf1/3", - "epA": "00:00:00:00:00:1A/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "3", - "rollup": [ - { - "id": "00:00:00:00:00:1A/None~device:leaf1/3", - "epA": "00:00:00:00:00:1A/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "3" - } - ] - }, - { - "id": "00:00:00:00:00:30/None~device:leaf2/3", - "epA": "00:00:00:00:00:30/None", - "epB": "device:leaf2", - "type": "UiEdgeLink", - "portB": "3", - "rollup": [ - { - "id": "00:00:00:00:00:30/None~device:leaf2/3", - "epA": "00:00:00:00:00:30/None", - "epB": "device:leaf2", - "type": "UiEdgeLink", - "portB": "3" - } - ] - }, - { - "id": "device:leaf1/2~device:spine2/1", - "epA": "device:leaf1/2", - "epB": "device:spine2/1", - "type": "UiDeviceLink", - "portA": "2", - "portB": "1", - "rollup": [ - { - "id": "device:leaf1/2~device:spine2/1", - "epA": "device:leaf1/2", - "epB": "device:spine2/1", - "type": "UiDeviceLink", - "portA": "2", - "portB": "1" - } - ] - }, - { - "id": "device:leaf2/1~device:spine1/2", - "epA": "device:leaf2/1", - "epB": "device:spine1/2", - "type": "UiDeviceLink", - "portA": "1", - "portB": "2", - "rollup": [ - { - "id": "device:leaf2/1~device:spine1/2", - "epA": "device:leaf2/1", - "epB": "device:spine1/2", - "type": "UiDeviceLink", - "portA": "1", - "portB": "2" - } - ] - }, - { - "id": "00:00:00:00:00:20/None~device:leaf1/6", - "epA": "00:00:00:00:00:20/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "6", - "rollup": [ - { - "id": "00:00:00:00:00:20/None~device:leaf1/6", - "epA": "00:00:00:00:00:20/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "6" - } - ] - }, - { - "id": "00:00:00:00:00:1C/None~device:leaf1/5", - "epA": "00:00:00:00:00:1C/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "5", - "rollup": [ - { - "id": "00:00:00:00:00:1C/None~device:leaf1/5", - "epA": "00:00:00:00:00:1C/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "5" - } - ] - }, - { - "id": "00:00:00:00:00:1B/None~device:leaf1/4", - "epA": "00:00:00:00:00:1B/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "4", - "rollup": [ - { - "id": "00:00:00:00:00:1B/None~device:leaf1/4", - "epA": "00:00:00:00:00:1B/None", - "epB": "device:leaf1", - "type": "UiEdgeLink", - "portB": "4" - } - ] - } - ], - "devices": [ - [], - [], - [ - { - "id": "device:spine1", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "172.24.0.3", - "layer": "def", - "props": { - "managementAddress": "grpc://mininet:50003?device_id=1", - "protocol": "P4Runtime, gNMI, gNOI", - "gridX": "400.0", - "gridY": "400.0", - "driver": "stratum-bmv2", - "name": "device:spine1", - "p4DeviceId": "1", - "locType": "grid" - }, - "location": { - "locType": "grid", - "latOrY": 400.0, - "longOrX": 400.0 - } - }, - { - "id": "device:spine2", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "172.24.0.3", - "layer": "def", - "props": { - "managementAddress": "grpc://mininet:50004?device_id=1", - "protocol": "P4Runtime, gNMI, gNOI", - "gridX": "600.0", - "gridY": "400.0", - "driver": "stratum-bmv2", - "name": "device:spine2", - "p4DeviceId": "1", - "locType": "grid" - }, - "location": { - "locType": "grid", - "latOrY": 400.0, - "longOrX": 600.0 - } - }, - { - "id": "device:leaf2", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "172.24.0.3", - "layer": "def", - "props": { - "managementAddress": "grpc://mininet:50002?device_id=1", - "protocol": "P4Runtime, gNMI, gNOI", - "gridX": "800.0", - "gridY": "600.0", - "driver": "stratum-bmv2", - "name": "device:leaf2", - "p4DeviceId": "1", - "locType": "grid" - }, - "location": { - "locType": "grid", - "latOrY": 600.0, - "longOrX": 800.0 - } - }, - { - "id": "device:leaf1", - "nodeType": "device", - "type": "switch", - "online": true, - "master": "172.24.0.3", - "layer": "def", - "props": { - "managementAddress": "grpc://mininet:50001?device_id=1", - "protocol": "P4Runtime, gNMI, gNOI", - "gridX": "200.0", - "gridY": "600.0", - "driver": "stratum-bmv2", - "name": "device:leaf1", - "p4DeviceId": "1", - "locType": "grid" - }, - "location": { - "locType": "grid", - "latOrY": 600.0, - "longOrX": 200.0 - } - } - ] - ], - "hosts": [ - [], - [], - [ - { - "id": "00:00:00:00:00:30/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "2001:2:3::1" - ], - "props": { - "gridX": "750.0", - "gridY": "700.0", - "latitude": null, - "name": "h3", - "locType": "grid", - "longitude": null - }, - "location": { - "locType": "grid", - "latOrY": 700.0, - "longOrX": 750.0 - }, - "configured": false - }, - { - "id": "00:00:00:00:00:1A/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "2001:1:1::a" - ], - "props": { - "gridX": "100.0", - "gridY": "700.0", - "latitude": null, - "name": "h1a", - "locType": "grid", - "longitude": null - }, - "location": { - "locType": "grid", - "latOrY": 700.0, - "longOrX": 100.0 - }, - "configured": false - }, - { - "id": "00:00:00:00:00:1B/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "2001:1:1::b" - ], - "props": { - "gridX": "100.0", - "gridY": "800.0", - "latitude": null, - "name": "h1b", - "locType": "grid", - "longitude": null - }, - "location": { - "locType": "grid", - "latOrY": 800.0, - "longOrX": 100.0 - }, - "configured": false - }, - { - "id": "00:00:00:00:00:1C/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "2001:1:1::c" - ], - "props": { - "gridX": "250.0", - "gridY": "800.0", - "latitude": null, - "name": "h1c", - "locType": "grid", - "longitude": null - }, - "location": { - "locType": "grid", - "latOrY": 800.0, - "longOrX": 250.0 - }, - "configured": false - }, - { - "id": "00:00:00:00:00:20/None", - "nodeType": "host", - "layer": "def", - "ips": [ - "2001:1:2::1" - ], - "props": { - "gridX": "400.0", - "gridY": "700.0", - "latitude": null, - "name": "h2", - "locType": "grid", - "longitude": null - }, - "location": { - "locType": "grid", - "latOrY": 700.0, - "longOrX": 400.0 - }, - "configured": false - } - ] - ], - "layerOrder": [ - "opt", - "pkt", - "def" - ] - } -} diff --git a/web/gui2-topo-lib/lib/layer/forcesvg/tests/topo2Highlights-sample.json b/web/gui2-topo-lib/lib/layer/forcesvg/tests/topo2Highlights-sample.json deleted file mode 100644 index 50995c8f22d..00000000000 --- a/web/gui2-topo-lib/lib/layer/forcesvg/tests/topo2Highlights-sample.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "event": "topo2Highlights", - "payload": { - "devices": [], - "hosts": [], - "links": [ - { - "id": "device:leaf2/2~device:spine2/2", - "label": "964.91 Kbps", - "css": "secondary port-traffic-green" - }, - { - "id": "device:leaf1/1~device:spine1/1", - "label": "3.92 Mbps", - "css": "secondary port-traffic-yellow" - }, - { - "id": "00:00:00:00:00:30/None~device:leaf2/3", - "label": "4.46 Mbps", - "css": "secondary port-traffic-yellow" - }, - { - "id": "device:leaf2/1~device:spine1/2", - "label": "3.53 Mbps", - "css": "secondary port-traffic-yellow" - }, - { - "id": "device:leaf1/2~device:spine2/1", - "label": "1.06 Mbps", - "css": "secondary port-traffic-yellow" - }, - { - "id": "00:00:00:00:00:20/None~device:leaf1/6", - "label": "4.98 Mbps", - "css": "secondary port-traffic-yellow" - } - ] - } -} diff --git a/web/gui2/BUILD b/web/gui2/BUILD index 7ecf797ea15..5fcc3f90e34 100644 --- a/web/gui2/BUILD +++ b/web/gui2/BUILD @@ -19,7 +19,7 @@ """ load("//tools/build/bazel:jdk_genrule.bzl", genrule = "jdk_genrule") -load("@npm_bazel_typescript//:index.bzl", "ts_config") +load("@npm//@bazel/typescript:index.bzl", "ts_config") COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + CLI + [ "@javax_ws_rs_api//jar", @@ -91,6 +91,7 @@ genrule( ":_onos-gui2-base-jar", "//web/gui:onos-gui-lion-for-gui2", "//web/gui2/src/main/webapp:WEB-INF/web.xml", + "//web/gui:onos-gui-jar_cfgdef.jar", ], outs = ["onos-gui2.jar"], cmd = " ROOT=`pwd` &&" + @@ -101,7 +102,8 @@ genrule( " mv web/gui/src/main/resources/org/onosproject/ui/lion* WEB-INF/classes/org/onosproject/ui/ &&" + " cp -R $$ROOT/$(location //web/gui2/src/main/webapp:prodapp)/* WEB-INF/classes/ &&" + " mv $$ROOT/$(location //web/gui2/src/main/webapp:WEB-INF/web.xml) WEB-INF &&" + - " find . -type f -exec touch -t 202001010001 {} \; &&" + + " (cd WEB-INF/classes && jar xf $$ROOT/$(location //web/gui:onos-gui-jar_cfgdef.jar)) &&" + + " find . -type f -exec touch -t 202001010001 {} \\; &&" + " jar cmf META-INF/MANIFEST.MF $$ROOT/$@ WEB-INF/web.xml WEB-INF/classes OSGI-INF/*.xml", output_to_bindir = 1, visibility = ["//visibility:public"], diff --git a/web/gui2/README.md b/web/gui2/README.md index 1c011a0e61a..72565176139 100644 --- a/web/gui2/README.md +++ b/web/gui2/README.md @@ -1,6 +1,6 @@ -# ONOS GUI 2.4.0 +# ONOS GUI 2.5.0 -This project is based on __[Angular 9](https://angular.io/docs)__ +This project is based on __[Angular 10](https://angular.io/docs)__ and __[ES6](http://www.ecma-international.org/ecma-262/6.0/index.html)__ (aka __ES2015__), as an alternative to the 1.0.0 GUI which was based off __[AngularJS 1.3.5](https://angularjs.org/)__ @@ -56,7 +56,7 @@ and are displayed smoothly by HTML5 compatible browsers. Occasionally the d3 libraries (such as d3-force) are used to help position graphics, but an over dependence on d3 is mainly avoided. -The main framework used is Angular 9, with a strong emphasis on making resuable +The main framework used is Angular 10, with a strong emphasis on making resuable components, directives, services and classes. Angular Routing and animation are also used. @@ -172,7 +172,7 @@ This module should then be given it's own ```BUILD.Bazel``` file to compile this package(default_visibility = ["//:__subpackages__"]) load("@io_bazel_rules_sass//:defs.bzl", "sass_binary") -load("@npm_angular_bazel//:index.bzl", "ng_module") +load("@npm//@angular/bazel:index.bzl", "ng_module") sass_binary( name = "mynewmodule-styles", diff --git a/web/gui2/angular.json b/web/gui2/angular.json deleted file mode 100644 index fe5d756ba7d..00000000000 --- a/web/gui2/angular.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "gui2": { - "root": "", - "sourceRoot": "src/main/webapp", - "projectType": "application", - "prefix": "onos", - "schematics": { - "@schematics/angular:component": { - "style": "scss" - } - }, - "architect": { - } - } - }, - "defaultProject": "ngbazel", - "cli": { - "analytics": "11fb2174-8daf-47e0-8d5b-8eee8719059a" - } -} diff --git a/web/gui2/package.json b/web/gui2/package.json index 23ad0a0d13d..bb9493f5711 100644 --- a/web/gui2/package.json +++ b/web/gui2/package.json @@ -4,38 +4,38 @@ "license": "MIT", "engines": { "node": ">=10.9.0 <13.0.0", - "yarn": ">=1.9.2 <2.0.0" + "yarn": ">=1.9.2 <2.3.1" }, "scripts": { "postinstall": "ngcc" }, "private": true, "dependencies": { - "@angular/animations": "9.1.0", - "@angular/common": "9.1.0", - "@angular/core": "9.1.0", - "@angular/forms": "9.1.0", - "@angular/platform-browser": "9.1.0", - "@angular/platform-browser-dynamic": "9.1.0", - "@angular/router": "9.1.0", - "d3": "^5.15.0", - "rxjs": "~6.5.4", + "@angular/animations": "10.2.4", + "@angular/common": "10.2.4", + "@angular/core": "10.2.4", + "@angular/forms": "10.2.4", + "@angular/platform-browser": "10.2.4", + "@angular/platform-browser-dynamic": "10.2.4", + "@angular/router": "10.2.4", + "d3": "^5.16.0", + "rxjs": "~6.6.3", "topojson-client": "^3.1.0", - "tslib": "1.10.0", - "zone.js": "0.10.2" + "tslib": "1.14.1", + "zone.js": "0.10.3" }, "devDependencies": { - "@angular/bazel": "9.1.0", - "@angular/cli": "9.1.0", - "@angular/compiler": "9.1.0", - "@angular/compiler-cli": "9.1.0", - "@angular-devkit/build-angular": "~0.901.1", - "@bazel/hide-bazel-files": "1.1.0", - "@bazel/karma": "1.6.0", - "@bazel/protractor": "1.6.0", - "@bazel/rollup": "1.6.0", - "@bazel/terser": "1.6.0", - "@bazel/typescript": "1.6.0", + "@angular/cli": "10.2.1", + "@angular/compiler": "10.2.4", + "@angular/compiler-cli": "10.2.4", + "@angular-devkit/build-angular": "~0.1002.1", + "@bazel/angular": "2.0.0", + "@bazel/buildifier": "^3.4.0", + "@bazel/karma": "2.0.0", + "@bazel/protractor": "2.0.0", + "@bazel/rollup": "2.0.0", + "@bazel/terser": "2.0.0", + "@bazel/typescript": "2.0.0", "@types/jasmine": "3.4.0", "@types/node": "10.14.22", "core-js": "2.6.9", @@ -51,10 +51,10 @@ "karma-coverage-istanbul-reporter": "~2.1.1", "protractor": "~5.4.2", "requirejs": "2.3.6", - "rollup": "~1.21.4", - "rollup-plugin-commonjs": "~10.1.0", - "rollup-plugin-node-resolve": "~5.2.0", + "rollup": "2.3.4", + "@rollup/plugin-commonjs": "^14.0.0", + "@rollup/plugin-node-resolve": "^8.4.0", "terser": "4.3.1", - "typescript": "3.8.3" + "typescript": "3.9.7" } } diff --git a/web/gui2/src/main/java/org/onosproject/ui/impl/gui2/HttpResponseHeadersFilter.java b/web/gui2/src/main/java/org/onosproject/ui/impl/gui2/HttpResponseHeadersFilter.java new file mode 100644 index 00000000000..68e4ac2bf38 --- /dev/null +++ b/web/gui2/src/main/java/org/onosproject/ui/impl/gui2/HttpResponseHeadersFilter.java @@ -0,0 +1,29 @@ +package org.onosproject.ui.impl.gui2; + +import java.io.IOException; + +import javax.servlet.Filter; +import javax.servlet.FilterConfig; +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletResponse; + + +public class HttpResponseHeadersFilter implements Filter { + + @Override + public void init(FilterConfig filterconfig){} + + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { + HttpServletResponse resp = (HttpServletResponse) response; + resp.setHeader("Content-Security-Policy", "frame-ancestors 'none'"); + chain.doFilter(request, resp); + } + + @Override + public void destroy(){} + +} \ No newline at end of file diff --git a/web/gui2/src/main/java/org/onosproject/ui/impl/gui2/MainIndexResource.java b/web/gui2/src/main/java/org/onosproject/ui/impl/gui2/MainIndexResource.java index 3441cbfb45c..64c4f2864ce 100644 --- a/web/gui2/src/main/java/org/onosproject/ui/impl/gui2/MainIndexResource.java +++ b/web/gui2/src/main/java/org/onosproject/ui/impl/gui2/MainIndexResource.java @@ -52,9 +52,6 @@ public class MainIndexResource extends AbstractInjectionResource { private static final String INDEX = "index.html"; private static final String NOT_READY = "not-ready.html"; - private static final String CONTENT_SECURITY_POLICY = "Content-Security-Policy"; - private static final String FRAME_ANCESTORS_NONE = "frame-ancestors 'none'"; - private static final String INJECT_USER_START = ""; private static final String INJECT_USER_END = ""; @@ -117,9 +114,7 @@ public Response getMainIndex() throws IOException { new ByteArrayInputStream(SCRIPT_END), stream(index, p0e, p3s))); - return Response.ok(new SequenceInputStream(streams)) - .header(CONTENT_SECURITY_POLICY, FRAME_ANCESTORS_NONE) - .build(); + return Response.ok(new SequenceInputStream(streams)).build(); } private InputStream userConsoleLog(String userName) { diff --git a/web/gui2/src/main/webapp/BUILD.bazel b/web/gui2/src/main/webapp/BUILD.bazel index 3b834e97624..e46d83c692f 100644 --- a/web/gui2/src/main/webapp/BUILD.bazel +++ b/web/gui2/src/main/webapp/BUILD.bazel @@ -1,12 +1,9 @@ """ Copyright 2020-present Open Networking Foundation - Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,15 +14,10 @@ package(default_visibility = ["//:__subpackages__"]) load("@build_bazel_rules_nodejs//:index.bzl", "pkg_web") -load("@io_bazel_rules_sass//:defs.bzl", "sass_binary") load("@npm//history-server:index.bzl", "history_server") -load("@npm//html-insert-assets:index.bzl", "html_insert_assets") -load("@npm_angular_bazel//:index.bzl", "ng_module") -load("@npm_bazel_rollup//:index.bzl", "rollup_bundle") -load("@npm_bazel_terser//:index.bzl", "terser_minified") -load("@npm_bazel_typescript//:index.bzl", "ts_config", "ts_devserver", "ts_library") - -#load("@npm_bazel_karma//:index.bzl", "ts_web_test_suite") +load("@npm//@bazel/rollup:index.bzl", "rollup_bundle") +load("@npm//@bazel/terser:index.bzl", "terser_minified") +load("@npm//@bazel/typescript:index.bzl", "ts_library") exports_files([ "WEB-INF/web.xml", @@ -38,7 +30,7 @@ NG_FACTORY_ADDED_IMPORTS = [ "@npm//@angular/forms", ] -ng_module( +ts_library( name = "gui2", srcs = [ "environments/environment.prod.ts", @@ -46,6 +38,7 @@ ng_module( "onos.prod.ts", ], tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = NG_FACTORY_ADDED_IMPORTS + [ "//web/gui2/src/main/webapp/app:app", "@npm//@angular/core", @@ -63,14 +56,15 @@ rollup_bundle( output_dir = True, deps = [ "//web/gui2/src/main/webapp:gui2", - "@npm//rollup-plugin-commonjs", - "@npm//rollup-plugin-node-resolve", + "@npm//@rollup/plugin-commonjs", + "@npm//@rollup/plugin-node-resolve", ], ) terser_minified( name = "bundle-es2015.min", src = ":bundle-es2015", + config_file = "terser.config.json", ) # Files that we serve in both development and production diff --git a/web/gui2/src/main/webapp/WEB-INF/web.xml b/web/gui2/src/main/webapp/WEB-INF/web.xml index 2543df830ae..fdcd4220ed7 100644 --- a/web/gui2/src/main/webapp/WEB-INF/web.xml +++ b/web/gui2/src/main/webapp/WEB-INF/web.xml @@ -21,6 +21,16 @@ id="ONOS" version="2.5"> ONOS GUI 2 + + Http Response Headers Filter + org.onosproject.ui.impl.gui2.HttpResponseHeadersFilter + + + + Http Response Headers Filter + /* + + index.html diff --git a/web/gui2/src/main/webapp/app/BUILD.bazel b/web/gui2/src/main/webapp/app/BUILD.bazel index f18236d9c0d..7d7971eec8b 100644 --- a/web/gui2/src/main/webapp/app/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/BUILD.bazel @@ -14,9 +14,7 @@ limitations under the License. """ -load("@npm_angular_bazel//:index.bzl", "ng_module") -load("@npm_bazel_karma//:index.bzl", "karma_web_test_suite") -load("@npm_bazel_typescript//:index.bzl", "ts_library") +load("@npm//@bazel/typescript:index.bzl", "ts_library") package(default_visibility = ["//:__subpackages__"]) @@ -26,7 +24,7 @@ NG_FACTORY_ADDED_IMPORTS = [ "@npm//@angular/forms", ] -ng_module( +ts_library( name = "app", srcs = [ "nav/nav.component.ts", @@ -35,7 +33,7 @@ ng_module( "onos.service.ts", "onos-routing.module.ts", ], - assets = [ + angular_assets = [ "onos.common.css", "onos.component.css", "onos.component.html", @@ -44,6 +42,7 @@ ng_module( "nav/nav.theme.css", ], tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = NG_FACTORY_ADDED_IMPORTS + [ "//web/gui2-fw-lib", "//web/gui2/src/main/webapp/app/view/apps:gui2-view-apps", @@ -67,6 +66,7 @@ ng_module( "//apps/yang-gui/yang-gui2-lib:yang-gui2-lib", "//apps/inbandtelemetry/intApp-gui2/intApp:intapp-gui2-lib", "@npm//@angular/core", + "@npm//@angular/common", "@npm//@angular/router", "@npm//@angular/platform-browser", "@npm//rxjs", diff --git a/web/gui2/src/main/webapp/app/view/apps/BUILD.bazel b/web/gui2/src/main/webapp/app/view/apps/BUILD.bazel index 9cfeb2a6cf6..64f314b219e 100644 --- a/web/gui2/src/main/webapp/app/view/apps/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/apps/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-apps", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-apps", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/cluster/BUILD.bazel b/web/gui2/src/main/webapp/app/view/cluster/BUILD.bazel index 3dc548e55a7..dea27831335 100644 --- a/web/gui2/src/main/webapp/app/view/cluster/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/cluster/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-cluster", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-cluster", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/device/BUILD.bazel b/web/gui2/src/main/webapp/app/view/device/BUILD.bazel index f821a4ff2e3..ce7abffa386 100644 --- a/web/gui2/src/main/webapp/app/view/device/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/device/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-device", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-device", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/flow/BUILD.bazel b/web/gui2/src/main/webapp/app/view/flow/BUILD.bazel index fe80c7437ea..e2896f89c01 100644 --- a/web/gui2/src/main/webapp/app/view/flow/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/flow/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-flow", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-flow", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/group/BUILD.bazel b/web/gui2/src/main/webapp/app/view/group/BUILD.bazel index 5eb36953b6f..02a5f5da236 100644 --- a/web/gui2/src/main/webapp/app/view/group/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/group/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-group", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-group", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/host/BUILD.bazel b/web/gui2/src/main/webapp/app/view/host/BUILD.bazel index df3f9be8f19..55cf6c31d36 100644 --- a/web/gui2/src/main/webapp/app/view/host/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/host/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-host", srcs = glob( include = [ @@ -28,14 +28,18 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/intent/BUILD.bazel b/web/gui2/src/main/webapp/app/view/intent/BUILD.bazel index e8c550860c7..7207aff6d51 100644 --- a/web/gui2/src/main/webapp/app/view/intent/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/intent/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-intent", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-intent", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/link/BUILD.bazel b/web/gui2/src/main/webapp/app/view/link/BUILD.bazel index f7c458d2af5..a15c5c9e9dd 100644 --- a/web/gui2/src/main/webapp/app/view/link/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/link/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-link", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-link", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/meter/BUILD.bazel b/web/gui2/src/main/webapp/app/view/meter/BUILD.bazel index 01f2f95214e..ed4d19d0c69 100644 --- a/web/gui2/src/main/webapp/app/view/meter/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/meter/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-meter", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-meter", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/partition/BUILD.bazel b/web/gui2/src/main/webapp/app/view/partition/BUILD.bazel index 80cbe054683..3936d9e099c 100644 --- a/web/gui2/src/main/webapp/app/view/partition/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/partition/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-partition", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-partition", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/pipeconf/BUILD.bazel b/web/gui2/src/main/webapp/app/view/pipeconf/BUILD.bazel index 16250bb36ab..697fa483160 100644 --- a/web/gui2/src/main/webapp/app/view/pipeconf/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/pipeconf/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-pipeconf", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-pipeconf", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/port/BUILD.bazel b/web/gui2/src/main/webapp/app/view/port/BUILD.bazel index 8b15b6f750b..91c6d7a492b 100644 --- a/web/gui2/src/main/webapp/app/view/port/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/port/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-port", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-port", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/processor/BUILD.bazel b/web/gui2/src/main/webapp/app/view/processor/BUILD.bazel index 5ea300089b5..895281f3cd5 100644 --- a/web/gui2/src/main/webapp/app/view/processor/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/processor/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-processor", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-processor", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/settings/BUILD.bazel b/web/gui2/src/main/webapp/app/view/settings/BUILD.bazel index f4a2f6d39b4..93b4c3c36e4 100644 --- a/web/gui2/src/main/webapp/app/view/settings/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/settings/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-settings", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-settings", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/app/view/tunnel/BUILD.bazel b/web/gui2/src/main/webapp/app/view/tunnel/BUILD.bazel index 4cc24e3b9e4..a0200db9717 100644 --- a/web/gui2/src/main/webapp/app/view/tunnel/BUILD.bazel +++ b/web/gui2/src/main/webapp/app/view/tunnel/BUILD.bazel @@ -14,11 +14,11 @@ limitations under the License. """ -package(default_visibility = ["//:__subpackages__"]) +load("@npm//@bazel/typescript:index.bzl", "ts_library") -load("@npm_angular_bazel//:index.bzl", "ng_module") +package(default_visibility = ["//:__subpackages__"]) -ng_module( +ts_library( name = "gui2-view-tunnel", srcs = glob( include = [ @@ -28,15 +28,19 @@ ng_module( "**/*.spec.ts", ], ), - assets = glob([ + angular_assets = [ + "//web/gui2-fw-lib:extra_css", + ] + glob([ "**/*.css", "**/*.html", ]), module_name = "gui2-view-tunnel", tsconfig = "//web/gui2:tsconfig.json", + use_angular_plugin = True, deps = [ "//web/gui2-fw-lib", "@npm//@angular/animations", + "@npm//@angular/common", "@npm//@angular/core", "@npm//@angular/forms", "@npm//@angular/platform-browser-dynamic", diff --git a/web/gui2/src/main/webapp/rollup.config.js b/web/gui2/src/main/webapp/rollup.config.js index 6f6d3727c5e..45e83b22355 100644 --- a/web/gui2/src/main/webapp/rollup.config.js +++ b/web/gui2/src/main/webapp/rollup.config.js @@ -1,11 +1,11 @@ -const node = require('rollup-plugin-node-resolve'); -const commonjs = require('rollup-plugin-commonjs'); +const {nodeResolve} = require('@rollup/plugin-node-resolve'); +const commonjs = require('@rollup/plugin-commonjs'); module.exports = { plugins: [ - node({ + nodeResolve({ mainFields: ['browser', 'es2015', 'module', 'jsnext:main', 'main'], }), commonjs(), ], -}; +}; \ No newline at end of file diff --git a/web/gui2/src/main/webapp/terser.config.json b/web/gui2/src/main/webapp/terser.config.json new file mode 100644 index 00000000000..d85d1d38c96 --- /dev/null +++ b/web/gui2/src/main/webapp/terser.config.json @@ -0,0 +1,11 @@ +{ + "compress": { + "keep_fnames": "bazel_no_debug", + "passes": 3, + "pure_getters": true, + "reduce_funcs": "bazel_no_debug", + "reduce_vars": "bazel_no_debug", + "sequences": "bazel_no_debug" +}, + "mangle": "bazel_no_debug" +} \ No newline at end of file diff --git a/web/gui2/yarn.lock b/web/gui2/yarn.lock index 2616f8782f0..3892e2dae15 100644 --- a/web/gui2/yarn.lock +++ b/web/gui2/yarn.lock @@ -2,189 +2,188 @@ # yarn lockfile v1 -"@angular-devkit/architect@0.901.0": - version "0.901.0" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.901.0.tgz#c660cb76e3bd35fc294d8e8578782b83157924aa" - integrity sha512-SlqEBkPrT40zMCy5344AsUqC76pEPCaGPaAkCIvadaz2dC9vNMzQrvubCPJHViD/TumkSX1kYmLS3iYASVM9GQ== +"@angular-devkit/architect@0.1002.1": + version "0.1002.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1002.1.tgz#bd33dda1361b5d7c23e07b41a603b48ac9c3c744" + integrity sha512-vP27xCe++p3zm+zwSDXDm9/rsM71Q4MYidLLi0MQfo8wxsWS/4mWXycCBoMwDkvW44SPJ4Ds1/F46bb3/xRDvA== dependencies: - "@angular-devkit/core" "9.1.0" - rxjs "6.5.4" + "@angular-devkit/core" "10.2.1" + rxjs "6.6.2" -"@angular-devkit/architect@0.901.1": - version "0.901.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.901.1.tgz#b60bfd288892612e3af98ea1621a58d3b6ef268b" - integrity sha512-foWDAurMfBDYLAJxHpTFkJBub1c2A8+eWHbBjgqIHmT8xadnE7t8nSA9XDl+k/kIoWw/qFU+6IttPirudYc/vw== +"@angular-devkit/architect@^0.901.7": + version "0.901.13" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.901.13.tgz#39bb8561250253416173087bc3911897b76d579e" + integrity sha512-vwIVlG+4TJKcnwMcgpkrMXXzjKnk87AEmgERynJVxGYpRJYppHWd6ul7bYdJQATuLUNbJrgdc+lvU4PZqi8Z2A== dependencies: - "@angular-devkit/core" "9.1.1" + "@angular-devkit/core" "9.1.13" rxjs "6.5.4" -"@angular-devkit/build-angular@~0.901.1": - version "0.901.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-0.901.1.tgz#46f4168287c5bc9969a91d1a2ab04c95969df04b" - integrity sha512-6uEvo5htsJoxQHBVwHOGmM6YWq5q6m9UWMv/ughlek0RtSLFfOt9TZQ/yQHgtGQsCQvscD/jBzVoD0zD5Ax/SQ== - dependencies: - "@angular-devkit/architect" "0.901.1" - "@angular-devkit/build-optimizer" "0.901.1" - "@angular-devkit/build-webpack" "0.901.1" - "@angular-devkit/core" "9.1.1" - "@babel/core" "7.9.0" - "@babel/generator" "7.9.3" - "@babel/preset-env" "7.9.0" - "@babel/template" "7.8.6" - "@jsdevtools/coverage-istanbul-loader" "3.0.3" - "@ngtools/webpack" "9.1.1" - ajv "6.12.0" - autoprefixer "9.7.4" - babel-loader "8.0.6" +"@angular-devkit/build-angular@~0.1002.1": + version "0.1002.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-0.1002.1.tgz#2c955cdd2e0e96a35b5f4149d439adeeb98f19f6" + integrity sha512-z5asIOrkxandGT2NgVH3B5uiV0ncURfHpXer/E8q1q5pwY2pCCmvqF2f7tMWrR6j+1Q/Dy1jrpXTWdOUlUCFqw== + dependencies: + "@angular-devkit/architect" "0.1002.1" + "@angular-devkit/build-optimizer" "0.1002.1" + "@angular-devkit/build-webpack" "0.1002.1" + "@angular-devkit/core" "10.2.1" + "@babel/core" "7.11.1" + "@babel/generator" "7.11.0" + "@babel/plugin-transform-runtime" "7.11.0" + "@babel/preset-env" "7.11.0" + "@babel/runtime" "7.11.2" + "@babel/template" "7.10.4" + "@jsdevtools/coverage-istanbul-loader" "3.0.5" + "@ngtools/webpack" "10.2.1" + autoprefixer "9.8.6" + babel-loader "8.1.0" browserslist "^4.9.1" - cacache "15.0.0" + cacache "15.0.5" caniuse-lite "^1.0.30001032" circular-dependency-plugin "5.2.0" - copy-webpack-plugin "5.1.1" + copy-webpack-plugin "6.0.3" core-js "3.6.4" + css-loader "4.2.2" cssnano "4.1.10" file-loader "6.0.0" find-cache-dir "3.3.1" glob "7.1.6" - jest-worker "25.1.0" + jest-worker "26.3.0" karma-source-map-support "1.4.0" - less "3.11.1" - less-loader "5.0.0" - license-webpack-plugin "2.1.4" + less-loader "6.2.0" + license-webpack-plugin "2.3.0" loader-utils "2.0.0" - mini-css-extract-plugin "0.9.0" + mini-css-extract-plugin "0.10.0" minimatch "3.0.4" - open "7.0.3" - parse5 "4.0.0" - postcss "7.0.27" + open "7.2.0" + parse5 "6.0.1" + parse5-htmlparser2-tree-adapter "6.0.1" + pnp-webpack-plugin "1.6.4" + postcss "7.0.32" postcss-import "12.0.1" postcss-loader "3.0.0" - raw-loader "4.0.0" - regenerator-runtime "0.13.5" + raw-loader "4.0.1" + regenerator-runtime "0.13.7" + resolve-url-loader "3.1.2" rimraf "3.0.2" - rollup "2.1.0" - rxjs "6.5.4" - sass "1.26.3" - sass-loader "8.0.2" - semver "7.1.3" + rollup "2.26.5" + rxjs "6.6.2" + sass "1.26.10" + sass-loader "10.0.1" + semver "7.3.2" source-map "0.7.3" - source-map-loader "0.2.4" - source-map-support "0.5.16" - speed-measure-webpack-plugin "1.3.1" - style-loader "1.1.3" - stylus "0.54.7" + source-map-loader "1.0.2" + source-map-support "0.5.19" + speed-measure-webpack-plugin "1.3.3" + style-loader "1.2.1" + stylus "0.54.8" stylus-loader "3.0.2" - terser "4.6.10" - terser-webpack-plugin "2.3.5" + terser "5.3.0" + terser-webpack-plugin "4.1.0" tree-kill "1.2.2" - webpack "4.42.0" + webpack "4.44.1" webpack-dev-middleware "3.7.2" - webpack-dev-server "3.10.3" + webpack-dev-server "3.11.0" webpack-merge "4.2.2" webpack-sources "1.4.3" - webpack-subresource-integrity "1.4.0" - worker-plugin "4.0.2" + webpack-subresource-integrity "1.4.1" + worker-plugin "5.0.0" -"@angular-devkit/build-optimizer@0.901.1": - version "0.901.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.901.1.tgz#49d7385c18f49aaccab2545ab2829c4d52e29b18" - integrity sha512-o0A9CcyDQSUnC5CQIKf92VH8amIYRYrMgLf2kdhSMcy0QV+rEJyN81dSvwX/Yxgnr9NbWEAQg7jnyKk06vfhOw== +"@angular-devkit/build-optimizer@0.1002.1": + version "0.1002.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.1002.1.tgz#826e85b02cc456a66b863d54fcdff4c5f56c5b16" + integrity sha512-9TLbHVGlux/b/eAubiyd3MNS5xog+8MDABG/Y4vWQInWZVNfcSUY7fycbvlCAXLguSVUvjYP2AoPBGPow4mIMw== dependencies: loader-utils "2.0.0" source-map "0.7.3" - tslib "1.11.1" - typescript "3.6.5" + tslib "2.0.1" + typescript "4.0.2" webpack-sources "1.4.3" -"@angular-devkit/build-webpack@0.901.1": - version "0.901.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.901.1.tgz#695bec662d04a8c832fb86ae13b664d85184f42a" - integrity sha512-9oNI+wPSk8yECy+f0EebfMx4PH3uDJRrifYZAxcr84IpzEbpfpRuYhE3ecwqd7k0zu2Kdjw1uUrGxBuH4/sbGg== +"@angular-devkit/build-webpack@0.1002.1": + version "0.1002.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1002.1.tgz#7fc185b6315cba3539b2f637ccb7a5bf833f3317" + integrity sha512-RgTIgwGoHY+fBUEwZGhYrAi2RqqvLe5eHAPxRIG33nydZ6KLxD4XozqmCEx7EJwDws+HFiOhlAYoW12QhimK7w== dependencies: - "@angular-devkit/architect" "0.901.1" - "@angular-devkit/core" "9.1.1" - rxjs "6.5.4" + "@angular-devkit/architect" "0.1002.1" + "@angular-devkit/core" "10.2.1" + rxjs "6.6.2" -"@angular-devkit/core@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-9.1.0.tgz#5cc89bb5d44c6fd12a3527bae0253adb60d64b07" - integrity sha512-vHTsrB4JaVUQ95FRnKrgo79Y3F6FokImrZdrmwkQmwAThpjXeXmpUEKZS+ZSTFRgesjiIysVGOFijARP4BQ7Bg== +"@angular-devkit/core@10.2.1": + version "10.2.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-10.2.1.tgz#3ae38be4ca56c745788481b3577173ac2007e9e0" + integrity sha512-dzlF9Gl7KNt9sPYT2HYq6ySZYwKzkyYR5mrBj3DZOD0OQsoc21LvLkWAHNSL2iYGdHJQS1oJDNs8iRYxYIOY3w== dependencies: - ajv "6.12.0" + ajv "6.12.4" fast-json-stable-stringify "2.1.0" magic-string "0.25.7" - rxjs "6.5.4" + rxjs "6.6.2" source-map "0.7.3" -"@angular-devkit/core@9.1.1": - version "9.1.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-9.1.1.tgz#6adb04c17d01abea506b8f2bd041aacdd569dc4f" - integrity sha512-57MNew2u1QwVb69jxZyhXgdW9kqcGyWyRy2ui/hWCkWLg7RumWtyypmdTs89FNExB4HqtXlQ2eO3JZxfs7QR3w== +"@angular-devkit/core@9.1.13": + version "9.1.13" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-9.1.13.tgz#47135a25c04ceb62579f0a50d4ad015c7741235a" + integrity sha512-bwehVRsva9OWfh/yuEh9VU+0Gr1T7DHJLe8tpZk/VsIkGOD0IszEPZOIEK23bg32yiff9bh6qJEPMA7ZBYEQHg== dependencies: - ajv "6.12.0" + ajv "6.12.3" fast-json-stable-stringify "2.1.0" magic-string "0.25.7" rxjs "6.5.4" source-map "0.7.3" -"@angular-devkit/schematics@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-9.1.0.tgz#f453a9ff78c34a5468cc21830ac4a46089ee1a31" - integrity sha512-cb9PSvskMwWlL54fPfCcpJoyNDWAX6Wo7CzL5qpIB2cJCPLAuyfRUYYrkO77YUST+n2HvypHz0cZ5SNGMfaaBQ== +"@angular-devkit/schematics@10.2.1": + version "10.2.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-10.2.1.tgz#1d1aaf3875c9ed5eb3ad97af993af39fe9ed10a9" + integrity sha512-0oMhB1eM7hg5Xf4U7r193zrNTGyxfzl2okBsLJPuVmkb3KCBGQOyHYmU5HjDNadPc5iCFc+Xo2+DSDvXGuLmaA== dependencies: - "@angular-devkit/core" "9.1.0" - ora "4.0.3" - rxjs "6.5.4" + "@angular-devkit/core" "10.2.1" + ora "5.0.0" + rxjs "6.6.2" -"@angular/animations@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-9.1.0.tgz#3030e290683c0e2d63fa61060d36f659511d3b2c" - integrity sha512-o7X3HM+eocoryw3VrDUtG6Wci2KwtzyBFo3KBJXjQ16X6fwdkjTG+hLb7pp2CBFBEJW4tPYEy7cSBmEfMRTqag== - -"@angular/bazel@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@angular/bazel/-/bazel-9.1.0.tgz#8790af9ebbec225ad174bd3a12e399540d359f3d" - integrity sha512-zFV65e87h4DjXzezCIqeQT+nqG4RNpgh62n8++etSB0MA1oCoQo87MCeWylOFt+yzq2a6wpvU9uOvQRiiCD+tQ== - dependencies: - "@microsoft/api-extractor" "^7.3.9" - shelljs "0.8.2" - tsickle "^0.38.0" - -"@angular/cli@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-9.1.0.tgz#07ec165d507208bb8d8d8ab73c3e14102643edff" - integrity sha512-ofum4gPE/W3fKyzuJrpdHeOS0ZL8x0eYCgsrMyUoFodSpb5LWPqeW+56NgDTpIeny+Trx3pM9dr9QTUVTJ0vYg== - dependencies: - "@angular-devkit/architect" "0.901.0" - "@angular-devkit/core" "9.1.0" - "@angular-devkit/schematics" "9.1.0" - "@schematics/angular" "9.1.0" - "@schematics/update" "0.901.0" +"@angular/animations@10.2.4": + version "10.2.4" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-10.2.4.tgz#6c222aa1f4efd078f4c7388235ef5b9144bf80a4" + integrity sha512-ovlfHxY1C6yH6SdfWIG1WqB77GHfuJ4i3jItvf0qFSvbOHG8OOzrSOR6EVRJYTnre4r4pQ3V8cDFy3igBlWXUw== + dependencies: + tslib "^2.0.0" + +"@angular/cli@10.2.1": + version "10.2.1" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-10.2.1.tgz#5c8dc126969edfe6d11ed63bb5451656c9203081" + integrity sha512-9u/IVZqESiNX7qsLDW31MPBFUJUqvc+zqq+ekEtjRopq32RQpAGFWfvRZCR6GyJd06gzUWcYeYKkpl1XFNBXUg== + dependencies: + "@angular-devkit/architect" "0.1002.1" + "@angular-devkit/core" "10.2.1" + "@angular-devkit/schematics" "10.2.1" + "@schematics/angular" "10.2.1" + "@schematics/update" "0.1002.1" "@yarnpkg/lockfile" "1.1.0" ansi-colors "4.1.1" debug "4.1.1" - ini "1.3.5" - inquirer "7.1.0" + ini "1.3.6" + inquirer "7.3.3" npm-package-arg "8.0.1" - npm-pick-manifest "6.0.0" - open "7.0.3" - pacote "11.1.4" + npm-pick-manifest "6.1.0" + open "7.2.0" + pacote "9.5.12" read-package-tree "5.3.1" rimraf "3.0.2" - semver "7.1.3" + semver "7.3.2" symbol-observable "1.2.0" - universal-analytics "0.4.20" - uuid "7.0.2" + universal-analytics "0.4.23" + uuid "8.3.0" -"@angular/common@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-9.1.0.tgz#f9b5353a28f9da6c06266bc7244bbabf9e005176" - integrity sha512-6JPLNtMhI03bGTVQJeSwc+dTjV6DtP7M/BAyzIV0InZP1D6XsOh2QahLFIaaN2sSxYA2ClKuwfX1v+rx9AbXQA== +"@angular/common@10.2.4": + version "10.2.4" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-10.2.4.tgz#fb1772ea5780c96e00411900c54457f0cbcf401b" + integrity sha512-bBfsLJNDQaC2OI1mReDJuSZ/uBb7Pf3HVpRmlQKNIPllIxqX1hLH8I3Plodrns9m32JMJ6FMsQthcP0KMdRCJA== + dependencies: + tslib "^2.0.0" -"@angular/compiler-cli@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-9.1.0.tgz#5887c278a2fe1f3165018b1cbceef71d9023b9ae" - integrity sha512-xZ8mVPmPporSTtvNA+cbFJQymLzuWfMX6HDDgztZ2eZ5WcQJYloRN4CcYMEzDhCxfV1Zw9Tfc2l14jZD8osi6g== +"@angular/compiler-cli@10.2.4": + version "10.2.4" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-10.2.4.tgz#e90f943fc34edf3a2d65ef2d7fe27fafa0b365d7" + integrity sha512-gpw7Px6c2EaVUiDrU4PLaxf5zk8oJ72Yq62YZ8k4Jd7Vhl39Bhx9a9/I3GFQzZ8X6W/VJMWfZRs3E7bm1krRkw== dependencies: canonical-path "1.0.0" chokidar "^3.0.0" @@ -197,364 +196,437 @@ semver "^6.3.0" source-map "^0.6.1" sourcemap-codec "^1.4.8" - yargs "15.3.0" - -"@angular/compiler@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-9.1.0.tgz#e55b4f2f24df75283002d5e8e85e1acfc46928f6" - integrity sha512-QHw/JSeTXHiJQ2Ih0EtU7FGsYcOr+0hwZhqwSW3EEn8TtUgA3DS5lXeiDV66f+3DdvNZFPmgiZIvun3ypxn1HA== - -"@angular/core@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-9.1.0.tgz#9dfc386bd1461e0fd4786031fd245da04371421c" - integrity sha512-RVlyegdIAij0P1wLY5ObIdsBAzvmHkHfElnmfiNKhaDftP6U/3zRtaKDu0bq0jvn1WCQ8zXxFQ8AWyKZwyFS+w== - -"@angular/forms@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-9.1.0.tgz#de14e34aa37bd41a28f93fee8666cd7f6393078c" - integrity sha512-5GC8HQlPChPV+168zLlm4yj4syA6N9ChSKV0tmzj1zIfMcub1UAOaB9IYaXRHQsjPFh9OuQXwmkzScyAfhEVjA== - -"@angular/platform-browser-dynamic@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.1.0.tgz#830bd5038d1875736e87e68c3aef44f0f835e418" - integrity sha512-sMtz/poQ3TYaWZzWjrn9apKUZ/WKql2MYCWbpax7pql3GgC9OoTslc7ZEe7/d3ynfFE/CQqWBBOuWGD71Z0LMQ== - -"@angular/platform-browser@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-9.1.0.tgz#0bd40db37c9e314944c149de935b0f6cdd1f7350" - integrity sha512-OsS/blUjl8ranmDaRADjFAmvnlmwbT6WNU7dVov7FhV0rqesbwaOJ5bR0LSYHYpej7Jaa6oYk0v0XWkaH9LTFg== - -"@angular/router@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-9.1.0.tgz#df059c0f64fa41ada8f6b5ce741fe47d49f10194" - integrity sha512-cExO1nPnoPFiUJWZ28hTHozPLFoCmqr3xqcM57We0hhKE0esdrO+gRWKRH0EJERukLbU8coPKVhA8daGUpASiQ== - -"@babel/code-frame@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" - integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== - dependencies: - "@babel/highlight" "^7.8.3" + tslib "^2.0.0" + yargs "^16.1.1" -"@babel/compat-data@^7.8.6", "@babel/compat-data@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.9.0.tgz#04815556fc90b0c174abd2c0c1bb966faa036a6c" - integrity sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g== +"@angular/compiler@10.2.4": + version "10.2.4" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-10.2.4.tgz#87ed92bae04dab78eace179ec93ec563e2d946bc" + integrity sha512-xkpDQJt9047eT+HPEoJoJ7TVN+yXIFL0EcYP9pE+jG/f7H8re6Nwf2sBXa91dyCYBanXGMRbivbXIjqLGOfzbA== dependencies: - browserslist "^4.9.1" - invariant "^2.2.4" - semver "^5.5.0" + tslib "^2.0.0" -"@babel/core@7.9.0", "@babel/core@^7.7.5": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" - integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.0" - "@babel/helper-module-transforms" "^7.9.0" - "@babel/helpers" "^7.9.0" - "@babel/parser" "^7.9.0" - "@babel/template" "^7.8.6" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.1" - json5 "^2.1.2" - lodash "^4.17.13" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.5.0" - -"@babel/generator@7.9.3": - version "7.9.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.3.tgz#7c8b2956c6f68b3ab732bd16305916fbba521d94" - integrity sha512-RpxM252EYsz9qLUIq6F7YJyK1sv0wWDBFuztfDGWaQKzHjqDHysxSiRUpA/X9jmfqo+WzkAVKFaUily5h+gDCQ== +"@angular/core@10.2.4": + version "10.2.4" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-10.2.4.tgz#1124061f8232d79fcff7508c9243ec5ec3fc00f3" + integrity sha512-5xpAvmZwD9nZ8eWx10urjibqEeePGEiFXVMEn3IaJWgfdOcMmeSoioW9JUllT3w85+DlNVWbRbhz0YfE9a4jyw== dependencies: - "@babel/types" "^7.9.0" - jsesc "^2.5.1" - lodash "^4.17.13" - source-map "^0.5.0" + tslib "^2.0.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.9.0", "@babel/generator@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.5.tgz#27f0917741acc41e6eaaced6d68f96c3fa9afaf9" - integrity sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ== +"@angular/forms@10.2.4": + version "10.2.4" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-10.2.4.tgz#83254fdd0f1fdcee8809175f19a804c7be5ea8e9" + integrity sha512-nrag/3+sjclH5mYqgM9UKzjotMGDCYBlPMqLt2Mj8rIxtAPRxfKmzAhxf4lRw3RTzMvOLM0rBRJagpi5glyLEw== dependencies: - "@babel/types" "^7.9.5" - jsesc "^2.5.1" - lodash "^4.17.13" - source-map "^0.5.0" - -"@babel/helper-annotate-as-pure@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz#60bc0bc657f63a0924ff9a4b4a0b24a13cf4deee" - integrity sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw== - dependencies: - "@babel/types" "^7.8.3" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz#c84097a427a061ac56a1c30ebf54b7b22d241503" - integrity sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw== - dependencies: - "@babel/helper-explode-assignable-expression" "^7.8.3" - "@babel/types" "^7.8.3" - -"@babel/helper-compilation-targets@^7.8.7": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz#dac1eea159c0e4bd46e309b5a1b04a66b53c1dde" - integrity sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw== - dependencies: - "@babel/compat-data" "^7.8.6" - browserslist "^4.9.1" - invariant "^2.2.4" - levenary "^1.1.1" - semver "^5.5.0" + tslib "^2.0.0" -"@babel/helper-create-regexp-features-plugin@^7.8.3", "@babel/helper-create-regexp-features-plugin@^7.8.8": - version "7.8.8" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz#5d84180b588f560b7864efaeea89243e58312087" - integrity sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg== +"@angular/platform-browser-dynamic@10.2.4": + version "10.2.4" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-10.2.4.tgz#c2fc87f9edf862a9f310f34a7a1f9082b259f73a" + integrity sha512-+oON9ujv9EOC3yJVgnV/vy3262dpMKBFlQ+dHcr5rfk2WpsnyJ26R+Nhkaug9FEdmSo9w+GqowF5bodrtTOTlA== dependencies: - "@babel/helper-annotate-as-pure" "^7.8.3" - "@babel/helper-regex" "^7.8.3" - regexpu-core "^4.7.0" + tslib "^2.0.0" -"@babel/helper-define-map@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz#a0655cad5451c3760b726eba875f1cd8faa02c15" - integrity sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g== +"@angular/platform-browser@10.2.4": + version "10.2.4" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-10.2.4.tgz#08fa0cfff88951120d00327993e00a4454ce0230" + integrity sha512-gYewLxoTnxOxX3XXK959YiDaw8CEnksKIbK6RYuofIcB8dTL9AlS9/l22xdGifTXTkFjs8noO6i/WT5hCt49Ww== dependencies: - "@babel/helper-function-name" "^7.8.3" - "@babel/types" "^7.8.3" - lodash "^4.17.13" + tslib "^2.0.0" -"@babel/helper-explode-assignable-expression@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz#a728dc5b4e89e30fc2dfc7d04fa28a930653f982" - integrity sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw== +"@angular/router@10.2.4": + version "10.2.4" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-10.2.4.tgz#0c6a680d8cbf8f5ce8b904636c8ee0e75765124d" + integrity sha512-y3xMwZHWS84fbm3FoU8vTAeXaTuPd4ZfmZ3dhkG9c1tkVq/jCmc6pkqNxjv3L1iPenKrvt2bFhh+wCs+bcUPhw== dependencies: - "@babel/traverse" "^7.8.3" - "@babel/types" "^7.8.3" + tslib "^2.0.0" -"@babel/helper-function-name@^7.8.3", "@babel/helper-function-name@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz#2b53820d35275120e1874a82e5aabe1376920a5c" - integrity sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw== +"@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== dependencies: - "@babel/helper-get-function-arity" "^7.8.3" - "@babel/template" "^7.8.3" - "@babel/types" "^7.9.5" + "@babel/highlight" "^7.10.4" -"@babel/helper-get-function-arity@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" - integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== - dependencies: - "@babel/types" "^7.8.3" +"@babel/compat-data@^7.11.0", "@babel/compat-data@^7.12.5": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.12.7.tgz#9329b4782a7d6bbd7eef57e11addf91ee3ef1e41" + integrity sha512-YaxPMGs/XIWtYqrdEOZOCPsVWfEoriXopnsz3/i7apYPXQ3698UFhS6dVT1KN5qOsWmVgw/FOrmQgpRaZayGsw== -"@babel/helper-hoist-variables@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz#1dbe9b6b55d78c9b4183fc8cdc6e30ceb83b7134" - integrity sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg== +"@babel/core@7.11.1": + version "7.11.1" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.1.tgz#2c55b604e73a40dc21b0e52650b11c65cf276643" + integrity sha512-XqF7F6FWQdKGGWAzGELL+aCO1p+lRY5Tj5/tbT3St1G8NaH70jhhDIKknIZaDans0OQBG5wRAldROLHSt44BgQ== dependencies: - "@babel/types" "^7.8.3" + "@babel/code-frame" "^7.10.4" + "@babel/generator" "^7.11.0" + "@babel/helper-module-transforms" "^7.11.0" + "@babel/helpers" "^7.10.4" + "@babel/parser" "^7.11.1" + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.11.0" + "@babel/types" "^7.11.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.19" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" -"@babel/helper-member-expression-to-functions@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz#659b710498ea6c1d9907e0c73f206eee7dadc24c" - integrity sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA== - dependencies: - "@babel/types" "^7.8.3" +"@babel/core@^7.7.5": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" + integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/generator" "^7.12.10" + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helpers" "^7.12.5" + "@babel/parser" "^7.12.10" + "@babel/template" "^7.12.7" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.10" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.19" + semver "^5.4.1" + source-map "^0.5.0" -"@babel/helper-module-imports@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498" - integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg== +"@babel/generator@7.11.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.0.tgz#4b90c78d8c12825024568cbe83ee6c9af193585c" + integrity sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ== dependencies: - "@babel/types" "^7.8.3" + "@babel/types" "^7.11.0" + jsesc "^2.5.1" + source-map "^0.5.0" -"@babel/helper-module-transforms@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz#43b34dfe15961918707d247327431388e9fe96e5" - integrity sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA== +"@babel/generator@^7.11.0", "@babel/generator@^7.12.10", "@babel/generator@^7.12.11", "@babel/generator@^7.4.0": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.11.tgz#98a7df7b8c358c9a37ab07a24056853016aba3af" + integrity sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA== dependencies: - "@babel/helper-module-imports" "^7.8.3" - "@babel/helper-replace-supers" "^7.8.6" - "@babel/helper-simple-access" "^7.8.3" - "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/template" "^7.8.6" - "@babel/types" "^7.9.0" - lodash "^4.17.13" + "@babel/types" "^7.12.11" + jsesc "^2.5.1" + source-map "^0.5.0" -"@babel/helper-optimise-call-expression@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz#7ed071813d09c75298ef4f208956006b6111ecb9" - integrity sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ== +"@babel/helper-annotate-as-pure@^7.10.4": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.10.tgz#54ab9b000e60a93644ce17b3f37d313aaf1d115d" + integrity sha512-XplmVbC1n+KY6jL8/fgLVXXUauDIB+lD5+GsQEh6F6GBF1dq1qy4DP4yXWzDKcoqXB3X58t61e85Fitoww4JVQ== dependencies: - "@babel/types" "^7.8.3" + "@babel/types" "^7.12.10" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" - integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== - -"@babel/helper-regex@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.8.3.tgz#139772607d51b93f23effe72105b319d2a4c6965" - integrity sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ== +"@babel/helper-builder-binary-assignment-operator-visitor@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz#bb0b75f31bf98cbf9ff143c1ae578b87274ae1a3" + integrity sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg== dependencies: - lodash "^4.17.13" + "@babel/helper-explode-assignable-expression" "^7.10.4" + "@babel/types" "^7.10.4" -"@babel/helper-remap-async-to-generator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz#273c600d8b9bf5006142c1e35887d555c12edd86" - integrity sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.8.3" - "@babel/helper-wrap-function" "^7.8.3" - "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.3" - "@babel/types" "^7.8.3" - -"@babel/helper-replace-supers@^7.8.3", "@babel/helper-replace-supers@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" - integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.8.3" - "@babel/helper-optimise-call-expression" "^7.8.3" - "@babel/traverse" "^7.8.6" - "@babel/types" "^7.8.6" - -"@babel/helper-simple-access@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz#7f8109928b4dab4654076986af575231deb639ae" - integrity sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw== +"@babel/helper-compilation-targets@^7.10.4": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.5.tgz#cb470c76198db6a24e9dbc8987275631e5d29831" + integrity sha512-+qH6NrscMolUlzOYngSBMIOQpKUGPPsc61Bu5W10mg84LxZ7cmvnBHzARKbDoFxVvqqAbj6Tg6N7bSrWSPXMyw== dependencies: - "@babel/template" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/compat-data" "^7.12.5" + "@babel/helper-validator-option" "^7.12.1" + browserslist "^4.14.5" + semver "^5.5.0" -"@babel/helper-split-export-declaration@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" - integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== - dependencies: - "@babel/types" "^7.8.3" +"@babel/helper-create-class-features-plugin@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz#3c45998f431edd4a9214c5f1d3ad1448a6137f6e" + integrity sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w== + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-member-expression-to-functions" "^7.12.1" + "@babel/helper-optimise-call-expression" "^7.10.4" + "@babel/helper-replace-supers" "^7.12.1" + "@babel/helper-split-export-declaration" "^7.10.4" + +"@babel/helper-create-regexp-features-plugin@^7.12.1": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.7.tgz#2084172e95443fa0a09214ba1bb328f9aea1278f" + integrity sha512-idnutvQPdpbduutvi3JVfEgcVIHooQnhvhx0Nk9isOINOIGYkZea1Pk2JlJRiUnMefrlvr0vkByATBY/mB4vjQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + regexpu-core "^4.7.1" + +"@babel/helper-define-map@^7.10.4": + version "7.10.5" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz#b53c10db78a640800152692b13393147acb9bb30" + integrity sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ== + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/types" "^7.10.5" + lodash "^4.17.19" + +"@babel/helper-explode-assignable-expression@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz#8006a466695c4ad86a2a5f2fb15b5f2c31ad5633" + integrity sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA== + dependencies: + "@babel/types" "^7.12.1" + +"@babel/helper-function-name@^7.10.4", "@babel/helper-function-name@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz#1fd7738aee5dcf53c3ecff24f1da9c511ec47b42" + integrity sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA== + dependencies: + "@babel/helper-get-function-arity" "^7.12.10" + "@babel/template" "^7.12.7" + "@babel/types" "^7.12.11" + +"@babel/helper-get-function-arity@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" + integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag== + dependencies: + "@babel/types" "^7.12.10" + +"@babel/helper-hoist-variables@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz#d49b001d1d5a68ca5e6604dda01a6297f7c9381e" + integrity sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA== + dependencies: + "@babel/types" "^7.10.4" + +"@babel/helper-member-expression-to-functions@^7.12.1", "@babel/helper-member-expression-to-functions@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz#aa77bd0396ec8114e5e30787efa78599d874a855" + integrity sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw== + dependencies: + "@babel/types" "^7.12.7" + +"@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.12.1": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb" + integrity sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA== + dependencies: + "@babel/types" "^7.12.5" + +"@babel/helper-module-transforms@^7.11.0", "@babel/helper-module-transforms@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c" + integrity sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w== + dependencies: + "@babel/helper-module-imports" "^7.12.1" + "@babel/helper-replace-supers" "^7.12.1" + "@babel/helper-simple-access" "^7.12.1" + "@babel/helper-split-export-declaration" "^7.11.0" + "@babel/helper-validator-identifier" "^7.10.4" + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.12.1" + "@babel/types" "^7.12.1" + lodash "^4.17.19" + +"@babel/helper-optimise-call-expression@^7.10.4", "@babel/helper-optimise-call-expression@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz#94ca4e306ee11a7dd6e9f42823e2ac6b49881e2d" + integrity sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ== + dependencies: + "@babel/types" "^7.12.10" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" + integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== + +"@babel/helper-remap-async-to-generator@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz#8c4dbbf916314f6047dc05e6a2217074238347fd" + integrity sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + "@babel/helper-wrap-function" "^7.10.4" + "@babel/types" "^7.12.1" + +"@babel/helper-replace-supers@^7.12.1": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.11.tgz#ea511658fc66c7908f923106dd88e08d1997d60d" + integrity sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.12.7" + "@babel/helper-optimise-call-expression" "^7.12.10" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.11" + +"@babel/helper-simple-access@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136" + integrity sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA== + dependencies: + "@babel/types" "^7.12.1" + +"@babel/helper-skip-transparent-expression-wrappers@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz#462dc63a7e435ade8468385c63d2b84cce4b3cbf" + integrity sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA== + dependencies: + "@babel/types" "^7.12.1" + +"@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0", "@babel/helper-split-export-declaration@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz#1b4cc424458643c47d37022223da33d76ea4603a" + integrity sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g== + dependencies: + "@babel/types" "^7.12.11" + +"@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" + integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== + +"@babel/helper-validator-option@^7.12.1": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz#d66cb8b7a3e7fe4c6962b32020a131ecf0847f4f" + integrity sha512-TBFCyj939mFSdeX7U7DDj32WtzYY7fDcalgq8v3fBZMNOJQNn7nOYzMaUCiPxPYfCup69mtIpqlKgMZLvQ8Xhw== + +"@babel/helper-wrap-function@^7.10.4": + version "7.12.3" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz#3332339fc4d1fbbf1c27d7958c27d34708e990d9" + integrity sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow== + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/helpers@^7.10.4", "@babel/helpers@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e" + integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA== + dependencies: + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.12.5" + "@babel/types" "^7.12.5" + +"@babel/highlight@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" + integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== + dependencies: + "@babel/helper-validator-identifier" "^7.10.4" + chalk "^2.0.0" + js-tokens "^4.0.0" -"@babel/helper-validator-identifier@^7.9.0", "@babel/helper-validator-identifier@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" - integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== +"@babel/parser@^7.10.4", "@babel/parser@^7.11.1", "@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.4.3": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79" + integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg== -"@babel/helper-wrap-function@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz#9dbdb2bb55ef14aaa01fe8c99b629bd5352d8610" - integrity sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ== +"@babel/plugin-proposal-async-generator-functions@^7.10.4": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.12.tgz#04b8f24fd4532008ab4e79f788468fd5a8476566" + integrity sha512-nrz9y0a4xmUrRq51bYkWJIO5SBZyG2ys2qinHsN0zHDHVsUaModrkpyWWWXfGqYQmOL3x9sQIcTNN/pBGpo09A== dependencies: - "@babel/helper-function-name" "^7.8.3" - "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-remap-async-to-generator" "^7.12.1" + "@babel/plugin-syntax-async-generators" "^7.8.0" -"@babel/helpers@^7.9.0": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f" - integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA== +"@babel/plugin-proposal-class-properties@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz#a082ff541f2a29a4821065b8add9346c0c16e5de" + integrity sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w== dependencies: - "@babel/template" "^7.8.3" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" + "@babel/helper-create-class-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/highlight@^7.8.3": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" - integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== +"@babel/plugin-proposal-dynamic-import@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz#43eb5c2a3487ecd98c5c8ea8b5fdb69a2749b2dc" + integrity sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ== dependencies: - "@babel/helper-validator-identifier" "^7.9.0" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.4.3", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": - version "7.9.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" - integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" -"@babel/plugin-proposal-async-generator-functions@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz#bad329c670b382589721b27540c7d288601c6e6f" - integrity sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw== +"@babel/plugin-proposal-export-namespace-from@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.1.tgz#8b9b8f376b2d88f5dd774e4d24a5cc2e3679b6d4" + integrity sha512-6CThGf0irEkzujYS5LQcjBx8j/4aQGiVv7J9+2f7pGfxqyKh3WnmVJYW3hdrQjyksErMGBPQrCnHfOtna+WLbw== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/helper-remap-async-to-generator" "^7.8.3" - "@babel/plugin-syntax-async-generators" "^7.8.0" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-proposal-dynamic-import@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz#38c4fe555744826e97e2ae930b0fb4cc07e66054" - integrity sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w== +"@babel/plugin-proposal-json-strings@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz#d45423b517714eedd5621a9dfdc03fa9f4eb241c" + integrity sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-json-strings" "^7.8.0" -"@babel/plugin-proposal-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz#da5216b238a98b58a1e05d6852104b10f9a70d6b" - integrity sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q== +"@babel/plugin-proposal-logical-assignment-operators@^7.11.0": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.1.tgz#f2c490d36e1b3c9659241034a5d2cd50263a2751" + integrity sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.0" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz#e4572253fdeed65cddeecfdab3f928afeb2fd5d2" - integrity sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw== +"@babel/plugin-proposal-nullish-coalescing-operator@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz#3ed4fff31c015e7f3f1467f190dbe545cd7b046c" + integrity sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" -"@babel/plugin-proposal-numeric-separator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz#5d6769409699ec9b3b68684cd8116cedff93bad8" - integrity sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ== +"@babel/plugin-proposal-numeric-separator@^7.10.4": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.7.tgz#8bf253de8139099fea193b297d23a9d406ef056b" + integrity sha512-8c+uy0qmnRTeukiGsjLGy6uVs/TFjJchGXUeBqlG4VWYOdJWkhhVPdQ3uHwbmalfJwv2JsV0qffXP4asRfL2SQ== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-proposal-object-rest-spread@^7.9.0": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.5.tgz#3fd65911306d8746014ec0d0cf78f0e39a149116" - integrity sha512-VP2oXvAf7KCYTthbUHwBlewbl1Iq059f6seJGsxMizaCdgHIeczOr7FBqELhSqfkIl04Fi8okzWzl63UKbQmmg== +"@babel/plugin-proposal-object-rest-spread@^7.11.0": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz#def9bd03cea0f9b72283dac0ec22d289c7691069" + integrity sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-object-rest-spread" "^7.8.0" - "@babel/plugin-transform-parameters" "^7.9.5" + "@babel/plugin-transform-parameters" "^7.12.1" -"@babel/plugin-proposal-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz#9dee96ab1650eed88646ae9734ca167ac4a9c5c9" - integrity sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw== +"@babel/plugin-proposal-optional-catch-binding@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz#ccc2421af64d3aae50b558a71cede929a5ab2942" + integrity sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" -"@babel/plugin-proposal-optional-chaining@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz#31db16b154c39d6b8a645292472b98394c292a58" - integrity sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w== +"@babel/plugin-proposal-optional-chaining@^7.11.0": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.7.tgz#e02f0ea1b5dc59d401ec16fb824679f683d3303c" + integrity sha512-4ovylXZ0PWmwoOvhU2vhnzVNnm88/Sm9nx7V8BPgMvAzn5zDou3/Awy0EjglyubVHasJj+XCEkr/r1X3P5elCA== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" "@babel/plugin-syntax-optional-chaining" "^7.8.0" -"@babel/plugin-proposal-unicode-property-regex@^7.4.4", "@babel/plugin-proposal-unicode-property-regex@^7.8.3": - version "7.8.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz#ee3a95e90cdc04fe8cd92ec3279fa017d68a0d1d" - integrity sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A== +"@babel/plugin-proposal-private-methods@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.1.tgz#86814f6e7a21374c980c10d38b4493e703f4a389" + integrity sha512-mwZ1phvH7/NHK6Kf8LP7MYDogGV+DKB1mryFOEwx5EBNQrosvIczzZFTUmWaeujd5xT6G1ELYWUz3CutMhjE1w== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.8.8" - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-create-class-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-proposal-unicode-property-regex@^7.10.4", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.1.tgz#2a183958d417765b9eae334f47758e5d6a82e072" + integrity sha512-MYq+l+PvHuw/rKUz1at/vb6nCnQ2gmJBNaM62z0OgH7B2W1D9pvkpYtlti9bGtizNIU1K3zm4bZF9F91efVY0w== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-async-generators@^7.8.0": version "7.8.4" @@ -563,6 +635,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" +"@babel/plugin-syntax-class-properties@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz#bcb297c5366e79bebadef509549cd93b04f19978" + integrity sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-dynamic-import@^7.8.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" @@ -570,6 +649,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" +"@babel/plugin-syntax-export-namespace-from@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" + integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-json-strings@^7.8.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" @@ -577,6 +663,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" @@ -584,12 +677,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-numeric-separator@^7.8.0", "@babel/plugin-syntax-numeric-separator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz#0e3fb63e09bea1b11e96467271c8308007e7c41f" - integrity sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw== +"@babel/plugin-syntax-numeric-separator@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-object-rest-spread@^7.8.0": version "7.8.3" @@ -612,327 +705,350 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-top-level-await@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz#3acdece695e6b13aaf57fc291d1a800950c71391" - integrity sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g== +"@babel/plugin-syntax-top-level-await@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz#dd6c0b357ac1bb142d98537450a319625d13d2a0" + integrity sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-arrow-functions@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz#82776c2ed0cd9e1a49956daeb896024c9473b8b6" - integrity sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg== +"@babel/plugin-transform-arrow-functions@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz#8083ffc86ac8e777fbe24b5967c4b2521f3cb2b3" + integrity sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-async-to-generator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz#4308fad0d9409d71eafb9b1a6ee35f9d64b64086" - integrity sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ== +"@babel/plugin-transform-async-to-generator@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz#3849a49cc2a22e9743cbd6b52926d30337229af1" + integrity sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A== dependencies: - "@babel/helper-module-imports" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/helper-remap-async-to-generator" "^7.8.3" + "@babel/helper-module-imports" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-remap-async-to-generator" "^7.12.1" -"@babel/plugin-transform-block-scoped-functions@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz#437eec5b799b5852072084b3ae5ef66e8349e8a3" - integrity sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg== +"@babel/plugin-transform-block-scoped-functions@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz#f2a1a365bde2b7112e0a6ded9067fdd7c07905d9" + integrity sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-block-scoping@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz#97d35dab66857a437c166358b91d09050c868f3a" - integrity sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w== +"@babel/plugin-transform-block-scoping@^7.10.4": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.12.tgz#d93a567a152c22aea3b1929bb118d1d0a175cdca" + integrity sha512-VOEPQ/ExOVqbukuP7BYJtI5ZxxsmegTwzZ04j1aF0dkSypGo9XpDHuOrABsJu+ie+penpSJheDJ11x1BEZNiyQ== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - lodash "^4.17.13" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-classes@^7.9.0": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.5.tgz#800597ddb8aefc2c293ed27459c1fcc935a26c2c" - integrity sha512-x2kZoIuLC//O5iA7PEvecB105o7TLzZo8ofBVhP79N+DO3jaX+KYfww9TQcfBEZD0nikNyYcGB1IKtRq36rdmg== +"@babel/plugin-transform-classes@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz#65e650fcaddd3d88ddce67c0f834a3d436a32db6" + integrity sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog== dependencies: - "@babel/helper-annotate-as-pure" "^7.8.3" - "@babel/helper-define-map" "^7.8.3" - "@babel/helper-function-name" "^7.9.5" - "@babel/helper-optimise-call-expression" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/helper-replace-supers" "^7.8.6" - "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/helper-annotate-as-pure" "^7.10.4" + "@babel/helper-define-map" "^7.10.4" + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-optimise-call-expression" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-replace-supers" "^7.12.1" + "@babel/helper-split-export-declaration" "^7.10.4" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz#96d0d28b7f7ce4eb5b120bb2e0e943343c86f81b" - integrity sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA== +"@babel/plugin-transform-computed-properties@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz#d68cf6c9b7f838a8a4144badbe97541ea0904852" + integrity sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-destructuring@^7.8.3": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.9.5.tgz#72c97cf5f38604aea3abf3b935b0e17b1db76a50" - integrity sha512-j3OEsGel8nHL/iusv/mRd5fYZ3DrOxWC82x0ogmdN/vHfAP4MYw+AFKYanzWlktNwikKvlzUV//afBW5FTp17Q== +"@babel/plugin-transform-destructuring@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz#b9a570fe0d0a8d460116413cb4f97e8e08b2f847" + integrity sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-dotall-regex@^7.4.4", "@babel/plugin-transform-dotall-regex@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz#c3c6ec5ee6125c6993c5cbca20dc8621a9ea7a6e" - integrity sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw== +"@babel/plugin-transform-dotall-regex@^7.10.4", "@babel/plugin-transform-dotall-regex@^7.4.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.1.tgz#a1d16c14862817b6409c0a678d6f9373ca9cd975" + integrity sha512-B2pXeRKoLszfEW7J4Hg9LoFaWEbr/kzo3teWHmtFCszjRNa/b40f9mfeqZsIDLLt/FjwQ6pz/Gdlwy85xNckBA== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-create-regexp-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-duplicate-keys@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz#8d12df309aa537f272899c565ea1768e286e21f1" - integrity sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ== +"@babel/plugin-transform-duplicate-keys@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.1.tgz#745661baba295ac06e686822797a69fbaa2ca228" + integrity sha512-iRght0T0HztAb/CazveUpUQrZY+aGKKaWXMJ4uf9YJtqxSUe09j3wteztCUDRHs+SRAL7yMuFqUsLoAKKzgXjw== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-exponentiation-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz#581a6d7f56970e06bf51560cd64f5e947b70d7b7" - integrity sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ== +"@babel/plugin-transform-exponentiation-operator@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz#b0f2ed356ba1be1428ecaf128ff8a24f02830ae0" + integrity sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug== dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-for-of@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz#0f260e27d3e29cd1bb3128da5e76c761aa6c108e" - integrity sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ== +"@babel/plugin-transform-for-of@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz#07640f28867ed16f9511c99c888291f560921cfa" + integrity sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-function-name@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz#279373cb27322aaad67c2683e776dfc47196ed8b" - integrity sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ== +"@babel/plugin-transform-function-name@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.1.tgz#2ec76258c70fe08c6d7da154003a480620eba667" + integrity sha512-JF3UgJUILoFrFMEnOJLJkRHSk6LUSXLmEFsA23aR2O5CSLUxbeUX1IZ1YQ7Sn0aXb601Ncwjx73a+FVqgcljVw== dependencies: - "@babel/helper-function-name" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-literals@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz#aef239823d91994ec7b68e55193525d76dbd5dc1" - integrity sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A== +"@babel/plugin-transform-literals@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz#d73b803a26b37017ddf9d3bb8f4dc58bfb806f57" + integrity sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-member-expression-literals@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz#963fed4b620ac7cbf6029c755424029fa3a40410" - integrity sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA== +"@babel/plugin-transform-member-expression-literals@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.1.tgz#496038602daf1514a64d43d8e17cbb2755e0c3ad" + integrity sha512-1sxePl6z9ad0gFMB9KqmYofk34flq62aqMt9NqliS/7hPEpURUCMbyHXrMPlo282iY7nAvUB1aQd5mg79UD9Jg== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-modules-amd@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz#19755ee721912cf5bb04c07d50280af3484efef4" - integrity sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q== +"@babel/plugin-transform-modules-amd@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.1.tgz#3154300b026185666eebb0c0ed7f8415fefcf6f9" + integrity sha512-tDW8hMkzad5oDtzsB70HIQQRBiTKrhfgwC/KkJeGsaNFTdWhKNt/BiE8c5yj19XiGyrxpbkOfH87qkNg1YGlOQ== dependencies: - "@babel/helper-module-transforms" "^7.9.0" - "@babel/helper-plugin-utils" "^7.8.3" - babel-plugin-dynamic-import-node "^2.3.0" + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz#e3e72f4cbc9b4a260e30be0ea59bdf5a39748940" - integrity sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g== +"@babel/plugin-transform-modules-commonjs@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz#fa403124542636c786cf9b460a0ffbb48a86e648" + integrity sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag== dependencies: - "@babel/helper-module-transforms" "^7.9.0" - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/helper-simple-access" "^7.8.3" - babel-plugin-dynamic-import-node "^2.3.0" + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-simple-access" "^7.12.1" + babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-systemjs@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz#e9fd46a296fc91e009b64e07ddaa86d6f0edeb90" - integrity sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ== +"@babel/plugin-transform-modules-systemjs@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.1.tgz#663fea620d593c93f214a464cd399bf6dc683086" + integrity sha512-Hn7cVvOavVh8yvW6fLwveFqSnd7rbQN3zJvoPNyNaQSvgfKmDBO9U1YL9+PCXGRlZD9tNdWTy5ACKqMuzyn32Q== dependencies: - "@babel/helper-hoist-variables" "^7.8.3" - "@babel/helper-module-transforms" "^7.9.0" - "@babel/helper-plugin-utils" "^7.8.3" - babel-plugin-dynamic-import-node "^2.3.0" + "@babel/helper-hoist-variables" "^7.10.4" + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-validator-identifier" "^7.10.4" + babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-umd@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz#e909acae276fec280f9b821a5f38e1f08b480697" - integrity sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ== +"@babel/plugin-transform-modules-umd@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.1.tgz#eb5a218d6b1c68f3d6217b8fa2cc82fec6547902" + integrity sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q== dependencies: - "@babel/helper-module-transforms" "^7.9.0" - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-named-capturing-groups-regex@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz#a2a72bffa202ac0e2d0506afd0939c5ecbc48c6c" - integrity sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw== +"@babel/plugin-transform-named-capturing-groups-regex@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.1.tgz#b407f5c96be0d9f5f88467497fa82b30ac3e8753" + integrity sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.8.3" + "@babel/helper-create-regexp-features-plugin" "^7.12.1" -"@babel/plugin-transform-new-target@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz#60cc2ae66d85c95ab540eb34babb6434d4c70c43" - integrity sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw== +"@babel/plugin-transform-new-target@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.1.tgz#80073f02ee1bb2d365c3416490e085c95759dec0" + integrity sha512-+eW/VLcUL5L9IvJH7rT1sT0CzkdUTvPrXC2PXTn/7z7tXLBuKvezYbGdxD5WMRoyvyaujOq2fWoKl869heKjhw== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-object-super@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz#ebb6a1e7a86ffa96858bd6ac0102d65944261725" - integrity sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ== +"@babel/plugin-transform-object-super@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz#4ea08696b8d2e65841d0c7706482b048bed1066e" + integrity sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/helper-replace-supers" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-replace-supers" "^7.12.1" -"@babel/plugin-transform-parameters@^7.8.7", "@babel/plugin-transform-parameters@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.5.tgz#173b265746f5e15b2afe527eeda65b73623a0795" - integrity sha512-0+1FhHnMfj6lIIhVvS4KGQJeuhe1GI//h5uptK4PvLt+BGBxsoUJbd3/IW002yk//6sZPlFgsG1hY6OHLcy6kA== +"@babel/plugin-transform-parameters@^7.10.4", "@babel/plugin-transform-parameters@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz#d2e963b038771650c922eff593799c96d853255d" + integrity sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg== dependencies: - "@babel/helper-get-function-arity" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-property-literals@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz#33194300d8539c1ed28c62ad5087ba3807b98263" - integrity sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg== +"@babel/plugin-transform-property-literals@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz#41bc81200d730abb4456ab8b3fbd5537b59adecd" + integrity sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-regenerator@^7.8.7": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz#5e46a0dca2bee1ad8285eb0527e6abc9c37672f8" - integrity sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA== +"@babel/plugin-transform-regenerator@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz#5f0a28d842f6462281f06a964e88ba8d7ab49753" + integrity sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng== dependencies: regenerator-transform "^0.14.2" -"@babel/plugin-transform-reserved-words@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz#9a0635ac4e665d29b162837dd3cc50745dfdf1f5" - integrity sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/plugin-transform-shorthand-properties@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz#28545216e023a832d4d3a1185ed492bcfeac08c8" - integrity sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/plugin-transform-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz#9c8ffe8170fdfb88b114ecb920b82fb6e95fe5e8" - integrity sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/plugin-transform-sticky-regex@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz#be7a1290f81dae767475452199e1f76d6175b100" - integrity sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/helper-regex" "^7.8.3" - -"@babel/plugin-transform-template-literals@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz#7bfa4732b455ea6a43130adc0ba767ec0e402a80" - integrity sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/plugin-transform-typeof-symbol@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz#ede4062315ce0aaf8a657a920858f1a2f35fc412" - integrity sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/plugin-transform-unicode-regex@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz#0cef36e3ba73e5c57273effb182f46b91a1ecaad" - integrity sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/preset-env@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.0.tgz#a5fc42480e950ae8f5d9f8f2bbc03f52722df3a8" - integrity sha512-712DeRXT6dyKAM/FMbQTV/FvRCms2hPCx+3weRjZ8iQVQWZejWWk1wwG6ViWMyqb/ouBbGOl5b6aCk0+j1NmsQ== - dependencies: - "@babel/compat-data" "^7.9.0" - "@babel/helper-compilation-targets" "^7.8.7" - "@babel/helper-module-imports" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-proposal-async-generator-functions" "^7.8.3" - "@babel/plugin-proposal-dynamic-import" "^7.8.3" - "@babel/plugin-proposal-json-strings" "^7.8.3" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-proposal-numeric-separator" "^7.8.3" - "@babel/plugin-proposal-object-rest-spread" "^7.9.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.8.3" - "@babel/plugin-proposal-optional-chaining" "^7.9.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.8.3" +"@babel/plugin-transform-reserved-words@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.1.tgz#6fdfc8cc7edcc42b36a7c12188c6787c873adcd8" + integrity sha512-pOnUfhyPKvZpVyBHhSBoX8vfA09b7r00Pmm1sH+29ae2hMTKVmSp4Ztsr8KBKjLjx17H0eJqaRC3bR2iThM54A== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-runtime@7.11.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.11.0.tgz#e27f78eb36f19448636e05c33c90fd9ad9b8bccf" + integrity sha512-LFEsP+t3wkYBlis8w6/kmnd6Kb1dxTd+wGJ8MlxTGzQo//ehtqlVL4S9DNUa53+dtPSQobN2CXx4d81FqC58cw== + dependencies: + "@babel/helper-module-imports" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + resolve "^1.8.1" + semver "^5.5.1" + +"@babel/plugin-transform-shorthand-properties@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz#0bf9cac5550fce0cfdf043420f661d645fdc75e3" + integrity sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-spread@^7.11.0": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz#527f9f311be4ec7fdc2b79bb89f7bf884b3e1e1e" + integrity sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" + +"@babel/plugin-transform-sticky-regex@^7.10.4": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.7.tgz#560224613ab23987453948ed21d0b0b193fa7fad" + integrity sha512-VEiqZL5N/QvDbdjfYQBhruN0HYjSPjC4XkeqW4ny/jNtH9gcbgaqBIXYEZCNnESMAGs0/K/R7oFGMhOyu/eIxg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-template-literals@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz#b43ece6ed9a79c0c71119f576d299ef09d942843" + integrity sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-typeof-symbol@^7.10.4": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.10.tgz#de01c4c8f96580bd00f183072b0d0ecdcf0dec4b" + integrity sha512-JQ6H8Rnsogh//ijxspCjc21YPd3VLVoYtAwv3zQmqAt8YGYUtdo5usNhdl4b9/Vir2kPFZl6n1h0PfUz4hJhaA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-unicode-escapes@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz#5232b9f81ccb07070b7c3c36c67a1b78f1845709" + integrity sha512-I8gNHJLIc7GdApm7wkVnStWssPNbSRMPtgHdmH3sRM1zopz09UWPS4x5V4n1yz/MIWTVnJ9sp6IkuXdWM4w+2Q== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-unicode-regex@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz#cc9661f61390db5c65e3febaccefd5c6ac3faecb" + integrity sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/preset-env@7.11.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.11.0.tgz#860ee38f2ce17ad60480c2021ba9689393efb796" + integrity sha512-2u1/k7rG/gTh02dylX2kL3S0IJNF+J6bfDSp4DI2Ma8QN6Y9x9pmAax59fsCk6QUQG0yqH47yJWA+u1I1LccAg== + dependencies: + "@babel/compat-data" "^7.11.0" + "@babel/helper-compilation-targets" "^7.10.4" + "@babel/helper-module-imports" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-proposal-async-generator-functions" "^7.10.4" + "@babel/plugin-proposal-class-properties" "^7.10.4" + "@babel/plugin-proposal-dynamic-import" "^7.10.4" + "@babel/plugin-proposal-export-namespace-from" "^7.10.4" + "@babel/plugin-proposal-json-strings" "^7.10.4" + "@babel/plugin-proposal-logical-assignment-operators" "^7.11.0" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.10.4" + "@babel/plugin-proposal-numeric-separator" "^7.10.4" + "@babel/plugin-proposal-object-rest-spread" "^7.11.0" + "@babel/plugin-proposal-optional-catch-binding" "^7.10.4" + "@babel/plugin-proposal-optional-chaining" "^7.11.0" + "@babel/plugin-proposal-private-methods" "^7.10.4" + "@babel/plugin-proposal-unicode-property-regex" "^7.10.4" "@babel/plugin-syntax-async-generators" "^7.8.0" + "@babel/plugin-syntax-class-properties" "^7.10.4" "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" "@babel/plugin-syntax-json-strings" "^7.8.0" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" - "@babel/plugin-syntax-numeric-separator" "^7.8.0" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" "@babel/plugin-syntax-object-rest-spread" "^7.8.0" "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" "@babel/plugin-syntax-optional-chaining" "^7.8.0" - "@babel/plugin-syntax-top-level-await" "^7.8.3" - "@babel/plugin-transform-arrow-functions" "^7.8.3" - "@babel/plugin-transform-async-to-generator" "^7.8.3" - "@babel/plugin-transform-block-scoped-functions" "^7.8.3" - "@babel/plugin-transform-block-scoping" "^7.8.3" - "@babel/plugin-transform-classes" "^7.9.0" - "@babel/plugin-transform-computed-properties" "^7.8.3" - "@babel/plugin-transform-destructuring" "^7.8.3" - "@babel/plugin-transform-dotall-regex" "^7.8.3" - "@babel/plugin-transform-duplicate-keys" "^7.8.3" - "@babel/plugin-transform-exponentiation-operator" "^7.8.3" - "@babel/plugin-transform-for-of" "^7.9.0" - "@babel/plugin-transform-function-name" "^7.8.3" - "@babel/plugin-transform-literals" "^7.8.3" - "@babel/plugin-transform-member-expression-literals" "^7.8.3" - "@babel/plugin-transform-modules-amd" "^7.9.0" - "@babel/plugin-transform-modules-commonjs" "^7.9.0" - "@babel/plugin-transform-modules-systemjs" "^7.9.0" - "@babel/plugin-transform-modules-umd" "^7.9.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" - "@babel/plugin-transform-new-target" "^7.8.3" - "@babel/plugin-transform-object-super" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.8.7" - "@babel/plugin-transform-property-literals" "^7.8.3" - "@babel/plugin-transform-regenerator" "^7.8.7" - "@babel/plugin-transform-reserved-words" "^7.8.3" - "@babel/plugin-transform-shorthand-properties" "^7.8.3" - "@babel/plugin-transform-spread" "^7.8.3" - "@babel/plugin-transform-sticky-regex" "^7.8.3" - "@babel/plugin-transform-template-literals" "^7.8.3" - "@babel/plugin-transform-typeof-symbol" "^7.8.4" - "@babel/plugin-transform-unicode-regex" "^7.8.3" + "@babel/plugin-syntax-top-level-await" "^7.10.4" + "@babel/plugin-transform-arrow-functions" "^7.10.4" + "@babel/plugin-transform-async-to-generator" "^7.10.4" + "@babel/plugin-transform-block-scoped-functions" "^7.10.4" + "@babel/plugin-transform-block-scoping" "^7.10.4" + "@babel/plugin-transform-classes" "^7.10.4" + "@babel/plugin-transform-computed-properties" "^7.10.4" + "@babel/plugin-transform-destructuring" "^7.10.4" + "@babel/plugin-transform-dotall-regex" "^7.10.4" + "@babel/plugin-transform-duplicate-keys" "^7.10.4" + "@babel/plugin-transform-exponentiation-operator" "^7.10.4" + "@babel/plugin-transform-for-of" "^7.10.4" + "@babel/plugin-transform-function-name" "^7.10.4" + "@babel/plugin-transform-literals" "^7.10.4" + "@babel/plugin-transform-member-expression-literals" "^7.10.4" + "@babel/plugin-transform-modules-amd" "^7.10.4" + "@babel/plugin-transform-modules-commonjs" "^7.10.4" + "@babel/plugin-transform-modules-systemjs" "^7.10.4" + "@babel/plugin-transform-modules-umd" "^7.10.4" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.10.4" + "@babel/plugin-transform-new-target" "^7.10.4" + "@babel/plugin-transform-object-super" "^7.10.4" + "@babel/plugin-transform-parameters" "^7.10.4" + "@babel/plugin-transform-property-literals" "^7.10.4" + "@babel/plugin-transform-regenerator" "^7.10.4" + "@babel/plugin-transform-reserved-words" "^7.10.4" + "@babel/plugin-transform-shorthand-properties" "^7.10.4" + "@babel/plugin-transform-spread" "^7.11.0" + "@babel/plugin-transform-sticky-regex" "^7.10.4" + "@babel/plugin-transform-template-literals" "^7.10.4" + "@babel/plugin-transform-typeof-symbol" "^7.10.4" + "@babel/plugin-transform-unicode-escapes" "^7.10.4" + "@babel/plugin-transform-unicode-regex" "^7.10.4" "@babel/preset-modules" "^0.1.3" - "@babel/types" "^7.9.0" - browserslist "^4.9.1" + "@babel/types" "^7.11.0" + browserslist "^4.12.0" core-js-compat "^3.6.2" invariant "^2.2.2" levenary "^1.1.1" semver "^5.5.0" "@babel/preset-modules@^0.1.3": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.3.tgz#13242b53b5ef8c883c3cf7dddd55b36ce80fbc72" - integrity sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg== + version "0.1.4" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.4.tgz#362f2b68c662842970fdb5e254ffc8fc1c2e415e" + integrity sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" @@ -940,77 +1056,112 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" +"@babel/runtime@7.11.2": + version "7.11.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" + integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/runtime@^7.8.4": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06" - integrity sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q== + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" + integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== dependencies: regenerator-runtime "^0.13.4" -"@babel/template@7.8.6", "@babel/template@^7.4.0", "@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" - integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/parser" "^7.8.6" - "@babel/types" "^7.8.6" - -"@babel/traverse@^7.4.3", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.5.tgz#6e7c56b44e2ac7011a948c21e283ddd9d9db97a2" - integrity sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.5" - "@babel/helper-function-name" "^7.9.5" - "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.9.0" - "@babel/types" "^7.9.5" +"@babel/template@7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278" + integrity sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/parser" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/template@^7.10.4", "@babel/template@^7.12.7", "@babel/template@^7.4.0": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc" + integrity sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/parser" "^7.12.7" + "@babel/types" "^7.12.7" + +"@babel/traverse@^7.10.4", "@babel/traverse@^7.11.0", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5", "@babel/traverse@^7.4.3": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376" + integrity sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w== + dependencies: + "@babel/code-frame" "^7.12.11" + "@babel/generator" "^7.12.11" + "@babel/helper-function-name" "^7.12.11" + "@babel/helper-split-export-declaration" "^7.12.11" + "@babel/parser" "^7.12.11" + "@babel/types" "^7.12.12" debug "^4.1.0" globals "^11.1.0" - lodash "^4.17.13" + lodash "^4.17.19" -"@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444" - integrity sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg== +"@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.12", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.4.0", "@babel/types@^7.4.4": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.12.tgz#4608a6ec313abbd87afa55004d373ad04a96c299" + integrity sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ== dependencies: - "@babel/helper-validator-identifier" "^7.9.5" - lodash "^4.17.13" + "@babel/helper-validator-identifier" "^7.12.11" + lodash "^4.17.19" to-fast-properties "^2.0.0" -"@bazel/hide-bazel-files@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@bazel/hide-bazel-files/-/hide-bazel-files-1.1.0.tgz#a7d46a4aa3717150b54fde05b2f8b6bab733f493" - integrity sha512-JJ9eMKPBodWugC4Wu0QLe0saDZ971RcP2kjZbG1vJfQHn/gnxvw+4nXDRwei5EzxBsGGuLxY1MkNDtRFIfZr5w== +"@bazel/angular@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@bazel/angular/-/angular-2.0.0.tgz#fe010d546641accb3cde29730ff686ce04c1de6b" + integrity sha512-ZY8sDsfdl77CHuoJ2pMR4C1yuSvP66gc375EU0kSMZQOnStOksZ7g9ZxtGyBPyXH/kWCUE7uEncEZdj/+TZoAA== + dependencies: + "@angular-devkit/architect" "^0.901.7" + "@bazel/bazelisk" "^1.4.0" + "@bazel/ibazel" "^0.13.1" -"@bazel/karma@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-1.6.0.tgz#98950b71114dd9ec169e6778a35d31ae1f578655" - integrity sha512-9cX0E1SiMWwA70ZMFnMzeqSRn3biduGx03bGV77FSUYKocZpyfU2cOEygYGfxAqHnyM7x4cS8nflRv3+ZE0Aqg== +"@bazel/bazelisk@^1.4.0": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.7.3.tgz#51d99286326e15434ce10c54c1ee598c4ab1f694" + integrity sha512-A+QLZvKifKnbFawH5aaCnooPx0Ia5JS3S8SckKB034GVB3BjtUTCwjaxzxG3ARQ6Jq1vDcQwWgF2bjT9FjrdDg== + +"@bazel/buildifier@^3.4.0": + version "3.5.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-3.5.0.tgz#afbee61d61543d0a0a28e2b29a5cbdb64c852953" + integrity sha512-cbUS0/GMg57g6NIg6JekgmqVtuobYzW4aGHk7KzMS/bFZvxg6WY19JJ5UZSzGyAGDu2152oUTFbh4WN74Fz1+Q== + +"@bazel/ibazel@^0.13.1": + version "0.13.2" + resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.13.2.tgz#eb914c41c66af4606db786457a7b130634355e8f" + integrity sha512-q5fGwjTY76MLNcYpF2zEu/y1Clu4DjdjhvJM9+yDKc3+3mBlbX+uiMJYiCz5b0oSYdJTlw1QSRptTYA7CID8EQ== + +"@bazel/karma@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-2.0.0.tgz#a386ba334716e6d94c667c9b40423955a727c896" + integrity sha512-VR/qzsH9/G1eJ0xqicoT7ea6FdiQGW0gd6FzPNecJnqm7OQjhKn7htRWvTONTNXoWl4qCIHTtW+RJ9piH1zU3Q== dependencies: tmp "0.1.0" -"@bazel/protractor@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-1.6.0.tgz#cf095a1dbc038def7031c513a3b87f4e79bedb00" - integrity sha512-gPiRv0oUJbVPpQ9nrwe5vjkffAc8VsYJhpTGgG+8aPdOaTLWgmBP/sy4BdfijU9O1Z/mNYojQCZgMzQz6kAvdg== +"@bazel/protractor@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-2.0.0.tgz#1b67a2f61c7124a25ae4322b585f91a26592458b" + integrity sha512-mr+Jkg/Ta5cp1FQevbV9DqXidDmScX3vy82HjAIew1Y1aQMT9SJ5RVopSSQFe/pIx/zodpAiW1D6lynPiwS1Cw== -"@bazel/rollup@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-1.6.0.tgz#c0bdad0ad0ba5c5b2e21d1634dc2ce48840ca044" - integrity sha512-MLF7laHX3CSAJH+RbIEVWgnQdz3U8dPkdJWJqiX/z9mUSEgC47LNsMBPKlRy1TpOJOpw1j0vLaJv0qN/bgq9NQ== +"@bazel/rollup@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-2.0.0.tgz#1980cb3f6922227659260bfdca99c457889a5bc1" + integrity sha512-mifUfCZbD1RIhfowh4N8E4881ag3FChz7F4z35wxMOP52g1q3+6Bvh5wv9iysFQopxGmS5jNEj3Dq/CWtSoOnw== -"@bazel/terser@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-1.6.0.tgz#63ccd20dd6c9793e7b3b23fb5ea82b55b3ef6eb2" - integrity sha512-csBrN4XfX/hYTtDVcH/ulVO9K4Ca/IlrCWk5o/l7JBJq/cHoTj5AWIA7PKJ4QgnxXeEjso4CmLFgUMEVKVYV3Q== +"@bazel/terser@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-2.0.0.tgz#a841db8aefd7c51c216b34a26bc02a6c93d5e56a" + integrity sha512-6mBYcfzP6pWxycYZ8r4Lz5kgiWZ7n08bVHZBIRExFeqs7Yy92dD92LPeA9FZIzFiX00IuR9Q1Lqy23xH5q7FeQ== -"@bazel/typescript@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.6.0.tgz#8dfd29e71bcf917d5f9cb67f19ac4dcfc9082439" - integrity sha512-vAKuwy1Hgl+t3M3sH/G0oqHRYN35TdENj+0lsCI3x7EbSzyI6cbA3YQrLrlyvdScksqOpZa3PZ3UBGqfJJq2DA== +"@bazel/typescript@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-2.0.0.tgz#2ff5615f09c733cc681ba2ada92b11c356b694cd" + integrity sha512-5FPkxULWIjAKLG5J1XvpXpY1/4IK39dAoWA/Hhg+16gXTES32fT8w42k96pb6BTaNnyBuYgIHBpELEAJ40OOAQ== dependencies: protobufjs "6.8.8" semver "5.6.0" @@ -1022,89 +1173,53 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jsdevtools/coverage-istanbul-loader@3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@jsdevtools/coverage-istanbul-loader/-/coverage-istanbul-loader-3.0.3.tgz#102e414b02ae2f0b3c7fd45a705601e1fd4867c5" - integrity sha512-TAdNkeGB5Fe4Og+ZkAr1Kvn9by2sfL44IAHFtxlh1BA1XJ5cLpO9iSNki5opWESv3l3vSHsZ9BNKuqFKbEbFaA== +"@jsdevtools/coverage-istanbul-loader@3.0.5": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@jsdevtools/coverage-istanbul-loader/-/coverage-istanbul-loader-3.0.5.tgz#2a4bc65d0271df8d4435982db4af35d81754ee26" + integrity sha512-EUCPEkaRPvmHjWAAZkWMT7JDzpw7FKB00WTISaiXsbNOd5hCHg77XLA8sLYLFDo1zepYLo2w7GstN8YBqRXZfA== dependencies: convert-source-map "^1.7.0" - istanbul-lib-instrument "^4.0.1" - loader-utils "^1.4.0" + istanbul-lib-instrument "^4.0.3" + loader-utils "^2.0.0" merge-source-map "^1.1.0" - schema-utils "^2.6.4" - -"@microsoft/api-extractor-model@7.7.11": - version "7.7.11" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.7.11.tgz#9dfc5425f4a6a2b6b1ebc39332ae8101ab8da36a" - integrity sha512-Kf3RytYDq7sP4ASaaA9IcvaOPbVj1Xj34E2Wxd9DznI7sG4HzcpoOGmxaZHCzyYVh7wfAaAlvcXf3SV+djhNZw== - dependencies: - "@microsoft/tsdoc" "0.12.19" - "@rushstack/node-core-library" "3.19.7" - -"@microsoft/api-extractor@^7.3.9": - version "7.7.13" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.7.13.tgz#7ee70978825a36d294d26e50b5d888ca3789d1b0" - integrity sha512-7+EGunGd7OSfDxZl4aDI4qMWG98+I84vTryNadti+IfgpB9IyhJtgA4r3dCG7hewTwKACBhi5aPqpH2C7l/30A== - dependencies: - "@microsoft/api-extractor-model" "7.7.11" - "@microsoft/tsdoc" "0.12.19" - "@rushstack/node-core-library" "3.19.7" - "@rushstack/ts-command-line" "4.3.14" - colors "~1.2.1" - lodash "~4.17.15" - resolve "1.8.1" - source-map "~0.6.1" - typescript "~3.7.2" - -"@microsoft/tsdoc@0.12.19": - version "0.12.19" - resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.12.19.tgz#2173ccb92469aaf62031fa9499d21b16d07f9b57" - integrity sha512-IpgPxHrNxZiMNUSXqR1l/gePKPkfAmIKoDRP9hp7OwjU29ZR8WCJsOJ8iBKgw0Qk+pFwR+8Y1cy8ImLY6e9m4A== + schema-utils "^2.7.0" -"@ngtools/webpack@9.1.1": - version "9.1.1" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-9.1.1.tgz#d67c23a62cd6d5ff0ca8f46062d9dc4aa7eebff4" - integrity sha512-4RPlk6aIlYhk9isTvXbMaA2G0LhxOzcZ+2iG7zV9Yj/Vm8+lrRexpQ/kC/Dh0GI/oCtKIkVpUzx5LTozYeTLdQ== +"@ngtools/webpack@10.2.1": + version "10.2.1" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-10.2.1.tgz#4b360993f784244c7d7a62f40312e9eee2a24cc5" + integrity sha512-RKJSoQufHHpLpsGWUas3WEYtFhnCXmf5GiYCEv8d36ITNRKHhQv38FHLq1aen8Jd7F0b3eZFX5JmGvb7JJmVVg== dependencies: - "@angular-devkit/core" "9.1.1" - enhanced-resolve "4.1.1" - rxjs "6.5.4" + "@angular-devkit/core" "10.2.1" + enhanced-resolve "4.3.0" webpack-sources "1.4.3" -"@npmcli/ci-detect@^1.0.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@npmcli/ci-detect/-/ci-detect-1.2.0.tgz#0df142a1ac3bba6cbf2e9da1a6994cd898e32c95" - integrity sha512-JtktVH7ASBVIWsQTFlFpeOzhBJskvoBCTfeeRhhZy7ybATcUvwiwotZ8j5rkqUUyB69lIy/AvboiiiGBjYBKBA== - -"@npmcli/git@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-2.0.1.tgz#d7ecaa9c945de6bb1af5a7e6ea634771193c168b" - integrity sha512-hVatexiBtx71F01Ars38Hr5AFUGmJgHAfQtRlO5fJlnAawRGSXwEFgjB5i3XdUUmElZU/RXy7fefN02dZKxgPw== +"@nodelib/fs.scandir@2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" + integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== dependencies: - "@npmcli/promise-spawn" "^1.1.0" - mkdirp "^1.0.3" - npm-pick-manifest "^6.0.0" - promise-inflight "^1.0.1" - promise-retry "^1.1.1" - unique-filename "^1.1.1" - which "^2.0.2" + "@nodelib/fs.stat" "2.0.4" + run-parallel "^1.1.9" -"@npmcli/installed-package-contents@^1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@npmcli/installed-package-contents/-/installed-package-contents-1.0.5.tgz#cc78565e55d9f14d46acf46a96f70934e516fa3d" - integrity sha512-aKIwguaaqb6ViwSOFytniGvLPb9SMCUm39TgM3SfUo7n0TxUMbwoXfpwyvQ4blm10lzbAwTsvjr7QZ85LvTi4A== +"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655" + integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063" + integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== dependencies: - npm-bundled "^1.1.1" - npm-normalize-package-bin "^1.0.1" - read-package-json-fast "^1.1.1" - readdir-scoped-modules "^1.1.0" + "@nodelib/fs.scandir" "2.1.4" + fastq "^1.6.0" -"@npmcli/promise-spawn@^1.1.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-1.2.0.tgz#167d70b926f771c8bd8b9183bfc8b5aec29d7e45" - integrity sha512-nFtqjVETliApiRdjbYwKwhlSHx2ZMagyj5b9YbNt0BWeeOVxJd47ZVE2u16vxDHyTOZvk+YLV7INwfAE9a2uow== +"@npmcli/move-file@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.0.1.tgz#de103070dac0f48ce49cf6693c23af59c0f70464" + integrity sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw== dependencies: - infer-owner "^1.0.4" + mkdirp "^1.0.4" "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" @@ -1159,82 +1274,79 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= -"@rushstack/node-core-library@3.19.7": - version "3.19.7" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.19.7.tgz#8d8a193fd6f99536c92dd797ab50fd5fcb7630ea" - integrity sha512-gKE/OXH5GAj8yJ1kEyRW68UekJernilZ3QTRgmQ0MUHBCQmtZ9Q6T5PQ1sVbcL4teH8BMdpZeFy1DKnHs8h3PA== - dependencies: - "@types/node" "10.17.13" - colors "~1.2.1" - fs-extra "~7.0.1" - jju "~1.4.0" - semver "~5.3.0" - timsort "~0.3.0" - z-schema "~3.18.3" - -"@rushstack/ts-command-line@4.3.14": - version "4.3.14" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.3.14.tgz#5d7a437d4e9c564ff1b8e876215fca96c74858a1" - integrity sha512-YJZIyKvkm3f6ZdKSfMntHS9542Y2mmMWzaiPPoXxLFZntKxEIDE3WfUNlvOSo3yK4fNd09Tz3hfvTivQNHSiKQ== - dependencies: - "@types/argparse" "1.0.33" - argparse "~1.0.9" - colors "~1.2.1" - -"@schematics/angular@9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-9.1.0.tgz#fc0ad9099d3c3be3044d6b3f260cac6eb9f3e564" - integrity sha512-qkehaITQ1S1udfnnBY5CXGWnk1iVFI8cZayjLUlRfD5w+6v9if3VIuqPssX96MqvkbjyRu1N214+ieaawzLmuA== - dependencies: - "@angular-devkit/core" "9.1.0" - "@angular-devkit/schematics" "9.1.0" - -"@schematics/update@0.901.0": - version "0.901.0" - resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.901.0.tgz#3e08231354f2c414c7d5b3bde1d9f7c08c664a74" - integrity sha512-u2VESL1dgOSGZK/wcWEz0WcCU/yv764zhzCQerCwUtbV1CISSSDZ6x+prVYDXOdxWBGtDos2MbCF3GEJJI1T+w== - dependencies: - "@angular-devkit/core" "9.1.0" - "@angular-devkit/schematics" "9.1.0" +"@rollup/plugin-commonjs@^14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-14.0.0.tgz#4285f9ec2db686a31129e5a2b415c94aa1f836f0" + integrity sha512-+PSmD9ePwTAeU106i9FRdc+Zb3XUWyW26mo5Atr2mk82hor8+nPwkztEjFo8/B1fJKfaQDg9aM2bzQkjhi7zOw== + dependencies: + "@rollup/pluginutils" "^3.0.8" + commondir "^1.0.1" + estree-walker "^1.0.1" + glob "^7.1.2" + is-reference "^1.1.2" + magic-string "^0.25.2" + resolve "^1.11.0" + +"@rollup/plugin-node-resolve@^8.4.0": + version "8.4.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-8.4.0.tgz#261d79a680e9dc3d86761c14462f24126ba83575" + integrity sha512-LFqKdRLn0ShtQyf6SBYO69bGE1upV6wUhBX0vFOUnLAyzx5cwp8svA0eHUnu8+YU57XOkrMtfG63QOpQx25pHQ== + dependencies: + "@rollup/pluginutils" "^3.1.0" + "@types/resolve" "1.17.1" + builtin-modules "^3.1.0" + deep-freeze "^0.0.1" + deepmerge "^4.2.2" + is-module "^1.0.0" + resolve "^1.17.0" + +"@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" + integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== + dependencies: + "@types/estree" "0.0.39" + estree-walker "^1.0.1" + picomatch "^2.2.2" + +"@schematics/angular@10.2.1": + version "10.2.1" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-10.2.1.tgz#cd523c9c9491e5ed9701f6b92f2b0593eedff56e" + integrity sha512-hmhZ6zPJshP1ATYc/EzJPwaFas0D+T6eeWEFyHAgIV2GmNdJNyBdKHQtizGRQBpfWvBdI4/krvX+a71VnkU8oA== + dependencies: + "@angular-devkit/core" "10.2.1" + "@angular-devkit/schematics" "10.2.1" + jsonc-parser "2.3.0" + +"@schematics/update@0.1002.1": + version "0.1002.1" + resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.1002.1.tgz#5e0d07498444f19c34e73ebe142d368d6f3f5bf0" + integrity sha512-RbC01VKb9q7Db5rpbrQLBOVkIzv3TPWMjRUSgg/LlLFEDVO3LPn5nX9bYnb6E0HeIqUW+zAU5Qaz9ob/Py06LA== + dependencies: + "@angular-devkit/core" "10.2.1" + "@angular-devkit/schematics" "10.2.1" "@yarnpkg/lockfile" "1.1.0" - ini "1.3.5" + ini "1.3.6" npm-package-arg "^8.0.0" - pacote "11.1.4" - rxjs "6.5.4" - semver "7.1.3" + pacote "9.5.12" + semver "7.3.2" semver-intersect "1.4.0" -"@tootallnate/once@1": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.0.0.tgz#9c13c2574c92d4503b005feca8f2e16cc1611506" - integrity sha512-KYyTT/T6ALPkIRd2Ge080X/BsXvy9O0hcWTtMWkPvwAwF99+vn6Dv4GzrFT/Nn1LePr+FFDbRXXlqmsy9lw2zA== - -"@types/argparse@1.0.33": - version "1.0.33" - resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.33.tgz#2728669427cdd74a99e53c9f457ca2866a37c52d" - integrity sha512-VQgHxyPMTj3hIlq9SY1mctqx+Jj8kpQfoLvDlVSDNOyuYs8JYfkuY3OW/4+dO657yPmNhHpePRx0/Tje5ImNVQ== - -"@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== +"@types/estree@*": + version "0.0.45" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.45.tgz#e9387572998e5ecdac221950dab3e8c3b16af884" + integrity sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g== "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== -"@types/events@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" - integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== - "@types/glob@^7.1.1": - version "7.1.1" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" - integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== + version "7.1.3" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" + integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== dependencies: - "@types/events" "*" "@types/minimatch" "*" "@types/node" "*" @@ -1243,6 +1355,11 @@ resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.4.0.tgz#018c56db42400c092aae47de21f710b7f04e4b06" integrity sha512-6pUnBg6DuSB55xnxJ5+gW9JOkFrPsXkYAuqqEE8oyrpgDiPQ+TZ+1Zt4S+CHcRJcxyNYXeIXG4vHSzdF6y9Uvw== +"@types/json-schema@^7.0.5": + version "7.0.6" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" + integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== + "@types/long@^4.0.0": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" @@ -1254,29 +1371,19 @@ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== "@types/node@*": - version "13.11.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.11.1.tgz#49a2a83df9d26daacead30d0ccc8762b128d53c7" - integrity sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g== + version "14.14.16" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.16.tgz#3cc351f8d48101deadfed4c9e4f116048d437b4b" + integrity sha512-naXYePhweTi+BMv11TgioE2/FXU4fSl29HAH1ffxVciNsH3rYXjNP2yM8wqmSm7jS20gM8TIklKiTen+1iVncw== "@types/node@10.14.22": version "10.14.22" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.22.tgz#34bcdf6b6cb5fc0db33d24816ad9d3ece22feea4" integrity sha512-9taxKC944BqoTVjE+UT3pQH0nHZlTvITwfsOZqyc+R3sfJuxaTtxWjfn1K2UlxyPcKHf0rnaXcVFrS9F9vf0bw== -"@types/node@10.17.13": - version "10.17.13" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" - integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== - "@types/node@^10.1.0": - version "10.17.19" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.19.tgz#1d31ddd5503dba2af7a901aafef3392e4955620e" - integrity sha512-46/xThm3zvvc9t9/7M3AaLEqtOpqlYYYcCZbpYVAQHG20+oMZBkae/VMrn4BTi6AJ8cpack0mEXhGiKmDNbLrQ== - -"@types/node@^12.7.5": - version "12.12.35" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.35.tgz#1e61b226c14380f4384f70cfe49a65c2c553ad2b" - integrity sha512-ASYsaKecA7TUsDrqIGPNk3JeEox0z/0XR/WsJJ8BIX/9+SkMSImQXKWfU/yBrSyc7ZSE/NPqLu36Nur0miCFfQ== + version "10.17.50" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.50.tgz#7a20902af591282aa9176baefc37d4372131c32d" + integrity sha512-vwX+/ija9xKc/z9VqMCdbf4WYcMTGsI0I/L/6shIF3qXURxZOhPQlPRHtjTpiNhAwn0paMJzlOQqw6mAGEQnTA== "@types/q@^0.0.32": version "0.0.32" @@ -1284,14 +1391,14 @@ integrity sha1-vShOV8hPEyXacCur/IKlMoGQwMU= "@types/q@^1.5.1": - version "1.5.2" - resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8" - integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw== + version "1.5.4" + resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" + integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== -"@types/resolve@0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" - integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== +"@types/resolve@1.17.1": + version "1.17.1" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" + integrity sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw== dependencies: "@types/node" "*" @@ -1306,158 +1413,157 @@ integrity sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA== "@types/webpack-sources@^0.1.5": - version "0.1.7" - resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.7.tgz#0a330a9456113410c74a5d64180af0cbca007141" - integrity sha512-XyaHrJILjK1VHVC4aVlKsdNN5KBTwufMb43cQs+flGxtPAf/1Qwl8+Q0tp5BwEGaI8D6XT1L+9bSWXckgkjTLw== + version "0.1.8" + resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.8.tgz#078d75410435993ec8a0a2855e88706f3f751f81" + integrity sha512-JHB2/xZlXOjzjBB6fMOpH1eQAfsrpqVVIbneE0Rok16WXwFaznaI5vfg75U5WgGJm7V9W1c4xeRQDjX/zwvghA== dependencies: "@types/node" "*" "@types/source-list-map" "*" source-map "^0.6.1" -"@webassemblyjs/ast@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359" - integrity sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ== - dependencies: - "@webassemblyjs/helper-module-context" "1.8.5" - "@webassemblyjs/helper-wasm-bytecode" "1.8.5" - "@webassemblyjs/wast-parser" "1.8.5" - -"@webassemblyjs/floating-point-hex-parser@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz#1ba926a2923613edce496fd5b02e8ce8a5f49721" - integrity sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ== - -"@webassemblyjs/helper-api-error@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz#c49dad22f645227c5edb610bdb9697f1aab721f7" - integrity sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA== - -"@webassemblyjs/helper-buffer@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz#fea93e429863dd5e4338555f42292385a653f204" - integrity sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q== - -"@webassemblyjs/helper-code-frame@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz#9a740ff48e3faa3022b1dff54423df9aa293c25e" - integrity sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ== - dependencies: - "@webassemblyjs/wast-printer" "1.8.5" - -"@webassemblyjs/helper-fsm@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz#ba0b7d3b3f7e4733da6059c9332275d860702452" - integrity sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow== - -"@webassemblyjs/helper-module-context@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz#def4b9927b0101dc8cbbd8d1edb5b7b9c82eb245" - integrity sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g== - dependencies: - "@webassemblyjs/ast" "1.8.5" - mamacro "^0.0.3" - -"@webassemblyjs/helper-wasm-bytecode@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz#537a750eddf5c1e932f3744206551c91c1b93e61" - integrity sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ== - -"@webassemblyjs/helper-wasm-section@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz#74ca6a6bcbe19e50a3b6b462847e69503e6bfcbf" - integrity sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-buffer" "1.8.5" - "@webassemblyjs/helper-wasm-bytecode" "1.8.5" - "@webassemblyjs/wasm-gen" "1.8.5" - -"@webassemblyjs/ieee754@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz#712329dbef240f36bf57bd2f7b8fb9bf4154421e" - integrity sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g== +"@webassemblyjs/ast@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" + integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== + dependencies: + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + +"@webassemblyjs/floating-point-hex-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" + integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== + +"@webassemblyjs/helper-api-error@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" + integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== + +"@webassemblyjs/helper-buffer@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" + integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== + +"@webassemblyjs/helper-code-frame@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" + integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== + dependencies: + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/helper-fsm@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" + integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== + +"@webassemblyjs/helper-module-context@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" + integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== + dependencies: + "@webassemblyjs/ast" "1.9.0" + +"@webassemblyjs/helper-wasm-bytecode@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" + integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== + +"@webassemblyjs/helper-wasm-section@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" + integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + +"@webassemblyjs/ieee754@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" + integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== dependencies: "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.8.5.tgz#044edeb34ea679f3e04cd4fd9824d5e35767ae10" - integrity sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A== +"@webassemblyjs/leb128@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" + integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== dependencies: "@xtuc/long" "4.2.2" -"@webassemblyjs/utf8@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.8.5.tgz#a8bf3b5d8ffe986c7c1e373ccbdc2a0915f0cedc" - integrity sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw== - -"@webassemblyjs/wasm-edit@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz#962da12aa5acc1c131c81c4232991c82ce56e01a" - integrity sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-buffer" "1.8.5" - "@webassemblyjs/helper-wasm-bytecode" "1.8.5" - "@webassemblyjs/helper-wasm-section" "1.8.5" - "@webassemblyjs/wasm-gen" "1.8.5" - "@webassemblyjs/wasm-opt" "1.8.5" - "@webassemblyjs/wasm-parser" "1.8.5" - "@webassemblyjs/wast-printer" "1.8.5" - -"@webassemblyjs/wasm-gen@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz#54840766c2c1002eb64ed1abe720aded714f98bc" - integrity sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-wasm-bytecode" "1.8.5" - "@webassemblyjs/ieee754" "1.8.5" - "@webassemblyjs/leb128" "1.8.5" - "@webassemblyjs/utf8" "1.8.5" - -"@webassemblyjs/wasm-opt@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz#b24d9f6ba50394af1349f510afa8ffcb8a63d264" - integrity sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-buffer" "1.8.5" - "@webassemblyjs/wasm-gen" "1.8.5" - "@webassemblyjs/wasm-parser" "1.8.5" - -"@webassemblyjs/wasm-parser@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz#21576f0ec88b91427357b8536383668ef7c66b8d" - integrity sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-api-error" "1.8.5" - "@webassemblyjs/helper-wasm-bytecode" "1.8.5" - "@webassemblyjs/ieee754" "1.8.5" - "@webassemblyjs/leb128" "1.8.5" - "@webassemblyjs/utf8" "1.8.5" - -"@webassemblyjs/wast-parser@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz#e10eecd542d0e7bd394f6827c49f3df6d4eefb8c" - integrity sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/floating-point-hex-parser" "1.8.5" - "@webassemblyjs/helper-api-error" "1.8.5" - "@webassemblyjs/helper-code-frame" "1.8.5" - "@webassemblyjs/helper-fsm" "1.8.5" +"@webassemblyjs/utf8@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" + integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== + +"@webassemblyjs/wasm-edit@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" + integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/helper-wasm-section" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-opt" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/wasm-gen@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" + integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wasm-opt@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" + integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + +"@webassemblyjs/wasm-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" + integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wast-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" + integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/floating-point-hex-parser" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-code-frame" "1.9.0" + "@webassemblyjs/helper-fsm" "1.9.0" "@xtuc/long" "4.2.2" -"@webassemblyjs/wast-printer@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz#114bbc481fd10ca0e23b3560fa812748b0bae5bc" - integrity sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg== +"@webassemblyjs/wast-printer@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" + integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/wast-parser" "1.8.5" + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" "@xtuc/long" "4.2.2" "@xtuc/ieee754@^1.2.0": @@ -1475,6 +1581,19 @@ resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== +JSONStream@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +abab@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" + integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== + accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -1483,53 +1602,54 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -acorn@^6.2.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" - integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== +acorn@^6.4.1: + version "6.4.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" + integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== -acorn@^7.0.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" - integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== +adjust-sourcemap-loader@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/adjust-sourcemap-loader/-/adjust-sourcemap-loader-3.0.0.tgz#5ae12fb5b7b1c585e80bbb5a63ec163a1a45e61e" + integrity sha512-YBrGyT2/uVQ/c6Rr+t6ZJXniY03YtHGMJQYal368burRGYKqhx9qGTWqcBU5s1CwYY9E/ri63RYyG1IacMZtqw== + dependencies: + loader-utils "^2.0.0" + regex-parser "^2.2.11" adm-zip@^0.4.9: - version "0.4.14" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.14.tgz#2cf312bcc9f8875df835b0f6040bd89be0a727a9" - integrity sha512-/9aQCnQHF+0IiCl0qhXoK7qs//SwYE7zX8lsr/DNk1BRAHYxeLZPL4pguwK29gUEqasYQjqPtEpDRSWEkdHn9g== + version "0.4.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" + integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== after@0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= -agent-base@6: - version "6.0.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.0.tgz#5d0101f19bbfaed39980b22ae866de153b93f09a" - integrity sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw== - dependencies: - debug "4" - -agent-base@^4.3.0: +agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== dependencies: es6-promisify "^5.0.0" -agentkeepalive@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.1.0.tgz#a48e040ed16745dd29ce923675f60c9c90f39ee0" - integrity sha512-CW/n1wxF8RpEuuiq6Vbn9S8m0VSYDMnZESqaJ6F2cWN9fY8rei2qaxweIaRgq+ek8TqfoFIsUjaGNKGGEHElSg== +agent-base@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" + integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== + dependencies: + es6-promisify "^5.0.0" + +agentkeepalive@^3.4.1: + version "3.5.2" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67" + integrity sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ== dependencies: - debug "^4.1.0" - depd "^1.1.2" humanize-ms "^1.2.1" aggregate-error@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0" - integrity sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA== + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== dependencies: clean-stack "^2.0.0" indent-string "^4.0.0" @@ -1539,15 +1659,35 @@ ajv-errors@^1.0.0: resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== -ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" - integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== +ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv@6.12.3: + version "6.12.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.3.tgz#18c5af38a111ddeb4f2697bd78d68abc1cabd706" + integrity sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@6.12.4: + version "6.12.4" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234" + integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" -ajv@6.12.0, ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: - version "6.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" - integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== +ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" @@ -1591,6 +1731,11 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + ansi-regex@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" @@ -1601,7 +1746,7 @@ ansi-styles@^2.2.1: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= -ansi-styles@^3.2.1: +ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== @@ -1609,11 +1754,10 @@ ansi-styles@^3.2.1: color-convert "^1.9.0" ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: - "@types/color-name" "^1.1.1" color-convert "^2.0.1" anymatch@^2.0.0: @@ -1644,13 +1788,18 @@ aproba@^1.1.1: resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== -argparse@^1.0.7, argparse@~1.0.9: +argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" +arity-n@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/arity-n/-/arity-n-1.0.4.tgz#d9e76b11733e08569c0847ae7b39b2860b30b745" + integrity sha1-2edrEXM+CFacCEeuezmyhgswt0U= + arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" @@ -1683,6 +1832,11 @@ array-union@^1.0.1: dependencies: array-uniq "^1.0.1" +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + array-uniq@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" @@ -1703,19 +1857,20 @@ arrify@^1.0.0: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= -asap@^2.0.0, asap@~2.0.3: +asap@^2.0.0: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= -asn1.js@^4.0.0: - version "4.10.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" - integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== +asn1.js@^5.2.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" + integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== dependencies: bn.js "^4.0.0" inherits "^2.0.1" minimalistic-assert "^1.0.0" + safer-buffer "^2.1.0" asn1@~0.2.3: version "0.2.4" @@ -1752,7 +1907,7 @@ async-limiter@~1.0.0: resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== -async@^2.5.0, async@^2.6.2: +async@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== @@ -1769,18 +1924,18 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@9.7.4: - version "9.7.4" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.4.tgz#f8bf3e06707d047f0641d87aee8cfb174b2a5378" - integrity sha512-g0Ya30YrMBAEZk60lp+qfX5YQllG+S5W3GYCFvyHTvhOki0AEQJLPEcIuGRsqVwLi8FvXPVtwTGhfr38hVpm0g== +autoprefixer@9.8.6: + version "9.8.6" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.6.tgz#3b73594ca1bf9266320c5acf1588d74dea74210f" + integrity sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg== dependencies: - browserslist "^4.8.3" - caniuse-lite "^1.0.30001020" - chalk "^2.4.2" + browserslist "^4.12.0" + caniuse-lite "^1.0.30001109" + colorette "^1.2.1" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^7.0.26" - postcss-value-parser "^4.0.2" + postcss "^7.0.32" + postcss-value-parser "^4.1.0" aws-sign2@~0.7.0: version "0.7.0" @@ -1788,24 +1943,25 @@ aws-sign2@~0.7.0: integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.8.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e" - integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug== + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -babel-loader@8.0.6: - version "8.0.6" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.6.tgz#e33bdb6f362b03f4bb141a0c21ab87c501b70dfb" - integrity sha512-4BmWKtBOBm13uoUwd08UwjZlaw3O9GWf456R9j+5YykFZ6LUIjIKLc0zEZf+hauxPOJs96C8k6FvYD09vWzhYw== +babel-loader@8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.1.0.tgz#c611d5112bd5209abe8b9fa84c3e4da25275f1c3" + integrity sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw== dependencies: - find-cache-dir "^2.0.0" - loader-utils "^1.0.2" - mkdirp "^0.5.1" + find-cache-dir "^2.1.0" + loader-utils "^1.4.0" + mkdirp "^0.5.3" pify "^4.0.1" + schema-utils "^2.6.5" -babel-plugin-dynamic-import-node@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" - integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ== +babel-plugin-dynamic-import-node@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" + integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== dependencies: object.assign "^4.1.0" @@ -1825,9 +1981,9 @@ base64-arraybuffer@0.1.5: integrity sha1-c5JncZI7Whl0etZmqlzUv5xunOg= base64-js@^1.0.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" - integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== base64id@1.0.0: version "1.0.0" @@ -1877,9 +2033,9 @@ binary-extensions@^1.0.0: integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== binary-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" - integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== + version "2.1.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" + integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== bindings@^1.5.0: version "1.5.0" @@ -1900,15 +2056,20 @@ blocking-proxy@^1.0.0: dependencies: minimist "^1.2.0" -bluebird@^3.3.0, bluebird@^3.5.5: +bluebird@^3.3.0, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: + version "4.11.9" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" + integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== + +bn.js@^5.0.0, bn.js@^5.1.1: + version "5.1.3" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b" + integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== body-parser@1.19.0, body-parser@^1.16.1: version "1.19.0" @@ -1967,7 +2128,7 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" -braces@~3.0.2: +braces@^3.0.1, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -2010,26 +2171,28 @@ browserify-des@^1.0.0: inherits "^2.0.1" safe-buffer "^5.1.2" -browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= +browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" + integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== dependencies: - bn.js "^4.1.0" + bn.js "^5.0.0" randombytes "^2.0.1" browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" + version "4.2.1" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" + integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== + dependencies: + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.3" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" browserify-zlib@^0.2.0: version "0.2.0" @@ -2038,20 +2201,21 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.0.0, browserslist@^4.8.3, browserslist@^4.8.5, browserslist@^4.9.1: - version "4.11.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.11.1.tgz#92f855ee88d6e050e7e7311d987992014f1a1f1b" - integrity sha512-DCTr3kDrKEYNw6Jb9HFxVLQNaue8z+0ZfRBRjmCunKDEXEBajKDj2Y+Uelg+Pi29OnvaSGwjOsnRyNEkXzHg5g== +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.15.0, browserslist@^4.9.1: + version "4.16.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.0.tgz#410277627500be3cb28a1bfe037586fbedf9488b" + integrity sha512-/j6k8R0p3nxOC6kx5JGAxsnhc9ixaWJfYc+TNTzxg6+ARaESAvQGV7h0uNOB4t+pLQJZWzcrMxXOxjgsCj3dqQ== dependencies: - caniuse-lite "^1.0.30001038" - electron-to-chromium "^1.3.390" - node-releases "^1.1.53" - pkg-up "^2.0.0" + caniuse-lite "^1.0.30001165" + colorette "^1.2.1" + electron-to-chromium "^1.3.621" + escalade "^3.1.1" + node-releases "^1.1.67" browserstack@^1.5.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/browserstack/-/browserstack-1.6.0.tgz#5a56ab90987605d9c138d7a8b88128370297f9bf" - integrity sha512-HJDJ0TSlmkwnt9RZ+v5gFpa1XZTBYTj0ywvLwJ3241J7vMw2jAsGNVhKHtmCOyg+VxeLZyaibO9UL71AsUeDIw== + version "1.6.1" + resolved "https://registry.yarnpkg.com/browserstack/-/browserstack-1.6.1.tgz#e051f9733ec3b507659f395c7a4765a1b1e358b3" + integrity sha512-GxtFjpIaKdbAyzHfFDKixKO8IBT7wR3NjbzrGc78nNs/Ciys9wU3/nBtsqsWv5nDSrdI5tz0peKuzCPuNXNUiw== dependencies: https-proxy-agent "^2.2.1" @@ -2098,9 +2262,9 @@ buffer@^4.3.0: isarray "^1.0.0" builtin-modules@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" - integrity sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw== + version "3.2.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887" + integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA== builtin-status-codes@^3.0.0: version "3.0.0" @@ -2122,30 +2286,30 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@15.0.0, cacache@^15.0.0: - version "15.0.0" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.0.0.tgz#133b59edbd2a37ea8ef2d54964c6f247e47e5059" - integrity sha512-L0JpXHhplbJSiDGzyJJnJCTL7er7NzbBgxzVqLswEb4bO91Zbv17OUMuUeu/q0ZwKn3V+1HM4wb9tO4eVE/K8g== +cacache@15.0.5, cacache@^15.0.4, cacache@^15.0.5: + version "15.0.5" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.0.5.tgz#69162833da29170d6732334643c60e005f5f17d0" + integrity sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A== dependencies: - chownr "^1.1.2" + "@npmcli/move-file" "^1.0.1" + chownr "^2.0.0" fs-minipass "^2.0.0" glob "^7.1.4" infer-owner "^1.0.4" - lru-cache "^5.1.1" + lru-cache "^6.0.0" minipass "^3.1.1" minipass-collect "^1.0.2" minipass-flush "^1.0.5" minipass-pipeline "^1.2.2" mkdirp "^1.0.3" - move-concurrently "^1.0.1" - p-map "^3.0.0" + p-map "^4.0.0" promise-inflight "^1.0.1" - rimraf "^2.7.1" + rimraf "^3.0.2" ssri "^8.0.0" - tar "^6.0.1" + tar "^6.0.2" unique-filename "^1.1.1" -cacache@^12.0.2, cacache@^12.0.3: +cacache@^12.0.0, cacache@^12.0.2: version "12.0.4" resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== @@ -2166,30 +2330,6 @@ cacache@^12.0.2, cacache@^12.0.3: unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^13.0.1: - version "13.0.1" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-13.0.1.tgz#a8000c21697089082f85287a1aec6e382024a71c" - integrity sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w== - dependencies: - chownr "^1.1.2" - figgy-pudding "^3.5.1" - fs-minipass "^2.0.0" - glob "^7.1.4" - graceful-fs "^4.2.2" - infer-owner "^1.0.4" - lru-cache "^5.1.1" - minipass "^3.0.0" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.2" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - p-map "^3.0.0" - promise-inflight "^1.0.1" - rimraf "^2.7.1" - ssri "^7.0.0" - unique-filename "^1.1.1" - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -2205,6 +2345,14 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +call-bind@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.0.tgz#24127054bb3f9bdcb4b1fb82418186072f77b8ce" + integrity sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.0" + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -2229,11 +2377,16 @@ callsites@^2.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= -camelcase@^5.0.0: +camelcase@5.3.1, camelcase@^5.0.0: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelcase@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== + caniuse-api@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" @@ -2244,10 +2397,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001020, caniuse-lite@^1.0.30001032, caniuse-lite@^1.0.30001038: - version "1.0.30001041" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001041.tgz#c2ea138dafc6fe03877921ddcddd4a02a14daf76" - integrity sha512-fqDtRCApddNrQuBxBS7kEiSGdBsgO4wiVw4G/IClfqzfhW45MbTumfN4cuUJGTM0YGFNn97DCXPJ683PS6zwvA== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001032, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001165: + version "1.0.30001171" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001171.tgz#3291e11e02699ad0a29e69b8d407666fc843eba7" + integrity sha512-5Alrh8TTYPG9IH4UkRqEBZoEToWRLvPbSQokvzSz0lii8/FOWKG4keO1HoYfPWs8IF/NH/dyNPg1cmJGvV3Zlg== canonical-path@1.0.0: version "1.0.0" @@ -2279,10 +2432,10 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== +chalk@^4.0.0, chalk@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" @@ -2292,10 +2445,10 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -"chokidar@>=2.0.0 <4.0.0", chokidar@^3.0.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450" - integrity sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg== +"chokidar@>=2.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.4.1: + version "3.4.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" + integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -2303,7 +2456,7 @@ chardet@^0.7.0: is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.3.0" + readdirp "~3.5.0" optionalDependencies: fsevents "~2.1.2" @@ -2326,11 +2479,16 @@ chokidar@^2.0.3, chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chownr@^1.1.1, chownr@^1.1.2, chownr@^1.1.3, chownr@^1.1.4: +chownr@^1.1.1, chownr@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + chrome-trace-event@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" @@ -2373,15 +2531,15 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-spinners@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.3.0.tgz#0632239a4b5aa4c958610142c34bb7a651fc8df5" - integrity sha512-Xs2Hf2nzrvJMFKimOR7YR0QwZ8fc0u98kdtwN1eNAZzNQgH3vK2pXzff6GJtKh7S5hoJ87ECiAiZFS2fb5Ii2w== +cli-spinners@^2.4.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.5.0.tgz#12763e47251bf951cb75c201dfa58ff1bcb2d047" + integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ== -cli-width@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" - integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= +cli-width@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" + integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== cliui@^4.0.0: version "4.1.0" @@ -2392,30 +2550,30 @@ cliui@^4.0.0: strip-ansi "^4.0.0" wrap-ansi "^2.0.0" -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" -clone-deep@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" - integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: - is-plain-object "^2.0.4" - kind-of "^6.0.2" - shallow-clone "^3.0.0" + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= -clone@^2.1.1, clone@^2.1.2: +clone@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= @@ -2466,32 +2624,32 @@ color-name@^1.0.0, color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-string@^1.5.2: - version "1.5.3" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc" - integrity sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw== +color-string@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.4.tgz#dd51cd25cfee953d138fe4002372cc3d0e504cb6" + integrity sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw== dependencies: color-name "^1.0.0" simple-swizzle "^0.2.2" color@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10" - integrity sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg== + version "3.1.3" + resolved "https://registry.yarnpkg.com/color/-/color-3.1.3.tgz#ca67fb4e7b97d611dcde39eceed422067d91596e" + integrity sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ== dependencies: color-convert "^1.9.1" - color-string "^1.5.2" + color-string "^1.5.4" + +colorette@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" + integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== colors@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -colors@~1.2.1: - version "1.2.5" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.5.tgz#89c7ad9a374bc030df8013241f68136ed8835afc" - integrity sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg== - combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -2499,7 +2657,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@2, commander@^2.20.0, commander@^2.7.1: +commander@2, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -2534,6 +2692,13 @@ component-inherit@0.0.3: resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" integrity sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM= +compose-function@3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/compose-function/-/compose-function-3.0.3.tgz#9ed675f13cc54501d30950a486ff6a7ba3ab185f" + integrity sha1-ntZ18TzFRQHTCVCkhv9qe6OrGF8= + dependencies: + arity-n "^1.0.4" + compressible@~2.0.16: version "2.0.18" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" @@ -2606,13 +2771,18 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -convert-source-map@^1.5.1, convert-source-map@^1.7.0: +convert-source-map@1.7.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== dependencies: safe-buffer "~5.1.1" +convert-source-map@^0.3.3: + version "0.3.5" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-0.3.5.tgz#f1d802950af7dd2631a1febe0596550c86ab3190" + integrity sha1-8dgClQr33SYxof6+BZZVDIarMZA= + cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" @@ -2628,6 +2798,13 @@ cookie@0.4.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== +copy-anything@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-2.0.1.tgz#2afbce6da684bdfcbec93752fa762819cb480d9a" + integrity sha512-lA57e7viQHOdPQcrytv5jFeudZZOXuyk47lZym279FiDQ8jeZomXiGuVf6ffMKkJ+3TIai3J1J3yi6M+/4U35g== + dependencies: + is-what "^3.7.1" + copy-concurrently@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" @@ -2645,30 +2822,29 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -copy-webpack-plugin@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-5.1.1.tgz#5481a03dea1123d88a988c6ff8b78247214f0b88" - integrity sha512-P15M5ZC8dyCjQHWwd4Ia/dm0SgVvZJMYeykVIVYXbGyqO4dWB5oyPHp9i7wjwo5LhtlhKbiBCdS2NvM07Wlybg== - dependencies: - cacache "^12.0.3" - find-cache-dir "^2.1.0" - glob-parent "^3.1.0" - globby "^7.1.1" - is-glob "^4.0.1" - loader-utils "^1.2.3" - minimatch "^3.0.4" +copy-webpack-plugin@6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-6.0.3.tgz#2b3d2bfc6861b96432a65f0149720adbd902040b" + integrity sha512-q5m6Vz4elsuyVEIUXr7wJdIdePWTubsqVbEMvf1WQnHGv0Q+9yPRu7MtYFPt+GBOXRav9lvIINifTQ1vSCs+eA== + dependencies: + cacache "^15.0.4" + fast-glob "^3.2.4" + find-cache-dir "^3.3.1" + glob-parent "^5.1.1" + globby "^11.0.1" + loader-utils "^2.0.0" normalize-path "^3.0.0" - p-limit "^2.2.1" - schema-utils "^1.0.0" - serialize-javascript "^2.1.2" - webpack-log "^2.0.0" + p-limit "^3.0.1" + schema-utils "^2.7.0" + serialize-javascript "^4.0.0" + webpack-sources "^1.4.3" core-js-compat@^3.6.2: - version "3.6.5" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.5.tgz#2a51d9a4e25dfd6e690251aa81f99e3c05481f1c" - integrity sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng== + version "3.8.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.8.1.tgz#8d1ddd341d660ba6194cbe0ce60f4c794c87a36e" + integrity sha512-a16TLmy9NVD1rkjUGbwuyWkiDoN0FDpAwrfLONvHFQx0D9k7J9y0srwMT8QP/Z6HE3MIFaVynEeYwZwPX1o5RQ== dependencies: - browserslist "^4.8.5" + browserslist "^4.15.0" semver "7.0.0" core-js@2.6.9: @@ -2682,9 +2858,9 @@ core-js@3.6.4: integrity sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw== core-js@^2.2.0: - version "2.6.11" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" - integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -2702,14 +2878,14 @@ cosmiconfig@^5.0.0: parse-json "^4.0.0" create-ecdh@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" - integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw== + version "4.0.4" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" + integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== dependencies: bn.js "^4.1.0" - elliptic "^6.0.0" + elliptic "^6.5.3" -create-hash@^1.1.0, create-hash@^1.1.2: +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== @@ -2720,7 +2896,7 @@ create-hash@^1.1.0, create-hash@^1.1.2: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== @@ -2773,6 +2949,24 @@ css-declaration-sorter@^4.0.1: postcss "^7.0.1" timsort "^0.3.0" +css-loader@4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-4.2.2.tgz#b668b3488d566dc22ebcf9425c5f254a05808c89" + integrity sha512-omVGsTkZPVwVRpckeUnLshPp12KsmMSLqYxs12+RzM9jRR5Y+Idn/tBffjXRvOE+qW7if24cuceFJqYR5FmGBg== + dependencies: + camelcase "^6.0.0" + cssesc "^3.0.0" + icss-utils "^4.1.1" + loader-utils "^2.0.0" + postcss "^7.0.32" + postcss-modules-extract-imports "^2.0.0" + postcss-modules-local-by-default "^3.0.3" + postcss-modules-scope "^2.2.0" + postcss-modules-values "^3.0.0" + postcss-value-parser "^4.1.0" + schema-utils "^2.7.0" + semver "^7.3.2" + css-parse@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-2.0.0.tgz#a468ee667c16d81ccf05c58c38d2a97c780dbfd4" @@ -2803,18 +2997,18 @@ css-tree@1.0.0-alpha.37: mdn-data "2.0.4" source-map "^0.6.1" -css-tree@1.0.0-alpha.39: - version "1.0.0-alpha.39" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.39.tgz#2bff3ffe1bb3f776cf7eefd91ee5cba77a149eeb" - integrity sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA== +css-tree@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.2.tgz#9ae393b5dafd7dae8a622475caec78d3d8fbd7b5" + integrity sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ== dependencies: - mdn-data "2.0.6" + mdn-data "2.0.14" source-map "^0.6.1" css-what@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.2.1.tgz#f4a8f12421064621b456755e34a03a2c22df5da1" - integrity sha512-WwOrosiQTvyms+Ti5ZC5vGEK0Vod3FTt1ca+payZqvKuGJF+dq7bG63DstxtN0dpm6FxY27a/zS3Wten+gEtGw== + version "3.4.2" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" + integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ== css@^2.0.0: version "2.2.4" @@ -2900,11 +3094,11 @@ cssnano@4.1.10: postcss "^7.0.0" csso@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/csso/-/csso-4.0.3.tgz#0d9985dc852c7cc2b2cacfbbe1079014d1a8e903" - integrity sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ== + version "4.2.0" + resolved "https://registry.yarnpkg.com/csso/-/csso-4.2.0.tgz#ea3a561346e8dc9f546d6febedd50187cf389529" + integrity sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA== dependencies: - css-tree "1.0.0-alpha.39" + css-tree "^1.1.2" custom-event@~1.0.0: version "1.0.1" @@ -2927,9 +3121,9 @@ d3-axis@1: integrity sha512-ejINPfPSNdGFKEOAtnBtdkpr24c4d4jsei6Lg98mxf424ivoDP2956/5HDpIAtmHo85lqT4pruy+zEgvRUBqaQ== d3-brush@1: - version "1.1.5" - resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-1.1.5.tgz#066b8e84d17b192986030446c97c0fba7e1bacdc" - integrity sha512-rEaJ5gHlgLxXugWjIkolTA0OyMvw8UWU1imYXy1v642XyyswmI1ybKOv05Ft+ewq+TFmdliD3VuK0pRp1VT/5A== + version "1.1.6" + resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-1.1.6.tgz#b0a22c7372cabec128bdddf9bddc058592f89e9b" + integrity sha512-7RW+w7HfMCPyZLifTz/UnJmI5kdkXtpCbombUSs8xniAyo0vIbrDzDwUJB6eJOgl9u5DQOt2TQlYumxzD1SvYA== dependencies: d3-dispatch "1" d3-drag "1" @@ -2951,9 +3145,9 @@ d3-collection@1: integrity sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A== d3-color@1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.4.0.tgz#89c45a995ed773b13314f06460df26d60ba0ecaf" - integrity sha512-TzNPeJy2+iEepfiL92LAAB7fvnp/dV2YwANPVHdDWmYMm23qIJBYww3qT8I8C1wXrmrg4UWs7BKc2tKIgyjzHg== + version "1.4.1" + resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.4.1.tgz#c52002bf8846ada4424d55d97982fef26eb3bc8a" + integrity sha512-p2sTHSLCJI2QKunbGb7ocOh7DgTAn8IrLx21QRc/BSnodXM4sv6aLQlnfpvehFMLZEfBc6g9pH9SWQccFYfJ9Q== d3-contour@1: version "1.3.2" @@ -2985,14 +3179,14 @@ d3-dsv@1: rw "1" d3-ease@1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-1.0.6.tgz#ebdb6da22dfac0a22222f2d4da06f66c416a0ec0" - integrity sha512-SZ/lVU7LRXafqp7XtIcBdxnWl8yyLpgOmzAk0mWBI9gXNzLDx5ybZgnRbH9dN/yY5tzVBqCQ9avltSnqVwessQ== + version "1.0.7" + resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-1.0.7.tgz#9a834890ef8b8ae8c558b2fe55bd57f5993b85e2" + integrity sha512-lx14ZPYkhNx0s/2HX5sLFUI3mbasHjSSpwO/KaaNACweVwxUruKyWVcb293wMv1RqTPZyZ8kSZ2NogUZNcLOFQ== d3-fetch@1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-1.1.2.tgz#957c8fbc6d4480599ba191b1b2518bf86b3e1be2" - integrity sha512-S2loaQCV/ZeyTyIF2oP8D1K9Z4QizUzW7cWeAOAS4U88qOt3Ucf6GsmgthuYSdyB2HyEm4CeGvkQxWsmInsIVA== + version "1.2.0" + resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-1.2.0.tgz#15ce2ecfc41b092b1db50abd2c552c2316cf7fc7" + integrity sha512-yC78NBVcd2zFAyR/HnUiBS7Lf6inSCoWcSxFfw8FYL7ydiqe80SazNwoffcqOfs95XaLo7yebsmQqDKSsXUtvA== dependencies: d3-dsv "1" @@ -3007,14 +3201,14 @@ d3-force@1: d3-timer "1" d3-format@1: - version "1.4.4" - resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.4.4.tgz#356925f28d0fd7c7983bfad593726fce46844030" - integrity sha512-TWks25e7t8/cqctxCmxpUuzZN11QxIA7YrMbram94zMQ0PXjE4LVIMe/f6a4+xxL8HQ3OsAFULOINQi1pE62Aw== + version "1.4.5" + resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.4.5.tgz#374f2ba1320e3717eb74a9356c67daee17a7edb4" + integrity sha512-J0piedu6Z8iB6TbIGfZgDzfXxUFN3qQRMofy2oPdXzQibYGqPB/9iMcxr/TGalU+2RsyDO+U4f33id8tbnSRMQ== d3-geo@1: - version "1.11.9" - resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-1.11.9.tgz#77eaed14ba62fc2c0aef55cd2943849c866f7ae6" - integrity sha512-9edcH6J3s/Aa3KJITWqFJbyB/8q3mMlA9Fi7z6yy+FAYMnRaxmC7jBhUnsINxVWD14GmqX3DK8uk7nV6/Ekt4A== + version "1.12.1" + resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-1.12.1.tgz#7fc2ab7414b72e59fbcbd603e80d9adc029b035f" + integrity sha512-XG4d1c/UJSEX9NfU02KwBL6BYPj8YKHxgBEw5om2ZnTRSbIcego6dhHwcxuSR3clxh0EpE38os1DVPOmnYtTPg== dependencies: d3-array "1" @@ -3071,9 +3265,9 @@ d3-scale@2: d3-time-format "2" d3-selection@1, d3-selection@^1.1.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-1.4.1.tgz#98eedbbe085fbda5bafa2f9e3f3a2f4d7d622a98" - integrity sha512-BTIbRjv/m5rcVTfBs4AMBLKs4x8XaaLkwm28KWu9S2vKNqXkXt2AH2Qf0sdPZHjFxcWg/YL53zcqAz+3g4/7PA== + version "1.4.2" + resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-1.4.2.tgz#dcaa49522c0dbf32d6c1858afc26b6094555bc5c" + integrity sha512-SJ0BqYihzOjDnnlfyeHT0e30k0K1+5sR3d5fNueCNeuhZTnGw4M4o8mqJchSwgKMXCNFo+e2VTChiSJ0vYtXkg== d3-shape@1: version "1.3.7" @@ -3083,9 +3277,9 @@ d3-shape@1: d3-path "1" d3-time-format@2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-2.2.3.tgz#0c9a12ee28342b2037e5ea1cf0b9eb4dd75f29cb" - integrity sha512-RAHNnD8+XvC4Zc4d2A56Uw0yJoM7bsvOlJR33bclxq399Rak/b9bhvu/InjxdWhPtkgU53JJcleJTGkNRnN6IA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-2.3.0.tgz#107bdc028667788a8924ba040faf1fbccd5a7850" + integrity sha512-guv6b2H37s2Uq/GefleCDtbe0XZAuy7Wa49VGkPVPMfLL9qObgBST3lEHJBMUp8S7NdLQAGIvr2KXk8Hc98iKQ== dependencies: d3-time "1" @@ -3127,10 +3321,10 @@ d3-zoom@1: d3-selection "1" d3-transition "1" -d3@^5.15.0: - version "5.15.1" - resolved "https://registry.yarnpkg.com/d3/-/d3-5.15.1.tgz#7a8f32208559505bf1f56537a31c3fb8e76a519b" - integrity sha512-Xu9gT6Lm0jH3wWJJSRomFwqnGGi3YAfWIfxNFl4++YVgYOjo3F8V2idAG3nJBgpZOkD0/RHPZX6F4k6tzgOvYw== +d3@^5.16.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/d3/-/d3-5.16.0.tgz#9c5e8d3b56403c79d4ed42fbd62f6113f199c877" + integrity sha512-4PL5hHaHwX4m7Zr1UapXW23apo6pexCgdetdJ5kTmADpG/7T9Gkxw0M0tf/pjoB63ezCCm0u5UaFYy2aMt0Mcw== dependencies: d3-array "1" d3-axis "1" @@ -3164,6 +3358,14 @@ d3@^5.15.0: d3-voronoi "1" d3-zoom "1" +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -3171,6 +3373,15 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +data-urls@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" + integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== + dependencies: + abab "^2.0.3" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.0.0" + date-format@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/date-format/-/date-format-2.1.0.tgz#31d5b5ea211cf5fd764cd38baf9d033df7e125cf" @@ -3183,26 +3394,33 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" -debug@4, debug@4.1.1, debug@^4.1.0, debug@^4.1.1: +debug@3.1.0, debug@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +debug@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== dependencies: ms "^2.1.1" -debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== +debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: ms "^2.1.1" -debug@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== +debug@^4.1.0, debug@^4.1.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== dependencies: - ms "2.0.0" + ms "2.1.2" debuglog@^1.0.1: version "1.0.1" @@ -3231,6 +3449,16 @@ deep-equal@^1.0.1: object-keys "^1.1.1" regexp.prototype.flags "^1.2.0" +deep-freeze@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/deep-freeze/-/deep-freeze-0.0.1.tgz#3a0b0005de18672819dfd38cd31f91179c893e84" + integrity sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ= + +deepmerge@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" + integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== + default-gateway@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" @@ -3253,7 +3481,7 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" -define-properties@^1.1.2, define-properties@^1.1.3: +define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== @@ -3313,7 +3541,7 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= -depd@^1.1.2, depd@~1.1.2: +depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= @@ -3363,12 +3591,12 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" -dir-glob@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" - integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw== +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== dependencies: - path-type "^3.0.0" + path-type "^4.0.0" dns-equal@^1.0.0: version "1.0.0" @@ -3419,9 +3647,9 @@ domelementtype@1: integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== domelementtype@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" - integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ== + version "2.1.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.1.0.tgz#a851c080a6d1c3d94344aed151d99f669edf585e" + integrity sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w== domutils@^1.7.0: version "1.7.0" @@ -3432,9 +3660,9 @@ domutils@^1.7.0: domelementtype "1" dot-prop@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb" - integrity sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A== + version "5.3.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" + integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== dependencies: is-obj "^2.0.0" @@ -3461,15 +3689,15 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.390: - version "1.3.405" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.405.tgz#b84fcb157edb26eae6c36d93d416cb51caa399bd" - integrity sha512-D+xkP+hAQY/790DzImC8bI8QJLaArNG4b74bYvkhkK/fli51JmNyUYxwKLSl/8VPGkkXEqKCupSDD05/E5P72w== +electron-to-chromium@^1.3.621: + version "1.3.633" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.633.tgz#16dd5aec9de03894e8d14a1db4cda8a369b9b7fe" + integrity sha512-bsVCsONiVX1abkWdH7KtpuDAhsQ3N3bjPYhROSAXE78roJKet0Y5wznA14JE9pzbwSZmSMAW6KiKYf1RvbTJkA== -elliptic@^6.0.0: - version "6.5.2" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" - integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== +elliptic@^6.5.3: + version "6.5.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" + integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== dependencies: bn.js "^4.4.0" brorand "^1.0.1" @@ -3479,11 +3707,21 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= + emojis-list@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" @@ -3494,12 +3732,12 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -encoding@^0.1.12: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= +encoding@^0.1.11: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== dependencies: - iconv-lite "~0.4.13" + iconv-lite "^0.6.2" end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.4" @@ -3548,10 +3786,10 @@ engine.io@~3.2.0: engine.io-parser "~2.1.0" ws "~3.3.1" -enhanced-resolve@4.1.1, enhanced-resolve@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" - integrity sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA== +enhanced-resolve@4.3.0, enhanced-resolve@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz#3b806f3bfafc1ec7de69551ef93cca46c1704126" + integrity sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ== dependencies: graceful-fs "^4.1.2" memory-fs "^0.5.0" @@ -3563,9 +3801,9 @@ ent@~2.2.0: integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= entities@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" - integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== + version "2.1.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" + integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== err-code@^1.0.0: version "1.1.2" @@ -3573,9 +3811,9 @@ err-code@^1.0.0: integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= errno@^0.1.1, errno@^0.1.3, errno@~0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== + version "0.1.8" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== dependencies: prr "~1.0.1" @@ -3586,22 +3824,40 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.5: - version "1.17.5" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" - integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== +es-abstract@^1.17.0-next.1, es-abstract@^1.17.2: + version "1.17.7" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz#a4de61b2f66989fc7421676c1cb9787573ace54c" + integrity sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g== dependencies: es-to-primitive "^1.2.1" function-bind "^1.1.1" has "^1.0.3" has-symbols "^1.0.1" - is-callable "^1.1.5" - is-regex "^1.0.5" - object-inspect "^1.7.0" + is-callable "^1.2.2" + is-regex "^1.1.1" + object-inspect "^1.8.0" object-keys "^1.1.1" - object.assign "^4.1.0" - string.prototype.trimleft "^2.1.1" - string.prototype.trimright "^2.1.1" + object.assign "^4.1.1" + string.prototype.trimend "^1.0.1" + string.prototype.trimstart "^1.0.1" + +es-abstract@^1.18.0-next.1: + version "1.18.0-next.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.1.tgz#6e3a0a4bda717e5023ab3b8e90bec36108d22c68" + integrity sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.2.2" + is-negative-zero "^2.0.0" + is-regex "^1.1.1" + object-inspect "^1.8.0" + object-keys "^1.1.1" + object.assign "^4.1.1" + string.prototype.trimend "^1.0.1" + string.prototype.trimstart "^1.0.1" es-to-primitive@^1.2.1: version "1.2.1" @@ -3612,6 +3868,24 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.53" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" + integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.3" + next-tick "~1.0.0" + +es6-iterator@2.0.3, es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + es6-promise@^4.0.3: version "4.2.8" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" @@ -3624,6 +3898,19 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" +es6-symbol@^3.1.1, es6-symbol@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -3648,21 +3935,26 @@ esprima@^4.0.0: integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esrecurse@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" - integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: - estraverse "^4.1.0" + estraverse "^5.2.0" -estraverse@^4.1.0, estraverse@^4.1.1: +estraverse@^4.1.1: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estree-walker@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" - integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== +estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + +estree-walker@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" + integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== esutils@^2.0.2: version "2.0.3" @@ -3675,14 +3967,14 @@ etag@~1.8.1: integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= eventemitter3@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb" - integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg== + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== events@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.1.0.tgz#84279af1b34cb75aa88bf5ff291f6d0bd9b31a59" - integrity sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg== + version "3.2.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379" + integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg== eventsource@^1.0.7: version "1.0.7" @@ -3766,6 +4058,13 @@ express@^4.14.0, express@^4.17.1: utils-merge "1.0.1" vary "~1.1.2" +ext@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" + integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== + dependencies: + type "^2.0.0" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -3820,15 +4119,34 @@ extsprintf@^1.2.0: integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= fast-deep-equal@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" - integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.1.1, fast-glob@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" + integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" + micromatch "^4.0.2" + picomatch "^2.2.1" fast-json-stable-stringify@2.1.0, fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fastq@^1.6.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.10.0.tgz#74dbefccade964932cdf500473ef302719c652bb" + integrity sha512-NL2Qc5L3iQEsyYzweq7qfgy5OtXCmGzGvhElGEd/SoFWEMOEczNh5s5ocaF01HDetxz+p8ecjNPA6cZxxIHmzA== + dependencies: + reusify "^1.0.4" + faye-websocket@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" @@ -3843,7 +4161,7 @@ faye-websocket@~0.11.1: dependencies: websocket-driver ">=0.5.1" -figgy-pudding@^3.5.1: +figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.2" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== @@ -3906,7 +4224,7 @@ finalhandler@1.1.2, finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-cache-dir@3.3.1, find-cache-dir@^3.2.0: +find-cache-dir@3.3.1, find-cache-dir@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== @@ -3915,7 +4233,7 @@ find-cache-dir@3.3.1, find-cache-dir@^3.2.0: make-dir "^3.0.2" pkg-dir "^4.1.0" -find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: +find-cache-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== @@ -3924,13 +4242,6 @@ find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -3938,7 +4249,7 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" -find-up@^4.0.0, find-up@^4.1.0: +find-up@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -3960,11 +4271,9 @@ flush-write-stream@^1.0.0: readable-stream "^2.3.6" follow-redirects@^1.0.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.11.0.tgz#afa14f08ba12a52963140fe43212658897bc0ecb" - integrity sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA== - dependencies: - debug "^3.0.0" + version "1.13.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.1.tgz#5f69b813376cee4fd0474a3aba835df04ab763b7" + integrity sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg== for-in@^1.0.2: version "1.0.2" @@ -4026,7 +4335,7 @@ fs-extra@4.0.2: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^7.0.1, fs-extra@~7.0.1: +fs-extra@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== @@ -4035,7 +4344,14 @@ fs-extra@^7.0.1, fs-extra@~7.0.1: jsonfile "^4.0.0" universalify "^0.1.0" -fs-minipass@^2.0.0, fs-minipass@^2.1.0: +fs-minipass@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + +fs-minipass@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== @@ -4058,39 +4374,53 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.2.7: - version "1.2.12" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.12.tgz#db7e0d8ec3b0b45724fd4d83d43554a8f1f0de5c" - integrity sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q== + version "1.2.13" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" + integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== dependencies: bindings "^1.5.0" nan "^2.12.1" fsevents@~2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" - integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +genfun@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" + integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== + gensync@^1.0.0-beta.1: - version "1.0.0-beta.1" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" - integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== -get-caller-file@^2.0.1: +get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-stream@^4.0.0: +get-intrinsic@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.0.2.tgz#6820da226e50b24894e08859469dc68361545d49" + integrity sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + +get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== @@ -4117,14 +4447,14 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@~5.1.0: +glob-parent@^5.1.0, glob-parent@^5.1.1, glob-parent@~5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== dependencies: is-glob "^4.0.1" -glob@7.1.6, glob@^7.0.0, glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: +glob@7.1.6, glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -4141,6 +4471,18 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globby@^11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" + integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" + slash "^3.0.0" + globby@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" @@ -4164,22 +4506,10 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" -globby@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680" - integrity sha1-+yzP+UAfhgCUXfral0QMypcrhoA= - dependencies: - array-union "^1.0.1" - dir-glob "^2.0.0" - glob "^7.1.2" - ignore "^3.3.5" - pify "^3.0.0" - slash "^1.0.0" - -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.2: - version "4.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" - integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== handle-thing@^2.0.0: version "2.0.1" @@ -4192,11 +4522,11 @@ har-schema@^2.0.0: integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= har-validator@~5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" - integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== dependencies: - ajv "^6.5.5" + ajv "^6.12.3" har-schema "^2.0.0" has-ansi@^2.0.0: @@ -4228,7 +4558,7 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-symbols@^1.0.0, has-symbols@^1.0.1: +has-symbols@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== @@ -4272,12 +4602,13 @@ has@^1.0.0, has@^1.0.3: function-bind "^1.1.1" hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" @@ -4310,17 +4641,17 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hosted-git-info@^2.1.4: +hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: version "2.8.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== -hosted-git-info@^3.0.2: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.4.tgz#be4973eb1fd2737b11c9c7c19380739bb249f60d" - integrity sha512-4oT62d2jwSDBbLLFLZE+1vPuQ1h8p9wjrJ8Mqx5TjsyWmBMV5B13eJqn8pvluqubLf3cJPTfiYCIwNwDNmzScQ== +hosted-git-info@^3.0.2, hosted-git-info@^3.0.6: + version "3.0.7" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.7.tgz#a30727385ea85acfcee94e0aad9e368c792e036c" + integrity sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ== dependencies: - lru-cache "^5.1.1" + lru-cache "^6.0.0" hpack.js@^2.1.6: version "2.1.6" @@ -4347,10 +4678,10 @@ html-comment-regex@^1.1.0: resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7" integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ== -html-entities@^1.2.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.3.1.tgz#fb9a1a4b5b14c5daba82d3e34c6ae4fe701a0e44" - integrity sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA== +html-entities@^1.3.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.4.0.tgz#cfbd1b01d2afaf9adca1b10ae7dffab98c71d2dc" + integrity sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA== html-escaper@^2.0.0: version "2.0.2" @@ -4365,10 +4696,10 @@ html-insert-assets@0.6.0: mkdirp "^1.0.3" parse5 "^5.1.1" -http-cache-semantics@^4.0.4: - version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== +http-cache-semantics@^3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" + integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== http-deceiver@^1.2.7: version "1.2.7" @@ -4407,19 +4738,18 @@ http-errors@~1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" -"http-parser-js@>=0.4.0 <0.4.11": - version "0.4.10" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.10.tgz#92c9c1374c35085f75db359ec56cc257cbb93fa4" - integrity sha1-ksnBN0w1CF912zWexWzCV8u5P6Q= +http-parser-js@>=0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.2.tgz#da2e31d237b393aae72ace43882dd7e270a8ff77" + integrity sha512-opCO9ASqg5Wy2FNo7A0sxy71yGbbkJJXLdgMK04Tcypw9jr2MgWbyubb0+WdmDmGnFflO7fRbqbaihh/ENDlRQ== -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" + agent-base "4" + debug "3.1.0" http-proxy-middleware@0.19.1: version "0.19.1" @@ -4432,9 +4762,9 @@ http-proxy-middleware@0.19.1: micromatch "^3.1.10" http-proxy@^1.13.0, http-proxy@^1.16.2, http-proxy@^1.17.0: - version "1.18.0" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.0.tgz#dbe55f63e75a347db7f3d99974f2692a314a6a3a" - integrity sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ== + version "1.18.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== dependencies: eventemitter3 "^4.0.0" follow-redirects "^1.0.0" @@ -4454,7 +4784,7 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -https-proxy-agent@^2.2.1: +https-proxy-agent@^2.2.1, https-proxy-agent@^2.2.3: version "2.2.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== @@ -4462,14 +4792,6 @@ https-proxy-agent@^2.2.1: agent-base "^4.3.0" debug "^3.1.0" -https-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" - integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== - dependencies: - agent-base "6" - debug "4" - humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -4477,34 +4799,48 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -iconv-lite@0.4, iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13: +iconv-lite@0.4, iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01" + integrity sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +icss-utils@^4.0.0, icss-utils@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467" + integrity sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA== + dependencies: + postcss "^7.0.14" + ieee754@^1.1.4: - version "1.1.13" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" - integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== iferr@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= -ignore-walk@^3.0.3: +ignore-walk@^3.0.1: version "3.0.3" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== dependencies: minimatch "^3.0.4" -ignore@^3.3.5: - version "3.3.10" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" - integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== +ignore@^5.1.4: + version "5.1.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== image-size@~0.5.0: version "0.5.5" @@ -4579,7 +4915,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -4594,26 +4930,31 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@1.3.5, ini@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== +ini@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.6.tgz#f1c46a2a93a253e7b3905115e74d527cd23061a1" + integrity sha512-IZUoxEjNjubzrmvzZU4lKP7OnYmX72XRl3sqkfJhBKweKi5rnGi5+IUdlj/H1M+Ip5JQ1WzaDMOBRY90Ajc5jg== + +ini@^1.3.4: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -inquirer@7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" - integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== +inquirer@7.3.3: + version "7.3.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" + integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== dependencies: ansi-escapes "^4.2.1" - chalk "^3.0.0" + chalk "^4.1.0" cli-cursor "^3.1.0" - cli-width "^2.0.0" + cli-width "^3.0.0" external-editor "^3.0.3" figures "^3.0.0" - lodash "^4.17.15" + lodash "^4.17.19" mute-stream "0.0.8" run-async "^2.4.0" - rxjs "^6.5.3" + rxjs "^6.6.0" string-width "^4.1.0" strip-ansi "^6.0.0" through "^2.3.6" @@ -4626,12 +4967,7 @@ internal-ip@^4.3.0: default-gateway "^4.2.0" ipaddr.js "^1.9.0" -interpret@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" - integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== - -invariant@^2.2.2, invariant@^2.2.4: +invariant@^2.2.2: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -4683,9 +5019,11 @@ is-accessor-descriptor@^1.0.0: kind-of "^6.0.0" is-arguments@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" - integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" + integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== + dependencies: + call-bind "^1.0.0" is-arrayish@^0.2.1: version "0.2.1" @@ -4716,10 +5054,10 @@ is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-callable@^1.1.4, is-callable@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" - integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== +is-callable@^1.1.4, is-callable@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" + integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== is-color-stop@^1.0.0: version "1.1.0" @@ -4733,6 +5071,13 @@ is-color-stop@^1.0.0: rgb-regex "^1.0.1" rgba-regex "^1.0.0" +is-core-module@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" + integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -4776,9 +5121,9 @@ is-directory@^0.3.1: integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= is-docker@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.0.0.tgz#2cb0df0e75e2d064fe1864c37cdeacb7b2dcf25b" - integrity sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ== + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.1.1.tgz#4125a88e44e450d384e09047ede71adc2d144156" + integrity sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw== is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" @@ -4833,16 +5178,16 @@ is-interactive@^1.0.0: resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== -is-lambda@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" - integrity sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU= - is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= +is-negative-zero@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -4910,24 +5255,19 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-promise@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= - is-reference@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.1.4.tgz#3f95849886ddb70256a3e6d062b1a68c13c51427" - integrity sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw== + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" + integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== dependencies: - "@types/estree" "0.0.39" + "@types/estree" "*" -is-regex@^1.0.4, is-regex@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" - integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== +is-regex@^1.0.4, is-regex@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" + integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== dependencies: - has "^1.0.3" + has-symbols "^1.0.1" is-resolvable@^1.0.0: version "1.1.0" @@ -4958,6 +5298,11 @@ is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-what@^3.7.1: + version "3.12.0" + resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.12.0.tgz#f4405ce4bd6dd420d3ced51a026fb90e03705e55" + integrity sha512-2ilQz5/f/o9V7WRWJQmpFYNmQFZ9iM+OXRonZKcYgTkCzjb949Vi4h282PD1UfmgHk666rcWonbRJ++KI41VGw== + is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -4969,9 +5314,11 @@ is-wsl@^1.1.0: integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= is-wsl@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.1.1.tgz#4a1c152d429df3d441669498e2486d3596ebaf1d" - integrity sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog== + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" @@ -5013,9 +5360,9 @@ isstream@~0.1.2: integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= istanbul-api@^2.1.6: - version "2.1.6" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-2.1.6.tgz#d61702a9d1c66ad89d92e66d401e16b0bda4a35f" - integrity sha512-x0Eicp6KsShG1k1rMgBAi/1GgY7kFGEBwQpw3PXGEmu+rBcBNhqU8g2DgY9mlepAsLPzrzrbqSgCGANnki4POA== + version "2.1.7" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-2.1.7.tgz#82786b79f3b93d481349c7aa1e2c2b4eeb48c8a8" + integrity sha512-LYTOa2UrYFyJ/aSczZi/6lBykVMjCCvUmT64gOe+jPZFy4w6FYfPGqFT2IiQ2BxVHHDOvCD7qrIXb0EOh4uGWw== dependencies: async "^2.6.2" compare-versions "^3.4.0" @@ -5025,7 +5372,7 @@ istanbul-api@^2.1.6: istanbul-lib-instrument "^3.3.0" istanbul-lib-report "^2.0.8" istanbul-lib-source-maps "^3.0.6" - istanbul-reports "^2.2.4" + istanbul-reports "^2.2.5" js-yaml "^3.13.1" make-dir "^2.1.0" minimatch "^3.0.4" @@ -5061,15 +5408,12 @@ istanbul-lib-instrument@^3.3.0: istanbul-lib-coverage "^2.0.5" semver "^6.0.0" -istanbul-lib-instrument@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.1.tgz#61f13ac2c96cfefb076fe7131156cc05907874e6" - integrity sha512-imIchxnodll7pvQBYOqUu88EufLCU56LMeFPZZM/fJZ1irYcYdqroaV+ACK1Ila8ls09iEYArp+nqyC6lW1Vfg== +istanbul-lib-instrument@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" + integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== dependencies: "@babel/core" "^7.7.5" - "@babel/parser" "^7.7.5" - "@babel/template" "^7.7.4" - "@babel/traverse" "^7.7.4" "@istanbuljs/schema" "^0.1.2" istanbul-lib-coverage "^3.0.0" semver "^6.3.0" @@ -5094,7 +5438,7 @@ istanbul-lib-source-maps@^3.0.6: rimraf "^2.6.3" source-map "^0.6.1" -istanbul-reports@^2.2.4: +istanbul-reports@^2.2.5: version "2.2.7" resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.2.7.tgz#5d939f6237d7b48393cc0959eab40cd4fd056931" integrity sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg== @@ -5102,9 +5446,9 @@ istanbul-reports@^2.2.4: html-escaper "^2.0.0" jasmine-core@^3.3: - version "3.5.0" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.5.0.tgz#132c23e645af96d85c8bca13c8758b18429fc1e4" - integrity sha512-nCeAiw37MIMA9w9IXso7bRaLl+c/ef3wnxsoSAlYrzS+Ot0zTG6nU8G/cIfGkqpkjX2wNaIW9RFG0TwIFnG6bA== + version "3.6.0" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.6.0.tgz#491f3bb23941799c353ceb7a45b38a950ebc5a20" + integrity sha512-8uQYa7zJN8hq9z+g8z1bqCfdC8eoDAeVnM5sfqs7KHv9/ifoJ500m018fpFc7RDaO6SWCLCXwo/wPSNcdYTgcw== jasmine-core@~2.8.0: version "2.8.0" @@ -5125,36 +5469,33 @@ jasminewd2@^2.1.0: resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.2.0.tgz#e37cf0b17f199cce23bea71b2039395246b4ec4e" integrity sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4= -jest-worker@25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.1.0.tgz#75d038bad6fdf58eba0d2ec1835856c497e3907a" - integrity sha512-ZHhHtlxOWSxCoNOKHGbiLzXnl42ga9CxDr27H36Qn+15pQZd3R/F24jrmjDelw9j/iHUIWMWs08/u2QN50HHOg== +jest-worker@26.3.0: + version "26.3.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.3.0.tgz#7c8a97e4f4364b4f05ed8bca8ca0c24de091871f" + integrity sha512-Vmpn2F6IASefL+DVBhPzI2J9/GJUsqzomdeN+P+dK8/jKxbh8R3BtFnx3FIta7wYlPU62cpJMJQo4kuOowcMnw== dependencies: + "@types/node" "*" merge-stream "^2.0.0" supports-color "^7.0.0" -jest-worker@^25.1.0: - version "25.2.6" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.2.6.tgz#d1292625326794ce187c38f51109faced3846c58" - integrity sha512-FJn9XDUSxcOR4cwDzRfL1z56rUofNTFs539FGASpd50RHdb6EVkhxQqktodW2mI49l+W3H+tFJDotCHUQF6dmA== +jest-worker@^26.3.0: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== dependencies: + "@types/node" "*" merge-stream "^2.0.0" supports-color "^7.0.0" -jju@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a" - integrity sha1-o6vicYryQaKykE+EpiWXDzia4yo= - "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -5174,15 +5515,15 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= -json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== -json-parse-even-better-errors@^2.0.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.2.0.tgz#304d29aa54bb01156a1328c454034ff0ac8a7bf4" - integrity sha512-2tLgY7LRNZ9Hd6gmCuBG5/OjRHQpSgJQqJoYyLLOhUgn8LdOYrjaZLcxkWnDads+AD/haWWioPNziXQcgvQJ/g== +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== json-schema-traverse@^0.4.1: version "0.4.1" @@ -5218,6 +5559,11 @@ json5@^2.1.2: dependencies: minimist "^1.2.5" +jsonc-parser@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.3.0.tgz#7c7fc988ee1486d35734faaaa866fadb00fa91ee" + integrity sha512-b0EBt8SWFNnixVdvoR2ZtEGa9ZqLhbJnOjezn+WP+8kspFm+PFYDN8Z4Bc7pRlDjvuVcADSUkroIuTWWn/YiIA== + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -5225,7 +5571,7 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" -jsonparse@^1.3.1: +jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= @@ -5241,9 +5587,9 @@ jsprim@^1.2.2: verror "1.10.0" jszip@^3.1.3: - version "3.3.0" - resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.3.0.tgz#29d72c21a54990fa885b11fc843db320640d5271" - integrity sha512-EJ9k766htB1ZWnsV5ZMDkKLgA+201r/ouFF8R2OigVjVdcm2rurcBrrdXaeqBJbqnUVMko512PYmlncBKE1Huw== + version "3.5.0" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.5.0.tgz#b4fd1f368245346658e781fec9675802489e15f6" + integrity sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA== dependencies: lie "~3.3.0" pako "~1.0.2" @@ -5272,9 +5618,9 @@ karma-firefox-launcher@1.1.0: integrity sha512-LbZ5/XlIXLeQ3cqnCbYLn+rOVhuMIK9aZwlP6eOLGzWdo1UVp7t6CN3DP4SafiRLjexKwHeKHDm0c38Mtd3VxA== karma-jasmine-html-reporter@~1.5.3: - version "1.5.3" - resolved "https://registry.yarnpkg.com/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.5.3.tgz#c724078436ed7b7d17a47e79164af36eed2d2713" - integrity sha512-ci0VrjuCaFj+9d1tYlTE3KIPUCp0rz874zWWU3JgCMqGIyw5ke+BXWFPOAGAqUdCJcrMwneyvp1zFXA74MiPUA== + version "1.5.4" + resolved "https://registry.yarnpkg.com/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.5.4.tgz#669f33d694d88fce1b0ccfda57111de716cb0192" + integrity sha512-PtilRLno5O6wH3lDihRnz0Ba8oSn0YUJqKjjux1peoYGwo0AQqrWRbdWk/RLzcGlb+onTyXAnHl6M+Hu3UxG/Q== karma-jasmine@2.0.1: version "2.0.1" @@ -5364,6 +5710,11 @@ kind-of@^6.0.0, kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +klona@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.4.tgz#7bb1e3affb0cb8624547ef7e8f6708ea2e39dfc0" + integrity sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA== + lcid@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" @@ -5371,30 +5722,30 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" -less-loader@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-5.0.0.tgz#498dde3a6c6c4f887458ee9ed3f086a12ad1b466" - integrity sha512-bquCU89mO/yWLaUq0Clk7qCsKhsF/TZpJUzETRvJa9KSVEL9SO3ovCvdEHISBhrC81OwC8QSVX7E0bzElZj9cg== +less-loader@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-6.2.0.tgz#8b26f621c155b342eefc24f5bd6e9dc40c42a719" + integrity sha512-Cl5h95/Pz/PWub/tCBgT1oNMFeH1WTD33piG80jn5jr12T4XbxZcjThwNXDQ7AG649WEynuIzO4b0+2Tn9Qolg== dependencies: - clone "^2.1.1" - loader-utils "^1.1.0" - pify "^4.0.1" + clone "^2.1.2" + less "^3.11.3" + loader-utils "^2.0.0" + schema-utils "^2.7.0" -less@3.11.1: - version "3.11.1" - resolved "https://registry.yarnpkg.com/less/-/less-3.11.1.tgz#c6bf08e39e02404fe6b307a3dfffafdc55bd36e2" - integrity sha512-tlWX341RECuTOvoDIvtFqXsKj072hm3+9ymRBe76/mD6O5ZZecnlAOVDlWAleF2+aohFrxNidXhv2773f6kY7g== +less@^3.11.3: + version "3.13.1" + resolved "https://registry.yarnpkg.com/less/-/less-3.13.1.tgz#0ebc91d2a0e9c0c6735b83d496b0ab0583077909" + integrity sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw== dependencies: - clone "^2.1.2" + copy-anything "^2.0.1" tslib "^1.10.0" optionalDependencies: errno "^0.1.1" graceful-fs "^4.1.2" image-size "~0.5.0" + make-dir "^2.1.0" mime "^1.4.1" - mkdirp "^0.5.0" - promise "^7.1.1" - request "^2.83.0" + native-request "^1.0.5" source-map "~0.6.0" leven@^3.1.0: @@ -5409,10 +5760,10 @@ levenary@^1.1.1: dependencies: leven "^3.1.0" -license-webpack-plugin@2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/license-webpack-plugin/-/license-webpack-plugin-2.1.4.tgz#c5529a4bb87cc9b4489b486d054ba7cae43a554e" - integrity sha512-1Xq72fmPbTg5KofXs+yI5L4QqPFjQ6mZxoeI6D7gfiEDOtaEIk6PGrdLaej90bpDqKNHNxlQ/MW4tMAL6xMPJQ== +license-webpack-plugin@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/license-webpack-plugin/-/license-webpack-plugin-2.3.0.tgz#c00f70d5725ba0408de208acb9e66612cc2eceda" + integrity sha512-JK/DXrtN6UeYQSgkg5q1+pgJ8aiKPL9tnz9Wzw+Ikkf+8mJxG56x6t8O+OH/tAeF/5NREnelTEMyFtbJNkjH4w== dependencies: "@types/webpack-sources" "^0.1.5" webpack-sources "^1.2.0" @@ -5429,6 +5780,15 @@ loader-runner@^2.4.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== +loader-utils@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" + integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== + dependencies: + big.js "^5.2.2" + emojis-list "^2.0.0" + json5 "^1.0.1" + loader-utils@2.0.0, loader-utils@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" @@ -5447,14 +5807,6 @@ loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4 emojis-list "^3.0.0" json5 "^1.0.1" -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -5475,37 +5827,32 @@ lodash.clonedeep@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= -lodash.get@^4.0.0: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= - -lodash.isequal@^4.0.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" - integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= - lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@~4.17.15: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== +lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19: + version "4.17.20" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" + integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== -log-symbols@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" - integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== +log-symbols@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" + integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== dependencies: - chalk "^2.4.2" + chalk "^4.0.0" log4js@^4.0.0: version "4.5.1" @@ -5518,10 +5865,10 @@ log4js@^4.0.0: rfdc "^1.1.4" streamroller "^1.0.6" -loglevel@^1.6.6: - version "1.6.8" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.8.tgz#8a25fb75d092230ecd4457270d80b54e28011171" - integrity sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA== +loglevel@^1.6.8: + version "1.7.1" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.1.tgz#005fde2f5e6e47068f935ff28573e125ef72f197" + integrity sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw== long@^4.0.0: version "4.0.0" @@ -5550,6 +5897,13 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + magic-string@0.25.7, magic-string@^0.25.0, magic-string@^0.25.2: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" @@ -5566,37 +5920,28 @@ make-dir@^2.0.0, make-dir@^2.1.0: semver "^5.6.0" make-dir@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" - integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== dependencies: semver "^6.0.0" -make-fetch-happen@^8.0.2: - version "8.0.4" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-8.0.4.tgz#d3451baf5b43d6230c4eea7009c5aa6b6bccf9d4" - integrity sha512-hIFoqGq1db0QMiy/Atr/pI1Rs4rDV+ZdGSey2SQyF3KK3u1z4aj9mS5UdNnZkdQpA+H3pGn0J3KlEwsi2x4EqA== - dependencies: - agentkeepalive "^4.1.0" - cacache "^15.0.0" - http-cache-semantics "^4.0.4" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" +make-fetch-happen@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz#aa8387104f2687edca01c8687ee45013d02d19bd" + integrity sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag== + dependencies: + agentkeepalive "^3.4.1" + cacache "^12.0.0" + http-cache-semantics "^3.8.1" + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.3" lru-cache "^5.1.1" - minipass "^3.0.0" - minipass-collect "^1.0.2" - minipass-fetch "^1.1.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.2" + mississippi "^3.0.0" + node-fetch-npm "^2.0.2" promise-retry "^1.1.1" - socks-proxy-agent "^5.0.0" - ssri "^8.0.0" - -mamacro@^0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/mamacro/-/mamacro-0.0.3.tgz#ad2c9576197c9f1abf308d0787865bd975a3f3e4" - integrity sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA== + socks-proxy-agent "^4.0.0" + ssri "^6.0.0" map-age-cleaner@^0.1.1: version "0.1.3" @@ -5626,16 +5971,16 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +mdn-data@2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" + integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== + mdn-data@2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== -mdn-data@2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.6.tgz#852dc60fcaa5daa2e8cf6c9189c440ed3e042978" - integrity sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA== - media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -5683,6 +6028,11 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== +merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -5707,6 +6057,14 @@ micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" @@ -5715,17 +6073,22 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.43.0, "mime-db@>= 1.43.0 < 2": - version "1.43.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" - integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== +mime-db@1.44.0: + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== + +"mime-db@>= 1.43.0 < 2": + version "1.45.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" + integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.26" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" - integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== dependencies: - mime-db "1.43.0" + mime-db "1.44.0" mime@1.6.0, mime@^1.4.1: version "1.6.0" @@ -5733,19 +6096,19 @@ mime@1.6.0, mime@^1.4.1: integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mime@^2.3.1, mime@^2.4.4: - version "2.4.4" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" - integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== + version "2.4.7" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.7.tgz#962aed9be0ed19c91fd7dc2ece5d7f4e89a90d74" + integrity sha512-dhNd1uA2u397uQk3Nv5LM4lm93WYDUXFn3Fu291FJerns4jyTudqhIWe4W04YLy7Uk1tm1Ore04NpjRvQp/NPA== mimic-fn@^2.0.0, mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mini-css-extract-plugin@0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz#47f2cf07aa165ab35733b1fc97d4c46c0564339e" - integrity sha512-lp3GeY7ygcgAmVIcRPBVhIkf8Us7FZjA+ILpal44qLdSu11wmjKQ3d9k15lfD7pO4esu9eUIAW7qiYIBppv40A== +mini-css-extract-plugin@0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.10.0.tgz#a0e6bfcad22a9c73f6c882a3c7557a98e2d3d27d" + integrity sha512-QgKgJBjaJhxVPwrLNqqwNS0AGkuQQ31Hp4xGXEK/P7wehEg6qmNtReHKai3zRXqY60wGVWLYcOMJK2b98aGc3A== dependencies: loader-utils "^1.1.0" normalize-url "1.9.1" @@ -5786,18 +6149,6 @@ minipass-collect@^1.0.2: dependencies: minipass "^3.0.0" -minipass-fetch@^1.1.2, minipass-fetch@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.2.1.tgz#1b97ecb559be56b09812d45b2e9509f1f59ece2f" - integrity sha512-ssHt0dkljEDaKmTgQ04DQgx2ag6G2gMPxA5hpcsoeTbfDgRf2fC2gNSRc6kISjD7ckCpHwwQvXxuTBK8402fXg== - dependencies: - minipass "^3.1.0" - minipass-pipeline "^1.2.2" - minipass-sized "^1.0.3" - minizlib "^2.0.0" - optionalDependencies: - encoding "^0.1.12" - minipass-flush@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" @@ -5805,39 +6156,39 @@ minipass-flush@^1.0.5: dependencies: minipass "^3.0.0" -minipass-json-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz#7edbb92588fbfc2ff1db2fc10397acb7b6b44aa7" - integrity sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg== - dependencies: - jsonparse "^1.3.1" - minipass "^3.0.0" - minipass-pipeline@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.2.tgz#3dcb6bb4a546e32969c7ad710f2c79a86abba93a" - integrity sha512-3JS5A2DKhD2g0Gg8x3yamO0pj7YeKGwVlDS90pF++kxptwx/F+B//roxf9SqYil5tQo65bijy+dAuAFZmYOouA== + version "1.2.4" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" + integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== dependencies: minipass "^3.0.0" -minipass-sized@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" - integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== +minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== dependencies: - minipass "^3.0.0" + safe-buffer "^5.1.2" + yallist "^3.0.0" -minipass@^3.0.0, minipass@^3.0.1, minipass@^3.1.0, minipass@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.1.tgz#7607ce778472a185ad6d89082aa2070f79cedcd5" - integrity sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w== +minipass@^3.0.0, minipass@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" + integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== dependencies: yallist "^4.0.0" -minizlib@^2.0.0, minizlib@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.0.tgz#fd52c645301ef09a63a2c209697c294c6ce02cf3" - integrity sha512-EzTZN/fjSvifSX0SlqUERCN39o6T40AMarPbv0MrarSFtIITCBh7bi+dU8nxGFHuqs9jdIAeoYoKuQAAASsPPA== +minizlib@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== dependencies: minipass "^3.0.0" yallist "^4.0.0" @@ -5866,14 +6217,14 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1, mkdirp@~0.5.x: +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5, mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== dependencies: minimist "^1.2.5" -mkdirp@^1.0.3: +mkdirp@^1.0.3, mkdirp@^1.0.4, mkdirp@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -5900,11 +6251,16 @@ ms@2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -ms@^2.0.0, ms@^2.1.1: +ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.0.0, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + multicast-dns-service-types@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" @@ -5924,9 +6280,9 @@ mute-stream@0.0.8: integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== nan@^2.12.1: - version "2.14.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" - integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + version "2.14.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" + integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== nanomatch@^1.2.9: version "1.2.13" @@ -5945,25 +6301,44 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +native-request@^1.0.5: + version "1.0.8" + resolved "https://registry.yarnpkg.com/native-request/-/native-request-1.0.8.tgz#8f66bf606e0f7ea27c0e5995eb2f5d03e33ae6fb" + integrity sha512-vU2JojJVelUGp6jRcLwToPoWGxSx23z/0iX+I77J3Ht17rf2INGjrhOoQnjVo60nQd8wVsgzKkPfRXBiVdD2ag== + negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== -neo-async@^2.5.0, neo-async@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" - integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== +neo-async@^2.5.0, neo-async@^2.6.1, neo-async@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +next-tick@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-forge@0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579" - integrity sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ== +node-fetch-npm@^2.0.2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz#6507d0e17a9ec0be3bec516958a497cec54bf5a4" + integrity sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg== + dependencies: + encoding "^0.1.11" + json-parse-better-errors "^1.0.0" + safe-buffer "^5.1.1" + +node-forge@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3" + integrity sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA== node-libs-browser@^2.2.1: version "2.2.1" @@ -5994,12 +6369,12 @@ node-libs-browser@^2.2.1: util "^0.11.0" vm-browserify "^1.0.1" -node-releases@^1.1.53: - version "1.1.53" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4" - integrity sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ== +node-releases@^1.1.67: + version "1.1.67" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.67.tgz#28ebfcccd0baa6aad8e8d4d8fe4cbc49ae239c12" + integrity sha512-V5QF9noGFl3EymEwUYzO+3NTDpGfQB4ve6Qfnzf3UNydMhjQRVPR1DZTuvWiLzaFJYw2fmDwAfnRNEVb64hSIg== -normalize-package-data@^2.0.0: +normalize-package-data@^2.0.0, normalize-package-data@^2.4.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== @@ -6041,7 +6416,7 @@ normalize-url@^3.0.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== -npm-bundled@^1.1.1: +npm-bundled@^1.0.1: version "1.1.1" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== @@ -6060,7 +6435,7 @@ npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== -npm-package-arg@8.0.1, npm-package-arg@^8.0.0, npm-package-arg@^8.0.1: +npm-package-arg@8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.0.1.tgz#9d76f8d7667b2373ffda60bb801a27ef71e3e270" integrity sha512-/h5Fm6a/exByzFSTm7jAyHbgOqErl9qSNJDQF32Si/ZzgwT2TERVxRxn3Jurw1wflgyVVAxnFR4fRHPM7y1ClQ== @@ -6069,26 +6444,35 @@ npm-package-arg@8.0.1, npm-package-arg@^8.0.0, npm-package-arg@^8.0.1: semver "^7.0.0" validate-npm-package-name "^3.0.0" -npm-packlist@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-2.1.1.tgz#08806a1df79acdc43d02d20c83a3d5472d96c90c" - integrity sha512-95TSDvGwujIhqfSpIiRRLodEF+y6mJMopuZdahoGzqtRDFZXGav46S0p6ngeWaiAkb5R72w6eVARhzej0HvZeQ== +npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" + integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== dependencies: - glob "^7.1.6" - ignore-walk "^3.0.3" - npm-bundled "^1.1.1" - npm-normalize-package-bin "^1.0.1" + hosted-git-info "^2.7.1" + osenv "^0.1.5" + semver "^5.6.0" + validate-npm-package-name "^3.0.0" -npm-pick-manifest@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-6.0.0.tgz#bfde7abe95f2670aed1629a3c18245ccb3cc2eb8" - integrity sha512-PdJpXMvjqt4nftNEDpCgjBUF8yI3Q3MyuAmVB9nemnnCg32F4BPL/JFBfdj8DubgHCYUFQhtLWmBPvdsFtjWMg== +npm-package-arg@^8.0.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.0.tgz#b5f6319418c3246a1c38e1a8fbaa06231bc5308f" + integrity sha512-/ep6QDxBkm9HvOhOg0heitSd7JHA1U7y1qhhlRlteYYAi9Pdb/ZV7FW5aHpkrpM8+P+4p/jjR8zCyKPBMBjSig== dependencies: - npm-install-checks "^4.0.0" - npm-package-arg "^8.0.0" + hosted-git-info "^3.0.6" semver "^7.0.0" + validate-npm-package-name "^3.0.0" -npm-pick-manifest@^6.0.0: +npm-packlist@^1.1.12: + version "1.4.8" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" + integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + npm-normalize-package-bin "^1.0.1" + +npm-pick-manifest@6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-6.1.0.tgz#2befed87b0fce956790f62d32afb56d7539c022a" integrity sha512-ygs4k6f54ZxJXrzT0x34NybRlLeZ4+6nECAIbr2i0foTnijtS1TJiyzpqtuUAJOps/hO0tNDr8fRV5g+BtRlTw== @@ -6097,19 +6481,27 @@ npm-pick-manifest@^6.0.0: npm-package-arg "^8.0.0" semver "^7.0.0" -npm-registry-fetch@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-8.0.0.tgz#65bb51dd2b9634b8363019aac9c76c003e5c5eaf" - integrity sha512-975WwLvZjX97y9UWWQ8nAyr7bw02s9xKPHqvEm5T900LQsB1HXb8Gb9ebYtCBLSX+K8gSOrO5KS/9yV/naLZmQ== +npm-pick-manifest@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" + integrity sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw== + dependencies: + figgy-pudding "^3.5.1" + npm-package-arg "^6.0.0" + semver "^5.4.1" + +npm-registry-fetch@^4.0.0: + version "4.0.7" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-4.0.7.tgz#57951bf6541e0246b34c9f9a38ab73607c9449d7" + integrity sha512-cny9v0+Mq6Tjz+e0erFAB+RYJ/AVGzkjnISiobqP8OWj9c9FLoZZu8/SPSKJWE17F1tk4018wfjV+ZbIbqC7fQ== dependencies: - "@npmcli/ci-detect" "^1.0.0" + JSONStream "^1.3.4" + bluebird "^3.5.1" + figgy-pudding "^3.4.1" lru-cache "^5.1.1" - make-fetch-happen "^8.0.2" - minipass "^3.0.0" - minipass-fetch "^1.1.2" - minipass-json-stream "^1.0.1" - minizlib "^2.0.0" - npm-package-arg "^8.0.0" + make-fetch-happen "^5.0.0" + npm-package-arg "^6.1.0" + safe-buffer "^5.2.0" npm-run-path@^2.0.0: version "2.0.2" @@ -6164,17 +6556,20 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" - integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== +object-inspect@^1.8.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" + integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== object-is@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.2.tgz#6b80eb84fe451498f65007982f035a5b445edec4" - integrity sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ== + version "1.1.4" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.4.tgz#63d6c83c00a43f4cbc9434eb9757c8a5b8565068" + integrity sha512-1ZvAZ4wlF7IyPVOcE1Omikt7UpaFlOQq0HlSti+ZvDH3UiD2brwGMwDbyV43jao2bKJ+4+WdPJHSd7kgzKYVqg== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: +object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== @@ -6186,23 +6581,24 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== +object.assign@^4.1.0, object.assign@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" - integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== + version "2.1.1" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz#0dfda8d108074d9c563e80490c883b6661091544" + integrity sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" + es-abstract "^1.18.0-next.1" object.pick@^1.3.0: version "1.3.0" @@ -6212,13 +6608,13 @@ object.pick@^1.3.0: isobject "^3.0.1" object.values@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" - integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== + version "1.1.2" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.2.tgz#7a2015e06fcb0f546bd652486ce8583a4731c731" + integrity sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - function-bind "^1.1.1" + es-abstract "^1.18.0-next.1" has "^1.0.3" obuf@^1.0.0, obuf@^1.1.2: @@ -6246,16 +6642,16 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: wrappy "1" onetime@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" - integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== dependencies: mimic-fn "^2.1.0" -open@7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/open/-/open-7.0.3.tgz#db551a1af9c7ab4c7af664139930826138531c48" - integrity sha512-sP2ru2v0P290WFfv49Ap8MF6PkzGNnGlAwHweB4WR4mr5d2d0woiCluUeJ218w7/+PmoBy9JmYgD5A4mLcWOFA== +open@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/open/-/open-7.2.0.tgz#212959bd7b0ce2e8e3676adc76e3cf2f0a2498b4" + integrity sha512-4HeyhxCvBTI5uBePsAdi55C5fmqnWZ2e2MlmvWi5KW5tdH5rxoiv/aMtbeVxKZc3eWkT1GymMnLG8XC4Rq4TDQ== dependencies: is-docker "^2.0.0" is-wsl "^2.1.1" @@ -6267,7 +6663,7 @@ opn@^5.5.0: dependencies: is-wsl "^1.1.0" -optimist@^0.6.1, optimist@~0.6.0: +optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= @@ -6275,16 +6671,16 @@ optimist@^0.6.1, optimist@~0.6.0: minimist "~0.0.1" wordwrap "~0.0.2" -ora@4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/ora/-/ora-4.0.3.tgz#752a1b7b4be4825546a7a3d59256fa523b6b6d05" - integrity sha512-fnDebVFyz309A73cqCipVL1fBZewq4vwgSHfxh43vVy31mbyoQ8sCH3Oeaog/owYOs/lLlGVPCISQonTneg6Pg== +ora@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.0.0.tgz#4f0b34f2994877b49b452a707245ab1e9f6afccb" + integrity sha512-s26qdWqke2kjN/wC4dy+IQPBIMWBJlSU/0JZhk30ZDBLelW25rv66yutUWARMigpGPzcXHb+Nac5pNhN/WsARw== dependencies: - chalk "^3.0.0" + chalk "^4.1.0" cli-cursor "^3.1.0" - cli-spinners "^2.2.0" + cli-spinners "^2.4.0" is-interactive "^1.0.0" - log-symbols "^3.0.0" + log-symbols "^4.0.0" mute-stream "0.0.8" strip-ansi "^6.0.0" wcwidth "^1.0.1" @@ -6301,6 +6697,11 @@ os-browserify@^0.3.0: resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + os-locale@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" @@ -6310,11 +6711,19 @@ os-locale@^3.0.0: lcid "^2.0.0" mem "^4.0.0" -os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: +os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= +osenv@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + p-defer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" @@ -6330,26 +6739,19 @@ p-is-promise@^2.0.0: resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.1, p-limit@^2.2.2: +p-limit@^2.0.0, p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= +p-limit@^3.0.1, p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: - p-limit "^1.1.0" + yocto-queue "^0.1.0" p-locate@^3.0.0: version "3.0.0" @@ -6370,10 +6772,10 @@ p-map@^2.0.0: resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== -p-map@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" - integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== dependencies: aggregate-error "^3.0.0" @@ -6384,44 +6786,46 @@ p-retry@^3.0.1: dependencies: retry "^0.12.0" -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -pacote@11.1.4: - version "11.1.4" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-11.1.4.tgz#5529a453c59881b7f059da8af6903b0f79c124b2" - integrity sha512-eUGJvSSpWFZKn3z8gig/HgnBmUl6gIWByIIaHzSyEr3tOWX0w8tFEADXtpu8HGv5E0ShCeTP6enRq8iHKCHSvw== - dependencies: - "@npmcli/git" "^2.0.1" - "@npmcli/installed-package-contents" "^1.0.5" - "@npmcli/promise-spawn" "^1.1.0" - cacache "^15.0.0" - chownr "^1.1.4" - fs-minipass "^2.1.0" +pacote@9.5.12: + version "9.5.12" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.5.12.tgz#1e11dd7a8d736bcc36b375a9804d41bb0377bf66" + integrity sha512-BUIj/4kKbwWg4RtnBncXPJd15piFSVNpTzY0rysSr3VnMowTYgkGKcaHrbReepAkjTr8lH2CVWRi58Spg2CicQ== + dependencies: + bluebird "^3.5.3" + cacache "^12.0.2" + chownr "^1.1.2" + figgy-pudding "^3.5.1" + get-stream "^4.1.0" + glob "^7.1.3" infer-owner "^1.0.4" lru-cache "^5.1.1" - minipass "^3.0.1" - minipass-fetch "^1.2.1" - mkdirp "^1.0.3" - npm-package-arg "^8.0.1" - npm-packlist "^2.1.0" - npm-pick-manifest "^6.0.0" - npm-registry-fetch "^8.0.0" + make-fetch-happen "^5.0.0" + minimatch "^3.0.4" + minipass "^2.3.5" + mississippi "^3.0.0" + mkdirp "^0.5.1" + normalize-package-data "^2.4.0" + npm-normalize-package-bin "^1.0.0" + npm-package-arg "^6.1.0" + npm-packlist "^1.1.12" + npm-pick-manifest "^3.0.0" + npm-registry-fetch "^4.0.0" + osenv "^0.1.5" promise-inflight "^1.0.1" promise-retry "^1.1.1" - read-package-json-fast "^1.1.3" - rimraf "^2.7.1" - semver "^7.1.3" - ssri "^8.0.0" - tar "^6.0.1" - which "^2.0.2" + protoduck "^5.0.1" + rimraf "^2.6.2" + safe-buffer "^5.1.2" + semver "^5.6.0" + ssri "^6.0.1" + tar "^4.4.10" + unique-filename "^1.1.1" + which "^1.3.1" pako@~1.0.2, pako@~1.0.5: version "1.0.11" @@ -6437,14 +6841,13 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -parse-asn1@^5.0.0: - version "5.1.5" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" - integrity sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ== +parse-asn1@^5.0.0, parse-asn1@^5.1.5: + version "5.1.6" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" + integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== dependencies: - asn1.js "^4.0.0" + asn1.js "^5.2.0" browserify-aes "^1.0.0" - create-hash "^1.1.0" evp_bytestokey "^1.0.0" pbkdf2 "^3.0.3" safe-buffer "^5.1.1" @@ -6457,10 +6860,17 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse5@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" - integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== +parse5-htmlparser2-tree-adapter@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" + integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== + dependencies: + parse5 "^6.0.1" + +parse5@6.0.1, parse5@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== parse5@^5.1.1: version "5.1.1" @@ -6526,7 +6936,7 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= -path-parse@^1.0.5, path-parse@^1.0.6: +path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== @@ -6536,17 +6946,15 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== pbkdf2@^3.0.3: - version "3.0.17" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" - integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== + version "3.1.1" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" + integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== dependencies: create-hash "^1.1.2" create-hmac "^1.1.4" @@ -6559,7 +6967,7 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.0.7: +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1, picomatch@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== @@ -6569,11 +6977,6 @@ pify@^2.0.0, pify@^2.3.0: resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - pify@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" @@ -6605,21 +7008,21 @@ pkg-dir@^4.1.0: dependencies: find-up "^4.0.0" -pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" - integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= +pnp-webpack-plugin@1.6.4: + version "1.6.4" + resolved "https://registry.yarnpkg.com/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz#c9711ac4dc48a685dabafc86f8b6dd9f8df84149" + integrity sha512-7Wjy+9E3WwLOEL30D+m8TSTF7qJJUJLONBnwQp0518siuMxUQUbgZwssaFX+QKlZkjHZcw/IpZCt/H0srrntSg== dependencies: - find-up "^2.1.0" + ts-pnp "^1.1.6" -portfinder@^1.0.25: - version "1.0.25" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" - integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg== +portfinder@^1.0.26: + version "1.0.28" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" + integrity sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA== dependencies: async "^2.6.2" debug "^3.1.1" - mkdirp "^0.5.1" + mkdirp "^0.5.5" posix-character-classes@^0.1.0: version "0.1.1" @@ -6627,9 +7030,9 @@ posix-character-classes@^0.1.0: integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= postcss-calc@^7.0.1: - version "7.0.2" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-7.0.2.tgz#504efcd008ca0273120568b0792b16cdcde8aac1" - integrity sha512-rofZFHUg6ZIrvRwPeFktv06GdbDYLcGqh9EwiMutZg+a0oePCCw1zHOEiji6LCpyRcjTREtPASuUqeAvYlEVvQ== + version "7.0.5" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-7.0.5.tgz#f8a6e99f12e619c2ebc23cf6c486fdc15860933e" + integrity sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg== dependencies: postcss "^7.0.27" postcss-selector-parser "^6.0.2" @@ -6693,9 +7096,9 @@ postcss-import@12.0.1: resolve "^1.1.7" postcss-load-config@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003" - integrity sha512-4pV3JJVPLd5+RueiVVB+gFOAa7GWc25XQcMp86Zexzke69mKf6Nx9LRcQywdz7yZI9n1udOxmLuAwTBypypF8Q== + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.2.tgz#c5ea504f2c4aef33c7359a34de3573772ad7502a" + integrity sha512-/rDeGV6vMUo3mwJZmeHfEDvwnTKKqQ0S7OHUi/kJvvtx3aWtyWG2/0ZWnzCt2keEclwN6Tf0DST2v9kITdOKYw== dependencies: cosmiconfig "^5.0.0" import-cwd "^2.0.0" @@ -6767,10 +7170,43 @@ postcss-minify-selectors@^4.0.2: resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8" integrity sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g== dependencies: - alphanum-sort "^1.0.0" - has "^1.0.0" - postcss "^7.0.0" - postcss-selector-parser "^3.0.0" + alphanum-sort "^1.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + +postcss-modules-extract-imports@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e" + integrity sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ== + dependencies: + postcss "^7.0.5" + +postcss-modules-local-by-default@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz#bb14e0cc78279d504dbdcbfd7e0ca28993ffbbb0" + integrity sha512-e3xDq+LotiGesympRlKNgaJ0PCzoUIdpH0dj47iWAui/kyTgh3CiAr1qP54uodmJhl6p9rN6BoNcdEDVJx9RDw== + dependencies: + icss-utils "^4.1.1" + postcss "^7.0.32" + postcss-selector-parser "^6.0.2" + postcss-value-parser "^4.1.0" + +postcss-modules-scope@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee" + integrity sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ== + dependencies: + postcss "^7.0.6" + postcss-selector-parser "^6.0.0" + +postcss-modules-values@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz#5b5000d6ebae29b4255301b4a3a54574423e7f10" + integrity sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg== + dependencies: + icss-utils "^4.0.0" + postcss "^7.0.6" postcss-normalize-charset@^4.0.1: version "4.0.1" @@ -6891,14 +7327,15 @@ postcss-selector-parser@^3.0.0: indexes-of "^1.0.1" uniq "^1.0.1" -postcss-selector-parser@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c" - integrity sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg== +postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2: + version "6.0.4" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz#56075a1380a04604c38b063ea7767a129af5c2b3" + integrity sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw== dependencies: cssesc "^3.0.0" indexes-of "^1.0.1" uniq "^1.0.1" + util-deprecate "^1.0.2" postcss-svgo@^4.0.2: version "4.0.2" @@ -6924,15 +7361,33 @@ postcss-value-parser@^3.0.0, postcss-value-parser@^3.2.3: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== -postcss-value-parser@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d" - integrity sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg== +postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" + integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== + +postcss@7.0.21: + version "7.0.21" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.21.tgz#06bb07824c19c2021c5d056d5b10c35b989f7e17" + integrity sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + +postcss@7.0.32: + version "7.0.32" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d" + integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" -postcss@7.0.27, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.26, postcss@^7.0.27: - version "7.0.27" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.27.tgz#cc67cdc6b0daa375105b7c424a85567345fc54d9" - integrity sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ== +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.27, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6: + version "7.0.35" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.35.tgz#d2be00b998f7f211d8a276974079f2e92b970e24" + integrity sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg== dependencies: chalk "^2.4.2" source-map "^0.6.1" @@ -6943,11 +7398,6 @@ prepend-http@^1.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= -private@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== - process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -6971,13 +7421,6 @@ promise-retry@^1.1.1: err-code "^1.0.0" retry "^0.10.0" -promise@^7.1.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" - integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== - dependencies: - asap "~2.0.3" - protobufjs@6.8.8: version "6.8.8" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.8.8.tgz#c8b4f1282fd7a90e6f5b109ed11c84af82908e7c" @@ -6997,10 +7440,17 @@ protobufjs@6.8.8: "@types/node" "^10.1.0" long "^4.0.0" +protoduck@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" + integrity sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg== + dependencies: + genfun "^5.0.0" + protractor@~5.4.2: - version "5.4.3" - resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.4.3.tgz#35f050741e404a45868618ea648745d89af31683" - integrity sha512-7pMAolv8Ah1yJIqaorDTzACtn3gk7BamVKPTeO5lqIGOrfosjPgXFx/z1dqSI+m5EeZc2GMJHPr5DYlodujDNA== + version "5.4.4" + resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.4.4.tgz#b241466aaf83b76bc2c58df67deb9a5cdfc61529" + integrity sha512-BaL4vePgu3Vfa/whvTUAlgaCAId4uNSGxIFSCXMgj7LMYENPWLp85h5RBi9pdpX/bWQ8SF6flP7afmi2TC4eHw== dependencies: "@types/q" "^0.0.32" "@types/selenium-webdriver" "^3.0.0" @@ -7010,13 +7460,13 @@ protractor@~5.4.2: glob "^7.0.3" jasmine "2.8.0" jasminewd2 "^2.1.0" - optimist "~0.6.0" q "1.4.1" saucelabs "^1.5.0" selenium-webdriver "3.6.0" source-map-support "~0.4.0" webdriver-js-extender "2.1.0" webdriver-manager "^12.0.6" + yargs "^12.0.5" proxy-addr@~2.0.5: version "2.0.6" @@ -7137,11 +7587,11 @@ querystring@0.2.0: integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= querystringify@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" - integrity sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== @@ -7171,13 +7621,13 @@ raw-body@2.4.0: iconv-lite "0.4.24" unpipe "1.0.0" -raw-loader@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.0.tgz#d639c40fb9d72b5c7f8abc1fb2ddb25b29d3d540" - integrity sha512-iINUOYvl1cGEmfoaLjnZXt4bKfT2LJnZZib5N/LLyAphC+Dd11vNP9CNVb38j+SAJpFI1uo8j9frmih53ASy7Q== +raw-loader@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.1.tgz#14e1f726a359b68437e183d5a5b7d33a3eba6933" + integrity sha512-baolhQBSi3iNh1cglJjA0mYzga+wePk7vdEX//1dTFd+v4TsQlQE0jitJSNF1OIP82rdYulH7otaVmdlDaJ64A== dependencies: - loader-utils "^1.2.3" - schema-utils "^2.5.0" + loader-utils "^2.0.0" + schema-utils "^2.6.5" read-cache@^1.0.0: version "1.0.0" @@ -7186,25 +7636,15 @@ read-cache@^1.0.0: dependencies: pify "^2.3.0" -read-package-json-fast@^1.1.1, read-package-json-fast@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-1.1.3.tgz#3b78464ea8f3c4447f3358635390b6946dc0737e" - integrity sha512-MmFqiyfCXV2Dmm4jH24DEGhxdkUDFivJQj4oPZQPOKywxR7HWBE6WnMWDAapfFHi3wm1b+mhR+XHlUH0CL8axg== - dependencies: - json-parse-even-better-errors "^2.0.1" - npm-normalize-package-bin "^1.0.1" - read-package-json@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.1.tgz#16aa66c59e7d4dad6288f179dd9295fd59bb98f1" - integrity sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A== + version "2.1.2" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.2.tgz#6992b2b66c7177259feb8eaac73c3acd28b9222a" + integrity sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA== dependencies: glob "^7.1.1" - json-parse-better-errors "^1.0.1" + json-parse-even-better-errors "^2.3.0" normalize-package-data "^2.0.0" npm-normalize-package-bin "^1.0.0" - optionalDependencies: - graceful-fs "^4.1.2" read-package-tree@5.3.1: version "5.3.1" @@ -7228,7 +7668,7 @@ read-package-tree@5.3.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.6: +readable-stream@^3.0.6, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -7237,7 +7677,7 @@ readable-stream@^3.0.6: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readdir-scoped-modules@^1.0.0, readdir-scoped-modules@^1.1.0: +readdir-scoped-modules@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw== @@ -7256,19 +7696,12 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" -readdirp@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.3.0.tgz#984458d13a1e42e2e9f5841b129e162f369aff17" - integrity sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ== - dependencies: - picomatch "^2.0.7" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= +readdirp@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" + integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== dependencies: - resolve "^1.1.6" + picomatch "^2.2.1" reflect-metadata@^0.1.2: version "0.1.13" @@ -7283,22 +7716,21 @@ regenerate-unicode-properties@^8.2.0: regenerate "^1.4.0" regenerate@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" - integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== + version "1.4.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@0.13.5, regenerator-runtime@^0.13.4: - version "0.13.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" - integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== +regenerator-runtime@0.13.7, regenerator-runtime@^0.13.4: + version "0.13.7" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" + integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== regenerator-transform@^0.14.2: - version "0.14.4" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.4.tgz#5266857896518d1616a78a0479337a30ea974cc7" - integrity sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw== + version "0.14.5" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.5.tgz#c98da154683671c9c4dcb16ece736517e1b7feb4" + integrity sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw== dependencies: "@babel/runtime" "^7.8.4" - private "^0.1.8" regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" @@ -7308,6 +7740,11 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" +regex-parser@^2.2.11: + version "2.2.11" + resolved "https://registry.yarnpkg.com/regex-parser/-/regex-parser-2.2.11.tgz#3b37ec9049e19479806e878cabe7c1ca83ccfe58" + integrity sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q== + regexp.prototype.flags@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" @@ -7316,10 +7753,10 @@ regexp.prototype.flags@^1.2.0: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" -regexpu-core@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" - integrity sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ== +regexpu-core@^4.7.1: + version "4.7.1" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.1.tgz#2dea5a9a07233298fbf0db91fa9abc4c6e0f8ad6" + integrity sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ== dependencies: regenerate "^1.4.0" regenerate-unicode-properties "^8.2.0" @@ -7329,9 +7766,9 @@ regexpu-core@^4.7.0: unicode-match-property-value-ecmascript "^1.2.0" regjsgen@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c" - integrity sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg== + version "0.5.2" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" + integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== regjsparser@^0.6.4: version "0.6.4" @@ -7355,7 +7792,7 @@ repeat-string@^1.6.1: resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= -request@^2.83.0, request@^2.87.0, request@^2.88.0: +request@^2.87.0, request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -7418,23 +7855,33 @@ resolve-from@^3.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" integrity sha1-six699nWiBvItuZTM17rywoYh0g= +resolve-url-loader@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/resolve-url-loader/-/resolve-url-loader-3.1.2.tgz#235e2c28e22e3e432ba7a5d4e305c59a58edfc08" + integrity sha512-QEb4A76c8Mi7I3xNKXlRKQSlLBwjUV/ULFMP+G7n3/7tJZ8MG5wsZ3ucxP1Jz8Vevn6fnJsxDx9cIls+utGzPQ== + dependencies: + adjust-sourcemap-loader "3.0.0" + camelcase "5.3.1" + compose-function "3.0.3" + convert-source-map "1.7.0" + es6-iterator "2.0.3" + loader-utils "1.2.3" + postcss "7.0.21" + rework "1.0.1" + rework-visit "1.0.0" + source-map "0.6.1" + resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== - dependencies: - path-parse "^1.0.5" - -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.3.2: - version "1.15.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" - integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== +resolve@^1.1.7, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.17.0, resolve@^1.3.2, resolve@^1.8.1: + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== dependencies: + is-core-module "^2.1.0" path-parse "^1.0.6" restore-cursor@^3.1.0: @@ -7460,6 +7907,24 @@ retry@^0.12.0: resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rework-visit@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/rework-visit/-/rework-visit-1.0.0.tgz#9945b2803f219e2f7aca00adb8bc9f640f842c9a" + integrity sha1-mUWygD8hni96ygCtuLyfZA+ELJo= + +rework@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/rework/-/rework-1.0.1.tgz#30806a841342b54510aa4110850cd48534144aa7" + integrity sha1-MIBqhBNCtUUQqkEQhQzUhTQUSqc= + dependencies: + convert-source-map "^0.3.3" + css "^2.0.0" + rfdc@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.1.4.tgz#ba72cc1367a0ccd9cf81a870b3b58bd3ad07f8c2" @@ -7475,14 +7940,14 @@ rgba-regex@^1.0.0: resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= -rimraf@3.0.2: +rimraf@3.0.2, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" -rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.3, rimraf@^2.7.1: +rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -7497,57 +7962,29 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rollup-plugin-commonjs@~10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz#417af3b54503878e084d127adf4d1caf8beb86fb" - integrity sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q== - dependencies: - estree-walker "^0.6.1" - is-reference "^1.1.2" - magic-string "^0.25.2" - resolve "^1.11.0" - rollup-pluginutils "^2.8.1" - -rollup-plugin-node-resolve@~5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz#730f93d10ed202473b1fb54a5997a7db8c6d8523" - integrity sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw== - dependencies: - "@types/resolve" "0.0.8" - builtin-modules "^3.1.0" - is-module "^1.0.0" - resolve "^1.11.1" - rollup-pluginutils "^2.8.1" - -rollup-pluginutils@^2.8.1: - version "2.8.2" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" - integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== - dependencies: - estree-walker "^0.6.1" - -rollup@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.1.0.tgz#552e248e397a06b9c6db878c0564ca4ee06729c9" - integrity sha512-gfE1455AEazVVTJoeQtcOq/U6GSxwoj4XPSWVsuWmgIxj7sBQNLDOSA82PbdMe+cP8ql8fR1jogPFe8Wg8g4SQ== +rollup@2.26.5: + version "2.26.5" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.26.5.tgz#5562ec36fcba3eed65cfd630bd78e037ad0e0307" + integrity sha512-rCyFG3ZtQdnn9YwfuAVH0l/Om34BdO5lwCA0W6Hq+bNB21dVEBbCRxhaHOmu1G7OBFDWytbzAC104u7rxHwGjA== optionalDependencies: fsevents "~2.1.2" -rollup@~1.21.4: - version "1.21.4" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.21.4.tgz#00a41a30f90095db890301b226cbe2918e4cf54d" - integrity sha512-Pl512XVCmVzgcBz5h/3Li4oTaoDcmpuFZ+kdhS/wLreALz//WuDAMfomD3QEYl84NkDu6Z6wV9twlcREb4qQsw== - dependencies: - "@types/estree" "0.0.39" - "@types/node" "^12.7.5" - acorn "^7.0.0" +rollup@2.3.4: + version "2.3.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.3.4.tgz#979e461f8cab1a71aec2d37ce2a434052ae70223" + integrity sha512-8U9x54RCVhrUEV1zon4Pp8kokg1HM0fwzf5vkwe2/rOfyTClarx5e27kFlaoZ7ofJiazWkNQ+dgdG4HuZxkQ9A== + optionalDependencies: + fsevents "~2.1.2" run-async@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" - integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== - dependencies: - is-promise "^2.1.0" + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +run-parallel@^1.1.9: + version "1.1.10" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.10.tgz#60a51b2ae836636c81377df16cb107351bcd13ef" + integrity sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw== run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" @@ -7568,10 +8005,17 @@ rxjs@6.5.4: dependencies: tslib "^1.9.0" -rxjs@^6.5.3, rxjs@~6.5.4: - version "6.5.5" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" - integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== +rxjs@6.6.2: + version "6.6.2" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.2.tgz#8096a7ac03f2cc4fe5860ef6e572810d9e01c0d2" + integrity sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg== + dependencies: + tslib "^1.9.0" + +rxjs@^6.6.0, rxjs@~6.6.3: + version "6.6.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" + integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== dependencies: tslib "^1.9.0" @@ -7580,10 +8024,10 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" - integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== safe-regex@^1.1.0: version "1.1.0" @@ -7592,26 +8036,26 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@^2.1.2, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@^2.1.2, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sass-loader@8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-8.0.2.tgz#debecd8c3ce243c76454f2e8290482150380090d" - integrity sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ== +sass-loader@10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-10.0.1.tgz#10c0364d8034f22fee25ddcc9eded20f99bbe3b4" + integrity sha512-b2PSldKVTS3JcFPHSrEXh3BeAfR7XknGiGCAO5aHruR3Pf3kqLP3Gb2ypXLglRrAzgZkloNxLZ7GXEGDX0hBUQ== dependencies: - clone-deep "^4.0.1" - loader-utils "^1.2.3" - neo-async "^2.6.1" - schema-utils "^2.6.1" - semver "^6.3.0" + klona "^2.0.3" + loader-utils "^2.0.0" + neo-async "^2.6.2" + schema-utils "^2.7.0" + semver "^7.3.2" -sass@1.26.3: - version "1.26.3" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.26.3.tgz#412df54486143b76b5a65cdf7569e86f44659f46" - integrity sha512-5NMHI1+YFYw4sN3yfKjpLuV9B5l7MqQ6FlkTcC4FT+oHbBRUZoSjHrrt/mE0nFXJyY2kQtU9ou9HxvFVjLFuuw== +sass@1.26.10: + version "1.26.10" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.26.10.tgz#851d126021cdc93decbf201d1eca2a20ee434760" + integrity sha512-bzN0uvmzfsTvjz0qwccN1sPm2HxxpNI/Xa+7PlUEMS+nQvbyuEK7Y0qFqxlPHhiNHb1Ze8WQJtU31olMObkAMw== dependencies: chokidar ">=2.0.0 <4.0.0" @@ -7636,13 +8080,14 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.5.0, schema-utils@^2.6.1, schema-utils@^2.6.4, schema-utils@^2.6.5: - version "2.6.5" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" - integrity sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ== +schema-utils@^2.6.5, schema-utils@^2.6.6, schema-utils@^2.7.0: + version "2.7.1" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7" + integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg== dependencies: - ajv "^6.12.0" - ajv-keywords "^3.4.1" + "@types/json-schema" "^7.0.5" + ajv "^6.12.4" + ajv-keywords "^3.5.2" select-hose@^2.0.0: version "2.0.0" @@ -7660,11 +8105,11 @@ selenium-webdriver@3.6.0, selenium-webdriver@^3.0.1: xml2js "^0.4.17" selfsigned@^1.10.7: - version "1.10.7" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.7.tgz#da5819fd049d5574f28e88a9bcc6dbc6e6f3906b" - integrity sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA== + version "1.10.8" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.8.tgz#0d17208b7d12c33f8eac85c41835f27fc3d81a30" + integrity sha512-2P4PtieJeEwVgTU9QEcwIRDQ/mXJLX8/+I3ur+Pg16nS8oNbrGxEso9NyYWy8NAmXiNl4dlAp5MwoNeCWzON4w== dependencies: - node-forge "0.9.0" + node-forge "^0.10.0" semver-intersect@1.4.0: version "1.4.0" @@ -7673,7 +8118,7 @@ semver-intersect@1.4.0: dependencies: semver "^5.0.0" -"semver@2 || 3 || 4 || 5", semver@^5.0.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.0.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -7688,25 +8133,22 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6" - integrity sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA== +semver@7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" + integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== semver@^6.0.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.0.0, semver@^7.1.1, semver@^7.1.3: - version "7.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.0.tgz#91f7c70ec944a63e5dc7a74cde2da375d8e0853c" - integrity sha512-uyvgU/igkrMgNHwLgXvlpD9jEADbJhB0+JXSywoO47JgJ6c16iau9F9cjtc/E5o0PoqRYTiTIAPRKaYe84z6eQ== - -semver@~5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= +semver@^7.0.0, semver@^7.1.1, semver@^7.3.2: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" send@0.17.1: version "0.17.1" @@ -7727,10 +8169,12 @@ send@0.17.1: range-parser "~1.2.1" statuses "~1.5.0" -serialize-javascript@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" - integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== +serialize-javascript@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" + integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== + dependencies: + randombytes "^2.1.0" serve-index@^1.9.1: version "1.9.1" @@ -7798,13 +8242,6 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" -shallow-clone@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" - integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== - dependencies: - kind-of "^6.0.2" - shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -7817,15 +8254,6 @@ shebang-regex@^1.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= -shelljs@0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35" - integrity sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ== - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" @@ -7838,10 +8266,10 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== smart-buffer@^4.1.0: version "4.1.0" @@ -7936,24 +8364,24 @@ sockjs-client@1.4.0: json3 "^3.3.2" url-parse "^1.4.3" -sockjs@0.3.19: - version "0.3.19" - resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.19.tgz#d976bbe800af7bd20ae08598d582393508993c0d" - integrity sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw== +sockjs@0.3.20: + version "0.3.20" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.20.tgz#b26a283ec562ef8b2687b44033a4eeceac75d855" + integrity sha512-SpmVOVpdq0DJc0qArhF3E5xsxvaiqGNb73XfgBpK1y3UD5gs8DSo8aCTsuT5pX8rssdc2NDIzANwP9eCAiSdTA== dependencies: faye-websocket "^0.10.0" - uuid "^3.0.1" + uuid "^3.4.0" + websocket-driver "0.6.5" -socks-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.0.tgz#7c0f364e7b1cf4a7a437e71253bed72e9004be60" - integrity sha512-lEpa1zsWCChxiynk+lCycKuC502RxDWLKJZoIhnxrWNjLSDGYRFflHA1/228VkRcnv9TIb8w98derGbpKxJRgA== +socks-proxy-agent@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" + integrity sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg== dependencies: - agent-base "6" - debug "4" - socks "^2.3.3" + agent-base "~4.2.1" + socks "~2.3.2" -socks@^2.3.3: +socks@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3" integrity sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA== @@ -7973,13 +8401,16 @@ source-list-map@^2.0.0: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== -source-map-loader@0.2.4: - version "0.2.4" - resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-0.2.4.tgz#c18b0dc6e23bf66f6792437557c569a11e072271" - integrity sha512-OU6UJUty+i2JDpTItnizPrlpOIBLmQbWMuBg9q5bVtnHACqw1tn9nNwqJLbv0/00JjnJb/Ee5g5WS5vrRv7zIQ== +source-map-loader@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-1.0.2.tgz#b0a6582b2eaa387ede1ecf8061ae0b93c23f9eb0" + integrity sha512-oX8d6ndRjN+tVyjj6PlXSyFPhDdVAPsZA30nD3/II8g4uOv8fCz0DMn5sy8KtVbDfKQxOpGwGJnK3xIW3tauDw== dependencies: - async "^2.5.0" - loader-utils "^1.1.0" + data-urls "^2.0.0" + iconv-lite "^0.6.2" + loader-utils "^2.0.0" + schema-utils "^2.7.0" + source-map "^0.6.1" source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: version "0.5.3" @@ -7992,10 +8423,10 @@ source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@0.5.16, source-map-support@^0.5.5, source-map-support@~0.5.12: - version "0.5.16" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" - integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== +source-map-support@0.5.19, source-map-support@^0.5.5, source-map-support@~0.5.12, source-map-support@~0.5.19: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -8020,7 +8451,12 @@ source-map-url@^0.4.0: resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= -source-map@0.7.3, source-map@^0.7.3: +source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@0.7.3, source-map@^0.7.3, source-map@~0.7.2: version "0.7.3" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== @@ -8030,41 +8466,36 @@ source-map@^0.5.0, source-map@^0.5.6: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - sourcemap-codec@^1.4.4, sourcemap-codec@^1.4.8: version "1.4.8" resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== spdx-correct@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" - integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.5" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" - integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + version "3.0.7" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65" + integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== spdy-transport@^3.0.0: version "3.0.0" @@ -8078,7 +8509,7 @@ spdy-transport@^3.0.0: readable-stream "^3.0.6" wbuf "^1.7.3" -spdy@^4.0.1: +spdy@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== @@ -8089,10 +8520,10 @@ spdy@^4.0.1: select-hose "^2.0.0" spdy-transport "^3.0.0" -speed-measure-webpack-plugin@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.3.1.tgz#69840a5cdc08b4638697dac7db037f595d7f36a0" - integrity sha512-qVIkJvbtS9j/UeZumbdfz0vg+QfG/zxonAjzefZrqzkr7xOncLVXkeGbTpzd1gjCBM4PmVNkWlkeTVhgskAGSQ== +speed-measure-webpack-plugin@1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.3.3.tgz#6ff894fc83e8a6310dde3af863a0329cd79da4f5" + integrity sha512-2ljD4Ch/rz2zG3HsLsnPfp23osuPBS0qPuz9sGpkNXTN1Ic4M+W9xB8l8rS8ob2cO4b1L+WTJw/0AJwWYVgcxQ== dependencies: chalk "^2.0.1" @@ -8123,21 +8554,13 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" -ssri@^6.0.1: +ssri@^6.0.0, ssri@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== dependencies: figgy-pudding "^3.5.1" -ssri@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-7.1.0.tgz#92c241bf6de82365b5c7fb4bd76e975522e1294d" - integrity sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g== - dependencies: - figgy-pudding "^3.5.1" - minipass "^3.1.1" - ssri@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.0.tgz#79ca74e21f8ceaeddfcb4b90143c458b8d988808" @@ -8228,6 +8651,15 @@ string-width@^2.0.0, string-width@^2.1.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + string-width@^4.1.0, string-width@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" @@ -8237,39 +8669,21 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" -string.prototype.trimend@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" - integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -string.prototype.trimleft@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz#4408aa2e5d6ddd0c9a80739b087fbc067c03b3cc" - integrity sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - string.prototype.trimstart "^1.0.0" - -string.prototype.trimright@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz#c76f1cef30f21bbad8afeb8db1511496cfb0f2a3" - integrity sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg== +string.prototype.trimend@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz#a22bd53cca5c7cf44d7c9d5c732118873d6cd18b" + integrity sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.5" - string.prototype.trimend "^1.0.0" -string.prototype.trimstart@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" - integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== +string.prototype.trimstart@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz#9b4cb590e123bb36564401d59824298de50fd5aa" + integrity sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg== dependencies: + call-bind "^1.0.0" define-properties "^1.1.3" - es-abstract "^1.17.5" string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.3.0" @@ -8299,6 +8713,13 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + strip-ansi@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" @@ -8316,13 +8737,13 @@ strip-eof@^1.0.0: resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= -style-loader@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.1.3.tgz#9e826e69c683c4d9bf9db924f85e9abb30d5e200" - integrity sha512-rlkH7X/22yuwFYK357fMN/BxYOorfnfq0eD7+vqlemSK4wEcejFF1dg4zxP0euBW8NrYx2WZzZ8PPFevr7D+Kw== +style-loader@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.2.1.tgz#c5cbbfbf1170d076cfdd86e0109c5bba114baa1a" + integrity sha512-ByHSTQvHLkWE9Ir5+lGbVOXhxX10fbprhLvdg96wedFZb4NDekDPxVKv5Fwmio+QcMlkkNfuK+5W1peQ5CUhZg== dependencies: - loader-utils "^1.2.3" - schema-utils "^2.6.4" + loader-utils "^2.0.0" + schema-utils "^2.6.6" stylehacks@^4.0.0: version "4.0.3" @@ -8342,18 +8763,18 @@ stylus-loader@3.0.2: lodash.clonedeep "^4.5.0" when "~3.6.x" -stylus@0.54.7: - version "0.54.7" - resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.7.tgz#c6ce4793965ee538bcebe50f31537bfc04d88cd2" - integrity sha512-Yw3WMTzVwevT6ZTrLCYNHAFmanMxdylelL3hkWNgPMeTCpMwpV3nXjpOHuBXtFv7aiO2xRuQS6OoAdgkNcSNug== +stylus@0.54.8: + version "0.54.8" + resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.8.tgz#3da3e65966bc567a7b044bfe0eece653e099d147" + integrity sha512-vr54Or4BZ7pJafo2mpf0ZcwA74rpuYCZbxrHBsH8kbcXOwSfvBFwsRfpGO5OD5fhG5HDCFW737PKaawI7OqEAg== dependencies: css-parse "~2.0.0" debug "~3.1.0" - glob "^7.1.3" - mkdirp "~0.5.x" + glob "^7.1.6" + mkdirp "~1.0.4" safer-buffer "^2.1.2" sax "~1.2.4" - semver "^6.0.0" + semver "^6.3.0" source-map "^0.7.3" supports-color@^2.0.0: @@ -8376,9 +8797,9 @@ supports-color@^6.1.0: has-flag "^3.0.0" supports-color@^7.0.0, supports-color@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" - integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" @@ -8411,43 +8832,56 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tar@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.1.tgz#7b3bd6c313cb6e0153770108f8d70ac298607efa" - integrity sha512-bKhKrrz2FJJj5s7wynxy/fyxpE0CmCjmOQ1KV4KkgXFWOgoIT/NbTMnB1n+LFNrNk0SSBVGGxcK5AGsyC+pW5Q== +tar@^4.4.10: + version "4.4.13" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" + integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.8.6" + minizlib "^1.2.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.3" + +tar@^6.0.2: + version "6.0.5" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.5.tgz#bde815086e10b39f1dcd298e89d596e1535e200f" + integrity sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg== dependencies: - chownr "^1.1.3" + chownr "^2.0.0" fs-minipass "^2.0.0" minipass "^3.0.0" - minizlib "^2.1.0" + minizlib "^2.1.1" mkdirp "^1.0.3" yallist "^4.0.0" -terser-webpack-plugin@2.3.5: - version "2.3.5" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.3.5.tgz#5ad971acce5c517440ba873ea4f09687de2f4a81" - integrity sha512-WlWksUoq+E4+JlJ+h+U+QUzXpcsMSSNXkDy9lBVkSqDn1w23Gg29L/ary9GeJVYCGiNJJX7LnVc4bwL1N3/g1w== - dependencies: - cacache "^13.0.1" - find-cache-dir "^3.2.0" - jest-worker "^25.1.0" - p-limit "^2.2.2" - schema-utils "^2.6.4" - serialize-javascript "^2.1.2" +terser-webpack-plugin@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-4.1.0.tgz#6e9d6ae4e1a900d88ddce8da6a47507ea61f44bc" + integrity sha512-0ZWDPIP8BtEDZdChbufcXUigOYk6dOX/P/X0hWxqDDcVAQLb8Yy/0FAaemSfax3PAA67+DJR778oz8qVbmy4hA== + dependencies: + cacache "^15.0.5" + find-cache-dir "^3.3.1" + jest-worker "^26.3.0" + p-limit "^3.0.2" + schema-utils "^2.6.6" + serialize-javascript "^4.0.0" source-map "^0.6.1" - terser "^4.4.3" + terser "^5.0.0" webpack-sources "^1.4.3" terser-webpack-plugin@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c" - integrity sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA== + version "1.4.5" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz#a217aefaea330e734ffacb6120ec1fa312d6040b" + integrity sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw== dependencies: cacache "^12.0.2" find-cache-dir "^2.1.0" is-wsl "^1.1.0" schema-utils "^1.0.0" - serialize-javascript "^2.1.2" + serialize-javascript "^4.0.0" source-map "^0.6.1" terser "^4.1.2" webpack-sources "^1.4.0" @@ -8462,24 +8896,33 @@ terser@4.3.1: source-map "~0.6.1" source-map-support "~0.5.12" -terser@4.6.10: - version "4.6.10" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.10.tgz#90f5bd069ff456ddbc9503b18e52f9c493d3b7c2" - integrity sha512-qbF/3UOo11Hggsbsqm2hPa6+L4w7bkr+09FNseEe8xrcVD3APGLFqE+Oz1ZKAxjYnFsj80rLOfgAtJ0LNJjtTA== +terser@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.3.0.tgz#c481f4afecdcc182d5e2bdd2ff2dc61555161e81" + integrity sha512-XTT3D3AwxC54KywJijmY2mxZ8nJiEjBHVYzq8l9OaYuRFWeQNBwvipuzzYEP4e+/AVcd1hqG/CqgsdIRyT45Fg== dependencies: commander "^2.20.0" source-map "~0.6.1" source-map-support "~0.5.12" -terser@^4.1.2, terser@^4.4.3: - version "4.6.11" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.11.tgz#12ff99fdd62a26de2a82f508515407eb6ccd8a9f" - integrity sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA== +terser@^4.1.2: + version "4.8.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" + integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== dependencies: commander "^2.20.0" source-map "~0.6.1" source-map-support "~0.5.12" +terser@^5.0.0: + version "5.5.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.5.1.tgz#540caa25139d6f496fdea056e414284886fb2289" + integrity sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ== + dependencies: + commander "^2.20.0" + source-map "~0.7.2" + source-map-support "~0.5.19" + through2@^2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" @@ -8488,7 +8931,7 @@ through2@^2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" -through@^2.3.6: +"through@>=2.2.7 <3", through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -8499,13 +8942,13 @@ thunky@^1.0.2: integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== timers-browserify@^2.0.4: - version "2.0.11" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" - integrity sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ== + version "2.0.12" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" + integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== dependencies: setimmediate "^1.0.4" -timsort@^0.3.0, timsort@~0.3.0: +timsort@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= @@ -8598,25 +9041,37 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" +tr46@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.0.2.tgz#03273586def1595ae08fedb38d7733cee91d2479" + integrity sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg== + dependencies: + punycode "^2.1.1" + tree-kill@1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== -tsickle@^0.38.0: - version "0.38.1" - resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.38.1.tgz#30762db759d40c435943093b6972c7f2efb384ef" - integrity sha512-4xZfvC6+etRu6ivKCNqMOd1FqcY/m6JY3Y+yr5+Xw+i751ciwrWINi6x/3l1ekcODH9GZhlf0ny2LpzWxnjWYA== +ts-pnp@^1.1.6: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" + integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== -tslib@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" - integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== +tslib@1.14.1, tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e" + integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ== -tslib@1.11.1, tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: - version "1.11.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" - integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== +tslib@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" + integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== tsutils@2.27.2: version "2.27.2" @@ -8655,25 +9110,30 @@ type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.1.0.tgz#9bdc22c648cf8cf86dd23d32336a41cfb6475e3f" + integrity sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA== + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@3.6.5: - version "3.6.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.5.tgz#dae20114a7b4ff4bd642db9c8c699f2953e8bbdb" - integrity sha512-BEjlc0Z06ORZKbtcxGrIvvwYs5hAnuo6TKdNFL55frVDlB+na3z5bsLhFaIxmT+dPWgBIjMo6aNnTOgHHmHgiQ== +typescript@3.9.7: + version "3.9.7" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" + integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== -typescript@3.8.3: - version "3.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" - integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== - -typescript@~3.7.2: - version "3.7.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae" - integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw== +typescript@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2" + integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ== ultron@~1.1.0: version "1.1.1" @@ -8737,13 +9197,13 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" -universal-analytics@0.4.20: - version "0.4.20" - resolved "https://registry.yarnpkg.com/universal-analytics/-/universal-analytics-0.4.20.tgz#d6b64e5312bf74f7c368e3024a922135dbf24b03" - integrity sha512-gE91dtMvNkjO+kWsPstHRtSwHXz0l2axqptGYp5ceg4MsuurloM0PU3pdOfpb5zBXUvyjT4PwhWK2m39uczZuw== +universal-analytics@0.4.23: + version "0.4.23" + resolved "https://registry.yarnpkg.com/universal-analytics/-/universal-analytics-0.4.23.tgz#d915e676850c25c4156762471bdd7cf2eaaca8ac" + integrity sha512-lgMIH7XBI6OgYn1woDEmxhGdj8yDefMKg7GkWdeATAlQZFrMrNyxSkpDzY57iY0/6fdlzTbBV03OawvvzG+q7A== dependencies: - debug "^3.0.0" - request "^2.88.0" + debug "^4.1.1" + request "^2.88.2" uuid "^3.0.0" universalify@^0.1.0: @@ -8775,9 +9235,9 @@ upath@^1.1.1: integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + version "4.4.0" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602" + integrity sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g== dependencies: punycode "^2.1.0" @@ -8815,7 +9275,7 @@ useragent@2.3.0: lru-cache "4.1.x" tmp "0.0.x" -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= @@ -8856,12 +9316,12 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.2.tgz#7ff5c203467e91f5e0d85cfcbaaf7d2ebbca9be6" - integrity sha512-vy9V/+pKG+5ZTYKf+VcphF5Oc6EFiu3W8Nv3P3zIh0EqVI80ZxOzuPfe9EHjkFNvf8+xuTHVeei4Drydlx4zjw== +uuid@8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.0.tgz#ab738085ca22dc9a8c92725e459b1d507df5d6ea" + integrity sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ== -uuid@^3.0.0, uuid@^3.0.1, uuid@^3.3.2: +uuid@^3.0.0, uuid@^3.3.2, uuid@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -8881,11 +9341,6 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -validator@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-8.2.0.tgz#3c1237290e37092355344fef78c231249dab77b9" - integrity sha512-Yw5wW34fSv5spzTXNkokD6S6/Oq92d8q/t14TqsS3fAiA1RYnxSFSIZ+CY3n6PGGRCq5HhJTSepQvFUS2QUDxA== - vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -8915,14 +9370,23 @@ void-elements@^2.0.0: resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" integrity sha1-wGavtYK7HLQSjWDqkjkulNXp2+w= -watchpack@^1.6.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.1.tgz#280da0a8718592174010c078c7585a74cd8cd0e2" - integrity sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA== +watchpack-chokidar2@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz#38500072ee6ece66f3769936950ea1771be1c957" + integrity sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww== dependencies: chokidar "^2.1.8" + +watchpack@^1.7.4: + version "1.7.5" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" + integrity sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== + dependencies: graceful-fs "^4.1.2" neo-async "^2.5.0" + optionalDependencies: + chokidar "^3.4.1" + watchpack-chokidar2 "^2.0.1" wbuf@^1.1.0, wbuf@^1.7.3: version "1.7.3" @@ -8963,7 +9427,12 @@ webdriver-manager@^12.0.6: semver "^5.3.0" xml2js "^0.4.17" -webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.2: +webidl-conversions@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" + integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== + +webpack-dev-middleware@3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3" integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== @@ -8974,10 +9443,21 @@ webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.2: range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-server@3.10.3: - version "3.10.3" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.10.3.tgz#f35945036813e57ef582c2420ef7b470e14d3af0" - integrity sha512-e4nWev8YzEVNdOMcNzNeCN947sWJNd43E5XvsJzbAL08kGc2frm1tQ32hTJslRS+H65LCb/AaUCYU7fjHCpDeQ== +webpack-dev-middleware@^3.7.2: + version "3.7.3" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz#0639372b143262e2b84ab95d3b91a7597061c2c5" + integrity sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ== + dependencies: + memory-fs "^0.4.1" + mime "^2.4.4" + mkdirp "^0.5.1" + range-parser "^1.2.1" + webpack-log "^2.0.0" + +webpack-dev-server@3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.11.0.tgz#8f154a3bce1bcfd1cc618ef4e703278855e7ff8c" + integrity sha512-PUxZ+oSTxogFQgkTtFndEtJIPNmml7ExwufBZ9L2/Xyyd5PnOL5UreWe5ZT7IU25DSdykL9p1MLQzmLh2ljSeg== dependencies: ansi-html "0.0.7" bonjour "^3.5.0" @@ -8987,31 +9467,31 @@ webpack-dev-server@3.10.3: debug "^4.1.1" del "^4.1.1" express "^4.17.1" - html-entities "^1.2.1" + html-entities "^1.3.1" http-proxy-middleware "0.19.1" import-local "^2.0.0" internal-ip "^4.3.0" ip "^1.1.5" is-absolute-url "^3.0.3" killable "^1.0.1" - loglevel "^1.6.6" + loglevel "^1.6.8" opn "^5.5.0" p-retry "^3.0.1" - portfinder "^1.0.25" + portfinder "^1.0.26" schema-utils "^1.0.0" selfsigned "^1.10.7" semver "^6.3.0" serve-index "^1.9.1" - sockjs "0.3.19" + sockjs "0.3.20" sockjs-client "1.4.0" - spdy "^4.0.1" + spdy "^4.0.2" strip-ansi "^3.0.1" supports-color "^6.1.0" url "^0.11.0" webpack-dev-middleware "^3.7.2" webpack-log "^2.0.0" ws "^6.2.1" - yargs "12.0.5" + yargs "^13.3.2" webpack-log@^2.0.0: version "2.0.0" @@ -9036,55 +9516,76 @@ webpack-sources@1.4.3, webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-s source-list-map "^2.0.0" source-map "~0.6.1" -webpack-subresource-integrity@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-1.4.0.tgz#44963a64c9a214ad729158e7f46d52c2525cc88a" - integrity sha512-GB1kB/LwAWC3CxwcedGhMkxGpNZxSheCe1q+KJP1bakuieAdX/rGHEcf5zsEzhKXpqsGqokgsDoD9dIkr61VDQ== +webpack-subresource-integrity@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-1.4.1.tgz#e8bf918b444277df46a66cd84542cbcdc5a6272d" + integrity sha512-XMLFInbGbB1HV7K4vHWANzc1CN0t/c4bBvnlvGxGwV45yE/S/feAXIm8dJsCkzqWtSKnmaEgTp/meyeThxG4Iw== dependencies: webpack-sources "^1.3.0" -webpack@4.42.0: - version "4.42.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.42.0.tgz#b901635dd6179391d90740a63c93f76f39883eb8" - integrity sha512-EzJRHvwQyBiYrYqhyjW9AqM90dE4+s1/XtCfn7uWg6cS72zH+2VPFAlsnW0+W0cDi0XRjNKUMoJtpSi50+Ph6w== +webpack@4.44.1: + version "4.44.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.44.1.tgz#17e69fff9f321b8f117d1fda714edfc0b939cc21" + integrity sha512-4UOGAohv/VGUNQJstzEywwNxqX417FnjZgZJpJQegddzPmTvph37eBIRbRTfdySXzVtJXLJfbMN3mMYhM6GdmQ== dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-module-context" "1.8.5" - "@webassemblyjs/wasm-edit" "1.8.5" - "@webassemblyjs/wasm-parser" "1.8.5" - acorn "^6.2.1" + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/wasm-edit" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + acorn "^6.4.1" ajv "^6.10.2" ajv-keywords "^3.4.1" chrome-trace-event "^1.0.2" - enhanced-resolve "^4.1.0" + enhanced-resolve "^4.3.0" eslint-scope "^4.0.3" json-parse-better-errors "^1.0.2" loader-runner "^2.4.0" loader-utils "^1.2.3" memory-fs "^0.4.1" micromatch "^3.1.10" - mkdirp "^0.5.1" + mkdirp "^0.5.3" neo-async "^2.6.1" node-libs-browser "^2.2.1" schema-utils "^1.0.0" tapable "^1.1.3" terser-webpack-plugin "^1.4.3" - watchpack "^1.6.0" + watchpack "^1.7.4" webpack-sources "^1.4.1" +websocket-driver@0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36" + integrity sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY= + dependencies: + websocket-extensions ">=0.1.1" + websocket-driver@>=0.5.1: - version "0.7.3" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" - integrity sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg== + version "0.7.4" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" + integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== dependencies: - http-parser-js ">=0.4.0 <0.4.11" + http-parser-js ">=0.5.1" safe-buffer ">=5.1.0" websocket-extensions ">=0.1.1" websocket-extensions@>=0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" - integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg== + version "0.1.4" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" + integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== + +whatwg-mimetype@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" + integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== + +whatwg-url@^8.0.0: + version "8.4.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.4.0.tgz#50fb9615b05469591d2b2bd6dfaed2942ed72837" + integrity sha512-vwTUFf6V4zhcPkWp/4CQPr1TW9Ml6SF4lVyaIMBdJw5i6qUUJ1QWM4Z6YYVkfka0OUIzVo/0aNtGVGk256IKWw== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^2.0.2" + webidl-conversions "^6.1.0" when@~3.6.x: version "3.6.4" @@ -9096,20 +9597,13 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@^1.2.1, which@^1.2.9: +which@^1.2.1, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" -which@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" @@ -9122,10 +9616,10 @@ worker-farm@^1.7.0: dependencies: errno "~0.1.7" -worker-plugin@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/worker-plugin/-/worker-plugin-4.0.2.tgz#0456dd7af1c0de64591326fd8a08c5d9f2b5b27a" - integrity sha512-V+1zSZMOOKk+uBzKyNIODLQLsx59zSIOaI75J1EMS0iR1qy+KQR3y/pQ3T0vIhvPfDFapGRMsoMvQNEL3okqSA== +worker-plugin@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/worker-plugin/-/worker-plugin-5.0.0.tgz#113b5fe1f4a5d6a957cecd29915bedafd70bb537" + integrity sha512-AXMUstURCxDD6yGam2r4E34aJg6kW85IiaeX72hi+I1cxyaMUtrvVY6sbfpGKAj5e7f68Acl62BjQF5aOOx2IQ== dependencies: loader-utils "^1.1.0" @@ -9137,10 +9631,19 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" string-width "^4.1.0" @@ -9191,16 +9694,21 @@ xtend@^4.0.0, xtend@~4.0.1: integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== "y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + version "4.0.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" + integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== + +y18n@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" + integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.2: +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== @@ -9218,15 +9726,20 @@ yargs-parser@^11.1.1: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^18.1.0: - version "18.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.2.tgz#2f482bea2136dbde0861683abea7756d30b504f1" - integrity sha512-hlIPNR3IzC1YuL1c2UwwDKpXlNFBqD1Fswwh1khz5+d8Cq/8yc/Mn0i+rQXduu8hcrFKvO7Eryk+09NecTQAAQ== +yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== dependencies: camelcase "^5.0.0" decamelize "^1.2.0" -yargs@12.0.5: +yargs-parser@^20.2.2: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs@^12.0.5: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== @@ -9244,40 +9757,46 @@ yargs@12.0.5: y18n "^3.2.1 || ^4.0.0" yargs-parser "^11.1.1" -yargs@15.3.0: - version "15.3.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.0.tgz#403af6edc75b3ae04bf66c94202228ba119f0976" - integrity sha512-g/QCnmjgOl1YJjGsnUg2SatC7NUYEiLXJqxNOQU9qSpjzGtGXda9b+OKccr1kLTy8BN9yqEyqfq5lxlwdc13TA== +yargs@^13.3.2: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" + cliui "^5.0.0" + find-up "^3.0.0" get-caller-file "^2.0.1" require-directory "^2.1.1" require-main-filename "^2.0.0" set-blocking "^2.0.0" - string-width "^4.2.0" + string-width "^3.0.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^18.1.0" + yargs-parser "^13.1.2" + +yargs@^16.1.1: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" yeast@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" integrity sha1-AI4G2AlDIMNy28L47XagymyKxBk= -z-schema@~3.18.3: - version "3.18.4" - resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-3.18.4.tgz#ea8132b279533ee60be2485a02f7e3e42541a9a2" - integrity sha512-DUOKC/IhbkdLKKiV89gw9DUauTV8U/8yJl1sjf6MtDmzevLKOF2duNJ495S3MFVjqZarr+qNGCPbkg4mu4PpLw== - dependencies: - lodash.get "^4.0.0" - lodash.isequal "^4.0.0" - validator "^8.0.0" - optionalDependencies: - commander "^2.7.1" +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -zone.js@0.10.2: - version "0.10.2" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.10.2.tgz#67ca084b3116fc33fc40435e0d5ea40a207e392e" - integrity sha512-UAYfiuvxLN4oyuqhJwd21Uxb4CNawrq6fPS/05Su5L4G+1TN+HVDJMUHNMobVQDFJRir2cLAODXwluaOKB7HFg== +zone.js@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.10.3.tgz#3e5e4da03c607c9dcd92e37dd35687a14a140c16" + integrity sha512-LXVLVEq0NNOqK/fLJo3d0kfzd4sxwn2/h67/02pjCjfKDxgx1i9QqpvtHD8CrBnSSwMw5+dy11O7FRX5mkO7Cg==