Spec update against reviews #70100, #70246, #70319
[genius.git] / docs / specs / qos-shaping.rst
1
2 .. contents:: Table of Contents
3       :depth: 3
4
5 =====================================
6 Traffic shaping with Ovsdb QoS queues
7 =====================================
8 QoS patches: https://git.opendaylight.org/gerrit/#/q/topic:qos-shaping
9
10 The current Boron implementation provides support for ingress rate limiting configuration of OVS.
11 The Carbon release will add egress traffic shaping to QoS feature set.
12 (Note, the direction of traffic flow (ingress, egress) is from the perspective of the OpenSwitch)
13
14 Problem description
15 ===================
16 OVS supports traffic shaping for traffic that egresses from a switch. To utilize this functionality,
17 Genius implementation should be able to create 'set queue' output action upon connection of new
18 OpenFlow node.
19
20 Use Cases
21 ---------
22 Use case 1: Allow Unimgr to shape egress traffic from UNI
23
24 Proposed change
25 ===============
26 Unimgr or Neutron VPN creates ietf vlan interface for each port connected to particular service.
27 The Ovsdb provides a possibility to create QoS and mapped Queue with egress rate limits for
28 lower level port. Such queue should be created on parent physical interface of vlan or trunk member
29 port if service has definition of limits.
30 The ovsdb southbound provides interface for creation of ovs QoS and Queues.
31 This functionality may be utilized by netvirt qos service.
32 Below is the dump from ovsdb with queues created for one of the ports.
33
34 .. code::
35
36    Port table
37       _uuid : a6cf4ca9-b15c-4090-aefe-23af2d5ce4f2
38       name                : "ens5"
39       qos                 : 9779ce41-4347-4383-b308-75f46d6a258c
40    QoS table
41       _uuid               : 9779ce41-4347-4383-b308-75f46d6a258c
42       other_config        : {max-rate="50000"}
43       queues              : {1=3cc34bb7-7df8-4538-9fd7-4a6c6c467c69}
44       type                : linux-htb
45    Queue table
46       _uuid               : 3cc34bb7-7df8-4538-9fd7-4a6c6c467c69
47       dscp                : []
48       other_config        : {max-rate="50000", min-rate="5000"}
49
50 The queues creation is out of scope of this document.
51 The definition of vlan or trunk member port  will be augmented with relevant queue reference 
52 and number if queue was created successful.
53 That will allow to create openflow ‘set_queue’ output action during service binding.
54
55 Pipeline changes
56 ----------------
57 New 'set_queue' action will be supported in Egress Dispatcher table
58
59 =======================   ==========  ==========================================
60 Table                     Match       Action
61 =======================   ==========  ==========================================
62 Egress Dispatcher [220]   no changes  Set queue id (optional) and output to port
63 =======================   ==========  ==========================================
64
65
66 Yang changes
67 ------------
68 A new augment "ovs-qos" is added to if:interface in odl-interface.yang
69
70 .. code::
71
72    /* vlan port to qos queue */
73     augment "/if:interfaces/if:interface" {
74         ext:augment-identifier "ovs-qos";
75         when "if:type = 'ianaift:l2vlan'";
76
77         leaf ovs-qos-ref {
78             type instance-identifier;
79             description
80               "represents whether service port has associated qos. A reference to a ovsdb QoS entry";
81         }
82         leaf service-queue-number {
83             type uint32;
84             description
85               "specific queue number within the list of queues in the qos entry";
86         }
87     }
88
89 Configuration impact
90 ---------------------
91 None
92
93 Clustering considerations
94 -------------------------
95 None
96
97 Other Infra considerations
98 --------------------------
99 None
100
101 Security considerations
102 -----------------------
103 None
104
105 Scale and Performance Impact
106 ----------------------------
107 Additional OpenFlow action will be performed on part of the packages.
108 Egress packages will be processed via linux-htp if service configured accordanly.
109
110 Targeted Release
111 -----------------
112 Carbon
113
114 Alternatives
115 ------------
116 The unified REST API for ovsdb port adjustment could be created if future release.
117 The QoS engress queues and ingress rate limiting should be a part of this API.
118 Usage
119 =====
120 User will configure unimgr service with egress rate limits.
121 That will follow to process described above.
122
123 Features to Install
124 -------------------
125 - odl-genius (unimgr using genius feature for flows creation)
126
127 REST API
128 --------
129 None
130
131 CLI
132 ---
133 None
134
135 Implementation
136 ==============
137
138 Assignee(s)
139 -----------
140 Primary assignee:
141   konsta.pozdeev@hpe.com
142
143 Work Items
144 ----------
145
146 Dependencies
147 ============
148 Minimum OVS version 1.8.0 is required.
149
150 Testing
151 =======
152 Unimgr test cases with configured egress rate limits will cover this functionality.
153
154 Unit Tests
155 ----------
156
157 Integration Tests
158 -----------------
159
160 CSIT
161 ----
162
163 References
164 ==========
165 [1] `OpenDaylight Documentation Guide <http://docs.opendaylight.org/en/latest/documentation.html>`
166
167 [2] https://specs.openstack.org/openstack/nova-specs/specs/kilo/template.html