blob: 667897b54c956bcc88beb24e676846be32fe3ddf [file] [log] [blame]
Carmelo Casconeca94bcf2017-10-27 14:16:59 -07001/*
2 * Copyright 2017-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.pipelines.basic;
18
Carmelo Cascone87892e22017-11-13 16:01:29 -080019import org.onosproject.net.pi.model.PiActionId;
20import org.onosproject.net.pi.model.PiActionParamId;
21import org.onosproject.net.pi.model.PiActionProfileId;
Carmelo Cascone4c289b72019-01-22 15:30:45 -080022import org.onosproject.net.pi.model.PiPacketMetadataId;
Carmelo Cascone87892e22017-11-13 16:01:29 -080023import org.onosproject.net.pi.model.PiCounterId;
24import org.onosproject.net.pi.model.PiMatchFieldId;
25import org.onosproject.net.pi.model.PiTableId;
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070026/**
Carmelo Cascone776be382018-12-12 19:03:57 -080027 * Constants for basic pipeline.
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070028 */
29public final class BasicConstants {
30
Carmelo Cascone776be382018-12-12 19:03:57 -080031 // hide default constructor
32 private BasicConstants() {
33 }
Carmelo Cascone81929aa2018-04-07 01:38:55 -070034
35 // Header field IDs
Carmelo Cascone776be382018-12-12 19:03:57 -080036 public static final PiMatchFieldId HDR_HDR_IPV4_PROTOCOL =
37 PiMatchFieldId.of("hdr.ipv4.protocol");
38 public static final PiMatchFieldId HDR_HDR_IPV4_SRC_ADDR =
39 PiMatchFieldId.of("hdr.ipv4.src_addr");
40 public static final PiMatchFieldId HDR_HDR_ETHERNET_ETHER_TYPE =
41 PiMatchFieldId.of("hdr.ethernet.ether_type");
42 public static final PiMatchFieldId HDR_HDR_ETHERNET_SRC_ADDR =
43 PiMatchFieldId.of("hdr.ethernet.src_addr");
44 public static final PiMatchFieldId HDR_LOCAL_METADATA_L4_DST_PORT =
45 PiMatchFieldId.of("local_metadata.l4_dst_port");
46 public static final PiMatchFieldId HDR_LOCAL_METADATA_L4_SRC_PORT =
47 PiMatchFieldId.of("local_metadata.l4_src_port");
48 public static final PiMatchFieldId HDR_STANDARD_METADATA_INGRESS_PORT =
49 PiMatchFieldId.of("standard_metadata.ingress_port");
50 public static final PiMatchFieldId HDR_HDR_IPV4_DST_ADDR =
51 PiMatchFieldId.of("hdr.ipv4.dst_addr");
52 public static final PiMatchFieldId HDR_LOCAL_METADATA_NEXT_HOP_ID =
53 PiMatchFieldId.of("local_metadata.next_hop_id");
54 public static final PiMatchFieldId HDR_HDR_ETHERNET_DST_ADDR =
55 PiMatchFieldId.of("hdr.ethernet.dst_addr");
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070056 // Table IDs
Carmelo Cascone776be382018-12-12 19:03:57 -080057 public static final PiTableId INGRESS_WCMP_CONTROL_WCMP_TABLE =
58 PiTableId.of("ingress.wcmp_control.wcmp_table");
59 public static final PiTableId INGRESS_HOST_METER_CONTROL_HOST_METER_TABLE =
60 PiTableId.of("ingress.host_meter_control.host_meter_table");
61 public static final PiTableId INGRESS_TABLE0_CONTROL_TABLE0 =
62 PiTableId.of("ingress.table0_control.table0");
63 // Indirect Counter IDs
64 public static final PiCounterId EGRESS_PORT_COUNTERS_EGRESS_EGRESS_PORT_COUNTER =
65 PiCounterId.of("egress.port_counters_egress.egress_port_counter");
66 public static final PiCounterId INGRESS_PORT_COUNTERS_INGRESS_INGRESS_PORT_COUNTER =
67 PiCounterId.of("ingress.port_counters_ingress.ingress_port_counter");
68 // Direct Counter IDs
69 public static final PiCounterId INGRESS_WCMP_CONTROL_WCMP_TABLE_COUNTER =
70 PiCounterId.of("ingress.wcmp_control.wcmp_table_counter");
71 public static final PiCounterId INGRESS_TABLE0_CONTROL_TABLE0_COUNTER =
72 PiCounterId.of("ingress.table0_control.table0_counter");
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070073 // Action IDs
Carmelo Cascone776be382018-12-12 19:03:57 -080074 public static final PiActionId INGRESS_TABLE0_CONTROL_SEND_TO_CPU =
75 PiActionId.of("ingress.table0_control.send_to_cpu");
76 public static final PiActionId NO_ACTION = PiActionId.of("NoAction");
77 public static final PiActionId INGRESS_WCMP_CONTROL_SET_EGRESS_PORT =
78 PiActionId.of("ingress.wcmp_control.set_egress_port");
79 public static final PiActionId INGRESS_TABLE0_CONTROL_SET_NEXT_HOP_ID =
80 PiActionId.of("ingress.table0_control.set_next_hop_id");
81 public static final PiActionId INGRESS_TABLE0_CONTROL_SET_EGRESS_PORT =
82 PiActionId.of("ingress.table0_control.set_egress_port");
83 public static final PiActionId DROP = PiActionId.of("_drop");
84 public static final PiActionId INGRESS_HOST_METER_CONTROL_READ_METER =
85 PiActionId.of("ingress.host_meter_control.read_meter");
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070086 // Action Param IDs
Carmelo Cascone776be382018-12-12 19:03:57 -080087 public static final PiActionParamId PORT = PiActionParamId.of("port");
88 public static final PiActionParamId NEXT_HOP_ID =
Carmelo Cascone81929aa2018-04-07 01:38:55 -070089 PiActionParamId.of("next_hop_id");
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070090 // Action Profile IDs
Carmelo Cascone776be382018-12-12 19:03:57 -080091 public static final PiActionProfileId INGRESS_WCMP_CONTROL_WCMP_SELECTOR =
92 PiActionProfileId.of("ingress.wcmp_control.wcmp_selector");
Carmelo Casconeca94bcf2017-10-27 14:16:59 -070093 // Packet Metadata IDs
Carmelo Cascone4c289b72019-01-22 15:30:45 -080094 public static final PiPacketMetadataId PADDING =
95 PiPacketMetadataId.of("_padding");
96 public static final PiPacketMetadataId INGRESS_PORT =
97 PiPacketMetadataId.of("ingress_port");
98 public static final PiPacketMetadataId EGRESS_PORT =
99 PiPacketMetadataId.of("egress_port");
Carmelo Casconeca94bcf2017-10-27 14:16:59 -0700100}