blob: 8ae743d39da3f93c1dd860dd51d73e4d0a48f71a [file] [log] [blame]
Jonghwan Hyunb9358822017-12-06 17:55:27 -08001/*
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
19import org.onosproject.net.pi.model.PiActionId;
20import org.onosproject.net.pi.model.PiActionParamId;
21import org.onosproject.net.pi.model.PiCounterId;
22import org.onosproject.net.pi.model.PiMatchFieldId;
23import org.onosproject.net.pi.model.PiTableId;
24
Jonghwan Hyunf5d57822018-05-09 10:19:50 -070025import static org.onosproject.pipelines.basic.BasicConstants.*;
Jonghwan Hyunb9358822017-12-06 17:55:27 -080026
27/**
28 * Constants for INT pipeline.
29 */
30public final class IntConstants {
31
32 // Hide default constructor
33 private IntConstants() {
34 }
35
36 // Strings
Jonghwan Hyunf5d57822018-05-09 10:19:50 -070037 private static final String CTRL_SET_SOURCE_SINK = EGRESS + DOT + "process_set_source_sink";
38 private static final String CTRL_INT_SOURCE = EGRESS + DOT + "process_int_source";
39 private static final String CTRL_INT_TRANSIT = EGRESS + DOT + "process_int_transit";
40 private static final String CTRL_INT_SINK = EGRESS + DOT + "process_int_sink";
41 private static final String CTRL_INT_OUTER_ENCAP = EGRESS + DOT + "process_int_outer_encap";
Jonghwan Hyunb9358822017-12-06 17:55:27 -080042 private static final String INT_METADATA = "int_meta";
43 private static final String INT_HDR = "int_header";
44
45 // Header field IDs
46 public static final PiMatchFieldId LOCAL_META_SRC_PORT_ID =
47 PiMatchFieldId.of(LOCAL_METADATA + DOT + "l4_src_port");
48 public static final PiMatchFieldId LOCAL_META_DST_PORT_ID =
49 PiMatchFieldId.of(LOCAL_METADATA + DOT + "l4_dst_port");
50 public static final PiMatchFieldId INT_META_SINK_ID =
51 PiMatchFieldId.of(LOCAL_METADATA + DOT + INT_METADATA + DOT + "sink");
52 public static final PiMatchFieldId INT_HDR_INST_MASK_0003_ID =
53 PiMatchFieldId.of(HDR + DOT + INT_HDR + DOT + "instruction_mask_0003");
54 public static final PiMatchFieldId INT_HDR_INST_MASK_0407_ID =
55 PiMatchFieldId.of(HDR + DOT + INT_HDR + DOT + "instruction_mask_0407");
Jonghwan Hyunf5d57822018-05-09 10:19:50 -070056 public static final PiMatchFieldId HDR_OUT_PORT_ID =
57 PiMatchFieldId.of(STANDARD_METADATA + DOT + "egress_port");
Jonghwan Hyunb9358822017-12-06 17:55:27 -080058
59 // Table IDs
Jonghwan Hyunf5d57822018-05-09 10:19:50 -070060 public static final PiTableId TBL_SET_SOURCE_ID =
61 PiTableId.of(CTRL_SET_SOURCE_SINK + DOT + "tb_set_source");
62 public static final PiTableId TBL_SET_SINK_ID =
63 PiTableId.of(CTRL_SET_SOURCE_SINK + DOT + "tb_set_sink");
Jonghwan Hyunb9358822017-12-06 17:55:27 -080064 public static final PiTableId TBL_INT_SOURCE_ID =
65 PiTableId.of(CTRL_INT_SOURCE + DOT + "tb_int_source");
66 public static final PiTableId TBL_INT_INSERT_ID =
67 PiTableId.of(CTRL_INT_TRANSIT + DOT + "tb_int_insert");
68 public static final PiTableId TBL_INT_INST_0003_ID =
69 PiTableId.of(CTRL_INT_TRANSIT + DOT + "tb_int_inst_0003");
70 public static final PiTableId TBL_INT_INST_0407_ID =
71 PiTableId.of(CTRL_INT_TRANSIT + DOT + "tb_int_inst_0407");
72
73 // Counter IDs
74 public static final PiCounterId CNT_SET_SOURCE_SINK_ID =
75 PiCounterId.of(CTRL_SET_SOURCE_SINK + DOT + "counter_set_source_sink");
76 public static final PiCounterId CNT_INT_SOURCE_ID =
77 PiCounterId.of(CTRL_INT_SOURCE + DOT + "counter_int_source");
78 public static final PiCounterId CNT_INT_INSERT_ID =
79 PiCounterId.of(CTRL_INT_TRANSIT + DOT + "counter_int_insert");
80 public static final PiCounterId CNT_INT_INST_0003_ID =
81 PiCounterId.of(CTRL_INT_TRANSIT + DOT + "counter_int_inst_0003");
82 public static final PiCounterId CNT_INT_INST_0407_ID =
83 PiCounterId.of(CTRL_INT_TRANSIT + DOT + "counter_int_inst_0407");
84
85 // Action IDs
86 public static final PiActionId ACT_INT_SET_SOURCE_ID =
87 PiActionId.of(CTRL_SET_SOURCE_SINK + DOT + "int_set_source");
88 public static final PiActionId ACT_INT_SET_SINK_ID =
89 PiActionId.of(CTRL_SET_SOURCE_SINK + DOT + "int_set_sink");
90 public static final PiActionId ACT_INT_SOURCE_DSCP_ID =
91 PiActionId.of(CTRL_INT_SOURCE + DOT + "int_source_dscp");
92 public static final PiActionId ACT_INT_UPDATE_TOTAL_HOP_CNT_ID =
93 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_update_total_hop_cnt");
94 public static final PiActionId ACT_INT_TRANSIT_ID =
95 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_transit");
96 public static final PiActionId ACT_INT_SET_HEADER_0003_I0_ID =
97 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i0");
98 public static final PiActionId ACT_INT_SET_HEADER_0003_I1_ID =
99 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i1");
100 public static final PiActionId ACT_INT_SET_HEADER_0003_I2_ID =
101 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i2");
102 public static final PiActionId ACT_INT_SET_HEADER_0003_I3_ID =
103 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i3");
104 public static final PiActionId ACT_INT_SET_HEADER_0003_I4_ID =
105 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i4");
106 public static final PiActionId ACT_INT_SET_HEADER_0003_I5_ID =
107 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i5");
108 public static final PiActionId ACT_INT_SET_HEADER_0003_I6_ID =
109 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i6");
110 public static final PiActionId ACT_INT_SET_HEADER_0003_I7_ID =
111 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i7");
112 public static final PiActionId ACT_INT_SET_HEADER_0003_I8_ID =
113 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i8");
114 public static final PiActionId ACT_INT_SET_HEADER_0003_I9_ID =
115 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i9");
116 public static final PiActionId ACT_INT_SET_HEADER_0003_I10_ID =
117 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i10");
118 public static final PiActionId ACT_INT_SET_HEADER_0003_I11_ID =
119 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i11");
120 public static final PiActionId ACT_INT_SET_HEADER_0003_I12_ID =
121 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i12");
122 public static final PiActionId ACT_INT_SET_HEADER_0003_I13_ID =
123 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i13");
124 public static final PiActionId ACT_INT_SET_HEADER_0003_I14_ID =
125 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i14");
126 public static final PiActionId ACT_INT_SET_HEADER_0003_I15_ID =
127 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0003_i15");
128 public static final PiActionId ACT_INT_SET_HEADER_0407_I0_ID =
129 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i0");
130 public static final PiActionId ACT_INT_SET_HEADER_0407_I1_ID =
131 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i1");
132 public static final PiActionId ACT_INT_SET_HEADER_0407_I2_ID =
133 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i2");
134 public static final PiActionId ACT_INT_SET_HEADER_0407_I3_ID =
135 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i3");
136 public static final PiActionId ACT_INT_SET_HEADER_0407_I4_ID =
137 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i4");
138 public static final PiActionId ACT_INT_SET_HEADER_0407_I5_ID =
139 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i5");
140 public static final PiActionId ACT_INT_SET_HEADER_0407_I6_ID =
141 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i6");
142 public static final PiActionId ACT_INT_SET_HEADER_0407_I7_ID =
143 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i7");
144 public static final PiActionId ACT_INT_SET_HEADER_0407_I8_ID =
145 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i8");
146 public static final PiActionId ACT_INT_SET_HEADER_0407_I9_ID =
147 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i9");
148 public static final PiActionId ACT_INT_SET_HEADER_0407_I10_ID =
149 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i10");
150 public static final PiActionId ACT_INT_SET_HEADER_0407_I11_ID =
151 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i11");
152 public static final PiActionId ACT_INT_SET_HEADER_0407_I12_ID =
153 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i12");
154 public static final PiActionId ACT_INT_SET_HEADER_0407_I13_ID =
155 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i13");
156 public static final PiActionId ACT_INT_SET_HEADER_0407_I14_ID =
157 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i14");
158 public static final PiActionId ACT_INT_SET_HEADER_0407_I15_ID =
159 PiActionId.of(CTRL_INT_TRANSIT + DOT + "int_set_header_0407_i15");
160 public static final PiActionId ACT_INT_UPDATE_IPV4_ID =
161 PiActionId.of(CTRL_INT_OUTER_ENCAP + DOT + "int_update_ipv4");
162 public static final PiActionId ACT_INT_UPDATE_UDP_ID =
163 PiActionId.of(CTRL_INT_OUTER_ENCAP + DOT + "int_update_udp");
164 public static final PiActionId ACT_INT_UPDATE_SHIM_ID =
165 PiActionId.of(CTRL_INT_OUTER_ENCAP + DOT + "int_update_shim");
166 public static final PiActionId ACT_INT_RESTORE_HEADER_ID =
167 PiActionId.of(CTRL_INT_SINK + DOT + "restore_header");
168 public static final PiActionId ACT_INT_SINK_ID =
169 PiActionId.of(CTRL_INT_SINK + DOT + "int_sink");
170
171 // Action param IDs
172 public static final PiActionParamId ACT_PRM_MAX_HOP_ID = PiActionParamId.of("max_hop");
173 public static final PiActionParamId ACT_PRM_INS_CNT_ID = PiActionParamId.of("ins_cnt");
174 public static final PiActionParamId ACT_PRM_INS_MASK0003_ID = PiActionParamId.of("ins_mask0003");
175 public static final PiActionParamId ACT_PRM_INS_MASK0407_ID = PiActionParamId.of("ins_mask0407");
176 public static final PiActionParamId ACT_PRM_SWITCH_ID = PiActionParamId.of("switch_id");
177}