blob: 8aa74b447a8ba46b0207b6b6f615291cd623de36 [file] [log] [blame]
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -04001// 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
15syntax = "proto3";
16
17option go_package = "github.com/opencord/voltha-protos/go/tech_profile";
18
19package tech_profile;
20import "google/api/annotations.proto";
21
22enum Direction {
23 UPSTREAM = 0;
24 DOWNSTREAM = 1;
25 BIDIRECTIONAL = 2;
26}
27
28enum SchedulingPolicy {
29 WRR = 0;
30 StrictPriority = 1;
31 Hybrid = 2;
32}
33
34enum AdditionalBW {
35 AdditionalBW_None = 0;
36 AdditionalBW_NA = 1;
37 AdditionalBW_BestEffort = 2;
38 AdditionalBW_Auto = 3;
39}
40
41enum DiscardPolicy {
42 TailDrop = 0;
43 WTailDrop = 1;
44 Red = 2;
45 WRed = 3;
46}
47
48enum InferredAdditionBWIndication {
49 InferredAdditionBWIndication_None = 0;
50 InferredAdditionBWIndication_Assured = 1;
51 InferredAdditionBWIndication_BestEffort = 2;
52}
53
54message SchedulerConfig {
55 Direction direction = 1;
56 AdditionalBW additional_bw = 2; // Valid on for “direction == Upstream”.
57 fixed32 priority = 3;
58 fixed32 weight = 4;
59 SchedulingPolicy sched_policy = 5;
60}
61
62message TrafficShapingInfo {
63 fixed32 cir = 1;
64 fixed32 cbs = 2;
65 fixed32 pir = 3;
66 fixed32 pbs = 4;
67 fixed32 gir = 5; // only if “direction == Upstream ”
68 InferredAdditionBWIndication add_bw_ind = 6; // only if “direction == Upstream”
69}
70
71message TrafficScheduler {
72 Direction direction = 1;
73 fixed32 alloc_id = 2; // valid only if “direction == Upstream ”
74 SchedulerConfig scheduler = 3;
75 TrafficShapingInfo traffic_shaping_info = 4;
76 fixed32 parent_sched_id = 5; // Used with HQoS, points to interface sched if not present
77}
78
79message TrafficSchedulers {
80 fixed32 intf_id = 1;
81 fixed32 onu_id = 2;
82 fixed32 uni_id = 4;
83 fixed32 port_no = 5;
84 repeated TrafficScheduler traffic_scheds = 3;
85}
86
87message TailDropDiscardConfig {
88 fixed32 queue_size = 1;
89}
90
91message RedDiscardConfig {
92 fixed32 min_threshold = 1;
93 fixed32 max_threshold = 2;
94 fixed32 max_probability = 3;
95}
96
97message WRedDiscardConfig {
98 RedDiscardConfig green = 1;
99 RedDiscardConfig yellow = 2;
100 RedDiscardConfig red = 3;
101}
102
103message DiscardConfig {
104 DiscardPolicy discard_policy = 1;
105 oneof discard_config {
106 TailDropDiscardConfig tail_drop_discard_config = 2;
107 RedDiscardConfig red_discard_config = 3;
108 WRedDiscardConfig wred_discard_config = 4;
109 }
110}
111
112message TrafficQueue {
113 Direction direction = 1;
114 fixed32 gemport_id = 2;
115 string pbit_map = 3;
116 bool aes_encryption = 4;
117 SchedulingPolicy sched_policy = 5; // This can be SP or WRR
118 fixed32 priority = 6;
119 fixed32 weight = 7;
120 DiscardPolicy discard_policy = 8;
121 DiscardConfig discard_config = 9;
122 TrafficShapingInfo shaping_info = 10; // Not used in the current version
123 fixed32 scheduler_id = 11; // Ties the queue to a scheduler
124}
125
126message TrafficQueues {
127 fixed32 intf_id = 1;
128 fixed32 onu_id = 2;
129 fixed32 uni_id = 4;
130 fixed32 port_no = 5;
131 repeated TrafficQueue traffic_queues = 6;
132}