diff --git a/apps/p4runtime-test/src/test/java/org/onosproject/p4runtime/test/P4RuntimeTest.java b/apps/p4runtime-test/src/test/java/org/onosproject/p4runtime/test/P4RuntimeTest.java index 47381bc355..1e980e3dda 100644 --- a/apps/p4runtime-test/src/test/java/org/onosproject/p4runtime/test/P4RuntimeTest.java +++ b/apps/p4runtime-test/src/test/java/org/onosproject/p4runtime/test/P4RuntimeTest.java @@ -49,8 +49,8 @@ import org.onosproject.p4runtime.ctl.P4RuntimeClientImpl; import org.onosproject.p4runtime.ctl.P4RuntimeControllerImpl; import org.onosproject.pipelines.basic.PipeconfLoader; import org.slf4j.Logger; -import p4.P4RuntimeGrpc; -import p4.P4RuntimeOuterClass; +import p4.v1.P4RuntimeGrpc; +import p4.v1.P4RuntimeOuterClass; import java.net.URL; import java.util.Collection; @@ -62,7 +62,7 @@ import static org.onlab.util.ImmutableByteSequence.ofZeros; import static org.onosproject.net.pi.model.PiPacketOperationType.PACKET_OUT; import static org.onosproject.net.pi.model.PiPipeconf.ExtensionType.BMV2_JSON; import static org.slf4j.LoggerFactory.getLogger; -import static p4.P4RuntimeOuterClass.Update.Type.INSERT; +import static p4.v1.P4RuntimeOuterClass.Update.Type.INSERT; /** * Class used for quick testing of P4Runtime with real devices. To be removed before release. 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 23102ddcc7..a346927fd7 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 @@ -25,7 +25,6 @@ import org.onosproject.net.pi.runtime.PiFieldMatch; import org.onosproject.net.pi.runtime.PiLpmFieldMatch; import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; -import org.onosproject.net.pi.runtime.PiValidFieldMatch; import java.util.Collection; import java.util.Optional; @@ -273,18 +272,6 @@ public final class PiCriterion implements Criterion { return this; } - /** - * Adds a valid field match for the given fieldId and flag. - * - * @param fieldId protocol-independent header field Id - * @param flag a boolean value - * @return this - */ - public Builder matchValid(PiMatchFieldId fieldId, boolean flag) { - fieldMatchMapBuilder.put(fieldId, new PiValidFieldMatch(fieldId, flag)); - return this; - } - /** * Adds a range field match for the given fieldId, low and high. * 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 1e24fce579..f4fce3edc8 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 @@ -39,11 +39,6 @@ public enum PiMatchType { */ LPM, - /** - * Valid match type. - */ - VALID, - /** * Range match type. */ diff --git a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiValidFieldMatch.java b/core/api/src/main/java/org/onosproject/net/pi/runtime/PiValidFieldMatch.java deleted file mode 100644 index 7894ba82a1..0000000000 --- a/core/api/src/main/java/org/onosproject/net/pi/runtime/PiValidFieldMatch.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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.net.pi.runtime; - -import com.google.common.annotations.Beta; -import com.google.common.base.Objects; -import org.onosproject.net.pi.model.PiMatchFieldId; -import org.onosproject.net.pi.model.PiMatchType; - -/** - * Instance of a valid field match in a protocol-independent pipeline. - */ -@Beta -public final class PiValidFieldMatch extends PiFieldMatch { - - private final boolean isValid; - - /** - * Creates a new valid field match. - * - * @param fieldId field identifier - * @param isValid validity flag - */ - public PiValidFieldMatch(PiMatchFieldId fieldId, boolean isValid) { - super(fieldId); - this.isValid = isValid; - } - - @Override - public final PiMatchType type() { - return PiMatchType.VALID; - } - - /** - * Returns the boolean flag of this valid match parameter. - * - * @return valid match flag - */ - public boolean isValid() { - return isValid; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PiValidFieldMatch that = (PiValidFieldMatch) o; - return Objects.equal(this.fieldId(), that.fieldId()) && - isValid == that.isValid; - } - - @Override - public int hashCode() { - return Objects.hashCode(this.fieldId(), isValid); - } - - @Override - public String toString() { - return this.fieldId().toString() + '=' + (isValid ? "VALID" : "NOT_VALID"); - } -} 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 ab0446d2cc..bd11252be6 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 @@ -24,7 +24,6 @@ import org.onosproject.net.pi.runtime.PiFieldMatch; import org.onosproject.net.pi.runtime.PiLpmFieldMatch; import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; -import org.onosproject.net.pi.runtime.PiValidFieldMatch; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; @@ -154,10 +153,6 @@ public class PiCriteriaTest { private Criterion matchPiTernaryLong2 = PiCriterion.builder() .matchTernary(ipv4MatchFieldId, matchTernaryLong2, matchTernaryMaskLong).build(); - private Criterion matchPiValid1 = PiCriterion.builder().matchValid(ipv4MatchFieldId, false).build(); - private Criterion sameAsMatchPiValid1 = PiCriterion.builder().matchValid(ipv4MatchFieldId, false).build(); - private Criterion matchPiValid2 = PiCriterion.builder().matchValid(ipv4MatchFieldId, true).build(); - private byte[] matchRangeBytes1 = {0x10}; private byte[] matchRangeBytes2 = {0x20}; private byte[] matchRangeHighBytes = {0x30}; @@ -320,19 +315,6 @@ public class PiCriteriaTest { assertThat(piCriterionLong.fieldMatches().iterator().next(), is(expectedMatchLong)); } - /** - * Test the ValidMatchPi method. - */ - @Test - public void testValidMatchPiMethod() { - - Criterion matchPiBytes = PiCriterion.builder().matchValid(ipv4MatchFieldId, true).build(); - PiCriterion piCriterionBytes = checkAndConvert(matchPiBytes, Criterion.Type.PROTOCOL_INDEPENDENT, - PiCriterion.class); - PiFieldMatch expectedMatch = new PiValidFieldMatch(ipv4MatchFieldId, true); - assertThat(piCriterionBytes.fieldMatches().iterator().next(), is(expectedMatch)); - } - /** * Test the RangeMatchPi method. */ @@ -454,17 +436,6 @@ public class PiCriteriaTest { .testEquals(); } - /** - * Test the equals() method of the PiCriterion class. - */ - @Test - public void testPiValidCriterionEquals() { - new EqualsTester() - .addEqualityGroup(matchPiValid1, sameAsMatchPiValid1) - .addEqualityGroup(matchPiValid2) - .testEquals(); - } - /** * Test the equals() method of the PiCriterion class. */ diff --git a/core/api/src/test/java/org/onosproject/net/pi/runtime/PiValidFieldMatchTest.java b/core/api/src/test/java/org/onosproject/net/pi/runtime/PiValidFieldMatchTest.java deleted file mode 100644 index a62588a5e0..0000000000 --- a/core/api/src/test/java/org/onosproject/net/pi/runtime/PiValidFieldMatchTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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.net.pi.runtime; - -import com.google.common.testing.EqualsTester; -import org.junit.Test; -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.onosproject.net.pi.runtime.PiConstantsTest.DOT; -import static org.onosproject.net.pi.runtime.PiConstantsTest.VID; -import static org.onosproject.net.pi.runtime.PiConstantsTest.VLAN_HEADER_NAME; - -/** - * Unit tests for PiValidFieldMatch class. - */ -public class PiValidFieldMatchTest { - private final boolean isValid1 = true; - private final boolean isValid2 = false; - private final PiMatchFieldId piMatchField = PiMatchFieldId.of(VLAN_HEADER_NAME + DOT + VID); - private PiValidFieldMatch piValidFieldMatch1 = new PiValidFieldMatch(piMatchField, isValid1); - private PiValidFieldMatch sameAsPiValidFieldMatch1 = new PiValidFieldMatch(piMatchField, isValid1); - private PiValidFieldMatch piValidFieldMatch2 = new PiValidFieldMatch(piMatchField, isValid2); - - /** - * Checks that the PiValidFieldMatch class is immutable. - */ - @Test - public void testImmutability() { - assertThatClassIsImmutable(PiValidFieldMatch.class); - } - - /** - * Checks the operation of equals(), hashCode() and toString() methods. - */ - @Test - public void testEquals() { - new EqualsTester() - .addEqualityGroup(piValidFieldMatch1, sameAsPiValidFieldMatch1) - .addEqualityGroup(piValidFieldMatch2) - .testEquals(); - } - - /** - * Checks the construction of a PiValidFieldMatch object. - */ - @Test - public void testConstruction() { - assertThat(piValidFieldMatch1, is(notNullValue())); - assertThat(piValidFieldMatch1.isValid(), is(isValid1)); - assertThat(piValidFieldMatch1.type(), is(PiMatchType.VALID)); - } -} 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 9b1b7c24b5..ac88527b41 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 @@ -647,16 +647,6 @@ public final class DecodeCriterionCodecHelper { MISSING_MEMBER_MESSAGE).asText(), null) ); break; - case VALID: - builder.matchValid( - PiMatchFieldId.of( - nullIsIllegal(node.get(CriterionCodec.PI_MATCH_FIELD_ID), - CriterionCodec.PI_MATCH_FIELD_ID + - MISSING_MEMBER_MESSAGE).asText()), - nullIsIllegal(node.get(CriterionCodec.PI_MATCH_VALUE), - CriterionCodec.PI_MATCH_VALUE + - MISSING_MEMBER_MESSAGE).asBoolean()); - 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 efdc9ff707..83b25a772a 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 @@ -57,7 +57,6 @@ import org.onosproject.net.pi.runtime.PiFieldMatch; import org.onosproject.net.pi.runtime.PiLpmFieldMatch; import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; -import org.onosproject.net.pi.runtime.PiValidFieldMatch; import java.util.EnumMap; @@ -542,16 +541,6 @@ public final class EncodeCriterionCodecHelper { return matchRangeNode; } - private ObjectNode parsePiMatchValid(PiValidFieldMatch validFieldMatch) { - - ObjectNode matchValidNode = context.mapper().createObjectNode(); - matchValidNode.put(CriterionCodec.PI_MATCH_FIELD_ID, validFieldMatch.fieldId().id()); - matchValidNode.put(CriterionCodec.PI_MATCH_TYPE, PiMatchType.VALID.name().toLowerCase()); - matchValidNode.put(CriterionCodec.PI_MATCH_VALUE, validFieldMatch.isValid()); - - return matchValidNode; - } - private class FormatProtocolIndependent implements CriterionTypeFormatter { @Override public ObjectNode encodeCriterion(ObjectNode root, Criterion criterion) { @@ -569,13 +558,8 @@ public final class EncodeCriterionCodecHelper { matchNodes.add(parsePiMatchTernary((PiTernaryFieldMatch) fieldMatch)); break; case RANGE: - matchNodes.add(parsePiMatchRange((PiRangeFieldMatch) fieldMatch)); break; - case VALID: - - matchNodes.add(parsePiMatchValid((PiValidFieldMatch) fieldMatch)); - break; default: throw new IllegalArgumentException("Type " + fieldMatch.type().name() + " is unsupported"); } 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 c748ab6416..2a615c7e84 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 @@ -51,7 +51,6 @@ import org.onosproject.net.pi.runtime.PiFieldMatch; import org.onosproject.net.pi.runtime.PiLpmFieldMatch; import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; -import org.onosproject.net.pi.runtime.PiValidFieldMatch; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; @@ -508,10 +507,6 @@ public class CriterionCodecTest { .matchRange(ipv4MatchFieldId, matchRangeBytes1, matchRangeHighBytes).build(); ObjectNode rangeResult = criterionCodec.encode(rangeBytesCriterion, context); assertThat(rangeResult, matchesCriterion(rangeBytesCriterion)); - - Criterion validCriterion = PiCriterion.builder().matchValid(ipv4MatchFieldId, false).build(); - ObjectNode validResult = criterionCodec.encode(validCriterion, context); - assertThat(validResult, matchesCriterion(validCriterion)); } /** @@ -549,12 +544,8 @@ public class CriterionCodecTest { Assert.assertThat(((PiRangeFieldMatch) piFieldMatch).lowValue(), is(copyFrom((byte) 0x10))); break; - case VALID: - Assert.assertThat(piFieldMatch.fieldId().id(), is("ethernet_t.etherType")); - Assert.assertThat(((PiValidFieldMatch) piFieldMatch).isValid(), is(true)); - break; default: - Assert.assertTrue(false); + 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 0b38729982..bda55153fb 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 @@ -59,7 +59,6 @@ import org.onosproject.net.pi.runtime.PiFieldMatch; import org.onosproject.net.pi.runtime.PiLpmFieldMatch; import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; -import org.onosproject.net.pi.runtime.PiValidFieldMatch; import static org.onlab.util.ImmutableByteSequence.copyFrom; @@ -626,13 +625,6 @@ public final class CriterionJsonMatcher extends return false; } break; - case VALID: - if (!Objects.equals(matchNode.get("value").asBoolean(), - ((PiValidFieldMatch) fieldMatch).isValid())) { - description.appendText("match value was " + ((PiValidFieldMatch) fieldMatch).isValid()); - return false; - } - break; default: description.appendText("match type was " + fieldMatch.type().name().toLowerCase()); return false; 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 01d9226b27..d1df49ea70 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,11 +23,6 @@ "match": "range", "highValue": "20", "lowValue": "10" - }, - { - "field": "ethernet_t.etherType", - "match": "valid", - "value": true } ] -} \ No newline at end of file +} 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 46238c4e52..40a150f1c2 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 @@ -71,6 +71,7 @@ import static org.onosproject.net.pi.impl.PiUtils.translateTableId; final class PiFlowRuleTranslatorImpl { public static final int MAX_PI_PRIORITY = (int) Math.pow(2, 24); + public static final int MIN_PI_PRIORITY = 1; private static final Logger log = LoggerFactory.getLogger(PiFlowRuleTranslatorImpl.class); private PiFlowRuleTranslatorImpl() { @@ -129,15 +130,14 @@ final class PiFlowRuleTranslatorImpl { } if (needPriority) { - // In the P4 world 0 is the highest priority, in ONOS the lowest one. - // FIXME: move priority conversion to the P4Runtime driver + // FIXME: move priority check to P4Runtime driver. final int newPriority; if (rule.priority() > MAX_PI_PRIORITY) { log.warn("Flow rule priority too big, setting translated priority to max value {}: {}", MAX_PI_PRIORITY, rule); - newPriority = 0; + newPriority = MAX_PI_PRIORITY; } else { - newPriority = MAX_PI_PRIORITY - rule.priority(); + newPriority = MIN_PI_PRIORITY + rule.priority(); } tableEntryBuilder.withPriority(newPriority); } @@ -441,8 +441,6 @@ final class PiFlowRuleTranslatorImpl { return new PiRangeFieldMatch(fieldMatch.fieldId(), ((PiRangeFieldMatch) fieldMatch).lowValue().fit(modelBitWidth), ((PiRangeFieldMatch) fieldMatch).highValue().fit(modelBitWidth)); - case VALID: - return fieldMatch; default: // Should never be here. throw new IllegalArgumentException( diff --git a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java index 47bcd2767c..f4d15b6c24 100644 --- a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java +++ b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java @@ -244,7 +244,6 @@ import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTableAction; import org.onosproject.net.pi.runtime.PiTableEntry; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; -import org.onosproject.net.pi.runtime.PiValidFieldMatch; import org.onosproject.net.pi.runtime.PiTableEntryHandle; import org.onosproject.net.pi.service.PiTranslatable; import org.onosproject.net.pi.service.PiTranslatedEntity; @@ -696,7 +695,6 @@ public final class KryoNamespaces { PiTableAction.class, PiTableEntry.class, PiTernaryFieldMatch.class, - PiValidFieldMatch.class, // PI service PiTableEntryHandle.class, PiTranslatedEntity.class, diff --git a/pipelines/basic/src/main/resources/Makefile b/pipelines/basic/src/main/resources/Makefile index 1c48156898..ca8430b258 100644 --- a/pipelines/basic/src/main/resources/Makefile +++ b/pipelines/basic/src/main/resources/Makefile @@ -1,15 +1,14 @@ all: basic int basic: basic.p4 - p4c-bm2-ss -o p4c-out/bmv2/basic.json \ + p4c-bm2-ss --arch v1model -o p4c-out/bmv2/basic.json \ --p4runtime-file p4c-out/bmv2/basic.p4info \ --p4runtime-format text basic.p4 int: int.p4 - p4c-bm2-ss -o p4c-out/bmv2/int.json \ + p4c-bm2-ss --arch v1model -o p4c-out/bmv2/int.json \ --p4runtime-file p4c-out/bmv2/int.p4info \ --p4runtime-format text int.p4 clean: - rm -rf p4c-out/bmv2/*.json - rm -rf p4c-out/bmv2/*.p4info + rm -rf p4c-out/bmv2/* diff --git a/pipelines/basic/src/main/resources/p4c-out/bmv2/basic.json b/pipelines/basic/src/main/resources/p4c-out/bmv2/basic.json index ad8843a140..5769494b59 100644 --- a/pipelines/basic/src/main/resources/p4c-out/bmv2/basic.json +++ b/pipelines/basic/src/main/resources/p4c-out/bmv2/basic.json @@ -1,9 +1,4 @@ { - "program" : "basic.p4", - "__meta__" : { - "version" : [2, 7], - "compiler" : "https://github.com/p4lang/p4c" - }, "header_types" : [ { "name" : "scalars_0", @@ -21,80 +16,9 @@ ["local_metadata_t.next_hop_id", 16, false] ] }, - { - "name" : "packet_out_header_t", - "id" : 1, - "fields" : [ - ["egress_port", 9, false], - ["_padding", 7, false] - ] - }, - { - "name" : "packet_in_header_t", - "id" : 2, - "fields" : [ - ["ingress_port", 9, false], - ["_padding", 7, false] - ] - }, - { - "name" : "ethernet_t", - "id" : 3, - "fields" : [ - ["dst_addr", 48, false], - ["src_addr", 48, false], - ["ether_type", 16, false] - ] - }, - { - "name" : "ipv4_t", - "id" : 4, - "fields" : [ - ["version", 4, false], - ["ihl", 4, false], - ["dscp", 6, false], - ["ecn", 2, false], - ["len", 16, false], - ["identification", 16, false], - ["flags", 3, false], - ["frag_offset", 13, false], - ["ttl", 8, false], - ["protocol", 8, false], - ["hdr_checksum", 16, false], - ["src_addr", 32, false], - ["dst_addr", 32, false] - ] - }, - { - "name" : "tcp_t", - "id" : 5, - "fields" : [ - ["src_port", 16, false], - ["dst_port", 16, false], - ["seq_no", 32, false], - ["ack_no", 32, false], - ["data_offset", 4, false], - ["res", 3, false], - ["ecn", 3, false], - ["ctrl", 6, false], - ["window", 16, false], - ["checksum", 16, false], - ["urgent_ptr", 16, false] - ] - }, - { - "name" : "udp_t", - "id" : 6, - "fields" : [ - ["src_port", 16, false], - ["dst_port", 16, false], - ["length_", 16, false], - ["checksum", 16, false] - ] - }, { "name" : "standard_metadata", - "id" : 7, + "id" : 1, "fields" : [ ["ingress_port", 9, false], ["egress_spec", 9, false], @@ -118,6 +42,77 @@ ["recirculate_flag", 32, false], ["_padding_0", 5, false] ] + }, + { + "name" : "packet_out_header_t", + "id" : 2, + "fields" : [ + ["egress_port", 9, false], + ["_padding", 7, false] + ] + }, + { + "name" : "packet_in_header_t", + "id" : 3, + "fields" : [ + ["ingress_port", 9, false], + ["_padding", 7, false] + ] + }, + { + "name" : "ethernet_t", + "id" : 4, + "fields" : [ + ["dst_addr", 48, false], + ["src_addr", 48, false], + ["ether_type", 16, false] + ] + }, + { + "name" : "ipv4_t", + "id" : 5, + "fields" : [ + ["version", 4, false], + ["ihl", 4, false], + ["dscp", 6, false], + ["ecn", 2, false], + ["len", 16, false], + ["identification", 16, false], + ["flags", 3, false], + ["frag_offset", 13, false], + ["ttl", 8, false], + ["protocol", 8, false], + ["hdr_checksum", 16, false], + ["src_addr", 32, false], + ["dst_addr", 32, false] + ] + }, + { + "name" : "tcp_t", + "id" : 6, + "fields" : [ + ["src_port", 16, false], + ["dst_port", 16, false], + ["seq_no", 32, false], + ["ack_no", 32, false], + ["data_offset", 4, false], + ["res", 3, false], + ["ecn", 3, false], + ["ctrl", 6, false], + ["window", 16, false], + ["checksum", 16, false], + ["urgent_ptr", 16, false] + ] + }, + { + "name" : "udp_t", + "id" : 7, + "fields" : [ + ["src_port", 16, false], + ["dst_port", 16, false], + ["length_", 16, false], + ["checksum", 16, false] + ] } ], "headers" : [ @@ -183,14 +178,7 @@ "header_unions" : [], "header_union_stacks" : [], "field_lists" : [], - "errors" : [ - ["NoError", 1], - ["PacketTooShort", 2], - ["NoMatch", 3], - ["StackOutOfBounds", 4], - ["HeaderTooShort", 5], - ["ParserTimeout", 6] - ], + "errors" : [], "enums" : [], "parsers" : [ { @@ -722,7 +710,13 @@ } } } - ] + ], + "source_info" : { + "filename" : "include/port_counters.p4", + "line" : 29, + "column" : 35, + "source_fragment" : "(bit<32>) standard_metadata.ingress_port" + } }, { "op" : "count", @@ -767,7 +761,13 @@ } } } - ] + ], + "source_info" : { + "filename" : "include/port_meters.p4", + "line" : 27, + "column" : 53, + "source_fragment" : "(bit<32>)standard_metadata.ingress_port" + } }, { "op" : "execute_meter", @@ -924,7 +924,13 @@ } } } - ] + ], + "source_info" : { + "filename" : "include/port_counters.p4", + "line" : 39, + "column" : 34, + "source_fragment" : "(bit<32>) standard_metadata.egress_port" + } }, { "op" : "count", @@ -969,7 +975,13 @@ } } } - ] + ], + "source_info" : { + "filename" : "include/port_meters.p4", + "line" : 41, + "column" : 52, + "source_fragment" : "(bit<32>)standard_metadata.egress_port" + } }, { "op" : "execute_meter", @@ -1647,5 +1659,10 @@ "intrinsic_metadata.recirculate_flag", ["standard_metadata", "recirculate_flag"] ] - ] + ], + "program" : "basic.p4", + "__meta__" : { + "version" : [2, 18], + "compiler" : "https://github.com/p4lang/p4c" + } } \ No newline at end of file diff --git a/pipelines/basic/src/main/resources/p4c-out/bmv2/basic.p4info b/pipelines/basic/src/main/resources/p4c-out/bmv2/basic.p4info index 7c66b7394b..f1d7cd2e22 100644 --- a/pipelines/basic/src/main/resources/p4c-out/bmv2/basic.p4info +++ b/pipelines/basic/src/main/resources/p4c-out/bmv2/basic.p4info @@ -71,8 +71,9 @@ tables { id: 16784184 } const_default_action_id: 16784184 - direct_resource_ids: 302038973 + direct_resource_ids: 318816189 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -92,8 +93,9 @@ tables { action_refs { id: 16800567 } - direct_resource_ids: 318783457 + direct_resource_ids: 352337889 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -115,8 +117,9 @@ tables { annotations: "@defaultonly()" } implementation_id: 285253634 - direct_resource_ids: 302034578 + direct_resource_ids: 318811794 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } actions { preamble { @@ -216,7 +219,7 @@ counters { } direct_counters { preamble { - id: 302038973 + id: 318816189 name: "ingress.table0_control.table0_counter" alias: "table0_counter" } @@ -227,7 +230,7 @@ direct_counters { } direct_counters { preamble { - id: 302034578 + id: 318811794 name: "ingress.wcmp_control.wcmp_table_counter" alias: "wcmp_table_counter" } @@ -238,7 +241,7 @@ direct_counters { } meters { preamble { - id: 318803935 + id: 335581151 name: "ingress.port_meters_ingress.ingress_port_meter" alias: "ingress_port_meter" } @@ -249,7 +252,7 @@ meters { } meters { preamble { - id: 318792425 + id: 335569641 name: "egress.port_meters_egress.egress_port_meter" alias: "egress_port_meter" } @@ -260,7 +263,7 @@ meters { } direct_meters { preamble { - id: 318783457 + id: 352337889 name: "ingress.host_meter_control.host_meter" alias: "host_meter" } @@ -271,7 +274,7 @@ direct_meters { } controller_packet_metadata { preamble { - id: 2868941301 + id: 67146229 name: "packet_in" annotations: "@controller_header(\"packet_in\")" } @@ -288,7 +291,7 @@ controller_packet_metadata { } controller_packet_metadata { preamble { - id: 2868916615 + id: 67121543 name: "packet_out" annotations: "@controller_header(\"packet_out\")" } @@ -303,3 +306,5 @@ controller_packet_metadata { bitwidth: 7 } } +type_info { +} diff --git a/pipelines/basic/src/main/resources/p4c-out/bmv2/int.json b/pipelines/basic/src/main/resources/p4c-out/bmv2/int.json index 9a67fcb369..13a1d41a45 100644 --- a/pipelines/basic/src/main/resources/p4c-out/bmv2/int.json +++ b/pipelines/basic/src/main/resources/p4c-out/bmv2/int.json @@ -1,9 +1,4 @@ { - "program" : "int.p4", - "__meta__" : { - "version" : [2, 7], - "compiler" : "https://github.com/p4lang/p4c" - }, "header_types" : [ { "name" : "scalars_0", @@ -21,199 +16,9 @@ ["_padding_2", 6, false] ] }, - { - "name" : "packet_out_header_t", - "id" : 1, - "fields" : [ - ["egress_port", 9, false], - ["_padding", 7, false] - ] - }, - { - "name" : "packet_in_header_t", - "id" : 2, - "fields" : [ - ["ingress_port", 9, false], - ["_padding", 7, false] - ] - }, - { - "name" : "ethernet_t", - "id" : 3, - "fields" : [ - ["dst_addr", 48, false], - ["src_addr", 48, false], - ["ether_type", 16, false] - ] - }, - { - "name" : "ipv4_t", - "id" : 4, - "fields" : [ - ["version", 4, false], - ["ihl", 4, false], - ["dscp", 6, false], - ["ecn", 2, false], - ["len", 16, false], - ["identification", 16, false], - ["flags", 3, false], - ["frag_offset", 13, false], - ["ttl", 8, false], - ["protocol", 8, false], - ["hdr_checksum", 16, false], - ["src_addr", 32, false], - ["dst_addr", 32, false] - ] - }, - { - "name" : "tcp_t", - "id" : 5, - "fields" : [ - ["src_port", 16, false], - ["dst_port", 16, false], - ["seq_no", 32, false], - ["ack_no", 32, false], - ["data_offset", 4, false], - ["res", 3, false], - ["ecn", 3, false], - ["ctrl", 6, false], - ["window", 16, false], - ["checksum", 16, false], - ["urgent_ptr", 16, false] - ] - }, - { - "name" : "udp_t", - "id" : 6, - "fields" : [ - ["src_port", 16, false], - ["dst_port", 16, false], - ["length_", 16, false], - ["checksum", 16, false] - ] - }, - { - "name" : "intl4_shim_t", - "id" : 7, - "fields" : [ - ["int_type", 8, false], - ["rsvd1", 8, false], - ["len", 8, false], - ["rsvd2", 8, false] - ] - }, - { - "name" : "int_header_t", - "id" : 8, - "fields" : [ - ["ver", 2, false], - ["rep", 2, false], - ["c", 1, false], - ["e", 1, false], - ["rsvd1", 5, false], - ["ins_cnt", 5, false], - ["max_hop_cnt", 8, false], - ["total_hop_cnt", 8, false], - ["instruction_mask_0003", 4, false], - ["instruction_mask_0407", 4, false], - ["instruction_mask_0811", 4, false], - ["instruction_mask_1215", 4, false], - ["rsvd2", 16, false] - ] - }, - { - "name" : "int_data_t", - "id" : 9, - "fields" : [ - ["data", "*"] - ], - "max_length" : 1004 - }, - { - "name" : "int_switch_id_t", - "id" : 10, - "fields" : [ - ["switch_id", 32, false] - ] - }, - { - "name" : "int_port_ids_t", - "id" : 11, - "fields" : [ - ["ingress_port_id", 16, false], - ["egress_port_id", 16, false] - ] - }, - { - "name" : "int_hop_latency_t", - "id" : 12, - "fields" : [ - ["hop_latency", 32, false] - ] - }, - { - "name" : "int_q_occupancy_t", - "id" : 13, - "fields" : [ - ["q_id", 8, false], - ["q_occupancy", 24, false] - ] - }, - { - "name" : "int_ingress_tstamp_t", - "id" : 14, - "fields" : [ - ["ingress_tstamp", 32, false] - ] - }, - { - "name" : "int_egress_tstamp_t", - "id" : 15, - "fields" : [ - ["egress_tstamp", 32, false] - ] - }, - { - "name" : "int_q_congestion_t", - "id" : 16, - "fields" : [ - ["q_id", 8, false], - ["q_congestion", 24, false] - ] - }, - { - "name" : "int_egress_port_tx_util_t", - "id" : 17, - "fields" : [ - ["egress_port_tx_util", 32, false] - ] - }, - { - "name" : "intl4_tail_t", - "id" : 18, - "fields" : [ - ["next_proto", 8, false], - ["dest_port", 16, false], - ["dscp", 8, false] - ] - }, - { - "name" : "int_metadata_t", - "id" : 19, - "fields" : [ - ["switch_id", 32, false], - ["insert_byte_cnt", 16, false], - ["source", 1, false], - ["sink", 1, false], - ["mirror_id", 8, false], - ["flow_id", 16, false], - ["metadata_len", 8, false], - ["_padding_0", 6, false] - ] - }, { "name" : "standard_metadata", - "id" : 20, + "id" : 1, "fields" : [ ["ingress_port", 9, false], ["egress_spec", 9, false], @@ -235,7 +40,197 @@ ["egress_rid", 16, false], ["checksum_error", 1, false], ["recirculate_flag", 32, false], - ["_padding_1", 5, false] + ["_padding_0", 5, false] + ] + }, + { + "name" : "packet_out_header_t", + "id" : 2, + "fields" : [ + ["egress_port", 9, false], + ["_padding", 7, false] + ] + }, + { + "name" : "packet_in_header_t", + "id" : 3, + "fields" : [ + ["ingress_port", 9, false], + ["_padding", 7, false] + ] + }, + { + "name" : "ethernet_t", + "id" : 4, + "fields" : [ + ["dst_addr", 48, false], + ["src_addr", 48, false], + ["ether_type", 16, false] + ] + }, + { + "name" : "ipv4_t", + "id" : 5, + "fields" : [ + ["version", 4, false], + ["ihl", 4, false], + ["dscp", 6, false], + ["ecn", 2, false], + ["len", 16, false], + ["identification", 16, false], + ["flags", 3, false], + ["frag_offset", 13, false], + ["ttl", 8, false], + ["protocol", 8, false], + ["hdr_checksum", 16, false], + ["src_addr", 32, false], + ["dst_addr", 32, false] + ] + }, + { + "name" : "tcp_t", + "id" : 6, + "fields" : [ + ["src_port", 16, false], + ["dst_port", 16, false], + ["seq_no", 32, false], + ["ack_no", 32, false], + ["data_offset", 4, false], + ["res", 3, false], + ["ecn", 3, false], + ["ctrl", 6, false], + ["window", 16, false], + ["checksum", 16, false], + ["urgent_ptr", 16, false] + ] + }, + { + "name" : "udp_t", + "id" : 7, + "fields" : [ + ["src_port", 16, false], + ["dst_port", 16, false], + ["length_", 16, false], + ["checksum", 16, false] + ] + }, + { + "name" : "intl4_shim_t", + "id" : 8, + "fields" : [ + ["int_type", 8, false], + ["rsvd1", 8, false], + ["len", 8, false], + ["rsvd2", 8, false] + ] + }, + { + "name" : "int_header_t", + "id" : 9, + "fields" : [ + ["ver", 2, false], + ["rep", 2, false], + ["c", 1, false], + ["e", 1, false], + ["rsvd1", 5, false], + ["ins_cnt", 5, false], + ["max_hop_cnt", 8, false], + ["total_hop_cnt", 8, false], + ["instruction_mask_0003", 4, false], + ["instruction_mask_0407", 4, false], + ["instruction_mask_0811", 4, false], + ["instruction_mask_1215", 4, false], + ["rsvd2", 16, false] + ] + }, + { + "name" : "int_data_t", + "id" : 10, + "fields" : [ + ["data", "*"] + ], + "max_length" : 1004 + }, + { + "name" : "int_switch_id_t", + "id" : 11, + "fields" : [ + ["switch_id", 32, false] + ] + }, + { + "name" : "int_port_ids_t", + "id" : 12, + "fields" : [ + ["ingress_port_id", 16, false], + ["egress_port_id", 16, false] + ] + }, + { + "name" : "int_hop_latency_t", + "id" : 13, + "fields" : [ + ["hop_latency", 32, false] + ] + }, + { + "name" : "int_q_occupancy_t", + "id" : 14, + "fields" : [ + ["q_id", 8, false], + ["q_occupancy", 24, false] + ] + }, + { + "name" : "int_ingress_tstamp_t", + "id" : 15, + "fields" : [ + ["ingress_tstamp", 32, false] + ] + }, + { + "name" : "int_egress_tstamp_t", + "id" : 16, + "fields" : [ + ["egress_tstamp", 32, false] + ] + }, + { + "name" : "int_q_congestion_t", + "id" : 17, + "fields" : [ + ["q_id", 8, false], + ["q_congestion", 24, false] + ] + }, + { + "name" : "int_egress_port_tx_util_t", + "id" : 18, + "fields" : [ + ["egress_port_tx_util", 32, false] + ] + }, + { + "name" : "intl4_tail_t", + "id" : 19, + "fields" : [ + ["next_proto", 8, false], + ["dest_port", 16, false], + ["dscp", 8, false] + ] + }, + { + "name" : "int_metadata_t", + "id" : 20, + "fields" : [ + ["switch_id", 32, false], + ["insert_byte_cnt", 16, false], + ["source", 1, false], + ["sink", 1, false], + ["mirror_id", 8, false], + ["flow_id", 16, false], + ["metadata_len", 8, false], + ["_padding_1", 6, false] ] } ], @@ -393,14 +388,7 @@ "header_unions" : [], "header_union_stacks" : [], "field_lists" : [], - "errors" : [ - ["NoError", 1], - ["PacketTooShort", 2], - ["NoMatch", 3], - ["StackOutOfBounds", 4], - ["HeaderTooShort", 5], - ["ParserTimeout", 6] - ], + "errors" : [], "enums" : [], "parsers" : [ { @@ -1212,7 +1200,13 @@ } } } - ] + ], + "source_info" : { + "filename" : "include/port_counters.p4", + "line" : 29, + "column" : 35, + "source_fragment" : "(bit<32>) standard_metadata.ingress_port" + } }, { "op" : "count", @@ -5989,7 +5983,13 @@ } } } - ] + ], + "source_info" : { + "filename" : "include/port_counters.p4", + "line" : 39, + "column" : 34, + "source_fragment" : "(bit<32>) standard_metadata.egress_port" + } }, { "op" : "count", @@ -6951,5 +6951,10 @@ "intrinsic_metadata.recirculate_flag", ["standard_metadata", "recirculate_flag"] ] - ] + ], + "program" : "int.p4", + "__meta__" : { + "version" : [2, 18], + "compiler" : "https://github.com/p4lang/p4c" + } } \ No newline at end of file diff --git a/pipelines/basic/src/main/resources/p4c-out/bmv2/int.p4info b/pipelines/basic/src/main/resources/p4c-out/bmv2/int.p4info index 93a86460c1..7ac55cfd7c 100644 --- a/pipelines/basic/src/main/resources/p4c-out/bmv2/int.p4info +++ b/pipelines/basic/src/main/resources/p4c-out/bmv2/int.p4info @@ -71,8 +71,9 @@ tables { id: 16784184 } const_default_action_id: 16784184 - direct_resource_ids: 302038973 + direct_resource_ids: 318816189 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -93,8 +94,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 302052612 + direct_resource_ids: 318829828 size: 256 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -115,8 +117,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 302033970 + direct_resource_ids: 318811186 size: 256 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -155,8 +158,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 302019133 + direct_resource_ids: 318796349 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -171,8 +175,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 302026169 + direct_resource_ids: 318803385 size: 2 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -238,8 +243,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 302027886 + direct_resource_ids: 318805102 size: 16 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -305,8 +311,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 301998415 + direct_resource_ids: 318775631 size: 16 + idle_timeout_behavior: NO_TIMEOUT } actions { preamble { @@ -696,7 +703,7 @@ counters { } direct_counters { preamble { - id: 302038973 + id: 318816189 name: "ingress.table0_control.table0_counter" alias: "table0_counter" } @@ -707,7 +714,7 @@ direct_counters { } direct_counters { preamble { - id: 302052612 + id: 318829828 name: "egress.process_set_source_sink.counter_set_source" alias: "counter_set_source" } @@ -718,7 +725,7 @@ direct_counters { } direct_counters { preamble { - id: 302033970 + id: 318811186 name: "egress.process_set_source_sink.counter_set_sink" alias: "counter_set_sink" } @@ -729,7 +736,7 @@ direct_counters { } direct_counters { preamble { - id: 302019133 + id: 318796349 name: "egress.process_int_source.counter_int_source" alias: "counter_int_source" } @@ -740,7 +747,7 @@ direct_counters { } direct_counters { preamble { - id: 302026169 + id: 318803385 name: "egress.process_int_transit.counter_int_insert" alias: "counter_int_insert" } @@ -751,7 +758,7 @@ direct_counters { } direct_counters { preamble { - id: 302027886 + id: 318805102 name: "egress.process_int_transit.counter_int_inst_0003" alias: "counter_int_inst_0003" } @@ -762,7 +769,7 @@ direct_counters { } direct_counters { preamble { - id: 301998415 + id: 318775631 name: "egress.process_int_transit.counter_int_inst_0407" alias: "counter_int_inst_0407" } @@ -773,7 +780,7 @@ direct_counters { } controller_packet_metadata { preamble { - id: 2868941301 + id: 67146229 name: "packet_in" annotations: "@controller_header(\"packet_in\")" } @@ -790,7 +797,7 @@ controller_packet_metadata { } controller_packet_metadata { preamble { - id: 2868916615 + id: 67121543 name: "packet_out" annotations: "@controller_header(\"packet_out\")" } @@ -805,3 +812,5 @@ controller_packet_metadata { bitwidth: 7 } } +type_info { +} diff --git a/pipelines/fabric/src/main/resources/Makefile b/pipelines/fabric/src/main/resources/Makefile index 1873071103..c3016f84ee 100644 --- a/pipelines/fabric/src/main/resources/Makefile +++ b/pipelines/fabric/src/main/resources/Makefile @@ -4,19 +4,20 @@ BMV2_OPTIONS=-DTARGET_BMV2 -DCPU_PORT=$(BMV2_CPU_PORT) all: bmv2 bmv2-spgw -bmv2: - p4c -v -x p4-16 -b bmv2-v1model \ - $(BMV2_OPTIONS) -o p4c-out/bmv2 \ - --p4runtime-file p4c-out/bmv2/fabric.p4info \ - --p4runtime-format text fabric.p4 - mv p4c-out/bmv2/fabric.p4rt p4c-out/bmv2/fabric.p4info - rm -f p4c-out/bmv2/fabric.p4i +bmv2: makedir + p4c-bm2-ss --arch v1model -o p4c-out/bmv2/fabric.json \ + $(BMV2_OPTIONS) \ + --p4runtime-file p4c-out/bmv2/fabric.p4info \ + --p4runtime-format text fabric.p4 -bmv2-spgw: - p4c-bm2-ss -o p4c-out/bmv2/fabric-spgw.json \ - $(BMV2_OPTIONS) -DWITH_SPGW \ - --p4runtime-file p4c-out/bmv2/fabric-spgw.p4info \ - --p4runtime-format text fabric.p4 +bmv2-spgw: makedir + p4c-bm2-ss --arch v1model -o p4c-out/bmv2/fabric-spgw.json \ + $(BMV2_OPTIONS) -DWITH_SPGW \ + --p4runtime-file p4c-out/bmv2/fabric-spgw.p4info \ + --p4runtime-format text fabric.p4 + +makedir: + mkdir -p p4c-out/bmv2 clean: - rm -rf p4c-out/* + rm -rf p4c-out/bmv2/* diff --git a/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric-spgw.json b/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric-spgw.json index efab709ecb..6db1e8c74b 100644 --- a/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric-spgw.json +++ b/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric-spgw.json @@ -1,9 +1,4 @@ { - "program" : "fabric.p4", - "__meta__" : { - "version" : [2, 7], - "compiler" : "https://github.com/p4lang/p4c" - }, "header_types" : [ { "name" : "scalars_0", @@ -28,8 +23,35 @@ ] }, { - "name" : "ethernet_t", + "name" : "standard_metadata", "id" : 1, + "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], + ["deq_timedelta", 32, false], + ["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], + ["checksum_error", 1, false], + ["recirculate_flag", 32, false], + ["_padding", 5, false] + ] + }, + { + "name" : "ethernet_t", + "id" : 2, "fields" : [ ["dst_addr", 48, false], ["src_addr", 48, false], @@ -38,7 +60,7 @@ }, { "name" : "vlan_tag_t", - "id" : 2, + "id" : 3, "fields" : [ ["pri", 3, false], ["cfi", 1, false], @@ -48,7 +70,7 @@ }, { "name" : "mpls_t", - "id" : 3, + "id" : 4, "fields" : [ ["label", 20, false], ["tc", 3, false], @@ -58,7 +80,7 @@ }, { "name" : "ipv4_t", - "id" : 4, + "id" : 5, "fields" : [ ["version", 4, false], ["ihl", 4, false], @@ -76,7 +98,7 @@ }, { "name" : "udp_t", - "id" : 5, + "id" : 6, "fields" : [ ["src_port", 16, false], ["dst_port", 16, false], @@ -86,7 +108,7 @@ }, { "name" : "gtpu_t", - "id" : 6, + "id" : 7, "fields" : [ ["version", 3, false], ["pt", 1, false], @@ -99,20 +121,6 @@ ["teid", 32, false] ] }, - { - "name" : "ipv6_t", - "id" : 7, - "fields" : [ - ["version", 4, false], - ["traffic_class", 8, false], - ["flow_label", 20, false], - ["payload_len", 16, false], - ["next_hdr", 8, false], - ["hop_limit", 8, false], - ["src_addr", 128, false], - ["dst_addr", 128, false] - ] - }, { "name" : "arp_t", "id" : 8, @@ -179,34 +187,7 @@ ["teid", 32, false], ["s1u_enb_addr", 32, false], ["s1u_sgw_addr", 32, false], - ["_padding", 6, false] - ] - }, - { - "name" : "standard_metadata", - "id" : 14, - "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], - ["deq_timedelta", 32, false], - ["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], - ["checksum_error", 1, false], - ["recirculate_flag", 32, false], - ["_padding_0", 5, false] + ["_padding_0", 6, false] ] } ], @@ -274,58 +255,51 @@ "metadata" : false, "pi_omit" : true }, - { - "name" : "ipv6", - "id" : 9, - "header_type" : "ipv6_t", - "metadata" : false, - "pi_omit" : true - }, { "name" : "arp", - "id" : 10, + "id" : 9, "header_type" : "arp_t", "metadata" : false, "pi_omit" : true }, { "name" : "tcp", - "id" : 11, + "id" : 10, "header_type" : "tcp_t", "metadata" : false, "pi_omit" : true }, { "name" : "udp", - "id" : 12, + "id" : 11, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "icmp", - "id" : 13, + "id" : 12, "header_type" : "icmp_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_out", - "id" : 14, + "id" : 13, "header_type" : "packet_out_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_in", - "id" : 15, + "id" : 14, "header_type" : "packet_in_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "userMetadata.spgw", - "id" : 16, + "id" : 15, "header_type" : "spgw_meta_t", "metadata" : true, "pi_omit" : true @@ -336,14 +310,7 @@ "header_unions" : [], "header_union_stacks" : [], "field_lists" : [], - "errors" : [ - ["NoError", 0], - ["PacketTooShort", 1], - ["NoMatch", 2], - ["StackOutOfBounds", 3], - ["HeaderTooShort", 4], - ["ParserTimeout", 5] - ], + "errors" : [], "enums" : [], "parsers" : [ { @@ -450,12 +417,6 @@ "mask" : null, "next_state" : "parse_ipv4" }, - { - "type" : "hexstr", - "value" : "0x86dd", - "mask" : null, - "next_state" : "parse_ipv6" - }, { "value" : "default", "mask" : null, @@ -509,12 +470,6 @@ "mask" : null, "next_state" : "parse_ipv4" }, - { - "type" : "hexstr", - "value" : "0x86dd", - "mask" : null, - "next_state" : "parse_ipv6" - }, { "type" : "hexstr", "value" : "0x8847", @@ -568,12 +523,6 @@ "mask" : null, "next_state" : "parse_ipv4" }, - { - "type" : "hexstr", - "value" : "0x06", - "mask" : null, - "next_state" : "parse_ipv6" - }, { "value" : "default", "mask" : null, @@ -646,68 +595,9 @@ } ] }, - { - "name" : "parse_ipv6", - "id" : 6, - "parser_ops" : [ - { - "parameters" : [ - { - "type" : "regular", - "value" : "ipv6" - } - ], - "op" : "extract" - }, - { - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.ip_proto"] - }, - { - "type" : "field", - "value" : ["ipv6", "next_hdr"] - } - ], - "op" : "set" - } - ], - "transitions" : [ - { - "type" : "hexstr", - "value" : "0x06", - "mask" : null, - "next_state" : "parse_tcp" - }, - { - "type" : "hexstr", - "value" : "0x11", - "mask" : null, - "next_state" : "parse_udp" - }, - { - "type" : "hexstr", - "value" : "0x3a", - "mask" : null, - "next_state" : "parse_icmp" - }, - { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [ - { - "type" : "field", - "value" : ["ipv6", "next_hdr"] - } - ] - }, { "name" : "parse_arp", - "id" : 7, + "id" : 6, "parser_ops" : [ { "parameters" : [ @@ -730,7 +620,7 @@ }, { "name" : "parse_tcp", - "id" : 8, + "id" : 7, "parser_ops" : [ { "parameters" : [ @@ -779,7 +669,7 @@ }, { "name" : "parse_udp", - "id" : 9, + "id" : 8, "parser_ops" : [ { "parameters" : [ @@ -839,7 +729,7 @@ }, { "name" : "parse_icmp", - "id" : 10, + "id" : 9, "parser_ops" : [ { "parameters" : [ @@ -862,7 +752,7 @@ }, { "name" : "parse_gtpu", - "id" : 11, + "id" : 10, "parser_ops" : [ { "parameters" : [ @@ -917,7 +807,7 @@ }, { "name" : "parse_udp_inner", - "id" : 12, + "id" : 11, "parser_ops" : [ { "parameters" : [ @@ -973,12 +863,12 @@ "name" : "deparser", "id" : 0, "source_info" : { - "filename" : "./include/parser.p4", + "filename" : "include/parser.p4", "line" : 165, "column" : 8, "source_fragment" : "FabricDeparser" }, - "order" : ["packet_in", "ethernet", "vlan_tag", "mpls", "arp", "gtpu_ipv4", "gtpu_udp", "gtpu", "ipv4", "ipv6", "tcp", "udp", "icmp"] + "order" : ["packet_in", "ethernet", "vlan_tag", "mpls", "arp", "gtpu_ipv4", "gtpu_udp", "gtpu", "ipv4", "tcp", "udp", "icmp"] } ], "meter_arrays" : [], @@ -1025,53 +915,29 @@ "is_direct" : true, "binding" : "FabricIngress.forwarding.acl" }, - { - "name" : "FabricIngress.forwarding.multicast_v4_counter", - "id" : 7, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.multicast_v4" - }, - { - "name" : "FabricIngress.forwarding.unicast_v6_counter", - "id" : 8, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.unicast_v6" - }, - { - "name" : "FabricIngress.forwarding.multicast_v6_counter", - "id" : 9, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.multicast_v6" - }, { "name" : "FabricIngress.next.vlan_meta_counter", - "id" : 10, + "id" : 7, "is_direct" : true, "binding" : "FabricIngress.next.vlan_meta" }, { "name" : "FabricIngress.next.simple_counter", - "id" : 11, + "id" : 8, "is_direct" : true, "binding" : "FabricIngress.next.simple" }, { "name" : "FabricIngress.next.hashed_counter", - "id" : 12, + "id" : 9, "is_direct" : true, "binding" : "FabricIngress.next.hashed" }, - { - "name" : "FabricIngress.next.multicast_counter", - "id" : 13, - "is_direct" : true, - "binding" : "FabricIngress.next.multicast" - }, { "name" : "FabricIngress.port_counters_control.egress_port_counter", - "id" : 14, + "id" : 10, "source_info" : { - "filename" : "./include/control/port_counter.p4", + "filename" : "include/control/port_counter.p4", "line" : 23, "column" : 48, "source_fragment" : "egress_port_counter" @@ -1081,9 +947,9 @@ }, { "name" : "FabricIngress.port_counters_control.ingress_port_counter", - "id" : 15, + "id" : 11, "source_info" : { - "filename" : "./include/control/port_counter.p4", + "filename" : "include/control/port_counter.p4", "line" : 24, "column" : 48, "source_fragment" : "ingress_port_counter" @@ -1098,64 +964,7 @@ "name" : "calc", "id" : 0, "source_info" : { - "filename" : "./include/checksum.p4", - "line" : 56, - "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", "diffserv"] - }, - { - "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", + "filename" : "include/checksum.p4", "line" : 28, "column" : 8, "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." @@ -1209,10 +1018,10 @@ ] }, { - "name" : "calc_1", - "id" : 2, + "name" : "calc_0", + "id" : 1, "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 296, "column" : 8, "source_fragment" : "update_checksum(gtpu_ipv4.isValid(), ..." @@ -1264,6 +1073,63 @@ "value" : ["gtpu_ipv4", "dst_addr"] } ] + }, + { + "name" : "calc_1", + "id" : 2, + "source_info" : { + "filename" : "include/checksum.p4", + "line" : 56, + "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", "diffserv"] + }, + { + "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" : [], @@ -1323,57 +1189,33 @@ "primitives" : [] }, { - "name" : "NoAction", + "name" : "nop", "id" : 9, "runtime_data" : [], "primitives" : [] }, { - "name" : "NoAction", + "name" : "nop", "id" : 10, "runtime_data" : [], "primitives" : [] }, { - "name" : "NoAction", + "name" : "nop", "id" : 11, "runtime_data" : [], "primitives" : [] }, - { - "name" : "NoAction", - "id" : 12, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 13, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 14, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "nop", - "id" : 15, - "runtime_data" : [], - "primitives" : [] - }, { "name" : "FabricIngress.spgw_ingress.drop_now", - "id" : 16, + "id" : 12, "runtime_data" : [], "primitives" : [ { "op" : "drop", "parameters" : [], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 33, "column" : 8, "source_fragment" : "mark_to_drop()" @@ -1383,7 +1225,7 @@ "op" : "exit", "parameters" : [], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 34, "column" : 8, "source_fragment" : "exit" @@ -1393,7 +1235,7 @@ }, { "name" : "FabricIngress.spgw_ingress.gtpu_decap", - "id" : 17, + "id" : 13, "runtime_data" : [], "primitives" : [ { @@ -1405,7 +1247,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 38, "column" : 8, "source_fragment" : "gtpu_ipv4.setInvalid()" @@ -1420,7 +1262,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 39, "column" : 8, "source_fragment" : "gtpu_udp.setInvalid()" @@ -1435,7 +1277,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 40, "column" : 8, "source_fragment" : "gtpu.setInvalid()" @@ -1445,7 +1287,7 @@ }, { "name" : "FabricIngress.spgw_ingress.set_dl_sess_info", - "id" : 18, + "id" : 14, "runtime_data" : [ { "name" : "teid", @@ -1474,7 +1316,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 46, "column" : 8, "source_fragment" : "spgw_meta.teid = teid" @@ -1493,7 +1335,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 47, "column" : 8, "source_fragment" : "spgw_meta.s1u_enb_addr = s1u_enb_addr" @@ -1512,7 +1354,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 48, "column" : 8, "source_fragment" : "spgw_meta.s1u_sgw_addr = s1u_sgw_addr" @@ -1522,20 +1364,20 @@ }, { "name" : "FabricIngress.spgw_ingress.update_ue_cdr", - "id" : 19, + "id" : 15, "runtime_data" : [], "primitives" : [] }, { "name" : "FabricIngress.filtering.drop", - "id" : 20, + "id" : 16, "runtime_data" : [], "primitives" : [ { "op" : "drop", "parameters" : [], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 31, "column" : 8, "source_fragment" : "mark_to_drop()" @@ -1545,7 +1387,7 @@ }, { "name" : "FabricIngress.filtering.set_vlan", - "id" : 21, + "id" : 17, "runtime_data" : [ { "name" : "new_vlan_id", @@ -1566,7 +1408,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 35, "column" : 8, "source_fragment" : "hdr.vlan_tag.vlan_id = new_vlan_id" @@ -1576,7 +1418,7 @@ }, { "name" : "FabricIngress.filtering.push_internal_vlan", - "id" : 22, + "id" : 18, "runtime_data" : [ { "name" : "new_vlan_id", @@ -1593,7 +1435,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 41, "column" : 8, "source_fragment" : "hdr.vlan_tag.setValid()" @@ -1612,7 +1454,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 42, "column" : 8, "source_fragment" : "hdr.vlan_tag.cfi = 0" @@ -1631,7 +1473,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 43, "column" : 8, "source_fragment" : "hdr.vlan_tag.pri = 0" @@ -1650,7 +1492,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 44, "column" : 8, "source_fragment" : "hdr.vlan_tag.ether_type = hdr.ethernet.ether_type" @@ -1669,7 +1511,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 32, "column" : 31, "source_fragment" : "0x8100; ..." @@ -1688,7 +1530,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 35, "column" : 8, "source_fragment" : "hdr.vlan_tag.vlan_id = new_vlan_id; ..." @@ -1717,7 +1559,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 49, "column" : 8, "source_fragment" : "fabric_metadata.pop_vlan_when_packet_in = true" @@ -1727,7 +1569,7 @@ }, { "name" : "FabricIngress.filtering.set_forwarding_type", - "id" : 23, + "id" : 19, "runtime_data" : [ { "name" : "fwd_type", @@ -1748,7 +1590,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 53, "column" : 8, "source_fragment" : "fabric_metadata.fwd_type = fwd_type" @@ -1758,14 +1600,14 @@ }, { "name" : "FabricIngress.forwarding.drop", - "id" : 24, + "id" : 20, "runtime_data" : [], "primitives" : [ { "op" : "drop", "parameters" : [], "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 36, "column" : 8, "source_fragment" : "mark_to_drop()" @@ -1775,7 +1617,7 @@ }, { "name" : "FabricIngress.forwarding.set_next_id", - "id" : 25, + "id" : 21, "runtime_data" : [ { "name" : "next_id", @@ -1796,7 +1638,7 @@ } ], "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 40, "column" : 8, "source_fragment" : "fabric_metadata.next_id = next_id" @@ -1806,7 +1648,7 @@ }, { "name" : "FabricIngress.forwarding.set_next_id", - "id" : 26, + "id" : 22, "runtime_data" : [ { "name" : "next_id", @@ -1827,7 +1669,7 @@ } ], "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 40, "column" : 8, "source_fragment" : "fabric_metadata.next_id = next_id" @@ -1837,7 +1679,7 @@ }, { "name" : "FabricIngress.forwarding.set_next_id", - "id" : 27, + "id" : 23, "runtime_data" : [ { "name" : "next_id", @@ -1858,100 +1700,7 @@ } ], "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 40, - "column" : 8, - "source_fragment" : "fabric_metadata.next_id = next_id" - } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id", - "id" : 28, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.next_id"] - }, - { - "type" : "runtime_data", - "value" : 0 - } - ], - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 40, - "column" : 8, - "source_fragment" : "fabric_metadata.next_id = next_id" - } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id", - "id" : 29, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.next_id"] - }, - { - "type" : "runtime_data", - "value" : 0 - } - ], - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 40, - "column" : 8, - "source_fragment" : "fabric_metadata.next_id = next_id" - } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id", - "id" : 30, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.next_id"] - }, - { - "type" : "runtime_data", - "value" : 0 - } - ], - "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 40, "column" : 8, "source_fragment" : "fabric_metadata.next_id = next_id" @@ -1961,7 +1710,7 @@ }, { "name" : "FabricIngress.forwarding.pop_mpls_and_next", - "id" : 31, + "id" : 24, "runtime_data" : [ { "name" : "next_id", @@ -1978,7 +1727,7 @@ } ], "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 44, "column" : 8, "source_fragment" : "hdr.mpls.setInvalid()" @@ -1997,7 +1746,7 @@ } ], "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 45, "column" : 8, "source_fragment" : "fabric_metadata.next_id = next_id" @@ -2007,7 +1756,7 @@ }, { "name" : "FabricIngress.forwarding.duplicate_to_controller", - "id" : 32, + "id" : 25, "runtime_data" : [], "primitives" : [ { @@ -2023,7 +1772,7 @@ } ], "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 49, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = 255" @@ -2033,7 +1782,7 @@ }, { "name" : "FabricIngress.next.output", - "id" : 33, + "id" : 26, "runtime_data" : [ { "name" : "port_num", @@ -2054,7 +1803,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num" @@ -2064,7 +1813,7 @@ }, { "name" : "FabricIngress.next.set_vlan", - "id" : 34, + "id" : 27, "runtime_data" : [ { "name" : "new_vlan_id", @@ -2085,7 +1834,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 37, "column" : 8, "source_fragment" : "hdr.vlan_tag.vlan_id = new_vlan_id" @@ -2095,7 +1844,7 @@ }, { "name" : "FabricIngress.next.set_vlan_output", - "id" : 35, + "id" : 28, "runtime_data" : [ { "name" : "new_vlan_id", @@ -2120,7 +1869,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 46, "column" : 8, "source_fragment" : "hdr.vlan_tag.vlan_id = new_vlan_id" @@ -2139,7 +1888,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -2149,7 +1898,7 @@ }, { "name" : "FabricIngress.next.l3_routing", - "id" : 36, + "id" : 29, "runtime_data" : [ { "name" : "port_num", @@ -2178,7 +1927,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 51, "column" : 8, "source_fragment" : "hdr.ethernet.src_addr = smac; ..." @@ -2197,7 +1946,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 55, "column" : 8, "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." @@ -2216,7 +1965,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -2226,7 +1975,7 @@ }, { "name" : "FabricIngress.next.l3_routing", - "id" : 37, + "id" : 30, "runtime_data" : [ { "name" : "port_num", @@ -2255,7 +2004,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 51, "column" : 8, "source_fragment" : "hdr.ethernet.src_addr = smac; ..." @@ -2274,7 +2023,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 55, "column" : 8, "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." @@ -2293,7 +2042,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -2303,7 +2052,7 @@ }, { "name" : "FabricIngress.next.l3_routing_vlan", - "id" : 38, + "id" : 31, "runtime_data" : [ { "name" : "port_num", @@ -2336,7 +2085,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 51, "column" : 8, "source_fragment" : "hdr.ethernet.src_addr = smac; ..." @@ -2355,7 +2104,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 55, "column" : 8, "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." @@ -2374,7 +2123,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 46, "column" : 8, "source_fragment" : "hdr.vlan_tag.vlan_id = new_vlan_id; ..." @@ -2393,7 +2142,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -2403,7 +2152,7 @@ }, { "name" : "FabricIngress.next.mpls_routing_v4", - "id" : 39, + "id" : 32, "runtime_data" : [ { "name" : "port_num", @@ -2436,7 +2185,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 51, "column" : 8, "source_fragment" : "hdr.ethernet.src_addr = smac; ..." @@ -2455,7 +2204,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 55, "column" : 8, "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." @@ -2474,7 +2223,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -2489,7 +2238,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 72, "column" : 8, "source_fragment" : "hdr.mpls.setValid()" @@ -2508,7 +2257,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 33, "column" : 31, "source_fragment" : "0x8847; ..." @@ -2527,7 +2276,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 74, "column" : 8, "source_fragment" : "hdr.mpls.label = label; ..." @@ -2546,7 +2295,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 75, "column" : 8, "source_fragment" : "hdr.mpls.tc = tc; ..." @@ -2565,7 +2314,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 76, "column" : 8, "source_fragment" : "hdr.mpls.bos = 1w1" @@ -2584,7 +2333,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 67, "column" : 32, "source_fragment" : "64; ..." @@ -2594,7 +2343,7 @@ }, { "name" : "FabricIngress.next.mpls_routing_v4", - "id" : 40, + "id" : 33, "runtime_data" : [ { "name" : "port_num", @@ -2627,7 +2376,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 51, "column" : 8, "source_fragment" : "hdr.ethernet.src_addr = smac; ..." @@ -2646,7 +2395,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 55, "column" : 8, "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." @@ -2665,7 +2414,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -2680,7 +2429,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 72, "column" : 8, "source_fragment" : "hdr.mpls.setValid()" @@ -2699,7 +2448,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 33, "column" : 31, "source_fragment" : "0x8847; ..." @@ -2718,7 +2467,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 74, "column" : 8, "source_fragment" : "hdr.mpls.label = label; ..." @@ -2737,7 +2486,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 75, "column" : 8, "source_fragment" : "hdr.mpls.tc = tc; ..." @@ -2756,7 +2505,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 76, "column" : 8, "source_fragment" : "hdr.mpls.bos = 1w1" @@ -2775,7 +2524,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 67, "column" : 32, "source_fragment" : "64; ..." @@ -2785,7 +2534,7 @@ }, { "name" : "FabricIngress.next.mpls_routing_v6", - "id" : 41, + "id" : 34, "runtime_data" : [ { "name" : "port_num", @@ -2818,7 +2567,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 51, "column" : 8, "source_fragment" : "hdr.ethernet.src_addr = smac; ..." @@ -2837,7 +2586,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 55, "column" : 8, "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." @@ -2856,7 +2605,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -2871,7 +2620,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 72, "column" : 8, "source_fragment" : "hdr.mpls.setValid()" @@ -2890,7 +2639,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 33, "column" : 31, "source_fragment" : "0x8847; ..." @@ -2909,7 +2658,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 74, "column" : 8, "source_fragment" : "hdr.mpls.label = label; ..." @@ -2928,7 +2677,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 75, "column" : 8, "source_fragment" : "hdr.mpls.tc = tc; ..." @@ -2947,7 +2696,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 76, "column" : 8, "source_fragment" : "hdr.mpls.bos = 1w1" @@ -2966,7 +2715,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 67, "column" : 32, "source_fragment" : "64; ..." @@ -2974,63 +2723,9 @@ } ] }, - { - "name" : "FabricIngress.next.set_mcast_group", - "id" : 42, - "runtime_data" : [ - { - "name" : "gid", - "bitwidth" : 16 - }, - { - "name" : "smac", - "bitwidth" : 48 - } - ], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["standard_metadata", "mcast_grp"] - }, - { - "type" : "runtime_data", - "value" : 0 - } - ], - "source_info" : { - "filename" : "./include/control/next.p4", - "line" : 149, - "column" : 8, - "source_fragment" : "standard_metadata.mcast_grp = gid" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["ethernet", "src_addr"] - }, - { - "type" : "runtime_data", - "value" : 1 - } - ], - "source_info" : { - "filename" : "./include/control/next.p4", - "line" : 51, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." - } - } - ] - }, { "name" : "act", - "id" : 43, + "id" : 35, "runtime_data" : [], "primitives" : [ { @@ -3046,7 +2741,7 @@ } ], "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 26, "column" : 12, "source_fragment" : "standard_metadata.egress_spec = hdr.packet_out.egress_port" @@ -3061,7 +2756,7 @@ } ], "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 27, "column" : 12, "source_fragment" : "hdr.packet_out.setInvalid()" @@ -3071,7 +2766,7 @@ }, { "name" : "act_0", - "id" : 44, + "id" : 36, "runtime_data" : [], "primitives" : [ { @@ -3101,7 +2796,7 @@ }, { "name" : "act_1", - "id" : 45, + "id" : 37, "runtime_data" : [], "primitives" : [ { @@ -3131,7 +2826,7 @@ }, { "name" : "act_2", - "id" : 46, + "id" : 38, "runtime_data" : [], "primitives" : [ { @@ -3147,7 +2842,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 152, "column" : 12, "source_fragment" : "spgw_meta.s1u_enb_addr = ipv4.src_addr" @@ -3166,7 +2861,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 153, "column" : 12, "source_fragment" : "spgw_meta.s1u_sgw_addr = ipv4.dst_addr" @@ -3185,7 +2880,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 154, "column" : 17, "source_fragment" : "= gtpu_ipv4; ..." @@ -3204,7 +2899,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 155, "column" : 16, "source_fragment" : "= gtpu_udp; ..." @@ -3214,7 +2909,7 @@ }, { "name" : "act_3", - "id" : 47, + "id" : 39, "runtime_data" : [], "primitives" : [ { @@ -3240,7 +2935,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 159, "column" : 16, "source_fragment" : "spgw_meta.do_spgw = true" @@ -3259,7 +2954,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 88, "column" : 31, "source_fragment" : "1w0; ..." @@ -3269,7 +2964,7 @@ }, { "name" : "act_4", - "id" : 48, + "id" : 40, "runtime_data" : [], "primitives" : [ { @@ -3299,7 +2994,7 @@ }, { "name" : "act_5", - "id" : 49, + "id" : 41, "runtime_data" : [], "primitives" : [ { @@ -3329,7 +3024,7 @@ }, { "name" : "act_6", - "id" : 50, + "id" : 42, "runtime_data" : [], "primitives" : [ { @@ -3355,7 +3050,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 163, "column" : 12, "source_fragment" : "spgw_meta.do_spgw = true" @@ -3374,7 +3069,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 89, "column" : 33, "source_fragment" : "1w1; ..." @@ -3384,7 +3079,7 @@ }, { "name" : "act_7", - "id" : 51, + "id" : 43, "runtime_data" : [], "primitives" : [ { @@ -3433,7 +3128,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 146, "column" : 8, "source_fragment" : "spgw_meta.do_spgw = false" @@ -3443,7 +3138,7 @@ }, { "name" : "act_8", - "id" : 52, + "id" : 44, "runtime_data" : [], "primitives" : [ { @@ -3469,7 +3164,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 169, "column" : 12, "source_fragment" : "return" @@ -3479,7 +3174,7 @@ }, { "name" : "act_9", - "id" : 53, + "id" : 45, "runtime_data" : [], "primitives" : [ { @@ -3509,7 +3204,7 @@ }, { "name" : "act_10", - "id" : 54, + "id" : 46, "runtime_data" : [], "primitives" : [ { @@ -3539,7 +3234,7 @@ }, { "name" : "act_11", - "id" : 55, + "id" : 47, "runtime_data" : [], "primitives" : [ { @@ -3555,7 +3250,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 199, "column" : 8, "source_fragment" : "spgw_meta.ipv4_len = ipv4.total_len" @@ -3565,7 +3260,7 @@ }, { "name" : "act_12", - "id" : 56, + "id" : 48, "runtime_data" : [], "primitives" : [ { @@ -3581,7 +3276,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 35, "column" : 31, "source_fragment" : "0x0800; ..." @@ -3600,7 +3295,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 35, "column" : 31, "source_fragment" : "0x0800; ..." @@ -3610,7 +3305,7 @@ }, { "name" : "act_13", - "id" : 57, + "id" : 49, "runtime_data" : [], "primitives" : [ { @@ -3640,7 +3335,7 @@ }, { "name" : "act_14", - "id" : 58, + "id" : 50, "runtime_data" : [], "primitives" : [ { @@ -3670,7 +3365,7 @@ }, { "name" : "act_15", - "id" : 59, + "id" : 51, "runtime_data" : [], "primitives" : [ { @@ -3709,7 +3404,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 171, "column" : 20, "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" @@ -3719,56 +3414,7 @@ }, { "name" : "act_16", - "id" : 60, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["ipv6", "hop_limit"] - }, - { - "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" - } - } - } - } - ], - "source_info" : { - "filename" : "./include/control/next.p4", - "line" : 175, - "column" : 20, - "source_fragment" : "hdr.ipv6.hop_limit = hdr.ipv6.hop_limit - 1" - } - } - ] - }, - { - "name" : "act_17", - "id" : 61, + "id" : 52, "runtime_data" : [], "primitives" : [ { @@ -3795,7 +3441,13 @@ } } } - ] + ], + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 28, + "column" : 38, + "source_fragment" : "(bit<32>)standard_metadata.egress_spec" + } }, { "op" : "count", @@ -3810,7 +3462,7 @@ } ], "source_info" : { - "filename" : "./include/control/port_counter.p4", + "filename" : "include/control/port_counter.p4", "line" : 28, "column" : 12, "source_fragment" : "egress_port_counter.count((bit<32>)standard_metadata.egress_spec)" @@ -3819,8 +3471,8 @@ ] }, { - "name" : "act_18", - "id" : 62, + "name" : "act_17", + "id" : 53, "runtime_data" : [], "primitives" : [ { @@ -3847,7 +3499,13 @@ } } } - ] + ], + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 31, + "column" : 39, + "source_fragment" : "(bit<32>)standard_metadata.ingress_port" + } }, { "op" : "count", @@ -3862,7 +3520,7 @@ } ], "source_info" : { - "filename" : "./include/control/port_counter.p4", + "filename" : "include/control/port_counter.p4", "line" : 31, "column" : 12, "source_fragment" : "ingress_port_counter.count((bit<32>)standard_metadata.ingress_port)" @@ -3872,13 +3530,13 @@ }, { "name" : "nop", - "id" : 63, + "id" : 54, "runtime_data" : [], "primitives" : [] }, { "name" : "FabricEgress.spgw_egress.gtpu_encap", - "id" : 64, + "id" : 55, "runtime_data" : [], "primitives" : [ { @@ -3890,7 +3548,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 214, "column" : 8, "source_fragment" : "gtpu_ipv4.setValid()" @@ -3909,7 +3567,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 215, "column" : 8, "source_fragment" : "gtpu_ipv4.version = 4" @@ -3928,7 +3586,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 54, "column" : 28, "source_fragment" : "5; ..." @@ -3947,7 +3605,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 217, "column" : 8, "source_fragment" : "gtpu_ipv4.diffserv = 0" @@ -3989,7 +3647,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 218, "column" : 8, "source_fragment" : "gtpu_ipv4.total_len = spgw_meta.ipv4_len ..." @@ -4008,7 +3666,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 220, "column" : 8, "source_fragment" : "gtpu_ipv4.identification = 0x1513" @@ -4027,7 +3685,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 221, "column" : 8, "source_fragment" : "gtpu_ipv4.flags = 0" @@ -4046,7 +3704,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 222, "column" : 8, "source_fragment" : "gtpu_ipv4.frag_offset = 0" @@ -4065,7 +3723,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 78, "column" : 32, "source_fragment" : "64; ..." @@ -4084,7 +3742,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 51, "column" : 25, "source_fragment" : "17; ..." @@ -4103,7 +3761,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 225, "column" : 8, "source_fragment" : "gtpu_ipv4.dst_addr = spgw_meta.s1u_enb_addr" @@ -4122,7 +3780,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 226, "column" : 8, "source_fragment" : "gtpu_ipv4.src_addr = spgw_meta.s1u_sgw_addr" @@ -4141,7 +3799,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 227, "column" : 8, "source_fragment" : "gtpu_ipv4.hdr_checksum = 0" @@ -4156,7 +3814,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 229, "column" : 8, "source_fragment" : "gtpu_udp.setValid()" @@ -4175,7 +3833,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 230, "column" : 8, "source_fragment" : "gtpu_udp.src_port = 2152" @@ -4194,7 +3852,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 231, "column" : 8, "source_fragment" : "gtpu_udp.dst_port = 2152" @@ -4236,7 +3894,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 232, "column" : 8, "source_fragment" : "gtpu_udp.len = spgw_meta.ipv4_len ..." @@ -4255,7 +3913,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 234, "column" : 8, "source_fragment" : "gtpu_udp.checksum = 0" @@ -4270,7 +3928,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 236, "column" : 8, "source_fragment" : "gtpu.setValid()" @@ -4289,7 +3947,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 237, "column" : 8, "source_fragment" : "gtpu.version = 0x01" @@ -4308,7 +3966,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 238, "column" : 8, "source_fragment" : "gtpu.pt = 0x01" @@ -4327,7 +3985,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 239, "column" : 8, "source_fragment" : "gtpu.spare = 0" @@ -4346,7 +4004,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 240, "column" : 8, "source_fragment" : "gtpu.ex_flag = 0" @@ -4365,7 +4023,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 241, "column" : 8, "source_fragment" : "gtpu.seq_flag = 0" @@ -4384,7 +4042,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 242, "column" : 8, "source_fragment" : "gtpu.npdu_flag = 0" @@ -4403,7 +4061,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 243, "column" : 8, "source_fragment" : "gtpu.msgtype = 0xff" @@ -4422,7 +4080,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 244, "column" : 8, "source_fragment" : "gtpu.msglen = spgw_meta.ipv4_len" @@ -4441,7 +4099,7 @@ } ], "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 245, "column" : 8, "source_fragment" : "gtpu.teid = spgw_meta.teid" @@ -4451,7 +4109,7 @@ }, { "name" : "FabricEgress.pkt_io_egress.pop_vlan", - "id" : 65, + "id" : 56, "runtime_data" : [], "primitives" : [ { @@ -4467,7 +4125,7 @@ } ], "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 38, "column" : 8, "source_fragment" : "hdr.ethernet.ether_type = hdr.vlan_tag.ether_type" @@ -4482,7 +4140,7 @@ } ], "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 39, "column" : 8, "source_fragment" : "hdr.vlan_tag.setInvalid()" @@ -4492,7 +4150,7 @@ }, { "name" : "FabricEgress.egress_next.pop_vlan", - "id" : 66, + "id" : 57, "runtime_data" : [], "primitives" : [ { @@ -4508,7 +4166,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 193, "column" : 8, "source_fragment" : "hdr.ethernet.ether_type = hdr.vlan_tag.ether_type" @@ -4523,7 +4181,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 194, "column" : 8, "source_fragment" : "hdr.vlan_tag.setInvalid()" @@ -4532,8 +4190,8 @@ ] }, { - "name" : "act_19", - "id" : 67, + "name" : "act_18", + "id" : 58, "runtime_data" : [], "primitives" : [ { @@ -4545,7 +4203,7 @@ } ], "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 46, "column" : 12, "source_fragment" : "hdr.packet_in.setValid()" @@ -4564,7 +4222,7 @@ } ], "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 47, "column" : 12, "source_fragment" : "hdr.packet_in.ingress_port = standard_metadata.ingress_port" @@ -4573,8 +4231,8 @@ ] }, { - "name" : "act_20", - "id" : 68, + "name" : "act_19", + "id" : 59, "runtime_data" : [], "primitives" : [ { @@ -4647,14 +4305,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [43], + "action_ids" : [35], "actions" : ["act"], "base_default_next" : null, "next_tables" : { "act" : null }, "default_entry" : { - "action_id" : 43, + "action_id" : 35, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4670,14 +4328,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [51], + "action_ids" : [43], "actions" : ["act_7"], "base_default_next" : "node_5", "next_tables" : { "act_7" : "node_5" }, "default_entry" : { - "action_id" : 51, + "action_id" : 43, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4693,14 +4351,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [46], + "action_ids" : [38], "actions" : ["act_2"], "base_default_next" : "FabricIngress.spgw_ingress.s1u_filter_table", "next_tables" : { "act_2" : "FabricIngress.spgw_ingress.s1u_filter_table" }, "default_entry" : { - "action_id" : 46, + "action_id" : 38, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4710,7 +4368,7 @@ "name" : "FabricIngress.spgw_ingress.s1u_filter_table", "id" : 3, "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 65, "column" : 10, "source_fragment" : "s1u_filter_table" @@ -4753,14 +4411,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [44], + "action_ids" : [36], "actions" : ["act_0"], "base_default_next" : "node_10", "next_tables" : { "act_0" : "node_10" }, "default_entry" : { - "action_id" : 44, + "action_id" : 36, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4776,14 +4434,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [45], + "action_ids" : [37], "actions" : ["act_1"], "base_default_next" : "node_10", "next_tables" : { "act_1" : "node_10" }, "default_entry" : { - "action_id" : 45, + "action_id" : 37, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4799,14 +4457,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [47], + "action_ids" : [39], "actions" : ["act_3"], "base_default_next" : "node_17", "next_tables" : { "act_3" : "node_17" }, "default_entry" : { - "action_id" : 47, + "action_id" : 39, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4816,7 +4474,7 @@ "name" : "FabricIngress.spgw_ingress.ue_filter_table", "id" : 7, "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 55, "column" : 10, "source_fragment" : "ue_filter_table" @@ -4859,14 +4517,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [48], + "action_ids" : [40], "actions" : ["act_4"], "base_default_next" : "node_15", "next_tables" : { "act_4" : "node_15" }, "default_entry" : { - "action_id" : 48, + "action_id" : 40, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4882,14 +4540,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [49], + "action_ids" : [41], "actions" : ["act_5"], "base_default_next" : "node_15", "next_tables" : { "act_5" : "node_15" }, "default_entry" : { - "action_id" : 49, + "action_id" : 41, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4905,14 +4563,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [50], + "action_ids" : [42], "actions" : ["act_6"], "base_default_next" : "node_17", "next_tables" : { "act_6" : "node_17" }, "default_entry" : { - "action_id" : 50, + "action_id" : 42, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4928,14 +4586,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [52], + "action_ids" : [44], "actions" : ["act_8"], "base_default_next" : "node_19", "next_tables" : { "act_8" : "node_19" }, "default_entry" : { - "action_id" : 52, + "action_id" : 44, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4951,14 +4609,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [17], + "action_ids" : [13], "actions" : ["FabricIngress.spgw_ingress.gtpu_decap"], "base_default_next" : "node_22", "next_tables" : { "FabricIngress.spgw_ingress.gtpu_decap" : "node_22" }, "default_entry" : { - "action_id" : 17, + "action_id" : 13, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4968,7 +4626,7 @@ "name" : "FabricIngress.spgw_ingress.dl_sess_lookup", "id" : 13, "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 124, "column" : 10, "source_fragment" : "dl_sess_lookup" @@ -4987,7 +4645,7 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [18, 2], + "action_ids" : [14, 2], "actions" : ["FabricIngress.spgw_ingress.set_dl_sess_info", "NoAction"], "base_default_next" : null, "next_tables" : { @@ -5011,14 +4669,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [53], + "action_ids" : [45], "actions" : ["act_9"], "base_default_next" : "node_26", "next_tables" : { "act_9" : "node_26" }, "default_entry" : { - "action_id" : 53, + "action_id" : 45, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5034,14 +4692,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [54], + "action_ids" : [46], "actions" : ["act_10"], "base_default_next" : "node_26", "next_tables" : { "act_10" : "node_26" }, "default_entry" : { - "action_id" : 54, + "action_id" : 46, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5057,14 +4715,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [16], + "action_ids" : [12], "actions" : ["FabricIngress.spgw_ingress.drop_now"], "base_default_next" : "FabricIngress.spgw_ingress.ue_cdr_table", "next_tables" : { "FabricIngress.spgw_ingress.drop_now" : "FabricIngress.spgw_ingress.ue_cdr_table" }, "default_entry" : { - "action_id" : 16, + "action_id" : 12, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5074,7 +4732,7 @@ "name" : "FabricIngress.spgw_ingress.ue_cdr_table", "id" : 17, "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 134, "column" : 10, "source_fragment" : "ue_cdr_table" @@ -5093,7 +4751,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [19, 3], + "action_ids" : [15, 3], "actions" : ["FabricIngress.spgw_ingress.update_ue_cdr", "NoAction"], "base_default_next" : "tbl_act_11", "next_tables" : { @@ -5117,14 +4775,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [55], + "action_ids" : [47], "actions" : ["act_11"], "base_default_next" : "FabricIngress.filtering.ingress_port_vlan", "next_tables" : { "act_11" : "FabricIngress.filtering.ingress_port_vlan" }, "default_entry" : { - "action_id" : 55, + "action_id" : 47, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5134,7 +4792,7 @@ "name" : "FabricIngress.filtering.ingress_port_vlan", "id" : 19, "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 57, "column" : 10, "source_fragment" : "ingress_port_vlan" @@ -5165,7 +4823,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [22, 21, 13, 20], + "action_ids" : [18, 17, 9, 16], "actions" : ["FabricIngress.filtering.push_internal_vlan", "FabricIngress.filtering.set_vlan", "nop", "FabricIngress.filtering.drop"], "base_default_next" : "FabricIngress.filtering.fwd_classifier", "next_tables" : { @@ -5175,7 +4833,7 @@ "FabricIngress.filtering.drop" : "FabricIngress.filtering.fwd_classifier" }, "default_entry" : { - "action_id" : 13, + "action_id" : 9, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5185,7 +4843,7 @@ "name" : "FabricIngress.filtering.fwd_classifier", "id" : 20, "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 76, "column" : 10, "source_fragment" : "fwd_classifier" @@ -5216,14 +4874,14 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [23], + "action_ids" : [19], "actions" : ["FabricIngress.filtering.set_forwarding_type"], "base_default_next" : "node_32", "next_tables" : { "FabricIngress.filtering.set_forwarding_type" : "node_32" }, "default_entry" : { - "action_id" : 23, + "action_id" : 19, "action_const" : true, "action_data" : ["0x0"], "action_entry_const" : true @@ -5233,7 +4891,7 @@ "name" : "FabricIngress.forwarding.bridging", "id" : 21, "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 52, "column" : 10, "source_fragment" : "bridging" @@ -5258,7 +4916,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [25, 4], + "action_ids" : [21, 4], "actions" : ["FabricIngress.forwarding.set_next_id", "NoAction"], "base_default_next" : "FabricIngress.forwarding.acl", "next_tables" : { @@ -5276,7 +4934,7 @@ "name" : "FabricIngress.forwarding.mpls", "id" : 22, "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 64, "column" : 10, "source_fragment" : "mpls" @@ -5295,7 +4953,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [31, 5], + "action_ids" : [24, 5], "actions" : ["FabricIngress.forwarding.pop_mpls_and_next", "NoAction"], "base_default_next" : "tbl_act_12", "next_tables" : { @@ -5319,14 +4977,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [56], + "action_ids" : [48], "actions" : ["act_12"], "base_default_next" : "FabricIngress.forwarding.acl", "next_tables" : { "act_12" : "FabricIngress.forwarding.acl" }, "default_entry" : { - "action_id" : 56, + "action_id" : 48, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5336,7 +4994,7 @@ "name" : "FabricIngress.forwarding.unicast_v4", "id" : 24, "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 75, "column" : 10, "source_fragment" : "unicast_v4" @@ -5355,7 +5013,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [26, 6], + "action_ids" : [22, 6], "actions" : ["FabricIngress.forwarding.set_next_id", "NoAction"], "base_default_next" : "FabricIngress.forwarding.acl", "next_tables" : { @@ -5370,133 +5028,10 @@ } }, { - "name" : "FabricIngress.forwarding.multicast_v4", + "name" : "FabricIngress.forwarding.acl", "id" : 25, "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 89, - "column" : 10, - "source_fragment" : "multicast_v4" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "hdr.vlan_tag.vlan_id", - "target" : ["vlan_tag", "vlan_id"], - "mask" : null - }, - { - "match_type" : "lpm", - "name" : "hdr.ipv4.dst_addr", - "target" : ["ipv4", "dst_addr"], - "mask" : null - } - ], - "match_type" : "lpm", - "type" : "simple", - "max_size" : 1024, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [27, 7], - "actions" : ["FabricIngress.forwarding.set_next_id", "NoAction"], - "base_default_next" : "FabricIngress.forwarding.acl", - "next_tables" : { - "FabricIngress.forwarding.set_next_id" : "FabricIngress.forwarding.acl", - "NoAction" : "FabricIngress.forwarding.acl" - }, - "default_entry" : { - "action_id" : 7, - "action_const" : false, - "action_data" : [], - "action_entry_const" : false - } - }, - { - "name" : "FabricIngress.forwarding.unicast_v6", - "id" : 26, - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 105, - "column" : 10, - "source_fragment" : "unicast_v6" - }, - "key" : [ - { - "match_type" : "lpm", - "name" : "hdr.ipv6.dst_addr", - "target" : ["ipv6", "dst_addr"], - "mask" : null - } - ], - "match_type" : "lpm", - "type" : "simple", - "max_size" : 1024, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [28, 8], - "actions" : ["FabricIngress.forwarding.set_next_id", "NoAction"], - "base_default_next" : "FabricIngress.forwarding.acl", - "next_tables" : { - "FabricIngress.forwarding.set_next_id" : "FabricIngress.forwarding.acl", - "NoAction" : "FabricIngress.forwarding.acl" - }, - "default_entry" : { - "action_id" : 8, - "action_const" : false, - "action_data" : [], - "action_entry_const" : false - } - }, - { - "name" : "FabricIngress.forwarding.multicast_v6", - "id" : 27, - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 119, - "column" : 10, - "source_fragment" : "multicast_v6" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "hdr.vlan_tag.vlan_id", - "target" : ["vlan_tag", "vlan_id"], - "mask" : null - }, - { - "match_type" : "lpm", - "name" : "hdr.ipv6.dst_addr", - "target" : ["ipv6", "dst_addr"], - "mask" : null - } - ], - "match_type" : "lpm", - "type" : "simple", - "max_size" : 1024, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [29, 9], - "actions" : ["FabricIngress.forwarding.set_next_id", "NoAction"], - "base_default_next" : "FabricIngress.forwarding.acl", - "next_tables" : { - "FabricIngress.forwarding.set_next_id" : "FabricIngress.forwarding.acl", - "NoAction" : "FabricIngress.forwarding.acl" - }, - "default_entry" : { - "action_id" : 9, - "action_const" : false, - "action_data" : [], - "action_entry_const" : false - } - }, - { - "name" : "FabricIngress.forwarding.acl", - "id" : 28, - "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 133, "column" : 10, "source_fragment" : "acl" @@ -5581,7 +5116,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [30, 32, 24, 14], + "action_ids" : [23, 25, 20, 10], "actions" : ["FabricIngress.forwarding.set_next_id", "FabricIngress.forwarding.duplicate_to_controller", "FabricIngress.forwarding.drop", "nop"], "base_default_next" : "FabricIngress.next.vlan_meta", "next_tables" : { @@ -5591,7 +5126,7 @@ "nop" : "FabricIngress.next.vlan_meta" }, "default_entry" : { - "action_id" : 14, + "action_id" : 10, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5599,9 +5134,9 @@ }, { "name" : "FabricIngress.next.vlan_meta", - "id" : 29, + "id" : 26, "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 96, "column" : 10, "source_fragment" : "vlan_meta" @@ -5620,7 +5155,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [34, 15], + "action_ids" : [27, 11], "actions" : ["FabricIngress.next.set_vlan", "nop"], "base_default_next" : "FabricIngress.next.simple", "next_tables" : { @@ -5628,7 +5163,7 @@ "nop" : "FabricIngress.next.simple" }, "default_entry" : { - "action_id" : 15, + "action_id" : 11, "action_const" : false, "action_data" : [], "action_entry_const" : false @@ -5636,9 +5171,9 @@ }, { "name" : "FabricIngress.next.simple", - "id" : 30, + "id" : 27, "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 109, "column" : 10, "source_fragment" : "simple" @@ -5657,7 +5192,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [33, 35, 36, 39, 38, 10], + "action_ids" : [26, 28, 29, 32, 31, 7], "actions" : ["FabricIngress.next.output", "FabricIngress.next.set_vlan_output", "FabricIngress.next.l3_routing", "FabricIngress.next.mpls_routing_v4", "FabricIngress.next.l3_routing_vlan", "NoAction"], "base_default_next" : null, "next_tables" : { @@ -5665,7 +5200,7 @@ "__MISS__" : "tbl_act_14" }, "default_entry" : { - "action_id" : 10, + "action_id" : 7, "action_const" : false, "action_data" : [], "action_entry_const" : false @@ -5673,7 +5208,7 @@ }, { "name" : "tbl_act_13", - "id" : 31, + "id" : 28, "key" : [], "match_type" : "exact", "type" : "simple", @@ -5681,14 +5216,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [57], + "action_ids" : [49], "actions" : ["act_13"], - "base_default_next" : "node_50", + "base_default_next" : "node_44", "next_tables" : { - "act_13" : "node_50" + "act_13" : "node_44" }, "default_entry" : { - "action_id" : 57, + "action_id" : 49, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5696,7 +5231,7 @@ }, { "name" : "tbl_act_14", - "id" : 32, + "id" : 29, "key" : [], "match_type" : "exact", "type" : "simple", @@ -5704,14 +5239,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [58], + "action_ids" : [50], "actions" : ["act_14"], - "base_default_next" : "node_50", + "base_default_next" : "node_44", "next_tables" : { - "act_14" : "node_50" + "act_14" : "node_44" }, "default_entry" : { - "action_id" : 58, + "action_id" : 50, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5719,7 +5254,7 @@ }, { "name" : "tbl_act_15", - "id" : 33, + "id" : 30, "key" : [], "match_type" : "exact", "type" : "simple", @@ -5727,37 +5262,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [59], + "action_ids" : [51], "actions" : ["act_15"], "base_default_next" : "FabricIngress.next.hashed", "next_tables" : { "act_15" : "FabricIngress.next.hashed" }, "default_entry" : { - "action_id" : 59, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_16", - "id" : 34, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [60], - "actions" : ["act_16"], - "base_default_next" : "FabricIngress.next.hashed", - "next_tables" : { - "act_16" : "FabricIngress.next.hashed" - }, - "default_entry" : { - "action_id" : 60, + "action_id" : 51, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5765,9 +5277,9 @@ }, { "name" : "FabricIngress.next.hashed", - "id" : 35, + "id" : 31, "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 124, "column" : 10, "source_fragment" : "hashed" @@ -5787,56 +5299,19 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [37, 40, 41, 11], + "action_ids" : [30, 33, 34, 8], "actions" : ["FabricIngress.next.l3_routing", "FabricIngress.next.mpls_routing_v4", "FabricIngress.next.mpls_routing_v6", "NoAction"], - "base_default_next" : "FabricIngress.next.multicast", + "base_default_next" : "node_49", "next_tables" : { - "FabricIngress.next.l3_routing" : "FabricIngress.next.multicast", - "FabricIngress.next.mpls_routing_v4" : "FabricIngress.next.multicast", - "FabricIngress.next.mpls_routing_v6" : "FabricIngress.next.multicast", - "NoAction" : "FabricIngress.next.multicast" + "FabricIngress.next.l3_routing" : "node_49", + "FabricIngress.next.mpls_routing_v4" : "node_49", + "FabricIngress.next.mpls_routing_v6" : "node_49", + "NoAction" : "node_49" } }, { - "name" : "FabricIngress.next.multicast", - "id" : 36, - "source_info" : { - "filename" : "./include/control/next.p4", - "line" : 155, - "column" : 10, - "source_fragment" : "multicast" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "fabric_metadata.next_id", - "target" : ["scalars", "fabric_metadata_t.next_id"], - "mask" : null - } - ], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [42, 12], - "actions" : ["FabricIngress.next.set_mcast_group", "NoAction"], - "base_default_next" : "node_58", - "next_tables" : { - "FabricIngress.next.set_mcast_group" : "node_58", - "NoAction" : "node_58" - }, - "default_entry" : { - "action_id" : 12, - "action_const" : false, - "action_data" : [], - "action_entry_const" : false - } - }, - { - "name" : "tbl_act_17", - "id" : 37, + "name" : "tbl_act_16", + "id" : 32, "key" : [], "match_type" : "exact", "type" : "simple", @@ -5844,22 +5319,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [61], - "actions" : ["act_17"], - "base_default_next" : "node_60", + "action_ids" : [52], + "actions" : ["act_16"], + "base_default_next" : "node_51", "next_tables" : { - "act_17" : "node_60" + "act_16" : "node_51" }, "default_entry" : { - "action_id" : 61, + "action_id" : 52, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_18", - "id" : 38, + "name" : "tbl_act_17", + "id" : 33, "key" : [], "match_type" : "exact", "type" : "simple", @@ -5867,14 +5342,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [62], - "actions" : ["act_18"], + "action_ids" : [53], + "actions" : ["act_17"], "base_default_next" : null, "next_tables" : { - "act_18" : null + "act_17" : null }, "default_entry" : { - "action_id" : 62, + "action_id" : 53, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -5918,7 +5393,7 @@ "name" : "node_2", "id" : 0, "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 25, "column" : 12, "source_fragment" : "hdr.packet_out.isValid()" @@ -5941,7 +5416,7 @@ "name" : "node_5", "id" : 1, "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 147, "column" : 12, "source_fragment" : "gtpu.isValid()" @@ -5998,7 +5473,7 @@ "name" : "node_17", "id" : 4, "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 167, "column" : 12, "source_fragment" : "!spgw_meta.do_spgw" @@ -6052,7 +5527,7 @@ "name" : "node_20", "id" : 6, "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 172, "column" : 12, "source_fragment" : "spgw_meta.direction == DIR_UPLINK" @@ -6078,7 +5553,7 @@ "name" : "node_22", "id" : 7, "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 189, "column" : 12, "source_fragment" : "spgw_meta.direction == DIR_DOWNLINK" @@ -6104,7 +5579,7 @@ "name" : "node_26", "id" : 8, "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 190, "column" : 16, "source_fragment" : "!dl_sess_lookup.apply().hit" @@ -6134,7 +5609,7 @@ "name" : "node_32", "id" : 9, "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 163, "column" : 11, "source_fragment" : "fabric_metadata.fwd_type == FWD_BRIDGING" @@ -6160,7 +5635,7 @@ "name" : "node_34", "id" : 10, "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 164, "column" : 17, "source_fragment" : "fabric_metadata.fwd_type == FWD_MPLS" @@ -6186,8 +5661,8 @@ "name" : "node_37", "id" : 11, "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 171, + "filename" : "include/control/forwarding.p4", + "line" : 179, "column" : 17, "source_fragment" : "fabric_metadata.fwd_type == FWD_IPV4_UNICAST" }, @@ -6206,89 +5681,11 @@ } }, "true_next" : "FabricIngress.forwarding.unicast_v4", - "false_next" : "node_39" - }, - { - "name" : "node_39", - "id" : 12, - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 173, - "column" : 17, - "source_fragment" : "fabric_metadata.fwd_type == FWD_IPV4_MULTICAST" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "==", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.fwd_type"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x03" - } - } - }, - "true_next" : "FabricIngress.forwarding.multicast_v4", - "false_next" : "node_41" - }, - { - "name" : "node_41", - "id" : 13, - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 176, - "column" : 17, - "source_fragment" : "fabric_metadata.fwd_type == FWD_IPV6_UNICAST" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "==", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.fwd_type"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x04" - } - } - }, - "true_next" : "FabricIngress.forwarding.unicast_v6", - "false_next" : "node_43" - }, - { - "name" : "node_43", - "id" : 14, - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 178, - "column" : 17, - "source_fragment" : "fabric_metadata.fwd_type == FWD_IPV6_MULTICAST" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "==", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.fwd_type"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x05" - } - } - }, - "true_next" : "FabricIngress.forwarding.multicast_v6", "false_next" : "FabricIngress.forwarding.acl" }, { - "name" : "node_50", - "id" : 15, + "name" : "node_44", + "id" : 12, "expression" : { "type" : "expression", "value" : { @@ -6300,14 +5697,14 @@ } } }, - "true_next" : "node_51", + "true_next" : "node_45", "false_next" : "FabricIngress.next.hashed" }, { - "name" : "node_51", - "id" : 16, + "name" : "node_45", + "id" : 13, "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 169, "column" : 16, "source_fragment" : "!hdr.mpls.isValid()" @@ -6330,14 +5727,14 @@ } } }, - "true_next" : "node_52", + "true_next" : "node_46", "false_next" : "FabricIngress.next.hashed" }, { - "name" : "node_52", - "id" : 17, + "name" : "node_46", + "id" : 14, "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 170, "column" : 19, "source_fragment" : "hdr.ipv4.isValid()" @@ -6354,36 +5751,13 @@ } }, "true_next" : "tbl_act_15", - "false_next" : "node_54" - }, - { - "name" : "node_54", - "id" : 18, - "source_info" : { - "filename" : "./include/control/next.p4", - "line" : 174, - "column" : 25, - "source_fragment" : "hdr.ipv6.isValid()" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["ipv6", "$valid$"] - } - } - }, - "true_next" : "tbl_act_16", "false_next" : "FabricIngress.next.hashed" }, { - "name" : "node_58", - "id" : 19, + "name" : "node_49", + "id" : 15, "source_info" : { - "filename" : "./include/control/port_counter.p4", + "filename" : "include/control/port_counter.p4", "line" : 27, "column" : 12, "source_fragment" : "standard_metadata.egress_spec < 511" @@ -6402,14 +5776,14 @@ } } }, - "true_next" : "tbl_act_17", - "false_next" : "node_60" + "true_next" : "tbl_act_16", + "false_next" : "node_51" }, { - "name" : "node_60", - "id" : 20, + "name" : "node_51", + "id" : 16, "source_info" : { - "filename" : "./include/control/port_counter.p4", + "filename" : "include/control/port_counter.p4", "line" : 30, "column" : 12, "source_fragment" : "standard_metadata.ingress_port < 511" @@ -6429,7 +5803,7 @@ } }, "false_next" : null, - "true_next" : "tbl_act_18" + "true_next" : "tbl_act_17" } ] }, @@ -6446,9 +5820,9 @@ "tables" : [ { "name" : "FabricEgress.egress_next.egress_vlan", - "id" : 39, + "id" : 34, "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 197, "column" : 10, "source_fragment" : "egress_vlan" @@ -6473,15 +5847,15 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [66, 63], + "action_ids" : [57, 54], "actions" : ["FabricEgress.egress_next.pop_vlan", "nop"], - "base_default_next" : "node_65", + "base_default_next" : "node_56", "next_tables" : { - "FabricEgress.egress_next.pop_vlan" : "node_65", - "nop" : "node_65" + "FabricEgress.egress_next.pop_vlan" : "node_56", + "nop" : "node_56" }, "default_entry" : { - "action_id" : 63, + "action_id" : 54, "action_const" : false, "action_data" : [], "action_entry_const" : false @@ -6489,7 +5863,7 @@ }, { "name" : "tbl_pkt_io_egress_pop_vlan", - "id" : 40, + "id" : 35, "key" : [], "match_type" : "exact", "type" : "simple", @@ -6497,14 +5871,37 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [65], + "action_ids" : [56], "actions" : ["FabricEgress.pkt_io_egress.pop_vlan"], - "base_default_next" : "tbl_act_19", + "base_default_next" : "tbl_act_18", "next_tables" : { - "FabricEgress.pkt_io_egress.pop_vlan" : "tbl_act_19" + "FabricEgress.pkt_io_egress.pop_vlan" : "tbl_act_18" }, "default_entry" : { - "action_id" : 65, + "action_id" : 56, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_act_18", + "id" : 36, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [58], + "actions" : ["act_18"], + "base_default_next" : "tbl_act_19", + "next_tables" : { + "act_18" : "tbl_act_19" + }, + "default_entry" : { + "action_id" : 58, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -6512,7 +5909,7 @@ }, { "name" : "tbl_act_19", - "id" : 41, + "id" : 37, "key" : [], "match_type" : "exact", "type" : "simple", @@ -6520,37 +5917,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [67], + "action_ids" : [59], "actions" : ["act_19"], - "base_default_next" : "tbl_act_20", + "base_default_next" : "node_61", "next_tables" : { - "act_19" : "tbl_act_20" + "act_19" : "node_61" }, "default_entry" : { - "action_id" : 67, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_20", - "id" : 42, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [68], - "actions" : ["act_20"], - "base_default_next" : "node_70", - "next_tables" : { - "act_20" : "node_70" - }, - "default_entry" : { - "action_id" : 68, + "action_id" : 59, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -6558,7 +5932,7 @@ }, { "name" : "tbl_spgw_egress_gtpu_encap", - "id" : 43, + "id" : 38, "key" : [], "match_type" : "exact", "type" : "simple", @@ -6566,14 +5940,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [64], + "action_ids" : [55], "actions" : ["FabricEgress.spgw_egress.gtpu_encap"], "base_default_next" : null, "next_tables" : { "FabricEgress.spgw_egress.gtpu_encap" : null }, "default_entry" : { - "action_id" : 64, + "action_id" : 55, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -6583,10 +5957,10 @@ "action_profiles" : [], "conditionals" : [ { - "name" : "node_65", - "id" : 21, + "name" : "node_56", + "id" : 17, "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 42, "column" : 12, "source_fragment" : "standard_metadata.egress_port == 255" @@ -6605,14 +5979,14 @@ } } }, - "true_next" : "node_66", - "false_next" : "tbl_act_20" + "true_next" : "node_57", + "false_next" : "tbl_act_19" }, { - "name" : "node_66", - "id" : 22, + "name" : "node_57", + "id" : 18, "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 43, "column" : 16, "source_fragment" : "hdr.vlan_tag.isValid() && fabric_metadata.pop_vlan_when_packet_in" @@ -6646,13 +6020,13 @@ } }, "true_next" : "tbl_pkt_io_egress_pop_vlan", - "false_next" : "tbl_act_19" + "false_next" : "tbl_act_18" }, { - "name" : "node_70", - "id" : 23, + "name" : "node_61", + "id" : 19, "source_info" : { - "filename" : "./include/control/../spgw.p4", + "filename" : "include/spgw.p4", "line" : 249, "column" : 12, "source_fragment" : "spgw_meta.do_spgw && spgw_meta.direction == DIR_DOWNLINK" @@ -6716,7 +6090,7 @@ { "name" : "cksum_0", "id" : 1, - "target" : ["ipv4", "hdr_checksum"], + "target" : ["gtpu_ipv4", "hdr_checksum"], "type" : "generic", "calculation" : "calc_0", "if_cond" : { @@ -6726,7 +6100,7 @@ "left" : null, "right" : { "type" : "field", - "value" : ["ipv4", "$valid$"] + "value" : ["gtpu_ipv4", "$valid$"] } } } @@ -6734,7 +6108,7 @@ { "name" : "cksum_1", "id" : 2, - "target" : ["gtpu_ipv4", "hdr_checksum"], + "target" : ["ipv4", "hdr_checksum"], "type" : "generic", "calculation" : "calc_1", "if_cond" : { @@ -6744,7 +6118,7 @@ "left" : null, "right" : { "type" : "field", - "value" : ["gtpu_ipv4", "$valid$"] + "value" : ["ipv4", "$valid$"] } } } @@ -6797,5 +6171,10 @@ "intrinsic_metadata.recirculate_flag", ["standard_metadata", "recirculate_flag"] ] - ] + ], + "program" : "fabric.p4", + "__meta__" : { + "version" : [2, 18], + "compiler" : "https://github.com/p4lang/p4c" + } } \ No newline at end of file diff --git a/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric-spgw.p4info b/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric-spgw.p4info index 38c5346402..7be8a3fc27 100644 --- a/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric-spgw.p4info +++ b/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric-spgw.p4info @@ -14,6 +14,7 @@ tables { id: 16800567 } size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -31,6 +32,7 @@ tables { id: 16800567 } size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -52,6 +54,7 @@ tables { annotations: "@defaultonly()" } size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -72,8 +75,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 302004306 + direct_resource_ids: 318781522 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -112,8 +116,9 @@ tables { id: 16798734 } const_default_action_id: 16819938 - direct_resource_ids: 302038285 + direct_resource_ids: 318815501 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -143,8 +148,9 @@ tables { id: 16840921 } const_default_action_id: 16840921 - direct_resource_ids: 302050110 + direct_resource_ids: 318827326 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -171,8 +177,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 301993073 + direct_resource_ids: 318770289 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -193,8 +200,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 302053291 + direct_resource_ids: 318830507 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -215,86 +223,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 301991276 - size: 1024 -} -tables { - preamble { - id: 33578363 - name: "FabricIngress.forwarding.multicast_v4" - alias: "multicast_v4" - } - match_fields { - id: 1 - name: "hdr.vlan_tag.vlan_id" - bitwidth: 12 - match_type: EXACT - } - match_fields { - id: 2 - name: "hdr.ipv4.dst_addr" - bitwidth: 32 - match_type: LPM - } - action_refs { - id: 16839692 - } - action_refs { - id: 16800567 - annotations: "@defaultonly()" - } - direct_resource_ids: 302020680 - size: 1024 -} -tables { - preamble { - id: 33568751 - name: "FabricIngress.forwarding.unicast_v6" - alias: "unicast_v6" - } - match_fields { - id: 1 - name: "hdr.ipv6.dst_addr" - bitwidth: 128 - match_type: LPM - } - action_refs { - id: 16839692 - } - action_refs { - id: 16800567 - annotations: "@defaultonly()" - } - direct_resource_ids: 302043649 - size: 1024 -} -tables { - preamble { - id: 33581295 - name: "FabricIngress.forwarding.multicast_v6" - alias: "multicast_v6" - } - match_fields { - id: 1 - name: "hdr.vlan_tag.vlan_id" - bitwidth: 12 - match_type: EXACT - } - match_fields { - id: 2 - name: "hdr.ipv6.dst_addr" - bitwidth: 128 - match_type: LPM - } - action_refs { - id: 16839692 - } - action_refs { - id: 16800567 - annotations: "@defaultonly()" - } - direct_resource_ids: 302038094 + direct_resource_ids: 318768492 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -387,8 +318,9 @@ tables { id: 16819938 } const_default_action_id: 16819938 - direct_resource_ids: 301995056 + direct_resource_ids: 318772272 size: 256 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -408,8 +340,9 @@ tables { action_refs { id: 16819938 } - direct_resource_ids: 302008112 + direct_resource_ids: 318785328 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -442,8 +375,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 301991880 + direct_resource_ids: 318769096 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -471,30 +405,9 @@ tables { annotations: "@defaultonly()" } implementation_id: 285233747 - direct_resource_ids: 302023316 - size: 1024 -} -tables { - preamble { - id: 33606828 - name: "FabricIngress.next.multicast" - alias: "multicast" - } - match_fields { - id: 1 - name: "fabric_metadata.next_id" - bitwidth: 32 - match_type: EXACT - } - action_refs { - id: 16789575 - } - action_refs { - id: 16800567 - annotations: "@defaultonly()" - } - direct_resource_ids: 302024536 + direct_resource_ids: 318800532 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -521,6 +434,7 @@ tables { id: 16819938 } size: 1024 + idle_timeout_behavior: NO_TIMEOUT } actions { preamble { @@ -804,23 +718,6 @@ actions { bitwidth: 20 } } -actions { - preamble { - id: 16789575 - name: "FabricIngress.next.set_mcast_group" - alias: "set_mcast_group" - } - params { - id: 1 - name: "gid" - bitwidth: 16 - } - params { - id: 2 - name: "smac" - bitwidth: 48 - } -} actions { preamble { id: 16829135 @@ -876,7 +773,7 @@ counters { } direct_counters { preamble { - id: 302004306 + id: 318781522 name: "FabricIngress.spgw_ingress.ue_counter" alias: "ue_counter" } @@ -887,7 +784,7 @@ direct_counters { } direct_counters { preamble { - id: 302038285 + id: 318815501 name: "FabricIngress.filtering.ingress_port_vlan_counter" alias: "ingress_port_vlan_counter" } @@ -898,7 +795,7 @@ direct_counters { } direct_counters { preamble { - id: 302050110 + id: 318827326 name: "FabricIngress.filtering.fwd_classifier_counter" alias: "fwd_classifier_counter" } @@ -909,7 +806,7 @@ direct_counters { } direct_counters { preamble { - id: 301993073 + id: 318770289 name: "FabricIngress.forwarding.bridging_counter" alias: "bridging_counter" } @@ -920,7 +817,7 @@ direct_counters { } direct_counters { preamble { - id: 302053291 + id: 318830507 name: "FabricIngress.forwarding.mpls_counter" alias: "mpls_counter" } @@ -931,7 +828,7 @@ direct_counters { } direct_counters { preamble { - id: 301991276 + id: 318768492 name: "FabricIngress.forwarding.unicast_v4_counter" alias: "unicast_v4_counter" } @@ -942,40 +839,7 @@ direct_counters { } direct_counters { preamble { - id: 302020680 - name: "FabricIngress.forwarding.multicast_v4_counter" - alias: "multicast_v4_counter" - } - spec { - unit: BOTH - } - direct_table_id: 33578363 -} -direct_counters { - preamble { - id: 302043649 - name: "FabricIngress.forwarding.unicast_v6_counter" - alias: "unicast_v6_counter" - } - spec { - unit: BOTH - } - direct_table_id: 33568751 -} -direct_counters { - preamble { - id: 302038094 - name: "FabricIngress.forwarding.multicast_v6_counter" - alias: "multicast_v6_counter" - } - spec { - unit: BOTH - } - direct_table_id: 33581295 -} -direct_counters { - preamble { - id: 301995056 + id: 318772272 name: "FabricIngress.forwarding.acl_counter" alias: "acl_counter" } @@ -986,7 +850,7 @@ direct_counters { } direct_counters { preamble { - id: 302008112 + id: 318785328 name: "FabricIngress.next.vlan_meta_counter" alias: "vlan_meta_counter" } @@ -997,7 +861,7 @@ direct_counters { } direct_counters { preamble { - id: 301991880 + id: 318769096 name: "FabricIngress.next.simple_counter" alias: "simple_counter" } @@ -1008,7 +872,7 @@ direct_counters { } direct_counters { preamble { - id: 302023316 + id: 318800532 name: "FabricIngress.next.hashed_counter" alias: "hashed_counter" } @@ -1017,20 +881,9 @@ direct_counters { } direct_table_id: 33608588 } -direct_counters { - preamble { - id: 302024536 - name: "FabricIngress.next.multicast_counter" - alias: "multicast_counter" - } - spec { - unit: BOTH - } - direct_table_id: 33606828 -} controller_packet_metadata { preamble { - id: 2868941301 + id: 67146229 name: "packet_in" annotations: "@controller_header(\"packet_in\")" } @@ -1047,7 +900,7 @@ controller_packet_metadata { } controller_packet_metadata { preamble { - id: 2868916615 + id: 67121543 name: "packet_out" annotations: "@controller_header(\"packet_out\")" } @@ -1062,3 +915,5 @@ controller_packet_metadata { bitwidth: 7 } } +type_info { +} diff --git a/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.json b/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.json index ebf5743253..8aad592859 100644 --- a/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.json +++ b/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.json @@ -1,9 +1,4 @@ { - "program" : "p4c-out/bmv2/fabric.p4i", - "__meta__" : { - "version" : [2, 7], - "compiler" : "https://github.com/p4lang/p4c" - }, "header_types" : [ { "name" : "scalars_0", @@ -24,8 +19,35 @@ ] }, { - "name" : "ethernet_t", + "name" : "standard_metadata", "id" : 1, + "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], + ["deq_timedelta", 32, false], + ["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], + ["checksum_error", 1, false], + ["recirculate_flag", 32, false], + ["_padding", 5, false] + ] + }, + { + "name" : "ethernet_t", + "id" : 2, "fields" : [ ["dst_addr", 48, false], ["src_addr", 48, false], @@ -34,7 +56,7 @@ }, { "name" : "vlan_tag_t", - "id" : 2, + "id" : 3, "fields" : [ ["pri", 3, false], ["cfi", 1, false], @@ -44,7 +66,7 @@ }, { "name" : "mpls_t", - "id" : 3, + "id" : 4, "fields" : [ ["label", 20, false], ["tc", 3, false], @@ -54,7 +76,7 @@ }, { "name" : "ipv4_t", - "id" : 4, + "id" : 5, "fields" : [ ["version", 4, false], ["ihl", 4, false], @@ -70,20 +92,6 @@ ["dst_addr", 32, false] ] }, - { - "name" : "ipv6_t", - "id" : 5, - "fields" : [ - ["version", 4, false], - ["traffic_class", 8, false], - ["flow_label", 20, false], - ["payload_len", 16, false], - ["next_hdr", 8, false], - ["hop_limit", 8, false], - ["src_addr", 128, false], - ["dst_addr", 128, false] - ] - }, { "name" : "arp_t", "id" : 6, @@ -149,33 +157,6 @@ ["ingress_port", 9, false], ["_pad", 7, false] ] - }, - { - "name" : "standard_metadata", - "id" : 12, - "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], - ["deq_timedelta", 32, false], - ["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], - ["checksum_error", 1, false], - ["recirculate_flag", 32, false], - ["_padding", 5, false] - ] } ], "headers" : [ @@ -221,51 +202,44 @@ "metadata" : false, "pi_omit" : true }, - { - "name" : "ipv6", - "id" : 6, - "header_type" : "ipv6_t", - "metadata" : false, - "pi_omit" : true - }, { "name" : "arp", - "id" : 7, + "id" : 6, "header_type" : "arp_t", "metadata" : false, "pi_omit" : true }, { "name" : "tcp", - "id" : 8, + "id" : 7, "header_type" : "tcp_t", "metadata" : false, "pi_omit" : true }, { "name" : "udp", - "id" : 9, + "id" : 8, "header_type" : "udp_t", "metadata" : false, "pi_omit" : true }, { "name" : "icmp", - "id" : 10, + "id" : 9, "header_type" : "icmp_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_out", - "id" : 11, + "id" : 10, "header_type" : "packet_out_header_t", "metadata" : false, "pi_omit" : true }, { "name" : "packet_in", - "id" : 12, + "id" : 11, "header_type" : "packet_in_header_t", "metadata" : false, "pi_omit" : true @@ -276,14 +250,7 @@ "header_unions" : [], "header_union_stacks" : [], "field_lists" : [], - "errors" : [ - ["NoError", 0], - ["PacketTooShort", 1], - ["NoMatch", 2], - ["StackOutOfBounds", 3], - ["HeaderTooShort", 4], - ["ParserTimeout", 5] - ], + "errors" : [], "enums" : [], "parsers" : [ { @@ -390,12 +357,6 @@ "mask" : null, "next_state" : "parse_ipv4" }, - { - "type" : "hexstr", - "value" : "0x86dd", - "mask" : null, - "next_state" : "parse_ipv6" - }, { "value" : "default", "mask" : null, @@ -449,12 +410,6 @@ "mask" : null, "next_state" : "parse_ipv4" }, - { - "type" : "hexstr", - "value" : "0x86dd", - "mask" : null, - "next_state" : "parse_ipv6" - }, { "type" : "hexstr", "value" : "0x8847", @@ -508,12 +463,6 @@ "mask" : null, "next_state" : "parse_ipv4" }, - { - "type" : "hexstr", - "value" : "0x06", - "mask" : null, - "next_state" : "parse_ipv6" - }, { "value" : "default", "mask" : null, @@ -586,68 +535,9 @@ } ] }, - { - "name" : "parse_ipv6", - "id" : 6, - "parser_ops" : [ - { - "parameters" : [ - { - "type" : "regular", - "value" : "ipv6" - } - ], - "op" : "extract" - }, - { - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.ip_proto"] - }, - { - "type" : "field", - "value" : ["ipv6", "next_hdr"] - } - ], - "op" : "set" - } - ], - "transitions" : [ - { - "type" : "hexstr", - "value" : "0x06", - "mask" : null, - "next_state" : "parse_tcp" - }, - { - "type" : "hexstr", - "value" : "0x11", - "mask" : null, - "next_state" : "parse_udp" - }, - { - "type" : "hexstr", - "value" : "0x3a", - "mask" : null, - "next_state" : "parse_icmp" - }, - { - "value" : "default", - "mask" : null, - "next_state" : null - } - ], - "transition_key" : [ - { - "type" : "field", - "value" : ["ipv6", "next_hdr"] - } - ] - }, { "name" : "parse_arp", - "id" : 7, + "id" : 6, "parser_ops" : [ { "parameters" : [ @@ -670,7 +560,7 @@ }, { "name" : "parse_tcp", - "id" : 8, + "id" : 7, "parser_ops" : [ { "parameters" : [ @@ -719,7 +609,7 @@ }, { "name" : "parse_udp", - "id" : 9, + "id" : 8, "parser_ops" : [ { "parameters" : [ @@ -768,7 +658,7 @@ }, { "name" : "parse_icmp", - "id" : 10, + "id" : 9, "parser_ops" : [ { "parameters" : [ @@ -798,12 +688,12 @@ "name" : "deparser", "id" : 0, "source_info" : { - "filename" : "./include/parser.p4", + "filename" : "include/parser.p4", "line" : 165, "column" : 8, "source_fragment" : "FabricDeparser" }, - "order" : ["packet_in", "ethernet", "vlan_tag", "mpls", "arp", "ipv4", "ipv6", "tcp", "udp", "icmp"] + "order" : ["packet_in", "ethernet", "vlan_tag", "mpls", "arp", "ipv4", "tcp", "udp", "icmp"] } ], "meter_arrays" : [], @@ -844,53 +734,29 @@ "is_direct" : true, "binding" : "FabricIngress.forwarding.acl" }, - { - "name" : "FabricIngress.forwarding.multicast_v4_counter", - "id" : 6, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.multicast_v4" - }, - { - "name" : "FabricIngress.forwarding.unicast_v6_counter", - "id" : 7, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.unicast_v6" - }, - { - "name" : "FabricIngress.forwarding.multicast_v6_counter", - "id" : 8, - "is_direct" : true, - "binding" : "FabricIngress.forwarding.multicast_v6" - }, { "name" : "FabricIngress.next.vlan_meta_counter", - "id" : 9, + "id" : 6, "is_direct" : true, "binding" : "FabricIngress.next.vlan_meta" }, { "name" : "FabricIngress.next.simple_counter", - "id" : 10, + "id" : 7, "is_direct" : true, "binding" : "FabricIngress.next.simple" }, { "name" : "FabricIngress.next.hashed_counter", - "id" : 11, + "id" : 8, "is_direct" : true, "binding" : "FabricIngress.next.hashed" }, - { - "name" : "FabricIngress.next.multicast_counter", - "id" : 12, - "is_direct" : true, - "binding" : "FabricIngress.next.multicast" - }, { "name" : "FabricIngress.port_counters_control.egress_port_counter", - "id" : 13, + "id" : 9, "source_info" : { - "filename" : "./include/control/port_counter.p4", + "filename" : "include/control/port_counter.p4", "line" : 23, "column" : 48, "source_fragment" : "egress_port_counter" @@ -900,9 +766,9 @@ }, { "name" : "FabricIngress.port_counters_control.ingress_port_counter", - "id" : 14, + "id" : 10, "source_info" : { - "filename" : "./include/control/port_counter.p4", + "filename" : "include/control/port_counter.p4", "line" : 24, "column" : 48, "source_fragment" : "ingress_port_counter" @@ -917,10 +783,10 @@ "name" : "calc", "id" : 0, "source_info" : { - "filename" : "./include/checksum.p4", - "line" : 56, + "filename" : "include/checksum.p4", + "line" : 28, "column" : 8, - "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." + "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." }, "algo" : "csum16", "input" : [ @@ -974,10 +840,10 @@ "name" : "calc_0", "id" : 1, "source_info" : { - "filename" : "./include/checksum.p4", - "line" : 28, + "filename" : "include/checksum.p4", + "line" : 56, "column" : 8, - "source_fragment" : "update_checksum(hdr.ipv4.isValid(), ..." + "source_fragment" : "verify_checksum(hdr.ipv4.isValid(), ..." }, "algo" : "csum16", "input" : [ @@ -1078,40 +944,16 @@ "runtime_data" : [], "primitives" : [] }, - { - "name" : "NoAction", - "id" : 8, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "NoAction", - "id" : 9, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "NoAction", - "id" : 10, - "runtime_data" : [], - "primitives" : [] - }, - { - "name" : "NoAction", - "id" : 11, - "runtime_data" : [], - "primitives" : [] - }, { "name" : "FabricIngress.filtering.drop", - "id" : 12, + "id" : 8, "runtime_data" : [], "primitives" : [ { "op" : "drop", "parameters" : [], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 31, "column" : 8, "source_fragment" : "mark_to_drop()" @@ -1121,7 +963,7 @@ }, { "name" : "FabricIngress.filtering.set_vlan", - "id" : 13, + "id" : 9, "runtime_data" : [ { "name" : "new_vlan_id", @@ -1142,7 +984,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 35, "column" : 8, "source_fragment" : "hdr.vlan_tag.vlan_id = new_vlan_id" @@ -1152,7 +994,7 @@ }, { "name" : "FabricIngress.filtering.push_internal_vlan", - "id" : 14, + "id" : 10, "runtime_data" : [ { "name" : "new_vlan_id", @@ -1169,7 +1011,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 41, "column" : 8, "source_fragment" : "hdr.vlan_tag.setValid()" @@ -1188,7 +1030,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 42, "column" : 8, "source_fragment" : "hdr.vlan_tag.cfi = 0" @@ -1207,7 +1049,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 43, "column" : 8, "source_fragment" : "hdr.vlan_tag.pri = 0" @@ -1226,7 +1068,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 44, "column" : 8, "source_fragment" : "hdr.vlan_tag.ether_type = hdr.ethernet.ether_type" @@ -1245,7 +1087,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 32, "column" : 31, "source_fragment" : "0x8100; ..." @@ -1264,7 +1106,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 35, "column" : 8, "source_fragment" : "hdr.vlan_tag.vlan_id = new_vlan_id; ..." @@ -1293,7 +1135,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 49, "column" : 8, "source_fragment" : "fabric_metadata.pop_vlan_when_packet_in = true" @@ -1303,7 +1145,7 @@ }, { "name" : "FabricIngress.filtering.set_forwarding_type", - "id" : 15, + "id" : 11, "runtime_data" : [ { "name" : "fwd_type", @@ -1324,7 +1166,7 @@ } ], "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 53, "column" : 8, "source_fragment" : "fabric_metadata.fwd_type = fwd_type" @@ -1334,14 +1176,14 @@ }, { "name" : "FabricIngress.forwarding.drop", - "id" : 16, + "id" : 12, "runtime_data" : [], "primitives" : [ { "op" : "drop", "parameters" : [], "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 36, "column" : 8, "source_fragment" : "mark_to_drop()" @@ -1351,7 +1193,7 @@ }, { "name" : "FabricIngress.forwarding.set_next_id", - "id" : 17, + "id" : 13, "runtime_data" : [ { "name" : "next_id", @@ -1372,7 +1214,7 @@ } ], "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 40, "column" : 8, "source_fragment" : "fabric_metadata.next_id = next_id" @@ -1382,7 +1224,7 @@ }, { "name" : "FabricIngress.forwarding.set_next_id", - "id" : 18, + "id" : 14, "runtime_data" : [ { "name" : "next_id", @@ -1403,7 +1245,7 @@ } ], "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 40, "column" : 8, "source_fragment" : "fabric_metadata.next_id = next_id" @@ -1413,7 +1255,7 @@ }, { "name" : "FabricIngress.forwarding.set_next_id", - "id" : 19, + "id" : 15, "runtime_data" : [ { "name" : "next_id", @@ -1434,100 +1276,7 @@ } ], "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 40, - "column" : 8, - "source_fragment" : "fabric_metadata.next_id = next_id" - } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id", - "id" : 20, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.next_id"] - }, - { - "type" : "runtime_data", - "value" : 0 - } - ], - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 40, - "column" : 8, - "source_fragment" : "fabric_metadata.next_id = next_id" - } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id", - "id" : 21, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.next_id"] - }, - { - "type" : "runtime_data", - "value" : 0 - } - ], - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 40, - "column" : 8, - "source_fragment" : "fabric_metadata.next_id = next_id" - } - } - ] - }, - { - "name" : "FabricIngress.forwarding.set_next_id", - "id" : 22, - "runtime_data" : [ - { - "name" : "next_id", - "bitwidth" : 32 - } - ], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.next_id"] - }, - { - "type" : "runtime_data", - "value" : 0 - } - ], - "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 40, "column" : 8, "source_fragment" : "fabric_metadata.next_id = next_id" @@ -1537,7 +1286,7 @@ }, { "name" : "FabricIngress.forwarding.pop_mpls_and_next", - "id" : 23, + "id" : 16, "runtime_data" : [ { "name" : "next_id", @@ -1554,7 +1303,7 @@ } ], "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 44, "column" : 8, "source_fragment" : "hdr.mpls.setInvalid()" @@ -1573,7 +1322,7 @@ } ], "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 45, "column" : 8, "source_fragment" : "fabric_metadata.next_id = next_id" @@ -1583,7 +1332,7 @@ }, { "name" : "FabricIngress.forwarding.duplicate_to_controller", - "id" : 24, + "id" : 17, "runtime_data" : [], "primitives" : [ { @@ -1599,7 +1348,7 @@ } ], "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 49, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = 255" @@ -1609,7 +1358,7 @@ }, { "name" : "FabricIngress.next.output", - "id" : 25, + "id" : 18, "runtime_data" : [ { "name" : "port_num", @@ -1630,7 +1379,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num" @@ -1640,7 +1389,7 @@ }, { "name" : "FabricIngress.next.set_vlan", - "id" : 26, + "id" : 19, "runtime_data" : [ { "name" : "new_vlan_id", @@ -1661,7 +1410,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 37, "column" : 8, "source_fragment" : "hdr.vlan_tag.vlan_id = new_vlan_id" @@ -1671,7 +1420,7 @@ }, { "name" : "FabricIngress.next.set_vlan_output", - "id" : 27, + "id" : 20, "runtime_data" : [ { "name" : "new_vlan_id", @@ -1696,7 +1445,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 46, "column" : 8, "source_fragment" : "hdr.vlan_tag.vlan_id = new_vlan_id" @@ -1715,7 +1464,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -1725,7 +1474,7 @@ }, { "name" : "FabricIngress.next.l3_routing", - "id" : 28, + "id" : 21, "runtime_data" : [ { "name" : "port_num", @@ -1754,7 +1503,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 51, "column" : 8, "source_fragment" : "hdr.ethernet.src_addr = smac; ..." @@ -1773,7 +1522,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 55, "column" : 8, "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." @@ -1792,7 +1541,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -1802,7 +1551,7 @@ }, { "name" : "FabricIngress.next.l3_routing", - "id" : 29, + "id" : 22, "runtime_data" : [ { "name" : "port_num", @@ -1831,7 +1580,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 51, "column" : 8, "source_fragment" : "hdr.ethernet.src_addr = smac; ..." @@ -1850,7 +1599,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 55, "column" : 8, "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." @@ -1869,7 +1618,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -1879,7 +1628,7 @@ }, { "name" : "FabricIngress.next.l3_routing_vlan", - "id" : 30, + "id" : 23, "runtime_data" : [ { "name" : "port_num", @@ -1912,7 +1661,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 51, "column" : 8, "source_fragment" : "hdr.ethernet.src_addr = smac; ..." @@ -1931,7 +1680,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 55, "column" : 8, "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." @@ -1950,7 +1699,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 46, "column" : 8, "source_fragment" : "hdr.vlan_tag.vlan_id = new_vlan_id; ..." @@ -1969,7 +1718,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -1979,7 +1728,7 @@ }, { "name" : "FabricIngress.next.mpls_routing_v4", - "id" : 31, + "id" : 24, "runtime_data" : [ { "name" : "port_num", @@ -2012,7 +1761,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 51, "column" : 8, "source_fragment" : "hdr.ethernet.src_addr = smac; ..." @@ -2031,7 +1780,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 55, "column" : 8, "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." @@ -2050,7 +1799,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -2065,7 +1814,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 72, "column" : 8, "source_fragment" : "hdr.mpls.setValid()" @@ -2084,7 +1833,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 33, "column" : 31, "source_fragment" : "0x8847; ..." @@ -2103,7 +1852,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 74, "column" : 8, "source_fragment" : "hdr.mpls.label = label; ..." @@ -2122,7 +1871,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 75, "column" : 8, "source_fragment" : "hdr.mpls.tc = tc; ..." @@ -2141,7 +1890,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 76, "column" : 8, "source_fragment" : "hdr.mpls.bos = 1w1" @@ -2160,7 +1909,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 67, "column" : 32, "source_fragment" : "64; ..." @@ -2170,7 +1919,7 @@ }, { "name" : "FabricIngress.next.mpls_routing_v4", - "id" : 32, + "id" : 25, "runtime_data" : [ { "name" : "port_num", @@ -2203,7 +1952,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 51, "column" : 8, "source_fragment" : "hdr.ethernet.src_addr = smac; ..." @@ -2222,7 +1971,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 55, "column" : 8, "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." @@ -2241,7 +1990,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -2256,7 +2005,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 72, "column" : 8, "source_fragment" : "hdr.mpls.setValid()" @@ -2275,7 +2024,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 33, "column" : 31, "source_fragment" : "0x8847; ..." @@ -2294,7 +2043,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 74, "column" : 8, "source_fragment" : "hdr.mpls.label = label; ..." @@ -2313,7 +2062,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 75, "column" : 8, "source_fragment" : "hdr.mpls.tc = tc; ..." @@ -2332,7 +2081,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 76, "column" : 8, "source_fragment" : "hdr.mpls.bos = 1w1" @@ -2351,7 +2100,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 67, "column" : 32, "source_fragment" : "64; ..." @@ -2361,7 +2110,7 @@ }, { "name" : "FabricIngress.next.mpls_routing_v6", - "id" : 33, + "id" : 26, "runtime_data" : [ { "name" : "port_num", @@ -2394,7 +2143,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 51, "column" : 8, "source_fragment" : "hdr.ethernet.src_addr = smac; ..." @@ -2413,7 +2162,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 55, "column" : 8, "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." @@ -2432,7 +2181,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 33, "column" : 8, "source_fragment" : "standard_metadata.egress_spec = port_num; ..." @@ -2447,7 +2196,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 72, "column" : 8, "source_fragment" : "hdr.mpls.setValid()" @@ -2466,7 +2215,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 33, "column" : 31, "source_fragment" : "0x8847; ..." @@ -2485,7 +2234,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 74, "column" : 8, "source_fragment" : "hdr.mpls.label = label; ..." @@ -2504,7 +2253,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 75, "column" : 8, "source_fragment" : "hdr.mpls.tc = tc; ..." @@ -2523,7 +2272,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 76, "column" : 8, "source_fragment" : "hdr.mpls.bos = 1w1" @@ -2542,7 +2291,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 67, "column" : 32, "source_fragment" : "64; ..." @@ -2550,63 +2299,9 @@ } ] }, - { - "name" : "FabricIngress.next.set_mcast_group", - "id" : 34, - "runtime_data" : [ - { - "name" : "gid", - "bitwidth" : 16 - }, - { - "name" : "smac", - "bitwidth" : 48 - } - ], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["standard_metadata", "mcast_grp"] - }, - { - "type" : "runtime_data", - "value" : 0 - } - ], - "source_info" : { - "filename" : "./include/control/next.p4", - "line" : 149, - "column" : 8, - "source_fragment" : "standard_metadata.mcast_grp = gid" - } - }, - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["ethernet", "src_addr"] - }, - { - "type" : "runtime_data", - "value" : 1 - } - ], - "source_info" : { - "filename" : "./include/control/next.p4", - "line" : 51, - "column" : 8, - "source_fragment" : "hdr.ethernet.src_addr = smac; ..." - } - } - ] - }, { "name" : "act", - "id" : 35, + "id" : 27, "runtime_data" : [], "primitives" : [ { @@ -2622,7 +2317,7 @@ } ], "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 26, "column" : 12, "source_fragment" : "standard_metadata.egress_spec = hdr.packet_out.egress_port" @@ -2637,7 +2332,7 @@ } ], "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 27, "column" : 12, "source_fragment" : "hdr.packet_out.setInvalid()" @@ -2647,7 +2342,7 @@ }, { "name" : "act_0", - "id" : 36, + "id" : 28, "runtime_data" : [], "primitives" : [ { @@ -2663,7 +2358,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 35, "column" : 31, "source_fragment" : "0x0800; ..." @@ -2682,7 +2377,7 @@ } ], "source_info" : { - "filename" : "./include/control/../define.p4", + "filename" : "include/control/../define.p4", "line" : 35, "column" : 31, "source_fragment" : "0x0800; ..." @@ -2692,7 +2387,7 @@ }, { "name" : "act_1", - "id" : 37, + "id" : 29, "runtime_data" : [], "primitives" : [ { @@ -2722,7 +2417,7 @@ }, { "name" : "act_2", - "id" : 38, + "id" : 30, "runtime_data" : [], "primitives" : [ { @@ -2752,7 +2447,7 @@ }, { "name" : "act_3", - "id" : 39, + "id" : 31, "runtime_data" : [], "primitives" : [ { @@ -2791,7 +2486,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 171, "column" : 20, "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" @@ -2801,56 +2496,7 @@ }, { "name" : "act_4", - "id" : 40, - "runtime_data" : [], - "primitives" : [ - { - "op" : "assign", - "parameters" : [ - { - "type" : "field", - "value" : ["ipv6", "hop_limit"] - }, - { - "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" - } - } - } - } - ], - "source_info" : { - "filename" : "./include/control/next.p4", - "line" : 175, - "column" : 20, - "source_fragment" : "hdr.ipv6.hop_limit = hdr.ipv6.hop_limit - 1" - } - } - ] - }, - { - "name" : "act_5", - "id" : 41, + "id" : 32, "runtime_data" : [], "primitives" : [ { @@ -2877,7 +2523,13 @@ } } } - ] + ], + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 28, + "column" : 38, + "source_fragment" : "(bit<32>)standard_metadata.egress_spec" + } }, { "op" : "count", @@ -2892,7 +2544,7 @@ } ], "source_info" : { - "filename" : "./include/control/port_counter.p4", + "filename" : "include/control/port_counter.p4", "line" : 28, "column" : 12, "source_fragment" : "egress_port_counter.count((bit<32>)standard_metadata.egress_spec)" @@ -2901,8 +2553,8 @@ ] }, { - "name" : "act_6", - "id" : 42, + "name" : "act_5", + "id" : 33, "runtime_data" : [], "primitives" : [ { @@ -2929,7 +2581,13 @@ } } } - ] + ], + "source_info" : { + "filename" : "include/control/port_counter.p4", + "line" : 31, + "column" : 39, + "source_fragment" : "(bit<32>)standard_metadata.ingress_port" + } }, { "op" : "count", @@ -2944,7 +2602,7 @@ } ], "source_info" : { - "filename" : "./include/control/port_counter.p4", + "filename" : "include/control/port_counter.p4", "line" : 31, "column" : 12, "source_fragment" : "ingress_port_counter.count((bit<32>)standard_metadata.ingress_port)" @@ -2954,13 +2612,13 @@ }, { "name" : "nop", - "id" : 43, + "id" : 34, "runtime_data" : [], "primitives" : [] }, { "name" : "FabricEgress.pkt_io_egress.pop_vlan", - "id" : 44, + "id" : 35, "runtime_data" : [], "primitives" : [ { @@ -2976,7 +2634,7 @@ } ], "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 38, "column" : 8, "source_fragment" : "hdr.ethernet.ether_type = hdr.vlan_tag.ether_type" @@ -2991,7 +2649,7 @@ } ], "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 39, "column" : 8, "source_fragment" : "hdr.vlan_tag.setInvalid()" @@ -3001,7 +2659,7 @@ }, { "name" : "FabricEgress.egress_next.pop_vlan", - "id" : 45, + "id" : 36, "runtime_data" : [], "primitives" : [ { @@ -3017,7 +2675,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 193, "column" : 8, "source_fragment" : "hdr.ethernet.ether_type = hdr.vlan_tag.ether_type" @@ -3032,7 +2690,7 @@ } ], "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 194, "column" : 8, "source_fragment" : "hdr.vlan_tag.setInvalid()" @@ -3041,8 +2699,8 @@ ] }, { - "name" : "act_7", - "id" : 46, + "name" : "act_6", + "id" : 37, "runtime_data" : [], "primitives" : [ { @@ -3054,7 +2712,7 @@ } ], "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 46, "column" : 12, "source_fragment" : "hdr.packet_in.setValid()" @@ -3073,7 +2731,7 @@ } ], "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 47, "column" : 12, "source_fragment" : "hdr.packet_in.ingress_port = standard_metadata.ingress_port" @@ -3104,14 +2762,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [35], + "action_ids" : [27], "actions" : ["act"], "base_default_next" : null, "next_tables" : { "act" : null }, "default_entry" : { - "action_id" : 35, + "action_id" : 27, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -3121,7 +2779,7 @@ "name" : "FabricIngress.filtering.ingress_port_vlan", "id" : 1, "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 57, "column" : 10, "source_fragment" : "ingress_port_vlan" @@ -3152,7 +2810,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [14, 13, 0, 12], + "action_ids" : [10, 9, 0, 8], "actions" : ["FabricIngress.filtering.push_internal_vlan", "FabricIngress.filtering.set_vlan", "nop", "FabricIngress.filtering.drop"], "base_default_next" : "FabricIngress.filtering.fwd_classifier", "next_tables" : { @@ -3172,7 +2830,7 @@ "name" : "FabricIngress.filtering.fwd_classifier", "id" : 2, "source_info" : { - "filename" : "./include/control/filtering.p4", + "filename" : "include/control/filtering.p4", "line" : 76, "column" : 10, "source_fragment" : "fwd_classifier" @@ -3203,14 +2861,14 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [15], + "action_ids" : [11], "actions" : ["FabricIngress.filtering.set_forwarding_type"], "base_default_next" : "node_6", "next_tables" : { "FabricIngress.filtering.set_forwarding_type" : "node_6" }, "default_entry" : { - "action_id" : 15, + "action_id" : 11, "action_const" : true, "action_data" : ["0x0"], "action_entry_const" : true @@ -3220,7 +2878,7 @@ "name" : "FabricIngress.forwarding.bridging", "id" : 3, "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 52, "column" : 10, "source_fragment" : "bridging" @@ -3245,7 +2903,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [17, 3], + "action_ids" : [13, 3], "actions" : ["FabricIngress.forwarding.set_next_id", "NoAction"], "base_default_next" : "FabricIngress.forwarding.acl", "next_tables" : { @@ -3263,7 +2921,7 @@ "name" : "FabricIngress.forwarding.mpls", "id" : 4, "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 64, "column" : 10, "source_fragment" : "mpls" @@ -3282,7 +2940,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [23, 4], + "action_ids" : [16, 4], "actions" : ["FabricIngress.forwarding.pop_mpls_and_next", "NoAction"], "base_default_next" : "tbl_act_0", "next_tables" : { @@ -3306,14 +2964,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [36], + "action_ids" : [28], "actions" : ["act_0"], "base_default_next" : "FabricIngress.forwarding.acl", "next_tables" : { "act_0" : "FabricIngress.forwarding.acl" }, "default_entry" : { - "action_id" : 36, + "action_id" : 28, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -3323,7 +2981,7 @@ "name" : "FabricIngress.forwarding.unicast_v4", "id" : 6, "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 75, "column" : 10, "source_fragment" : "unicast_v4" @@ -3342,7 +3000,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [18, 5], + "action_ids" : [14, 5], "actions" : ["FabricIngress.forwarding.set_next_id", "NoAction"], "base_default_next" : "FabricIngress.forwarding.acl", "next_tables" : { @@ -3357,133 +3015,10 @@ } }, { - "name" : "FabricIngress.forwarding.multicast_v4", + "name" : "FabricIngress.forwarding.acl", "id" : 7, "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 89, - "column" : 10, - "source_fragment" : "multicast_v4" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "hdr.vlan_tag.vlan_id", - "target" : ["vlan_tag", "vlan_id"], - "mask" : null - }, - { - "match_type" : "lpm", - "name" : "hdr.ipv4.dst_addr", - "target" : ["ipv4", "dst_addr"], - "mask" : null - } - ], - "match_type" : "lpm", - "type" : "simple", - "max_size" : 1024, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [19, 6], - "actions" : ["FabricIngress.forwarding.set_next_id", "NoAction"], - "base_default_next" : "FabricIngress.forwarding.acl", - "next_tables" : { - "FabricIngress.forwarding.set_next_id" : "FabricIngress.forwarding.acl", - "NoAction" : "FabricIngress.forwarding.acl" - }, - "default_entry" : { - "action_id" : 6, - "action_const" : false, - "action_data" : [], - "action_entry_const" : false - } - }, - { - "name" : "FabricIngress.forwarding.unicast_v6", - "id" : 8, - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 105, - "column" : 10, - "source_fragment" : "unicast_v6" - }, - "key" : [ - { - "match_type" : "lpm", - "name" : "hdr.ipv6.dst_addr", - "target" : ["ipv6", "dst_addr"], - "mask" : null - } - ], - "match_type" : "lpm", - "type" : "simple", - "max_size" : 1024, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [20, 7], - "actions" : ["FabricIngress.forwarding.set_next_id", "NoAction"], - "base_default_next" : "FabricIngress.forwarding.acl", - "next_tables" : { - "FabricIngress.forwarding.set_next_id" : "FabricIngress.forwarding.acl", - "NoAction" : "FabricIngress.forwarding.acl" - }, - "default_entry" : { - "action_id" : 7, - "action_const" : false, - "action_data" : [], - "action_entry_const" : false - } - }, - { - "name" : "FabricIngress.forwarding.multicast_v6", - "id" : 9, - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 119, - "column" : 10, - "source_fragment" : "multicast_v6" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "hdr.vlan_tag.vlan_id", - "target" : ["vlan_tag", "vlan_id"], - "mask" : null - }, - { - "match_type" : "lpm", - "name" : "hdr.ipv6.dst_addr", - "target" : ["ipv6", "dst_addr"], - "mask" : null - } - ], - "match_type" : "lpm", - "type" : "simple", - "max_size" : 1024, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [21, 8], - "actions" : ["FabricIngress.forwarding.set_next_id", "NoAction"], - "base_default_next" : "FabricIngress.forwarding.acl", - "next_tables" : { - "FabricIngress.forwarding.set_next_id" : "FabricIngress.forwarding.acl", - "NoAction" : "FabricIngress.forwarding.acl" - }, - "default_entry" : { - "action_id" : 8, - "action_const" : false, - "action_data" : [], - "action_entry_const" : false - } - }, - { - "name" : "FabricIngress.forwarding.acl", - "id" : 10, - "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 133, "column" : 10, "source_fragment" : "acl" @@ -3568,7 +3103,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [22, 24, 16, 1], + "action_ids" : [15, 17, 12, 1], "actions" : ["FabricIngress.forwarding.set_next_id", "FabricIngress.forwarding.duplicate_to_controller", "FabricIngress.forwarding.drop", "nop"], "base_default_next" : "FabricIngress.next.vlan_meta", "next_tables" : { @@ -3586,9 +3121,9 @@ }, { "name" : "FabricIngress.next.vlan_meta", - "id" : 11, + "id" : 8, "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 96, "column" : 10, "source_fragment" : "vlan_meta" @@ -3607,7 +3142,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [26, 2], + "action_ids" : [19, 2], "actions" : ["FabricIngress.next.set_vlan", "nop"], "base_default_next" : "FabricIngress.next.simple", "next_tables" : { @@ -3623,9 +3158,9 @@ }, { "name" : "FabricIngress.next.simple", - "id" : 12, + "id" : 9, "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 109, "column" : 10, "source_fragment" : "simple" @@ -3644,7 +3179,7 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [25, 27, 28, 31, 30, 9], + "action_ids" : [18, 20, 21, 24, 23, 6], "actions" : ["FabricIngress.next.output", "FabricIngress.next.set_vlan_output", "FabricIngress.next.l3_routing", "FabricIngress.next.mpls_routing_v4", "FabricIngress.next.l3_routing_vlan", "NoAction"], "base_default_next" : null, "next_tables" : { @@ -3652,7 +3187,7 @@ "__MISS__" : "tbl_act_2" }, "default_entry" : { - "action_id" : 9, + "action_id" : 6, "action_const" : false, "action_data" : [], "action_entry_const" : false @@ -3660,7 +3195,7 @@ }, { "name" : "tbl_act_1", - "id" : 13, + "id" : 10, "key" : [], "match_type" : "exact", "type" : "simple", @@ -3668,14 +3203,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [37], + "action_ids" : [29], "actions" : ["act_1"], - "base_default_next" : "node_24", + "base_default_next" : "node_18", "next_tables" : { - "act_1" : "node_24" + "act_1" : "node_18" }, "default_entry" : { - "action_id" : 37, + "action_id" : 29, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -3683,7 +3218,7 @@ }, { "name" : "tbl_act_2", - "id" : 14, + "id" : 11, "key" : [], "match_type" : "exact", "type" : "simple", @@ -3691,14 +3226,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [38], + "action_ids" : [30], "actions" : ["act_2"], - "base_default_next" : "node_24", + "base_default_next" : "node_18", "next_tables" : { - "act_2" : "node_24" + "act_2" : "node_18" }, "default_entry" : { - "action_id" : 38, + "action_id" : 30, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -3706,7 +3241,7 @@ }, { "name" : "tbl_act_3", - "id" : 15, + "id" : 12, "key" : [], "match_type" : "exact", "type" : "simple", @@ -3714,37 +3249,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [39], + "action_ids" : [31], "actions" : ["act_3"], "base_default_next" : "FabricIngress.next.hashed", "next_tables" : { "act_3" : "FabricIngress.next.hashed" }, "default_entry" : { - "action_id" : 39, - "action_const" : true, - "action_data" : [], - "action_entry_const" : true - } - }, - { - "name" : "tbl_act_4", - "id" : 16, - "key" : [], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : false, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [40], - "actions" : ["act_4"], - "base_default_next" : "FabricIngress.next.hashed", - "next_tables" : { - "act_4" : "FabricIngress.next.hashed" - }, - "default_entry" : { - "action_id" : 40, + "action_id" : 31, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -3752,9 +3264,9 @@ }, { "name" : "FabricIngress.next.hashed", - "id" : 17, + "id" : 13, "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 124, "column" : 10, "source_fragment" : "hashed" @@ -3774,56 +3286,19 @@ "with_counters" : true, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [29, 32, 33, 10], + "action_ids" : [22, 25, 26, 7], "actions" : ["FabricIngress.next.l3_routing", "FabricIngress.next.mpls_routing_v4", "FabricIngress.next.mpls_routing_v6", "NoAction"], - "base_default_next" : "FabricIngress.next.multicast", + "base_default_next" : "node_23", "next_tables" : { - "FabricIngress.next.l3_routing" : "FabricIngress.next.multicast", - "FabricIngress.next.mpls_routing_v4" : "FabricIngress.next.multicast", - "FabricIngress.next.mpls_routing_v6" : "FabricIngress.next.multicast", - "NoAction" : "FabricIngress.next.multicast" + "FabricIngress.next.l3_routing" : "node_23", + "FabricIngress.next.mpls_routing_v4" : "node_23", + "FabricIngress.next.mpls_routing_v6" : "node_23", + "NoAction" : "node_23" } }, { - "name" : "FabricIngress.next.multicast", - "id" : 18, - "source_info" : { - "filename" : "./include/control/next.p4", - "line" : 155, - "column" : 10, - "source_fragment" : "multicast" - }, - "key" : [ - { - "match_type" : "exact", - "name" : "fabric_metadata.next_id", - "target" : ["scalars", "fabric_metadata_t.next_id"], - "mask" : null - } - ], - "match_type" : "exact", - "type" : "simple", - "max_size" : 1024, - "with_counters" : true, - "support_timeout" : false, - "direct_meters" : null, - "action_ids" : [34, 11], - "actions" : ["FabricIngress.next.set_mcast_group", "NoAction"], - "base_default_next" : "node_32", - "next_tables" : { - "FabricIngress.next.set_mcast_group" : "node_32", - "NoAction" : "node_32" - }, - "default_entry" : { - "action_id" : 11, - "action_const" : false, - "action_data" : [], - "action_entry_const" : false - } - }, - { - "name" : "tbl_act_5", - "id" : 19, + "name" : "tbl_act_4", + "id" : 14, "key" : [], "match_type" : "exact", "type" : "simple", @@ -3831,22 +3306,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [41], - "actions" : ["act_5"], - "base_default_next" : "node_34", + "action_ids" : [32], + "actions" : ["act_4"], + "base_default_next" : "node_25", "next_tables" : { - "act_5" : "node_34" + "act_4" : "node_25" }, "default_entry" : { - "action_id" : 41, + "action_id" : 32, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_6", - "id" : 20, + "name" : "tbl_act_5", + "id" : 15, "key" : [], "match_type" : "exact", "type" : "simple", @@ -3854,14 +3329,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [42], - "actions" : ["act_6"], + "action_ids" : [33], + "actions" : ["act_5"], "base_default_next" : null, "next_tables" : { - "act_6" : null + "act_5" : null }, "default_entry" : { - "action_id" : 42, + "action_id" : 33, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -3905,7 +3380,7 @@ "name" : "node_2", "id" : 0, "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 25, "column" : 12, "source_fragment" : "hdr.packet_out.isValid()" @@ -3928,7 +3403,7 @@ "name" : "node_6", "id" : 1, "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 163, "column" : 11, "source_fragment" : "fabric_metadata.fwd_type == FWD_BRIDGING" @@ -3954,7 +3429,7 @@ "name" : "node_8", "id" : 2, "source_info" : { - "filename" : "./include/control/forwarding.p4", + "filename" : "include/control/forwarding.p4", "line" : 164, "column" : 17, "source_fragment" : "fabric_metadata.fwd_type == FWD_MPLS" @@ -3980,8 +3455,8 @@ "name" : "node_11", "id" : 3, "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 171, + "filename" : "include/control/forwarding.p4", + "line" : 179, "column" : 17, "source_fragment" : "fabric_metadata.fwd_type == FWD_IPV4_UNICAST" }, @@ -4000,89 +3475,11 @@ } }, "true_next" : "FabricIngress.forwarding.unicast_v4", - "false_next" : "node_13" - }, - { - "name" : "node_13", - "id" : 4, - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 173, - "column" : 17, - "source_fragment" : "fabric_metadata.fwd_type == FWD_IPV4_MULTICAST" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "==", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.fwd_type"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x03" - } - } - }, - "true_next" : "FabricIngress.forwarding.multicast_v4", - "false_next" : "node_15" - }, - { - "name" : "node_15", - "id" : 5, - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 176, - "column" : 17, - "source_fragment" : "fabric_metadata.fwd_type == FWD_IPV6_UNICAST" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "==", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.fwd_type"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x04" - } - } - }, - "true_next" : "FabricIngress.forwarding.unicast_v6", - "false_next" : "node_17" - }, - { - "name" : "node_17", - "id" : 6, - "source_info" : { - "filename" : "./include/control/forwarding.p4", - "line" : 178, - "column" : 17, - "source_fragment" : "fabric_metadata.fwd_type == FWD_IPV6_MULTICAST" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "==", - "left" : { - "type" : "field", - "value" : ["scalars", "fabric_metadata_t.fwd_type"] - }, - "right" : { - "type" : "hexstr", - "value" : "0x05" - } - } - }, - "true_next" : "FabricIngress.forwarding.multicast_v6", "false_next" : "FabricIngress.forwarding.acl" }, { - "name" : "node_24", - "id" : 7, + "name" : "node_18", + "id" : 4, "expression" : { "type" : "expression", "value" : { @@ -4094,14 +3491,14 @@ } } }, - "true_next" : "node_25", + "true_next" : "node_19", "false_next" : "FabricIngress.next.hashed" }, { - "name" : "node_25", - "id" : 8, + "name" : "node_19", + "id" : 5, "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 169, "column" : 16, "source_fragment" : "!hdr.mpls.isValid()" @@ -4124,14 +3521,14 @@ } } }, - "true_next" : "node_26", + "true_next" : "node_20", "false_next" : "FabricIngress.next.hashed" }, { - "name" : "node_26", - "id" : 9, + "name" : "node_20", + "id" : 6, "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 170, "column" : 19, "source_fragment" : "hdr.ipv4.isValid()" @@ -4148,36 +3545,13 @@ } }, "true_next" : "tbl_act_3", - "false_next" : "node_28" - }, - { - "name" : "node_28", - "id" : 10, - "source_info" : { - "filename" : "./include/control/next.p4", - "line" : 174, - "column" : 25, - "source_fragment" : "hdr.ipv6.isValid()" - }, - "expression" : { - "type" : "expression", - "value" : { - "op" : "d2b", - "left" : null, - "right" : { - "type" : "field", - "value" : ["ipv6", "$valid$"] - } - } - }, - "true_next" : "tbl_act_4", "false_next" : "FabricIngress.next.hashed" }, { - "name" : "node_32", - "id" : 11, + "name" : "node_23", + "id" : 7, "source_info" : { - "filename" : "./include/control/port_counter.p4", + "filename" : "include/control/port_counter.p4", "line" : 27, "column" : 12, "source_fragment" : "standard_metadata.egress_spec < 511" @@ -4196,14 +3570,14 @@ } } }, - "true_next" : "tbl_act_5", - "false_next" : "node_34" + "true_next" : "tbl_act_4", + "false_next" : "node_25" }, { - "name" : "node_34", - "id" : 12, + "name" : "node_25", + "id" : 8, "source_info" : { - "filename" : "./include/control/port_counter.p4", + "filename" : "include/control/port_counter.p4", "line" : 30, "column" : 12, "source_fragment" : "standard_metadata.ingress_port < 511" @@ -4223,7 +3597,7 @@ } }, "false_next" : null, - "true_next" : "tbl_act_6" + "true_next" : "tbl_act_5" } ] }, @@ -4240,9 +3614,9 @@ "tables" : [ { "name" : "FabricEgress.egress_next.egress_vlan", - "id" : 21, + "id" : 16, "source_info" : { - "filename" : "./include/control/next.p4", + "filename" : "include/control/next.p4", "line" : 197, "column" : 10, "source_fragment" : "egress_vlan" @@ -4267,15 +3641,15 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [45, 43], + "action_ids" : [36, 34], "actions" : ["FabricEgress.egress_next.pop_vlan", "nop"], - "base_default_next" : "node_39", + "base_default_next" : "node_30", "next_tables" : { - "FabricEgress.egress_next.pop_vlan" : "node_39", - "nop" : "node_39" + "FabricEgress.egress_next.pop_vlan" : "node_30", + "nop" : "node_30" }, "default_entry" : { - "action_id" : 43, + "action_id" : 34, "action_const" : false, "action_data" : [], "action_entry_const" : false @@ -4283,7 +3657,7 @@ }, { "name" : "tbl_pkt_io_egress_pop_vlan", - "id" : 22, + "id" : 17, "key" : [], "match_type" : "exact", "type" : "simple", @@ -4291,22 +3665,22 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [44], + "action_ids" : [35], "actions" : ["FabricEgress.pkt_io_egress.pop_vlan"], - "base_default_next" : "tbl_act_7", + "base_default_next" : "tbl_act_6", "next_tables" : { - "FabricEgress.pkt_io_egress.pop_vlan" : "tbl_act_7" + "FabricEgress.pkt_io_egress.pop_vlan" : "tbl_act_6" }, "default_entry" : { - "action_id" : 44, + "action_id" : 35, "action_const" : true, "action_data" : [], "action_entry_const" : true } }, { - "name" : "tbl_act_7", - "id" : 23, + "name" : "tbl_act_6", + "id" : 18, "key" : [], "match_type" : "exact", "type" : "simple", @@ -4314,14 +3688,14 @@ "with_counters" : false, "support_timeout" : false, "direct_meters" : null, - "action_ids" : [46], - "actions" : ["act_7"], + "action_ids" : [37], + "actions" : ["act_6"], "base_default_next" : null, "next_tables" : { - "act_7" : null + "act_6" : null }, "default_entry" : { - "action_id" : 46, + "action_id" : 37, "action_const" : true, "action_data" : [], "action_entry_const" : true @@ -4331,10 +3705,10 @@ "action_profiles" : [], "conditionals" : [ { - "name" : "node_39", - "id" : 13, + "name" : "node_30", + "id" : 9, "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 42, "column" : 12, "source_fragment" : "standard_metadata.egress_port == 255" @@ -4354,13 +3728,13 @@ } }, "false_next" : null, - "true_next" : "node_40" + "true_next" : "node_31" }, { - "name" : "node_40", - "id" : 14, + "name" : "node_31", + "id" : 10, "source_info" : { - "filename" : "./include/control/packetio.p4", + "filename" : "include/control/packetio.p4", "line" : 43, "column" : 16, "source_fragment" : "hdr.vlan_tag.isValid() && fabric_metadata.pop_vlan_when_packet_in" @@ -4394,7 +3768,7 @@ } }, "true_next" : "tbl_pkt_io_egress_pop_vlan", - "false_next" : "tbl_act_7" + "false_next" : "tbl_act_6" } ] } @@ -4484,5 +3858,10 @@ "intrinsic_metadata.recirculate_flag", ["standard_metadata", "recirculate_flag"] ] - ] + ], + "program" : "fabric.p4", + "__meta__" : { + "version" : [2, 18], + "compiler" : "https://github.com/p4lang/p4c" + } } \ No newline at end of file diff --git a/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.p4info b/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.p4info index b4e460a154..bae8224206 100644 --- a/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.p4info +++ b/pipelines/fabric/src/main/resources/p4c-out/bmv2/fabric.p4info @@ -35,8 +35,9 @@ tables { id: 16798734 } const_default_action_id: 16819938 - direct_resource_ids: 302038285 + direct_resource_ids: 318815501 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -66,8 +67,9 @@ tables { id: 16840921 } const_default_action_id: 16840921 - direct_resource_ids: 302050110 + direct_resource_ids: 318827326 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -94,8 +96,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 301993073 + direct_resource_ids: 318770289 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -116,8 +119,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 302053291 + direct_resource_ids: 318830507 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -138,86 +142,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 301991276 - size: 1024 -} -tables { - preamble { - id: 33578363 - name: "FabricIngress.forwarding.multicast_v4" - alias: "multicast_v4" - } - match_fields { - id: 1 - name: "hdr.vlan_tag.vlan_id" - bitwidth: 12 - match_type: EXACT - } - match_fields { - id: 2 - name: "hdr.ipv4.dst_addr" - bitwidth: 32 - match_type: LPM - } - action_refs { - id: 16839692 - } - action_refs { - id: 16800567 - annotations: "@defaultonly()" - } - direct_resource_ids: 302020680 - size: 1024 -} -tables { - preamble { - id: 33568751 - name: "FabricIngress.forwarding.unicast_v6" - alias: "unicast_v6" - } - match_fields { - id: 1 - name: "hdr.ipv6.dst_addr" - bitwidth: 128 - match_type: LPM - } - action_refs { - id: 16839692 - } - action_refs { - id: 16800567 - annotations: "@defaultonly()" - } - direct_resource_ids: 302043649 - size: 1024 -} -tables { - preamble { - id: 33581295 - name: "FabricIngress.forwarding.multicast_v6" - alias: "multicast_v6" - } - match_fields { - id: 1 - name: "hdr.vlan_tag.vlan_id" - bitwidth: 12 - match_type: EXACT - } - match_fields { - id: 2 - name: "hdr.ipv6.dst_addr" - bitwidth: 128 - match_type: LPM - } - action_refs { - id: 16839692 - } - action_refs { - id: 16800567 - annotations: "@defaultonly()" - } - direct_resource_ids: 302038094 + direct_resource_ids: 318768492 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -310,8 +237,9 @@ tables { id: 16819938 } const_default_action_id: 16819938 - direct_resource_ids: 301995056 + direct_resource_ids: 318772272 size: 256 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -331,8 +259,9 @@ tables { action_refs { id: 16819938 } - direct_resource_ids: 302008112 + direct_resource_ids: 318785328 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -365,8 +294,9 @@ tables { id: 16800567 annotations: "@defaultonly()" } - direct_resource_ids: 301991880 + direct_resource_ids: 318769096 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -394,30 +324,9 @@ tables { annotations: "@defaultonly()" } implementation_id: 285233747 - direct_resource_ids: 302023316 - size: 1024 -} -tables { - preamble { - id: 33606828 - name: "FabricIngress.next.multicast" - alias: "multicast" - } - match_fields { - id: 1 - name: "fabric_metadata.next_id" - bitwidth: 32 - match_type: EXACT - } - action_refs { - id: 16789575 - } - action_refs { - id: 16800567 - annotations: "@defaultonly()" - } - direct_resource_ids: 302024536 + direct_resource_ids: 318800532 size: 1024 + idle_timeout_behavior: NO_TIMEOUT } tables { preamble { @@ -444,6 +353,7 @@ tables { id: 16819938 } size: 1024 + idle_timeout_behavior: NO_TIMEOUT } actions { preamble { @@ -684,23 +594,6 @@ actions { bitwidth: 20 } } -actions { - preamble { - id: 16789575 - name: "FabricIngress.next.set_mcast_group" - alias: "set_mcast_group" - } - params { - id: 1 - name: "gid" - bitwidth: 16 - } - params { - id: 2 - name: "smac" - bitwidth: 48 - } -} actions { preamble { id: 16801047 @@ -749,7 +642,7 @@ counters { } direct_counters { preamble { - id: 302038285 + id: 318815501 name: "FabricIngress.filtering.ingress_port_vlan_counter" alias: "ingress_port_vlan_counter" } @@ -760,7 +653,7 @@ direct_counters { } direct_counters { preamble { - id: 302050110 + id: 318827326 name: "FabricIngress.filtering.fwd_classifier_counter" alias: "fwd_classifier_counter" } @@ -771,7 +664,7 @@ direct_counters { } direct_counters { preamble { - id: 301993073 + id: 318770289 name: "FabricIngress.forwarding.bridging_counter" alias: "bridging_counter" } @@ -782,7 +675,7 @@ direct_counters { } direct_counters { preamble { - id: 302053291 + id: 318830507 name: "FabricIngress.forwarding.mpls_counter" alias: "mpls_counter" } @@ -793,7 +686,7 @@ direct_counters { } direct_counters { preamble { - id: 301991276 + id: 318768492 name: "FabricIngress.forwarding.unicast_v4_counter" alias: "unicast_v4_counter" } @@ -804,40 +697,7 @@ direct_counters { } direct_counters { preamble { - id: 302020680 - name: "FabricIngress.forwarding.multicast_v4_counter" - alias: "multicast_v4_counter" - } - spec { - unit: BOTH - } - direct_table_id: 33578363 -} -direct_counters { - preamble { - id: 302043649 - name: "FabricIngress.forwarding.unicast_v6_counter" - alias: "unicast_v6_counter" - } - spec { - unit: BOTH - } - direct_table_id: 33568751 -} -direct_counters { - preamble { - id: 302038094 - name: "FabricIngress.forwarding.multicast_v6_counter" - alias: "multicast_v6_counter" - } - spec { - unit: BOTH - } - direct_table_id: 33581295 -} -direct_counters { - preamble { - id: 301995056 + id: 318772272 name: "FabricIngress.forwarding.acl_counter" alias: "acl_counter" } @@ -848,7 +708,7 @@ direct_counters { } direct_counters { preamble { - id: 302008112 + id: 318785328 name: "FabricIngress.next.vlan_meta_counter" alias: "vlan_meta_counter" } @@ -859,7 +719,7 @@ direct_counters { } direct_counters { preamble { - id: 301991880 + id: 318769096 name: "FabricIngress.next.simple_counter" alias: "simple_counter" } @@ -870,7 +730,7 @@ direct_counters { } direct_counters { preamble { - id: 302023316 + id: 318800532 name: "FabricIngress.next.hashed_counter" alias: "hashed_counter" } @@ -879,20 +739,9 @@ direct_counters { } direct_table_id: 33608588 } -direct_counters { - preamble { - id: 302024536 - name: "FabricIngress.next.multicast_counter" - alias: "multicast_counter" - } - spec { - unit: BOTH - } - direct_table_id: 33606828 -} controller_packet_metadata { preamble { - id: 2868941301 + id: 67146229 name: "packet_in" annotations: "@controller_header(\"packet_in\")" } @@ -909,7 +758,7 @@ controller_packet_metadata { } controller_packet_metadata { preamble { - id: 2868916615 + id: 67121543 name: "packet_out" annotations: "@controller_header(\"packet_out\")" } @@ -924,3 +773,5 @@ controller_packet_metadata { bitwidth: 7 } } +type_info { +} diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/ActionProfileGroupEncoder.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/ActionProfileGroupEncoder.java index 9a01a82ba7..20f39dfe84 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/ActionProfileGroupEncoder.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/ActionProfileGroupEncoder.java @@ -21,10 +21,10 @@ import org.onosproject.net.pi.model.PiActionProfileId; import org.onosproject.net.pi.model.PiPipeconf; import org.onosproject.net.pi.runtime.PiActionGroup; import org.onosproject.net.pi.runtime.PiActionGroupId; -import p4.P4RuntimeOuterClass.ActionProfileGroup; -import p4.P4RuntimeOuterClass.ActionProfileGroup.Member; -import p4.P4RuntimeOuterClass.ActionProfileMember; -import p4.config.P4InfoOuterClass; +import p4.v1.P4RuntimeOuterClass.ActionProfileGroup; +import p4.v1.P4RuntimeOuterClass.ActionProfileGroup.Member; +import p4.v1.P4RuntimeOuterClass.ActionProfileMember; +import p4.config.v1.P4InfoOuterClass; import java.util.Collection; import java.util.Map; @@ -34,7 +34,8 @@ import static java.lang.String.format; /** * Encoder/Decoder for action profile group. */ -public final class ActionProfileGroupEncoder { +final class ActionProfileGroupEncoder { + private ActionProfileGroupEncoder() { // hide default constructor } diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/ActionProfileMemberEncoder.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/ActionProfileMemberEncoder.java index 7170eba164..ba31e69a58 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/ActionProfileMemberEncoder.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/ActionProfileMemberEncoder.java @@ -20,9 +20,9 @@ import org.onosproject.net.pi.model.PiActionProfileId; import org.onosproject.net.pi.model.PiPipeconf; import org.onosproject.net.pi.runtime.PiActionGroupMember; import org.onosproject.net.pi.runtime.PiActionGroupMemberId; -import p4.P4RuntimeOuterClass; -import p4.P4RuntimeOuterClass.ActionProfileMember; -import p4.config.P4InfoOuterClass; +import p4.config.v1.P4InfoOuterClass; +import p4.v1.P4RuntimeOuterClass; +import p4.v1.P4RuntimeOuterClass.ActionProfileMember; import static java.lang.String.format; import static org.onosproject.p4runtime.ctl.TableEntryEncoder.decodeActionMsg; @@ -36,23 +36,16 @@ public final class ActionProfileMemberEncoder { // Hide default constructor } - /** - * Encode a PiActionGroupMember to a ActionProfileMember. - * - * @param group the PI action group of members - * @param member the member to encode - * @param pipeconf the pipeconf - * @return encoded member - */ /** * Encode a PiActionGroupMember to a ActionProfileMember. * * @param profileId the PI action group profile ID of members - * @param member the member to encode - * @param pipeconf the pipeconf, as encode spec + * @param member the member to encode + * @param pipeconf the pipeconf, as encode spec * @return encoded member - * @throws P4InfoBrowser.NotFoundException can't find action profile from P4Info browser - * @throws EncodeException can't find P4Info from pipeconf + * @throws P4InfoBrowser.NotFoundException can't find action profile from + * P4Info browser + * @throws EncodeException can't find P4Info from pipeconf */ static ActionProfileMember encode(PiActionProfileId profileId, PiActionGroupMember member, @@ -88,12 +81,14 @@ public final class ActionProfileMemberEncoder { /** * Decode an action profile member to PI action group member. * - * @param member the action profile member - * @param weight the weight of the member + * @param member the action profile member + * @param weight the weight of the member * @param pipeconf the pipeconf, as decode spec * @return decoded PI action group member - * @throws P4InfoBrowser.NotFoundException can't find definition of action from P4 info - * @throws EncodeException can't get P4 info browser from pipeconf + * @throws P4InfoBrowser.NotFoundException can't find definition of action + * from P4 info + * @throws EncodeException can't get P4 info browser from + * pipeconf */ static PiActionGroupMember decode(ActionProfileMember member, int weight, diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/CounterEntryCodec.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/CounterEntryCodec.java index 17bff76c4d..ec50c682c7 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/CounterEntryCodec.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/CounterEntryCodec.java @@ -24,11 +24,11 @@ import org.onosproject.net.pi.runtime.PiCounterCellData; import org.onosproject.net.pi.runtime.PiCounterCellId; import org.onosproject.net.pi.runtime.PiTableEntry; import org.slf4j.Logger; -import p4.P4RuntimeOuterClass; -import p4.P4RuntimeOuterClass.CounterData; -import p4.P4RuntimeOuterClass.CounterEntry; -import p4.P4RuntimeOuterClass.DirectCounterEntry; -import p4.P4RuntimeOuterClass.Entity; +import p4.v1.P4RuntimeOuterClass; +import p4.v1.P4RuntimeOuterClass.CounterData; +import p4.v1.P4RuntimeOuterClass.CounterEntry; +import p4.v1.P4RuntimeOuterClass.DirectCounterEntry; +import p4.v1.P4RuntimeOuterClass.Entity; import java.util.Collection; import java.util.Collections; @@ -38,8 +38,8 @@ import java.util.stream.Collectors; import static java.lang.String.format; import static org.onosproject.p4runtime.ctl.P4RuntimeUtils.indexMsg; import static org.slf4j.LoggerFactory.getLogger; -import static p4.P4RuntimeOuterClass.Entity.EntityCase.COUNTER_ENTRY; -import static p4.P4RuntimeOuterClass.Entity.EntityCase.DIRECT_COUNTER_ENTRY; +import static p4.v1.P4RuntimeOuterClass.Entity.EntityCase.COUNTER_ENTRY; +import static p4.v1.P4RuntimeOuterClass.Entity.EntityCase.DIRECT_COUNTER_ENTRY; /** * Encoder/decoder of PI counter IDs to counter entry protobuf messages, and diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/DefaultArbitration.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/DefaultArbitration.java index 8c83beef47..e8b86581d4 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/DefaultArbitration.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/DefaultArbitration.java @@ -19,7 +19,7 @@ package org.onosproject.p4runtime.ctl; import org.onosproject.net.DeviceId; import org.onosproject.net.MastershipRole; import org.onosproject.p4runtime.api.P4RuntimeEventSubject; -import p4.P4RuntimeOuterClass.Uint128; +import p4.v1.P4RuntimeOuterClass.Uint128; /** * Default implementation of arbitration in P4Runtime. @@ -36,7 +36,7 @@ public class DefaultArbitration implements P4RuntimeEventSubject { * @param role the role * @param electionId the election id */ - public DefaultArbitration(DeviceId deviceId, MastershipRole role, Uint128 electionId) { + DefaultArbitration(DeviceId deviceId, MastershipRole role, Uint128 electionId) { this.deviceId = deviceId; this.role = role; this.electionId = electionId; diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/MeterEntryCodec.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/MeterEntryCodec.java index a830f6d3fd..12379fdf5a 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/MeterEntryCodec.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/MeterEntryCodec.java @@ -25,11 +25,11 @@ import org.onosproject.net.pi.runtime.PiMeterCellConfig; import org.onosproject.net.pi.runtime.PiMeterCellId; import org.onosproject.net.pi.runtime.PiTableEntry; import org.slf4j.Logger; -import p4.P4RuntimeOuterClass; -import p4.P4RuntimeOuterClass.DirectMeterEntry; -import p4.P4RuntimeOuterClass.Entity; -import p4.P4RuntimeOuterClass.MeterConfig; -import p4.P4RuntimeOuterClass.MeterEntry; +import p4.v1.P4RuntimeOuterClass; +import p4.v1.P4RuntimeOuterClass.DirectMeterEntry; +import p4.v1.P4RuntimeOuterClass.Entity; +import p4.v1.P4RuntimeOuterClass.MeterConfig; +import p4.v1.P4RuntimeOuterClass.MeterEntry; import java.util.Collection; import java.util.Collections; @@ -39,8 +39,8 @@ import java.util.stream.Collectors; import static java.lang.String.format; import static org.onosproject.p4runtime.ctl.P4RuntimeUtils.indexMsg; import static org.slf4j.LoggerFactory.getLogger; -import static p4.P4RuntimeOuterClass.Entity.EntityCase.DIRECT_METER_ENTRY; -import static p4.P4RuntimeOuterClass.Entity.EntityCase.METER_ENTRY; +import static p4.v1.P4RuntimeOuterClass.Entity.EntityCase.DIRECT_METER_ENTRY; +import static p4.v1.P4RuntimeOuterClass.Entity.EntityCase.METER_ENTRY; /** * Encoder/decoder of PI meter cell configurations to meter entry protobuf diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4DataCodec.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4DataCodec.java index 5b0a2c5d2b..551bf5cc14 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4DataCodec.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4DataCodec.java @@ -18,9 +18,9 @@ package org.onosproject.p4runtime.ctl; import com.google.protobuf.ByteString; import org.onlab.util.ImmutableByteSequence; +import org.onosproject.net.pi.model.PiData; import org.onosproject.net.pi.runtime.data.PiBitString; import org.onosproject.net.pi.runtime.data.PiBool; -import org.onosproject.net.pi.model.PiData; import org.onosproject.net.pi.runtime.data.PiEnumString; import org.onosproject.net.pi.runtime.data.PiErrorString; import org.onosproject.net.pi.runtime.data.PiHeader; @@ -29,13 +29,16 @@ import org.onosproject.net.pi.runtime.data.PiHeaderUnion; import org.onosproject.net.pi.runtime.data.PiHeaderUnionStack; import org.onosproject.net.pi.runtime.data.PiStruct; import org.onosproject.net.pi.runtime.data.PiTuple; -import org.slf4j.Logger; -import p4.P4Types; import java.util.List; import java.util.stream.Collectors; -import static org.slf4j.LoggerFactory.getLogger; +import static p4.v1.P4DataOuterClass.P4Data; +import static p4.v1.P4DataOuterClass.P4Header; +import static p4.v1.P4DataOuterClass.P4HeaderStack; +import static p4.v1.P4DataOuterClass.P4HeaderUnion; +import static p4.v1.P4DataOuterClass.P4HeaderUnionStack; +import static p4.v1.P4DataOuterClass.P4StructLike; /** * Encoder/decoder of PI Data entry to P4 Data entry protobuf @@ -43,14 +46,12 @@ import static org.slf4j.LoggerFactory.getLogger; */ final class P4DataCodec { - private static final Logger log = getLogger(P4DataCodec.class); - private P4DataCodec() { // Hides constructor. } - private static P4Types.P4Header encodeHeader(PiHeader piHeader) { - P4Types.P4Header.Builder builder = P4Types.P4Header.newBuilder(); + private static P4Header encodeHeader(PiHeader piHeader) { + P4Header.Builder builder = P4Header.newBuilder(); int i = 0; for (ImmutableByteSequence bitString : piHeader.bitStrings()) { builder.setBitstrings(i, ByteString.copyFrom(bitString.asArray())); @@ -59,7 +60,7 @@ final class P4DataCodec { return builder.setIsValid(piHeader.isValid()).build(); } - private static PiHeader decodeHeader(P4Types.P4Header p4Header) { + private static PiHeader decodeHeader(P4Header p4Header) { List bitStrings = p4Header.getBitstringsList().stream() .map(bit -> ImmutableByteSequence.copyFrom(bit.asReadOnlyByteBuffer())) .collect(Collectors.toList()); @@ -67,9 +68,9 @@ final class P4DataCodec { return PiHeader.of(p4Header.getIsValid(), bitStrings); } - private static P4Types.P4HeaderUnion encodeHeaderUnion(PiHeaderUnion headerUnion) { + private static P4HeaderUnion encodeHeaderUnion(PiHeaderUnion headerUnion) { - P4Types.P4HeaderUnion.Builder builder = P4Types.P4HeaderUnion.newBuilder(); + P4HeaderUnion.Builder builder = P4HeaderUnion.newBuilder(); if (headerUnion.isValid()) { builder.setValidHeader(encodeHeader(headerUnion.header())); builder.setValidHeaderName(headerUnion.headerName()); @@ -82,45 +83,45 @@ final class P4DataCodec { return builder.build(); } - private static PiHeaderUnion decodeHeaderUnion(P4Types.P4HeaderUnion p4HeaderUnion) { + private static PiHeaderUnion decodeHeaderUnion(P4HeaderUnion p4HeaderUnion) { return PiHeaderUnion.of(p4HeaderUnion.getValidHeaderName(), decodeHeader(p4HeaderUnion.getValidHeader())); } - private static P4Types.P4StructLike encodeStruct(PiStruct piStruct) { - P4Types.P4StructLike.Builder builder = P4Types.P4StructLike.newBuilder(); + private static P4StructLike encodeStruct(PiStruct piStruct) { + P4StructLike.Builder builder = P4StructLike.newBuilder(); builder.addAllMembers(piStruct.struct().stream() - .map(piData -> encodeP4Data(piData)) + .map(P4DataCodec::encodeP4Data) .collect(Collectors.toList())); return builder.build(); } - private static PiStruct decodeStruct(P4Types.P4StructLike p4StructLike) { + private static PiStruct decodeStruct(P4StructLike p4StructLike) { return PiStruct.of(p4StructLike.getMembersList().stream() - .map(p4Data -> decodeP4Data(p4Data)) + .map(P4DataCodec::decodeP4Data) .collect(Collectors.toList())); } - private static P4Types.P4StructLike encodeTuple(PiTuple piTuple) { - P4Types.P4StructLike.Builder builder = P4Types.P4StructLike.newBuilder(); + private static P4StructLike encodeTuple(PiTuple piTuple) { + P4StructLike.Builder builder = P4StructLike.newBuilder(); builder.addAllMembers(piTuple.tuple().stream() - .map(piData -> encodeP4Data(piData)) + .map(P4DataCodec::encodeP4Data) .collect(Collectors.toList())); return builder.build(); } - private static PiTuple decodeTuple(P4Types.P4StructLike p4StructLike) { + private static PiTuple decodeTuple(P4StructLike p4StructLike) { return PiTuple.of(p4StructLike.getMembersList().stream() - .map(p4Data -> decodeP4Data(p4Data)) + .map(P4DataCodec::decodeP4Data) .collect(Collectors.toList())); } - static P4Types.P4Data encodeP4Data(PiData piData) { + static P4Data encodeP4Data(PiData piData) { - P4Types.P4Data.Builder builder = P4Types.P4Data.newBuilder(); + P4Data.Builder builder = P4Data.newBuilder(); switch (piData.type()) { case BITSTRING: builder.setBitstring(ByteString.copyFrom(((PiBitString) piData).bitString().asArray())); @@ -144,7 +145,7 @@ final class P4DataCodec { builder.setHeader(encodeHeader((PiHeader) piData)); break; case HEADERSTACK: - P4Types.P4HeaderStack.Builder headerStack = P4Types.P4HeaderStack.newBuilder(); + P4HeaderStack.Builder headerStack = P4HeaderStack.newBuilder(); int i = 0; for (PiHeader header : ((PiHeaderStack) piData).headers()) { headerStack.setEntries(i, encodeHeader(header)); @@ -156,7 +157,7 @@ final class P4DataCodec { builder.setHeaderUnion(encodeHeaderUnion((PiHeaderUnion) piData)); break; case HEADERUNIONSTACK: - P4Types.P4HeaderUnionStack.Builder headerUnionStack = P4Types.P4HeaderUnionStack.newBuilder(); + P4HeaderUnionStack.Builder headerUnionStack = P4HeaderUnionStack.newBuilder(); int j = 0; for (PiHeaderUnion headerUnion : ((PiHeaderUnionStack) piData).headerUnions()) { headerUnionStack.setEntries(j, encodeHeaderUnion(headerUnion)); @@ -171,7 +172,7 @@ final class P4DataCodec { return builder.build(); } - static PiData decodeP4Data(P4Types.P4Data p4Data) { + static PiData decodeP4Data(P4Data p4Data) { PiData piData = null; switch (p4Data.getDataCase()) { @@ -195,13 +196,13 @@ final class P4DataCodec { break; case HEADER_STACK: piData = PiHeaderStack.of(p4Data.getHeaderStack().getEntriesList().stream() - .map(p4header -> decodeHeader(p4header)) + .map(P4DataCodec::decodeHeader) .collect(Collectors.toList())); break; case HEADER_UNION_STACK: piData = PiHeaderUnionStack.of(p4Data.getHeaderUnionStack() .getEntriesList().stream() - .map(p4HeaderUnion -> decodeHeaderUnion(p4HeaderUnion)) + .map(P4DataCodec::decodeHeaderUnion) .collect(Collectors.toList())); break; case ENUM: @@ -218,4 +219,4 @@ final class P4DataCodec { return piData; } -} \ No newline at end of file +} diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4InfoBrowser.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4InfoBrowser.java index 055b0c3977..801ce369a1 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4InfoBrowser.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4InfoBrowser.java @@ -19,17 +19,17 @@ package org.onosproject.p4runtime.ctl; import com.google.common.collect.Maps; import com.google.protobuf.Message; -import p4.config.P4InfoOuterClass.Action; -import p4.config.P4InfoOuterClass.ActionProfile; -import p4.config.P4InfoOuterClass.ControllerPacketMetadata; -import p4.config.P4InfoOuterClass.Counter; -import p4.config.P4InfoOuterClass.DirectCounter; -import p4.config.P4InfoOuterClass.DirectMeter; -import p4.config.P4InfoOuterClass.MatchField; -import p4.config.P4InfoOuterClass.Meter; -import p4.config.P4InfoOuterClass.P4Info; -import p4.config.P4InfoOuterClass.Preamble; -import p4.config.P4InfoOuterClass.Table; +import p4.config.v1.P4InfoOuterClass.Action; +import p4.config.v1.P4InfoOuterClass.ActionProfile; +import p4.config.v1.P4InfoOuterClass.ControllerPacketMetadata; +import p4.config.v1.P4InfoOuterClass.Counter; +import p4.config.v1.P4InfoOuterClass.DirectCounter; +import p4.config.v1.P4InfoOuterClass.DirectMeter; +import p4.config.v1.P4InfoOuterClass.MatchField; +import p4.config.v1.P4InfoOuterClass.Meter; +import p4.config.v1.P4InfoOuterClass.P4Info; +import p4.config.v1.P4InfoOuterClass.Preamble; +import p4.config.v1.P4InfoOuterClass.Table; import java.util.Map; diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4RuntimeClientImpl.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4RuntimeClientImpl.java index 624c41c3a7..43d01e5b8c 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4RuntimeClientImpl.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4RuntimeClientImpl.java @@ -52,24 +52,24 @@ import org.onosproject.net.pi.service.PiPipeconfService; import org.onosproject.p4runtime.api.P4RuntimeClient; import org.onosproject.p4runtime.api.P4RuntimeEvent; import org.slf4j.Logger; -import p4.P4RuntimeGrpc; -import p4.P4RuntimeOuterClass; -import p4.P4RuntimeOuterClass.ActionProfileGroup; -import p4.P4RuntimeOuterClass.ActionProfileMember; -import p4.P4RuntimeOuterClass.Entity; -import p4.P4RuntimeOuterClass.ForwardingPipelineConfig; -import p4.P4RuntimeOuterClass.MasterArbitrationUpdate; -import p4.P4RuntimeOuterClass.PacketIn; -import p4.P4RuntimeOuterClass.ReadRequest; -import p4.P4RuntimeOuterClass.ReadResponse; -import p4.P4RuntimeOuterClass.SetForwardingPipelineConfigRequest; -import p4.P4RuntimeOuterClass.StreamMessageRequest; -import p4.P4RuntimeOuterClass.StreamMessageResponse; -import p4.P4RuntimeOuterClass.TableEntry; -import p4.P4RuntimeOuterClass.Uint128; -import p4.P4RuntimeOuterClass.Update; -import p4.P4RuntimeOuterClass.WriteRequest; -import p4.config.P4InfoOuterClass.P4Info; +import p4.v1.P4RuntimeGrpc; +import p4.v1.P4RuntimeOuterClass; +import p4.v1.P4RuntimeOuterClass.ActionProfileGroup; +import p4.v1.P4RuntimeOuterClass.ActionProfileMember; +import p4.v1.P4RuntimeOuterClass.Entity; +import p4.v1.P4RuntimeOuterClass.ForwardingPipelineConfig; +import p4.v1.P4RuntimeOuterClass.MasterArbitrationUpdate; +import p4.v1.P4RuntimeOuterClass.PacketIn; +import p4.v1.P4RuntimeOuterClass.ReadRequest; +import p4.v1.P4RuntimeOuterClass.ReadResponse; +import p4.v1.P4RuntimeOuterClass.SetForwardingPipelineConfigRequest; +import p4.v1.P4RuntimeOuterClass.StreamMessageRequest; +import p4.v1.P4RuntimeOuterClass.StreamMessageResponse; +import p4.v1.P4RuntimeOuterClass.TableEntry; +import p4.v1.P4RuntimeOuterClass.Uint128; +import p4.v1.P4RuntimeOuterClass.Update; +import p4.v1.P4RuntimeOuterClass.WriteRequest; +import p4.config.v1.P4InfoOuterClass.P4Info; import p4.tmp.P4Config; import java.nio.ByteBuffer; @@ -96,11 +96,11 @@ import static com.google.common.base.Preconditions.checkNotNull; import static java.lang.String.format; import static org.onlab.util.Tools.groupedThreads; import static org.slf4j.LoggerFactory.getLogger; -import static p4.P4RuntimeOuterClass.Entity.EntityCase.ACTION_PROFILE_GROUP; -import static p4.P4RuntimeOuterClass.Entity.EntityCase.ACTION_PROFILE_MEMBER; -import static p4.P4RuntimeOuterClass.Entity.EntityCase.TABLE_ENTRY; -import static p4.P4RuntimeOuterClass.PacketOut; -import static p4.P4RuntimeOuterClass.SetForwardingPipelineConfigRequest.Action.VERIFY_AND_COMMIT; +import static p4.v1.P4RuntimeOuterClass.Entity.EntityCase.ACTION_PROFILE_GROUP; +import static p4.v1.P4RuntimeOuterClass.Entity.EntityCase.ACTION_PROFILE_MEMBER; +import static p4.v1.P4RuntimeOuterClass.Entity.EntityCase.TABLE_ENTRY; +import static p4.v1.P4RuntimeOuterClass.PacketOut; +import static p4.v1.P4RuntimeOuterClass.SetForwardingPipelineConfigRequest.Action.VERIFY_AND_COMMIT; /** * Implementation of a P4Runtime client. diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4RuntimeUtils.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4RuntimeUtils.java index 25ef153f21..5dafe2bd46 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4RuntimeUtils.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/P4RuntimeUtils.java @@ -17,14 +17,14 @@ package org.onosproject.p4runtime.ctl; import com.google.protobuf.ByteString; -import p4.P4RuntimeOuterClass; +import p4.v1.P4RuntimeOuterClass; import static java.lang.String.format; /** * Utilities for P4 runtime control. */ -public final class P4RuntimeUtils { +final class P4RuntimeUtils { private P4RuntimeUtils() { // Hide default construction diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/PacketIOCodec.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/PacketIOCodec.java index 485689f1fa..726e09258f 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/PacketIOCodec.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/PacketIOCodec.java @@ -25,7 +25,7 @@ import org.onosproject.net.pi.model.PiPipeconf; import org.onosproject.net.pi.runtime.PiControlMetadata; import org.onosproject.net.pi.runtime.PiPacketOperation; import org.slf4j.Logger; -import p4.config.P4InfoOuterClass; +import p4.config.v1.P4InfoOuterClass; import java.util.Collections; import java.util.List; @@ -35,9 +35,9 @@ import java.util.stream.Collectors; import static org.onlab.util.ImmutableByteSequence.copyFrom; import static org.onosproject.p4runtime.ctl.P4InfoBrowser.NotFoundException; import static org.slf4j.LoggerFactory.getLogger; -import static p4.P4RuntimeOuterClass.PacketIn; -import static p4.P4RuntimeOuterClass.PacketMetadata; -import static p4.P4RuntimeOuterClass.PacketOut; +import static p4.v1.P4RuntimeOuterClass.PacketIn; +import static p4.v1.P4RuntimeOuterClass.PacketMetadata; +import static p4.v1.P4RuntimeOuterClass.PacketOut; /** * Encoder of packet metadata, from ONOS Pi* format, to P4Runtime protobuf messages, and vice versa. diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/PipeconfHelper.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/PipeconfHelper.java index a49fdd8a17..85fa2a89ba 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/PipeconfHelper.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/PipeconfHelper.java @@ -24,7 +24,7 @@ import com.google.protobuf.TextFormat; import org.onosproject.net.pi.model.PiPipeconf; import org.onosproject.net.pi.model.PiPipeconfId; import org.slf4j.Logger; -import p4.config.P4InfoOuterClass.P4Info; +import p4.config.v1.P4InfoOuterClass.P4Info; import java.io.IOException; import java.io.InputStream; diff --git a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/TableEntryEncoder.java b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/TableEntryEncoder.java index 647b9cd06e..505b4cbdb9 100644 --- a/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/TableEntryEncoder.java +++ b/protocols/p4runtime/ctl/src/main/java/org/onosproject/p4runtime/ctl/TableEntryEncoder.java @@ -37,13 +37,12 @@ import org.onosproject.net.pi.runtime.PiRangeFieldMatch; import org.onosproject.net.pi.runtime.PiTableAction; import org.onosproject.net.pi.runtime.PiTableEntry; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; -import org.onosproject.net.pi.runtime.PiValidFieldMatch; import org.slf4j.Logger; -import p4.P4RuntimeOuterClass.Action; -import p4.P4RuntimeOuterClass.FieldMatch; -import p4.P4RuntimeOuterClass.TableAction; -import p4.P4RuntimeOuterClass.TableEntry; -import p4.config.P4InfoOuterClass; +import p4.v1.P4RuntimeOuterClass.Action; +import p4.v1.P4RuntimeOuterClass.FieldMatch; +import p4.v1.P4RuntimeOuterClass.TableAction; +import p4.v1.P4RuntimeOuterClass.TableEntry; +import p4.config.v1.P4InfoOuterClass; import java.util.Collection; import java.util.Collections; @@ -348,13 +347,6 @@ final class TableEntryEncoder { .setLow(rangeLowValue) .build()) .build(); - case VALID: - PiValidFieldMatch validMatch = (PiValidFieldMatch) piFieldMatch; - return fieldMatchMsgBuilder.setValid( - FieldMatch.Valid.newBuilder() - .setValue(validMatch.isValid()) - .build()) - .build(); default: throw new EncodeException(format( "Building of match type %s not implemented", piFieldMatch.type())); @@ -422,9 +414,6 @@ final class TableEntryEncoder { ImmutableByteSequence rangeHighValue = copyFrom(rangeFieldMatch.getHigh().asReadOnlyByteBuffer()); ImmutableByteSequence rangeLowValue = copyFrom(rangeFieldMatch.getLow().asReadOnlyByteBuffer()); return new PiRangeFieldMatch(headerFieldId, rangeLowValue, rangeHighValue); - case VALID: - FieldMatch.Valid validFieldMatch = fieldMatchMsg.getValid(); - return new PiValidFieldMatch(headerFieldId, validFieldMatch.getValue()); default: throw new EncodeException(format( "Decoding of field match type '%s' not implemented", typeCase.name())); diff --git a/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/MockP4RuntimeServer.java b/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/MockP4RuntimeServer.java index 47734580a6..99b60c48cf 100644 --- a/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/MockP4RuntimeServer.java +++ b/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/MockP4RuntimeServer.java @@ -18,17 +18,17 @@ package org.onosproject.p4runtime.ctl; import com.google.common.collect.Lists; import io.grpc.stub.StreamObserver; -import p4.P4RuntimeGrpc; -import p4.P4RuntimeOuterClass; -import p4.P4RuntimeOuterClass.GetForwardingPipelineConfigRequest; -import p4.P4RuntimeOuterClass.GetForwardingPipelineConfigResponse; -import p4.P4RuntimeOuterClass.ReadRequest; -import p4.P4RuntimeOuterClass.ReadResponse; -import p4.P4RuntimeOuterClass.SetForwardingPipelineConfigRequest; -import p4.P4RuntimeOuterClass.SetForwardingPipelineConfigResponse; -import p4.P4RuntimeOuterClass.StreamMessageResponse; -import p4.P4RuntimeOuterClass.WriteRequest; -import p4.P4RuntimeOuterClass.WriteResponse; +import p4.v1.P4RuntimeGrpc; +import p4.v1.P4RuntimeOuterClass; +import p4.v1.P4RuntimeOuterClass.GetForwardingPipelineConfigRequest; +import p4.v1.P4RuntimeOuterClass.GetForwardingPipelineConfigResponse; +import p4.v1.P4RuntimeOuterClass.ReadRequest; +import p4.v1.P4RuntimeOuterClass.ReadResponse; +import p4.v1.P4RuntimeOuterClass.SetForwardingPipelineConfigRequest; +import p4.v1.P4RuntimeOuterClass.SetForwardingPipelineConfigResponse; +import p4.v1.P4RuntimeOuterClass.StreamMessageResponse; +import p4.v1.P4RuntimeOuterClass.WriteRequest; +import p4.v1.P4RuntimeOuterClass.WriteResponse; import java.util.Collection; import java.util.List; 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 25d0e00d77..1e83577a07 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,12 +45,12 @@ import org.onosproject.net.pi.runtime.PiActionGroupId; import org.onosproject.net.pi.runtime.PiActionGroupMember; import org.onosproject.net.pi.runtime.PiActionGroupMemberId; import org.onosproject.net.pi.runtime.PiActionParam; -import p4.P4RuntimeOuterClass.ActionProfileGroup; -import p4.P4RuntimeOuterClass.ActionProfileMember; -import p4.P4RuntimeOuterClass.Entity; -import p4.P4RuntimeOuterClass.Uint128; -import p4.P4RuntimeOuterClass.Update; -import p4.P4RuntimeOuterClass.WriteRequest; +import p4.v1.P4RuntimeOuterClass.ActionProfileGroup; +import p4.v1.P4RuntimeOuterClass.ActionProfileMember; +import p4.v1.P4RuntimeOuterClass.Entity; +import p4.v1.P4RuntimeOuterClass.Uint128; +import p4.v1.P4RuntimeOuterClass.Update; +import p4.v1.P4RuntimeOuterClass.WriteRequest; import java.io.IOException; import java.net.URL; @@ -66,8 +66,8 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.onosproject.net.pi.model.PiPipeconf.ExtensionType.P4_INFO_TEXT; import static org.onosproject.p4runtime.api.P4RuntimeClient.WriteOperationType.INSERT; -import static p4.P4RuntimeOuterClass.Action; -import static p4.P4RuntimeOuterClass.ReadResponse; +import static p4.v1.P4RuntimeOuterClass.Action; +import static p4.v1.P4RuntimeOuterClass.ReadResponse; /** * Tests for P4 Runtime Action Profile Group support. diff --git a/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/TableEntryEncoderTest.java b/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/TableEntryEncoderTest.java index 709873e5c2..07991087a3 100644 --- a/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/TableEntryEncoderTest.java +++ b/protocols/p4runtime/ctl/src/test/java/org/onosproject/p4runtime/ctl/TableEntryEncoderTest.java @@ -36,8 +36,8 @@ import org.onosproject.net.pi.runtime.PiExactFieldMatch; import org.onosproject.net.pi.runtime.PiMatchKey; import org.onosproject.net.pi.runtime.PiTableEntry; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; -import p4.P4RuntimeOuterClass.Action; -import p4.P4RuntimeOuterClass.TableEntry; +import p4.v1.P4RuntimeOuterClass.Action; +import p4.v1.P4RuntimeOuterClass.TableEntry; import java.net.URL; import java.util.Collection; @@ -71,7 +71,6 @@ public class TableEntryEncoderTest { private static final String INGRESS_PORT = "ingress_port"; private static final String ETHER_TYPE = "etherType"; private static final String ECMP_GROUP_ID = "ecmp_group_id"; - private static final String ECMP_ACT_PROFILE = "ecmp_selector"; private final Random rand = new Random(); private final URL p4InfoUrl = this.getClass().getResource("/test.p4info"); 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 f8d6082c92..e60f25fac7 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 @@ -47,20 +47,20 @@ import org.onosproject.net.pi.model.PiRegisterModel; import org.onosproject.net.pi.model.PiTableId; import org.onosproject.net.pi.model.PiTableModel; import org.onosproject.net.pi.model.PiTableType; -import p4.config.P4InfoOuterClass; -import p4.config.P4InfoOuterClass.Action; -import p4.config.P4InfoOuterClass.ActionProfile; -import p4.config.P4InfoOuterClass.ActionRef; -import p4.config.P4InfoOuterClass.ControllerPacketMetadata; -import p4.config.P4InfoOuterClass.Counter; -import p4.config.P4InfoOuterClass.CounterSpec; -import p4.config.P4InfoOuterClass.DirectCounter; -import p4.config.P4InfoOuterClass.DirectMeter; -import p4.config.P4InfoOuterClass.MatchField; -import p4.config.P4InfoOuterClass.Meter; -import p4.config.P4InfoOuterClass.MeterSpec; -import p4.config.P4InfoOuterClass.P4Info; -import p4.config.P4InfoOuterClass.Table; +import p4.config.v1.P4InfoOuterClass; +import p4.config.v1.P4InfoOuterClass.Action; +import p4.config.v1.P4InfoOuterClass.ActionProfile; +import p4.config.v1.P4InfoOuterClass.ActionRef; +import p4.config.v1.P4InfoOuterClass.ControllerPacketMetadata; +import p4.config.v1.P4InfoOuterClass.Counter; +import p4.config.v1.P4InfoOuterClass.CounterSpec; +import p4.config.v1.P4InfoOuterClass.DirectCounter; +import p4.config.v1.P4InfoOuterClass.DirectMeter; +import p4.config.v1.P4InfoOuterClass.MatchField; +import p4.config.v1.P4InfoOuterClass.Meter; +import p4.config.v1.P4InfoOuterClass.MeterSpec; +import p4.config.v1.P4InfoOuterClass.P4Info; +import p4.config.v1.P4InfoOuterClass.Table; import java.io.IOException; import java.io.InputStream; @@ -103,7 +103,6 @@ public final class P4InfoParser { private static final Map MATCH_TYPE_MAP = new ImmutableMap.Builder() - .put(MatchField.MatchType.VALID, PiMatchType.VALID) .put(MatchField.MatchType.EXACT, PiMatchType.EXACT) .put(MatchField.MatchType.LPM, PiMatchType.LPM) .put(MatchField.MatchType.TERNARY, PiMatchType.TERNARY) @@ -211,7 +210,8 @@ public final class P4InfoParser { tableMsg.getSize(), tableCounterMapBuilder.build(), tableMeterMapBuilder.build(), - tableMsg.getWithEntryTimeout(), + !tableMsg.getIdleTimeoutBehavior() + .equals(Table.IdleTimeoutBehavior.NO_TIMEOUT), tableFieldMapBuilder.build(), tableActionMapBuilder.build(), actionMap.get(tableMsg.getConstDefaultActionId()), @@ -307,8 +307,7 @@ public final class P4InfoParser { return meterMap; } - private static Map parseRegisters(P4Info p4info) - throws P4InfoParserException { + private static Map parseRegisters(P4Info p4info) { final Map registerMap = Maps.newHashMap(); for (P4InfoOuterClass.Register registerMsg : p4info.getRegistersList()) { registerMap.put(registerMsg.getPreamble().getId(), 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 452a7a78a7..e23a49cfe0 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 @@ -22,6 +22,7 @@ import com.google.protobuf.ExtensionRegistry; import com.google.protobuf.TextFormat; import org.hamcrest.collection.IsIterableContainingInAnyOrder; import org.hamcrest.collection.IsIterableContainingInOrder; +import org.junit.Assert; import org.junit.Test; import org.onosproject.net.pi.model.PiActionId; import org.onosproject.net.pi.model.PiActionModel; @@ -40,22 +41,23 @@ import org.onosproject.net.pi.model.PiPacketOperationType; import org.onosproject.net.pi.model.PiPipelineModel; import org.onosproject.net.pi.model.PiTableId; import org.onosproject.net.pi.model.PiTableModel; -import p4.config.P4InfoOuterClass.Table; -import p4.config.P4InfoOuterClass.P4Info; -import p4.config.P4InfoOuterClass.MatchField; -import p4.config.P4InfoOuterClass.ActionRef; +import p4.config.v1.P4InfoOuterClass.ActionRef; +import p4.config.v1.P4InfoOuterClass.MatchField; +import p4.config.v1.P4InfoOuterClass.P4Info; +import p4.config.v1.P4InfoOuterClass.Table; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.Collection; import java.util.List; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsNull.notNullValue; /** @@ -69,8 +71,6 @@ public class P4InfoParserTest { private static final Long DEFAULT_MAX_TABLE_SIZE = 1024L; private static final Long DEFAULT_MAX_ACTION_PROFILE_SIZE = 64L; - public P4InfoParserTest() throws MalformedURLException { } - /** * Tests parse method. * @throws Exception if equality group objects dose not match as expected @@ -116,15 +116,14 @@ public class P4InfoParserTest { List piMatchFieldList = new ArrayList<>(); for (MatchField matchFieldIter : matchFieldList) { - int matchTypeNumber = matchFieldIter.getMatchType().getNumber(); - PiMatchType piMatchType = PiMatchType.VALID; - switch (matchTypeNumber) { - case 1: piMatchType = PiMatchType.VALID; break; - case 2: piMatchType = PiMatchType.EXACT; break; - case 3: piMatchType = PiMatchType.LPM; break; - case 4: piMatchType = piMatchType.TERNARY; break; - case 5: piMatchType = piMatchType.RANGE; break; - default: piMatchType = PiMatchType.VALID; break; + 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; + default: Assert.fail(); return; } piMatchFieldList.add(new P4MatchFieldModel(PiMatchFieldId.of(matchFieldIter.getName()), matchFieldIter.getBitwidth(), piMatchType)); diff --git a/protocols/p4runtime/proto/BUCK b/protocols/p4runtime/proto/BUCK index aa3d8d3c3f..2f8c07fa39 100644 --- a/protocols/p4runtime/proto/BUCK +++ b/protocols/p4runtime/proto/BUCK @@ -5,18 +5,19 @@ include_defs( PROTOBUF_VER = '3.2.0' GRPC_VER = '1.3.1' -PI_COMMIT = '219b3d67299ec09b49f433d7341049256ab5f512' +PI_COMMIT = '59c940916b4f5b182f33b4788d8c410972eaecce' PI_BASEURL = 'https://github.com/p4lang/PI.git' # Wondering which .proto files to build? Check p4runtime's Makefile: # https://github.com/p4lang/PI/blob/master/proto/Makefile.am PROTO_SRCS = [ - '/proto/p4/p4types.proto', - '/proto/p4/p4runtime.proto', - '/proto/p4/config/p4info.proto', + '/proto/p4/v1/p4runtime.proto', + '/proto/p4/v1/p4data.proto', + '/proto/p4/config/v1/p4info.proto', + '/proto/p4/config/v1/p4types.proto', + '/proto/p4/tmp/p4config.proto', '/proto/google/rpc/status.proto', '/proto/google/rpc/code.proto', - '/proto/p4/tmp/p4config.proto', ] COMPILE_DEPS =[ diff --git a/tools/dev/p4vm/install-p4-tools.sh b/tools/dev/p4vm/install-p4-tools.sh index a5c5bee63a..04b9bc6476 100755 --- a/tools/dev/p4vm/install-p4-tools.sh +++ b/tools/dev/p4vm/install-p4-tools.sh @@ -15,9 +15,9 @@ set -e BUILD_DIR=~/p4tools -BMV2_COMMIT="7e25eeb19d01eee1a8e982dc7ee90ee438c10a05" -PI_COMMIT="219b3d67299ec09b49f433d7341049256ab5f512" -P4C_COMMIT="48a57a6ae4f96961b74bd13f6bdeac5add7bb815" +BMV2_COMMIT="ed130d01be985d814c17de949839d484e76400b1" +PI_COMMIT="59c940916b4f5b182f33b4788d8c410972eaecce" +P4C_COMMIT="618d15155dcc2d784cc14a8e83131b407cf893e2" PROTOBUF_COMMIT="tags/v3.2.0" GRPC_COMMIT="tags/v1.3.2" LIBYANG_COMMIT="v0.14-r1"