Joey Armstrong | 25589d8 | 2024-01-02 22:31:35 -0500 | [diff] [blame] | 1 | // Copyright 2018-2024 Open Networking Foundation (ONF) and the ONF Contributors |
Abhilash Laxmeshwar | dfbb74d | 2019-07-23 08:03:08 -0400 | [diff] [blame] | 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at: |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | syntax = "proto3"; |
| 16 | |
khenaidoo | 5fc5cea | 2021-08-11 17:39:16 -0400 | [diff] [blame] | 17 | option go_package = "github.com/opencord/voltha-protos/v5/go/tech_profile"; |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 18 | option java_package = "org.opencord.voltha.tech_profile"; |
Abhilash Laxmeshwar | dfbb74d | 2019-07-23 08:03:08 -0400 | [diff] [blame] | 19 | |
| 20 | package tech_profile; |
| 21 | import "google/api/annotations.proto"; |
| 22 | |
| 23 | enum Direction { |
| 24 | UPSTREAM = 0; |
| 25 | DOWNSTREAM = 1; |
| 26 | BIDIRECTIONAL = 2; |
| 27 | } |
| 28 | |
| 29 | enum SchedulingPolicy { |
| 30 | WRR = 0; |
| 31 | StrictPriority = 1; |
| 32 | Hybrid = 2; |
| 33 | } |
| 34 | |
| 35 | enum AdditionalBW { |
| 36 | AdditionalBW_None = 0; |
| 37 | AdditionalBW_NA = 1; |
| 38 | AdditionalBW_BestEffort = 2; |
| 39 | AdditionalBW_Auto = 3; |
| 40 | } |
| 41 | |
| 42 | enum DiscardPolicy { |
| 43 | TailDrop = 0; |
| 44 | WTailDrop = 1; |
| 45 | Red = 2; |
| 46 | WRed = 3; |
| 47 | } |
| 48 | |
| 49 | enum InferredAdditionBWIndication { |
| 50 | InferredAdditionBWIndication_None = 0; |
| 51 | InferredAdditionBWIndication_Assured = 1; |
| 52 | InferredAdditionBWIndication_BestEffort = 2; |
| 53 | } |
| 54 | |
| 55 | message SchedulerConfig { |
| 56 | Direction direction = 1; |
| 57 | AdditionalBW additional_bw = 2; // Valid on for “direction == Upstream”. |
| 58 | fixed32 priority = 3; |
| 59 | fixed32 weight = 4; |
| 60 | SchedulingPolicy sched_policy = 5; |
| 61 | } |
| 62 | |
| 63 | message TrafficShapingInfo { |
| 64 | fixed32 cir = 1; |
| 65 | fixed32 cbs = 2; |
| 66 | fixed32 pir = 3; |
| 67 | fixed32 pbs = 4; |
| 68 | fixed32 gir = 5; // only if “direction == Upstream ” |
| 69 | InferredAdditionBWIndication add_bw_ind = 6; // only if “direction == Upstream” |
| 70 | } |
| 71 | |
| 72 | message TrafficScheduler { |
| 73 | Direction direction = 1; |
| 74 | fixed32 alloc_id = 2; // valid only if “direction == Upstream ” |
| 75 | SchedulerConfig scheduler = 3; |
| 76 | TrafficShapingInfo traffic_shaping_info = 4; |
Burak Gurdag | ce06435 | 2020-04-20 20:11:18 +0000 | [diff] [blame] | 77 | fixed32 tech_profile_id = 5; |
Abhilash Laxmeshwar | dfbb74d | 2019-07-23 08:03:08 -0400 | [diff] [blame] | 78 | } |
| 79 | |
| 80 | message TrafficSchedulers { |
| 81 | fixed32 intf_id = 1; |
| 82 | fixed32 onu_id = 2; |
| 83 | fixed32 uni_id = 4; |
| 84 | fixed32 port_no = 5; |
| 85 | repeated TrafficScheduler traffic_scheds = 3; |
| 86 | } |
| 87 | |
| 88 | message TailDropDiscardConfig { |
| 89 | fixed32 queue_size = 1; |
| 90 | } |
| 91 | |
| 92 | message RedDiscardConfig { |
| 93 | fixed32 min_threshold = 1; |
| 94 | fixed32 max_threshold = 2; |
| 95 | fixed32 max_probability = 3; |
| 96 | } |
| 97 | |
| 98 | message WRedDiscardConfig { |
| 99 | RedDiscardConfig green = 1; |
| 100 | RedDiscardConfig yellow = 2; |
| 101 | RedDiscardConfig red = 3; |
| 102 | } |
| 103 | |
| 104 | message DiscardConfig { |
| 105 | DiscardPolicy discard_policy = 1; |
| 106 | oneof discard_config { |
| 107 | TailDropDiscardConfig tail_drop_discard_config = 2; |
| 108 | RedDiscardConfig red_discard_config = 3; |
| 109 | WRedDiscardConfig wred_discard_config = 4; |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | message TrafficQueue { |
| 114 | Direction direction = 1; |
| 115 | fixed32 gemport_id = 2; |
| 116 | string pbit_map = 3; |
| 117 | bool aes_encryption = 4; |
| 118 | SchedulingPolicy sched_policy = 5; // This can be SP or WRR |
| 119 | fixed32 priority = 6; |
| 120 | fixed32 weight = 7; |
| 121 | DiscardPolicy discard_policy = 8; |
| 122 | DiscardConfig discard_config = 9; |
Abhilash Laxmeshwar | dfbb74d | 2019-07-23 08:03:08 -0400 | [diff] [blame] | 123 | } |
| 124 | |
| 125 | message TrafficQueues { |
| 126 | fixed32 intf_id = 1; |
| 127 | fixed32 onu_id = 2; |
| 128 | fixed32 uni_id = 4; |
| 129 | fixed32 port_no = 5; |
| 130 | repeated TrafficQueue traffic_queues = 6; |
Burak Gurdag | ce06435 | 2020-04-20 20:11:18 +0000 | [diff] [blame] | 131 | fixed32 tech_profile_id = 7; |
Abhilash Laxmeshwar | dfbb74d | 2019-07-23 08:03:08 -0400 | [diff] [blame] | 132 | } |
Girish Gowdra | 9c3e1c8 | 2021-06-01 14:29:34 -0700 | [diff] [blame] | 133 | |
| 134 | message InstanceControl { |
| 135 | string onu = 1; |
| 136 | string uni = 2; |
| 137 | string max_gem_payload_size = 3; |
| 138 | } |
| 139 | |
| 140 | message QThresholds { |
| 141 | uint32 q_threshold1 = 1; |
| 142 | uint32 q_threshold2 = 2; |
| 143 | uint32 q_threshold3 = 3; |
| 144 | uint32 q_threshold4 = 4; |
| 145 | uint32 q_threshold5 = 5; |
| 146 | uint32 q_threshold6 = 6; |
| 147 | uint32 q_threshold7 = 7; |
| 148 | } |
| 149 | |
| 150 | message GemPortAttributes { |
| 151 | fixed32 gemport_id = 1; // valid only when referenced in the tech profile instance |
| 152 | string max_q_size = 2; |
| 153 | string pbit_map = 3; |
| 154 | string aes_encryption = 4; |
| 155 | SchedulingPolicy scheduling_policy = 5; // This can be SP or WRR |
| 156 | fixed32 priority_q = 6; |
| 157 | fixed32 weight = 7; |
| 158 | DiscardPolicy discard_policy = 8; |
| 159 | RedDiscardConfig discard_config = 9; // used with version 1 of tech profile |
| 160 | DiscardConfig discard_config_v2 = 14; // used with version 2 of tech profile |
| 161 | string is_multicast = 10; |
| 162 | fixed32 multicast_gem_id = 11; |
| 163 | string dynamic_access_control_list = 12; |
| 164 | string static_access_control_list = 13; |
| 165 | } |
| 166 | |
| 167 | message SchedulerAttributes { |
| 168 | Direction direction = 1; |
| 169 | uint32 alloc_id = 2; // Valid on for “direction == Upstream” and when referenced in the tech profile instance |
| 170 | AdditionalBW additional_bw = 3; // Valid on for “direction == Upstream”. |
| 171 | fixed32 priority = 4; |
| 172 | fixed32 weight = 5; |
| 173 | SchedulingPolicy q_sched_policy = 6; |
| 174 | } |
| 175 | |
| 176 | message EPONQueueAttributes { |
| 177 | string max_q_size = 1; |
| 178 | string pbit_map = 2; |
| 179 | uint32 gemport_id = 3; |
| 180 | string aes_encryption = 4; |
| 181 | string traffic_type = 5; |
| 182 | uint32 unsolicited_grant_size = 6; |
| 183 | uint32 nominal_interval = 7; |
| 184 | uint32 tolerated_poll_jitter = 8; |
| 185 | uint32 request_transmission_policy = 9; |
| 186 | uint32 num_q_sets = 10; |
| 187 | QThresholds q_thresholds = 11; |
| 188 | SchedulingPolicy scheduling_policy = 12; |
| 189 | uint32 priority_q = 13; |
| 190 | uint32 weight = 14; |
| 191 | DiscardPolicy discard_policy = 15; |
| 192 | RedDiscardConfig discard_config = 16; // used with version 1 of tech profile |
| 193 | DiscardConfig discard_config_v2 = 17; // used with version 2 of tech profile |
| 194 | } |
| 195 | |
| 196 | // TechProfile definition (relevant for GPON, XGPON and XGS-PON technologies) |
| 197 | message TechProfile { |
| 198 | string name = 1; |
| 199 | uint32 version = 2; |
| 200 | string profile_type = 3; |
| 201 | uint32 num_gem_ports = 4; |
| 202 | InstanceControl instance_control = 5; |
| 203 | SchedulerAttributes us_scheduler = 6; |
| 204 | SchedulerAttributes ds_scheduler = 7; |
| 205 | repeated GemPortAttributes upstream_gem_port_attribute_list = 8; |
| 206 | repeated GemPortAttributes downstream_gem_port_attribute_list = 9; |
| 207 | } |
| 208 | |
| 209 | // EPON TechProfile definition |
| 210 | message EponTechProfile { |
| 211 | string name = 1; |
| 212 | uint32 version = 2; |
| 213 | string profile_type = 3; |
| 214 | uint32 num_gem_ports = 4; |
| 215 | InstanceControl instance_control = 5; |
| 216 | string package_type = 6; |
| 217 | repeated EPONQueueAttributes upstream_queue_attribute_list= 7; |
| 218 | repeated EPONQueueAttributes downstream_queue_attribute_list = 8; |
| 219 | } |
| 220 | |
| 221 | // TechProfile Instance definition (relevant for GPON, XGPON and XGS-PON technologies) |
| 222 | message TechProfileInstance { |
| 223 | string name = 1; |
| 224 | uint32 version = 2; |
| 225 | string subscriber_identifier = 3; |
| 226 | string profile_type = 4; |
| 227 | uint32 num_gem_ports = 5; |
| 228 | InstanceControl instance_control = 6; |
| 229 | SchedulerAttributes us_scheduler = 7; |
| 230 | SchedulerAttributes ds_scheduler = 8; |
| 231 | repeated GemPortAttributes upstream_gem_port_attribute_list = 9; |
| 232 | repeated GemPortAttributes downstream_gem_port_attribute_list = 10; |
| 233 | } |
| 234 | |
| 235 | // EPON TechProfile Instance definition. |
| 236 | message EponTechProfileInstance { |
| 237 | string name = 1; |
| 238 | uint32 version = 2; |
| 239 | string subscriber_identifier = 3; |
| 240 | string profile_type = 4; |
| 241 | uint32 num_gem_ports = 5; |
| 242 | uint32 alloc_id = 6; |
| 243 | InstanceControl instance_control = 7; |
| 244 | string package_type = 8; |
| 245 | repeated EPONQueueAttributes upstream_queue_attribute_list= 9; |
| 246 | repeated EPONQueueAttributes downstream_queue_attribute_list = 10; |
| 247 | } |
| 248 | |
| 249 | // Resource Instance definition |
| 250 | message ResourceInstance { |
| 251 | uint32 tp_id = 1; |
| 252 | string profile_type = 2; |
| 253 | string subscriber_identifier = 3; |
| 254 | uint32 alloc_id = 4; |
| 255 | repeated uint32 gemport_ids = 5; |
| 256 | } |