Abhilash Laxmeshwar | dfbb74d | 2019-07-23 08:03:08 -0400 | [diff] [blame] | 1 | // Copyright (c) 2018 Open Networking Foundation |
| 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 | |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 17 | option go_package = "github.com/opencord/voltha-protos/v3/go/tech_profile"; |
| 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 | } |