blob: f4f72cc28a6833d2d46506db1bc9d9cdaf7ac79b [file] [log] [blame]
Andrea Campanella38a06f92021-12-01 15:49:28 -08001Bandwidth Profiles in VOLTHA
Joey Armstrongf713d7f2023-02-23 06:06:49 -05002============================
Andrea Campanella38a06f92021-12-01 15:49:28 -08003
4This document describes Bandwidth profiles format in Sadis, how they are configured to VOLTHA and
5how they are mapped to physical configuration for the OLT and the ONU with Traffic Descriptors
6and T-CONT configuration.
7
8
9Bandwidth Profiles Representations in Sadis
10===========================================
11The ONOS Sadis application supports configuration of the bandwidth profiles in two formats, `IETF` and `MEF`.
12The values contained are expressed in kilobits/second (kbps).
Joey Armstrong1a9b7d12022-12-19 14:13:07 -050013The expectation is a `Default` meter will always present for workflows that have flow rules installed at port
Andrea Campanella38a06f92021-12-01 15:49:28 -080014startup, such as for EAPOL and DHCP. Meters referred by subscribers must also be present.
15
16The `MEF` Brandwidth Profile format is as follows:
17
18.. code:: json
19
20 {
21 "id": "Default",
22 "air": 100000,
23 "cbs": 30,
24 "cir": 600,
25 "ebs": 30,
26 "eir": 400
27 }
28
29and the `IETF` format:
30
31.. code:: json
32
33 {
34 "id": "DT_downstream_default_bw_profile",
35 "pir": 1168192,
36 "pbs": 0,
37 "cir": 0,
38 "cbs": 0,
39 "gir": 0
40 }
41
Joey Armstrong1a9b7d12022-12-19 14:13:07 -050042Independent of format the `olt` ONOS apps will generate a meter-per-bandwidth profile.
Andrea Campanella38a06f92021-12-01 15:49:28 -080043
44An example of a meter in ONOS is:
45
46.. code:: bash
47
48 onos> meters
Joey Armstrong1a9b7d12022-12-19 14:13:07 -050049 DefaultMeter{device=of:00000a0a0a0a0a0a, cellId=1, appId=DefaultApplicationId{id=411, name=org.opencord.olt},
50 unit=KB_PER_SEC, isBurst=true, state=ADDED,
51 bands=[DefaultBand{rate=600, burst-size=30, type=DROP, drop-precedence=null},
52 DefaultBand{rate=101000, burst-size=60, type=DROP, drop-precedence=null},
53 DefaultBand{rate=100000, burst-size=0, type=DROP, drop-precedence=null}], annotations={}}
Andrea Campanella38a06f92021-12-01 15:49:28 -080054
55note the different bands that map to the values of the `Default` bandwidth profile as well.
56The number of bands in the meter are based on the BW profile. If BW profile has only PIR value, then there is only
57one band, but if the BW profile has all - EIR, PIR and GIR, then we have all the three bands.
58
59The `cellId=1` value is the identification of the meter (in other places used as `meterId`) and it will be used in
60flows for a subscriber that requires the specific bandwidth profile corresponding to that meter.
61
62We can check the bandwidthProfile associated with this meter:
63
64.. code:: bash
65
66 onos> volt-bpmeter-mappings
67 bpInfo=Default deviceId=of:00000000c0a8646f meterId=1
68
69From the above, we see that `meterId=1` corresponds to bandwidthProfile Default, configured in SADIS.
70
71We can check the parameters of the configured bandwidthProfile with the following command, passing the Id of the meter
72in `sadis`:
73
74.. code:: bash
75
76 onos> bandwidthprofile Default
77 BandwidthProfileInformation{id=Default, committedInformationRate=600, committedBurstSize=30, exceededInformationRate=400, exceededBurstSize=30}
78
79Bandwidth Profiles and Subscriber Mapping
80=========================================
81
82Each subscriber in sadis can refer up to 4 meters, 2 meters per ONU and 2 per OLT, upstream and downstream.
83An example is:
84
85.. code:: json
86
87 {
88 "uniTagMatch" : 55,
89 "ponCTag" : 55,
90 "ponSTag" : 555,
91 "usPonCTagPriority" : 5,
92 "usPonSTagPriority" : 5,
93 "dsPonCTagPriority" : 5,
94 "dsPonSTagPriority" : 5,
95 "technologyProfileId" : 67,
96 "downstreamBandwidthProfile" : "High-Speed-Internet",
97 "upstreamBandwidthProfile" : "TCONT_TYPE3_700Mbps_Peak_500Mbps_Assured_ForVoD",
98 "downstreamOltBandwidthProfile" : "High-Speed-Internet",
99 "upstreamOltBandwidthProfile" : "TCONT_TYPE3_700Mbps_Peak_500Mbps_Assured_ForVoD",
100 "configuredMacAddress" : "2c:60:0c:ee:d7:68",
101 "serviceName" : "VOD",
102 "isDhcpRequired" : "true",
103 "isIgmpRequired" : "true"
104 }
105
106If the `downstreamOltBandwidthProfile` and `upstreamOltBandwidthProfile` are not specified the values of
107`downstreamBandwidthProfile` and `upstreamBandwidthProfile` are taken and used.
108
109A meter is referred by a flow for a specific subscriber by the `meter` instruction, as an example the following
110flow refers to meter `1`:
111
112.. code:: bash
113
Joey Armstrong1a9b7d12022-12-19 14:13:07 -0500114 ADDED, bytes=0, packets=0, table=0, priority=10000, selector=[IN_PORT:256, ETH_TYPE:eapol],
115 treatment=[immediate=[OUTPUT:CONTROLLER, VLAN_PUSH:vlan, VLAN_ID:4091], meter=METER:1,
116 metadata=METADATA:ffb004000000001/0]
Andrea Campanella38a06f92021-12-01 15:49:28 -0800117
118
119TCONT Mapping
120-------------
121
122Different Bandwidth profiles get mapped to different TCONT types:
123
124- If GIR > 0, GIR = PIR, additional_bw_eligibility = none then TCONT Type-1 is selected -> set guaranteed_bw
125 = maximum_bw = CBR_RT_BW (or CBR_NRT_BW) = GIR and alloc_type=none and send these parameters to BAL.
126 (alloc_type is inferred from the other parameters)
127- If GIR = 0, CIR > 0, CIR = PIR, additional_bw_eligibility = none then TCONT Type-2 is selected -> set guaranteed_bw
128 = maximum_bw = CIR, CBR_RT_BW = 0 and CBR_NRT_BW = 0 and alloc_type = NSR and send these parameters to BAL.
129 (alloc_type is set to NSR by default)
130- If GIR = 0, CIR > 0, PIR > CIR, additional_bw_eligibility = non_assured then TCONT Type-3
131 is selected -> set guaranteed_bw = CIR, maximum_bw = PIR, CBR_RT_BW = 0 and CBR_NRT_BW = 0 and alloc_type = NSR
132 and send these parameters to BAL. (alloc_type is set to NSR by default)
133- If GIR = 0, CIR = 0, PIR > 0, additional_bw_eligibility = best_effort then TCONT Type-4 is selected -> set
134 guaranteed_bw = 0, maximum_bw = PIR, CBR_RT_BW = 0 and CBR_NRT_BW = 0 and alloc_type = NSR and send these
135 parameters to BAL. (alloc_type is set to NSR by default)
136- If GIR > 0, PIR >= GIR + CIR, additional_bw_eligibility = non_assured or best_effort then TCONT Type-5 is selected
137 -> set guaranteed_bw = GIR+CIR, maximum_bw = PIR, CBR_RT_BW (or CBR_NRT_BW) = GIR and alloc_type = NSR and send these
138 parameters to BAL. (alloc_type is set to NSR by default)
139
140The `additional_bw_eligibility` can take `None`, `BestEffort`, `NonAssured` as values.
141
142Further information can be found in this `document <https://docs.google.com/document/d/1HipmsHD5LEQlOc-Y2tYV7DHD1fn7-_1lehBgp79sRwU/edit?usp=sharing>`_
143that goes into depth about the T-CONT type support.
144
145A meter gets applied to TCONTs based on the service definition on technology profile.
146
147Traffic Descriptor (TD)
148-----------------------
149The `G.988 standard <https://www.itu.int/rec/T-REC-G.988-202109-I!Amd4/en>`_ at page 117 describes the mapping of values
150to Traffic Descriptor MEs.
151
152For VOLTHA the Traffic Descriptor ME is computed as follows CIR(TD)=AIR+CIR, where both AIR and CIR are extracted
153from the bandwidth profile.
154
155Please note that the values for the elements in the Traffic Descriptor ME are in Bytes/second so a conversion from the
156kilobits/second of the Sadis representation is done by multiplying the values by 125 (kbps --> bps --> Bps).