ofproto: Support port mods in bundles.
[cascardo/ovs.git] / OPENFLOW-1.1+.md
1 OpenFlow 1.1+ support in Open vSwitch
2 =====================================
3
4 Open vSwitch support for OpenFlow 1.1 and beyond is a work in
5 progress.  This file describes the work still to be done.
6
7 The Plan
8 --------
9
10 OpenFlow version support is not a build-time option.  A single build
11 of Open vSwitch must be able to handle all supported versions of
12 OpenFlow.  Ideally, even at runtime it should be able to support all
13 protocol versions at the same time on different OpenFlow bridges (and
14 perhaps even on the same bridge).
15
16 At the same time, it would be a shame to litter the core of the OVS
17 code with lots of ugly code concerned with the details of various
18 OpenFlow protocol versions.
19
20 The primary approach to compatibility is to abstract most of the
21 details of the differences from the core code, by adding a protocol
22 layer that translates between OF1.x and a slightly higher-level
23 abstract representation.  The core of this approach is the many struct
24 ofputil_* structures in lib/ofp-util.h.
25
26 As a consequence of this approach, OVS cannot use OpenFlow protocol
27 definitions that closely resemble those in the OpenFlow specification,
28 because openflow.h in different versions of the OpenFlow specification
29 defines the same identifier with different values.  Instead,
30 openflow-common.h contains definitions that are common to all the
31 specifications and separate protocol version-specific headers contain
32 protocol-specific definitions renamed so as not to conflict,
33 e.g. OFPAT10_ENQUEUE and OFPAT11_ENQUEUE for the OpenFlow 1.0 and 1.1
34 values for OFPAT_ENQUEUE.  Generally, in cases of conflict, the
35 protocol layer will define a more abstract OFPUTIL_* or struct
36 ofputil_*.
37
38 Here are the current approaches in a few tricky areas:
39
40   * Port numbering.  OpenFlow 1.0 has 16-bit port numbers and later
41     OpenFlow versions have 32-bit port numbers.  For now, OVS
42     support for later protocol versions requires all port numbers to
43     fall into the 16-bit range, translating the reserved OFPP_* port
44     numbers.
45
46   * Actions.  OpenFlow 1.0 and later versions have very different
47     ideas of actions.  OVS reconciles by translating all the
48     versions' actions (and instructions) to and from a common
49     internal representation.
50
51 OpenFlow 1.1
52 ------------
53
54 The list of remaining work items for OpenFlow 1.1 is below.  It is
55 probably incomplete.
56
57   * Match and set double-tagged VLANs (QinQ).  This requires kernel
58     work for reasonable performance.
59     [optional for OF1.1+]
60
61   * VLANs tagged with 88a8 Ethertype.  This requires kernel work for
62     reasonable performance.
63     [required for OF1.1+]
64
65 OpenFlow 1.2
66 ------------
67
68 OpenFlow 1.2 support requires OpenFlow 1.1 as a prerequisite. All the
69 additional work specific to Openflow 1.2 are complete.  (This is based
70 on the change log at the end of the OF1.2 spec.  I didn't compare the
71 specs carefully yet.)
72
73 OpenFlow 1.3
74 ------------
75
76 OpenFlow 1.3 support requires OpenFlow 1.2 as a prerequisite, plus the
77 following additional work.  (This is based on the change log at the
78 end of the OF1.3 spec, reusing most of the section titles directly.  I
79 didn't compare the specs carefully yet.)
80
81   * Add support for multipart requests.
82     Currently we always report OFPBRC_MULTIPART_BUFFER_OVERFLOW.
83     [optional for OF1.3+]
84
85   * IPv6 extension header handling support.  Fully implementing this
86     requires kernel support.  This likely will take some careful and
87     probably time-consuming design work.  The actual coding, once
88     that is all done, is probably 2 or 3 days work.
89     [optional for OF1.3+]
90
91   * Per-flow meters.  OpenFlow protocol support is now implemented.
92     Support for the special OFPM_SLOWPATH and OFPM_CONTROLLER meters
93     is missing.  Support for the software switch is under review.
94     [optional for OF1.3+]
95
96   * Auxiliary connections.  An implementation in generic code might
97     be a week's worth of work.  The value of an implementation in
98     generic code is questionable, though, since much of the benefit
99     of axuiliary connections is supposed to be to take advantage of
100     hardware support.  (We could make the kernel module somehow
101     send packets across the auxiliary connections directly, for
102     some kind of "hardware" support, if we judged it useful enough.)
103     [optional for OF1.3+]
104
105   * Provider Backbone Bridge tagging.  I don't plan to implement
106     this (but we'd accept an implementation).
107     [optional for OF1.3+]
108
109   * On-demand flow counters.  I think this might be a real
110     optimization in some cases for the software switch.
111     [optional for OF1.3+]
112
113 OpenFlow 1.4 & ONF Extensions for 1.3.X Pack1
114 ---------------------------------------------
115
116 The following features are both defined as a set of ONF Extensions
117 for 1.3 and integrated in 1.4.
118 When defined as an ONF Extension for 1.3, the feature is using the
119 Experimenter mechanism with the ONF Experimenter ID.
120 When defined integrated in 1.4, the feature use the standard OpenFlow
121 structures (for example defined in openflow-1.4.h).
122 The two definitions for each feature are independant and can exist in
123 parallel in OVS.
124
125   * Flow entry notifications
126     This seems to be modelled after OVS's NXST_FLOW_MONITOR.
127     (Simon Horman is working on this.)
128     [EXT-187]
129     [optional for OF1.4+]
130
131   * Role Status
132     Already implemented as a 1.4 feature.
133     [EXT-191]
134     [required for OF1.4+]
135
136   * Flow entry eviction
137     OVS has flow eviction functionality.
138     table_mod OFPTC_EVICTION, flow_mod 'importance', and
139     table_desc ofp_table_mod_prop_eviction need to be implemented.
140     [EXT-192-e]
141     [optional for OF1.4+]
142
143   * Vacancy events
144     [EXT-192-v]
145     [optional for OF1.4+]
146
147   * Bundle
148     Transactional modification.  OpenFlow 1.4 requires to support
149     flow_mods and port_mods in a bundle if bundle is supported.
150     (Not related to OVS's 'ofbundle' stuff.)
151     Implemented as an OpenFlow 1.4 feature.  Only flow_mods and
152     port_mods are supported in a bundle.  If the bundle includes port
153     mods, it may not specify the OFPBF_ATOMIC flag.  Nevertheless,
154     port mods and flow mods in a bundle are always applied in order
155     and consecutive flow mods between port mods are made available to
156     lookups atomically.
157     [EXT-230]
158     [optional for OF1.4+]
159
160   * Table synchronisation
161     Probably not so useful to the software switch.
162     [EXT-232]
163     [optional for OF1.4+]
164
165   * Group and Meter change notifications
166     [EXT-235]
167     [optional for OF1.4+]
168
169   * Bad flow entry priority error
170     Probably not so useful to the software switch.
171     [EXT-236]
172     [optional for OF1.4+]
173
174   * Set async config error
175     [EXT-237]
176     [optional for OF1.4+]
177
178   * PBB UCA header field
179     See comment on Provider Backbone Bridge in section about OpenFlow 1.3.
180     [EXT-256]
181     [optional for OF1.4+]
182
183   * Multipart timeout error
184     [EXT-264]
185     [required for OF1.4+]
186
187 OpenFlow 1.4 only
188 -----------------
189
190 Those features are those only available in OpenFlow 1.4, other
191 OpenFlow 1.4 features are listed in the previous section.
192
193   * More extensible wire protocol
194     Many on-wire structures got TLVs.
195     Already implemented: port desc properties, port mod properties,
196                          port stats properties, table mod properties,
197                          queue stats, unified property errors.
198     Remaining required: set-async, queue desc
199     Remaining optional: table desc, table-status
200     [EXT-262]
201     [required for OF1.4+]
202
203   * More descriptive reasons for packet-in
204     Distinguish OFPR_APPLY_ACTION, OFPR_ACTION_SET, OFPR_GROUP,
205     OFPR_PACKET_OUT.  NO_MATCH was renamed to OFPR_TABLE_MISS.
206     (OFPR_ACTION_SET and OFPR_GROUP are now supported)
207     [EXT-136]
208     [required for OF1.4+]
209
210   * Optical port properties
211     [EXT-154]
212     [optional for OF1.4+]
213
214 OpenFlow 1.5 & ONF Extensions for 1.3.X Pack2
215 ---------------------------------------------
216
217 The following features are both defined as a set of ONF Extensions for
218 1.3 and integrated in 1.5. Note that this list is not definitive as
219 those are not yet published.
220 When defined as an ONF Extension for 1.3, the feature is using the
221 Experimenter mechanism with the ONF Experimenter ID.
222 When defined integrated in 1.5, the feature use the standard OpenFlow
223 structures (for example defined in openflow-1.5.h).
224 The two definitions for each feature are independant and can exist in
225 parallel in OVS.
226
227   * Time scheduled bundles
228     [EXT-340]
229     [optional for OF1.5+]
230
231 OpenFlow 1.5 only
232 -----------------
233
234 Those features are those only available in OpenFlow 1.5, other
235 OpenFlow 1.5 features are listed in the previous section.
236 Note that this list is not definitive as OpenFlow 1.5 is not yet
237 published.
238
239   * Egress Tables
240     [EXT-306]
241     [optional for OF1.5+]
242
243   * Packet Type aware pipeline
244     Prototype for OVS was done during specification.
245     [EXT-112]
246     [optional for OF1.5+]
247
248   * Extensible Flow Entry Statistics
249     [EXT-334]
250     [required for OF1.5+]
251
252   * Flow Entry Statistics Trigger
253     [EXT-335]
254     [optional for OF1.5+]
255
256   * Controller connection status
257     Prototype for OVS was done during specification.
258     [EXT-454]
259     [optional for OF1.5+]
260
261   * Meter action
262     [EXT-379]
263     [required for OF1.5+ if metering is supported]
264
265   * Enable setting all pipeline fields in packet-out
266     Prototype for OVS was done during specification.
267     [EXT-427]
268     [required for OF1.5+]
269
270   * Port properties for pipeline fields
271     Prototype for OVS was done during specification.
272     [EXT-388]
273     [optional for OF1.5+]
274
275   * Port property for recirculation
276     Prototype for OVS was done during specification.
277     [EXT-399]
278     [optional for OF1.5+]
279
280 General
281 -----
282
283   * ovs-ofctl(8) often lists as Nicira extensions features that
284     later OpenFlow versions support in standard ways.
285
286 How to contribute
287 -----------------
288
289 If you plan to contribute code for a feature, please let everyone know
290 on ovs-dev before you start work.  This will help avoid duplicating
291 work.
292
293 Please consider the following:
294
295   * Testing.  Please test your code.
296
297   * Unit tests.  Please consider writing some.  The tests directory
298     has many examples that you can use as a starting point.
299
300   * ovs-ofctl.  If you add a feature that is useful for some
301     ovs-ofctl command then you should add support for it there.
302
303   * Documentation.  If you add a user-visible feature, then you
304     should document it in the appropriate manpage and mention it in
305     NEWS as well.
306
307   * Coding style (see the [CodingStyle.md] file at the top of the
308     source tree).
309
310   * The patch submission guidelines (see [CONTRIBUTING.md]).  I
311     recommend using "git send-email", which automatically follows a
312     lot of those guidelines.
313
314 Bug Reporting
315 -------------
316
317 Please report problems to bugs@openvswitch.org.
318
319 [CONTRIBUTING.md]:CONTRIBUTING.md
320 [CodingStyle.md]:CodingStyle.md