blob: ccd9111275995f91b99d4dbfbee6f5c448a3ae9f [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;
Jonghwan Hyunc235d462019-01-30 23:31:48 +090021import org.onosproject.net.pi.model.PiPacketMetadataId;
Jonghwan Hyunb9358822017-12-06 17:55:27 -080022import org.onosproject.net.pi.model.PiCounterId;
23import org.onosproject.net.pi.model.PiMatchFieldId;
24import org.onosproject.net.pi.model.PiTableId;
Jonghwan Hyunb9358822017-12-06 17:55:27 -080025/**
26 * Constants for INT pipeline.
27 */
28public final class IntConstants {
29
Jonghwan Hyunc235d462019-01-30 23:31:48 +090030 // hide default constructor
Jonghwan Hyunb9358822017-12-06 17:55:27 -080031 private IntConstants() {
32 }
33
Jonghwan Hyunb9358822017-12-06 17:55:27 -080034 // Header field IDs
Jonghwan Hyunc235d462019-01-30 23:31:48 +090035 public static final PiMatchFieldId HDR_HDR_IPV4_PROTOCOL =
36 PiMatchFieldId.of("hdr.ipv4.protocol");
37 public static final PiMatchFieldId HDR_STANDARD_METADATA_EGRESS_SPEC =
38 PiMatchFieldId.of("standard_metadata.egress_spec");
39 public static final PiMatchFieldId HDR_HDR_IPV4_SRC_ADDR =
40 PiMatchFieldId.of("hdr.ipv4.src_addr");
41 public static final PiMatchFieldId HDR_HDR_ETHERNET_ETHER_TYPE =
42 PiMatchFieldId.of("hdr.ethernet.ether_type");
43 public static final PiMatchFieldId HDR_HDR_ETHERNET_SRC_ADDR =
44 PiMatchFieldId.of("hdr.ethernet.src_addr");
45 public static final PiMatchFieldId HDR_LOCAL_METADATA_L4_DST_PORT =
46 PiMatchFieldId.of("local_metadata.l4_dst_port");
47 public static final PiMatchFieldId HDR_LOCAL_METADATA_L4_SRC_PORT =
48 PiMatchFieldId.of("local_metadata.l4_src_port");
49 public static final PiMatchFieldId HDR_STANDARD_METADATA_INGRESS_PORT =
50 PiMatchFieldId.of("standard_metadata.ingress_port");
51 public static final PiMatchFieldId HDR_INT_IS_VALID =
52 PiMatchFieldId.of("int_is_valid");
53 public static final PiMatchFieldId HDR_HDR_IPV4_DST_ADDR =
54 PiMatchFieldId.of("hdr.ipv4.dst_addr");
55 public static final PiMatchFieldId HDR_HDR_ETHERNET_DST_ADDR =
56 PiMatchFieldId.of("hdr.ethernet.dst_addr");
Jonghwan Hyunb9358822017-12-06 17:55:27 -080057 // Table IDs
Jonghwan Hyunc235d462019-01-30 23:31:48 +090058 public static final PiTableId INGRESS_PROCESS_INT_SOURCE_TB_INT_SOURCE =
59 PiTableId.of("ingress.process_int_source.tb_int_source");
60 public static final PiTableId EGRESS_PROCESS_INT_REPORT_TB_GENERATE_REPORT =
61 PiTableId.of("egress.process_int_report.tb_generate_report");
62 public static final PiTableId INGRESS_TABLE0_CONTROL_TABLE0 =
63 PiTableId.of("ingress.table0_control.table0");
64 public static final PiTableId EGRESS_PROCESS_INT_TRANSIT_TB_INT_INSERT =
65 PiTableId.of("egress.process_int_transit.tb_int_insert");
66 public static final PiTableId INGRESS_PROCESS_INT_SOURCE_SINK_TB_SET_SINK =
67 PiTableId.of("ingress.process_int_source_sink.tb_set_sink");
68 public static final PiTableId INGRESS_PROCESS_INT_SOURCE_SINK_TB_SET_SOURCE =
69 PiTableId.of("ingress.process_int_source_sink.tb_set_source");
70 // Indirect Counter IDs
71 public static final PiCounterId EGRESS_PORT_COUNTERS_EGRESS_EGRESS_PORT_COUNTER =
72 PiCounterId.of("egress.port_counters_egress.egress_port_counter");
73 public static final PiCounterId INGRESS_PORT_COUNTERS_INGRESS_INGRESS_PORT_COUNTER =
74 PiCounterId.of("ingress.port_counters_ingress.ingress_port_counter");
75 // Direct Counter IDs
76 public static final PiCounterId INGRESS_PROCESS_INT_SOURCE_SINK_COUNTER_SET_SINK =
77 PiCounterId.of("ingress.process_int_source_sink.counter_set_sink");
78 public static final PiCounterId INGRESS_TABLE0_CONTROL_TABLE0_COUNTER =
79 PiCounterId.of("ingress.table0_control.table0_counter");
80 public static final PiCounterId INGRESS_PROCESS_INT_SOURCE_COUNTER_INT_SOURCE =
81 PiCounterId.of("ingress.process_int_source.counter_int_source");
82 public static final PiCounterId INGRESS_PROCESS_INT_SOURCE_SINK_COUNTER_SET_SOURCE =
83 PiCounterId.of("ingress.process_int_source_sink.counter_set_source");
Jonghwan Hyunb9358822017-12-06 17:55:27 -080084 // Action IDs
Jonghwan Hyunc235d462019-01-30 23:31:48 +090085 public static final PiActionId INGRESS_PROCESS_INT_SOURCE_INT_SOURCE_DSCP =
86 PiActionId.of("ingress.process_int_source.int_source_dscp");
87 public static final PiActionId EGRESS_PROCESS_INT_REPORT_DO_REPORT_ENCAPSULATION =
88 PiActionId.of("egress.process_int_report.do_report_encapsulation");
89 public static final PiActionId INGRESS_TABLE0_CONTROL_SEND_TO_CPU =
90 PiActionId.of("ingress.table0_control.send_to_cpu");
91 public static final PiActionId INGRESS_PROCESS_INT_SOURCE_SINK_INT_SET_SOURCE =
92 PiActionId.of("ingress.process_int_source_sink.int_set_source");
93 public static final PiActionId NO_ACTION = PiActionId.of("NoAction");
94 public static final PiActionId INGRESS_PROCESS_INT_SOURCE_SINK_INT_SET_SINK =
95 PiActionId.of("ingress.process_int_source_sink.int_set_sink");
96 public static final PiActionId INGRESS_TABLE0_CONTROL_SET_NEXT_HOP_ID =
97 PiActionId.of("ingress.table0_control.set_next_hop_id");
98 public static final PiActionId INGRESS_TABLE0_CONTROL_SET_EGRESS_PORT =
99 PiActionId.of("ingress.table0_control.set_egress_port");
100 public static final PiActionId EGRESS_PROCESS_INT_TRANSIT_INIT_METADATA =
101 PiActionId.of("egress.process_int_transit.init_metadata");
102 public static final PiActionId NOP = PiActionId.of("nop");
103 // Action Param IDs
104 public static final PiActionParamId INS_MASK0407 =
105 PiActionParamId.of("ins_mask0407");
106 public static final PiActionParamId NEXT_HOP_ID =
107 PiActionParamId.of("next_hop_id");
108 public static final PiActionParamId MON_PORT =
109 PiActionParamId.of("mon_port");
110 public static final PiActionParamId MON_MAC = PiActionParamId.of("mon_mac");
111 public static final PiActionParamId MON_IP = PiActionParamId.of("mon_ip");
112 public static final PiActionParamId SWITCH_ID =
113 PiActionParamId.of("switch_id");
114 public static final PiActionParamId SRC_MAC = PiActionParamId.of("src_mac");
115 public static final PiActionParamId INS_MASK0003 =
116 PiActionParamId.of("ins_mask0003");
117 public static final PiActionParamId REMAINING_HOP_CNT =
118 PiActionParamId.of("remaining_hop_cnt");
119 public static final PiActionParamId HOP_METADATA_LEN =
120 PiActionParamId.of("hop_metadata_len");
121 public static final PiActionParamId SRC_IP = PiActionParamId.of("src_ip");
122 public static final PiActionParamId PORT = PiActionParamId.of("port");
123 // Packet Metadata IDs
124 public static final PiPacketMetadataId INGRESS_PORT =
125 PiPacketMetadataId.of("ingress_port");
126 public static final PiPacketMetadataId EGRESS_PORT =
127 PiPacketMetadataId.of("egress_port");
Jonghwan Hyunb9358822017-12-06 17:55:27 -0800128}