Add support for write-actions
[sliver-openvswitch.git] / OPENFLOW-1.1+
1                 OpenFlow 1.1+ support in Open vSwitch
2                 =====================================
3
4 Open vSwitch support for OpenFlow 1.1, 1.2, and 1.3 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     * The new in_phy_port field in OFPT_PACKET_IN needs some kind of
58       implementation.  It has a sensible interpretation for tunnels
59       but in general the physical port is not in the datapath for OVS
60       so the value is not necessarily meaningful.  We might have to
61       just fix it as the same as in_port.
62       [required for OF1.1; optional for OF1.2+]
63
64     * OFPT_TABLE_MOD message.  This is new in OF1.1, so we need to
65       implement it.  It should be implemented so that the default OVS
66       behavior does not change.
67       [required for OF1.1 and OF1.2]
68
69     * MPLS.  Simon Horman maintains a patch series that adds this
70       feature.  This is partially merged.
71       [optional for OF1.1+]
72
73     * Match and set double-tagged VLANs (QinQ).  This requires kernel
74       work for reasonable performance.
75       [optional for OF1.1+]
76
77     * VLANs tagged with 88a8 Ethertype.  This requires kernel work for
78       reasonable performance.
79       [required for OF1.1+]
80
81     * Groups.
82
83         * Type all
84           [required for OF1.1+]
85
86         * Type select
87           [optional for OF1.1+]
88
89         * Type indirect
90           [required for OF1.1+]
91
92         * Type fast failover
93           [optional for OF1.1+]
94
95         * Statistics
96           [optional for OF1.1+]
97
98 OpenFlow 1.2
99 ------------
100
101 OpenFlow 1.2 support requires OpenFlow 1.1 as a prerequisite. All the
102 additional work specific to Openflow 1.2 are complete.  (This is based
103 on the change log at the end of the OF1.2 spec.  I didn't compare the
104 specs carefully yet.)
105
106 OpenFlow 1.3
107 ------------
108
109 OpenFlow 1.3 support requires OpenFlow 1.2 as a prerequisite, plus the
110 following additional work.  (This is based on the change log at the
111 end of the OF1.3 spec, reusing most of the section titles directly.  I
112 didn't compare the specs carefully yet.)
113
114     * Send errors for unsupported multipart requests.
115       [required for OF1.3+]
116
117     * Add support for multipart requests.
118       [optional for OF1.3+]
119
120     * Add OFPMP_TABLE_FEATURES statistics.
121       [optional for OF1.3+]
122
123     * More flexible table miss support.
124       [required for OF1.3+]
125
126     * IPv6 extension header handling support.  Fully implementing this
127       requires kernel support.  This likely will take some careful and
128       probably time-consuming design work.  The actual coding, once
129       that is all done, is probably 2 or 3 days work.
130       [optional for OF1.3+]
131
132     * Per-flow meters.  Similar to IPv6 extension headers in kernel
133       and design requirements.  Might be politically difficult to add
134       directly to the kernel module, since its functionality overlaps
135       with tc.  Ideally, therefore, we could implement these somehow
136       with tc, but I haven't investigated whether that makes sense.
137       [optional for OF1.3+]
138
139     * Per-connection event filtering.  OF1.3 adopted Open vSwitch's
140       existing design for this feature so implementation should be
141       easy.
142       [required for OF1.3+]
143
144     * Auxiliary connections.  An implementation in generic code might
145       be a week's worth of work.  The value of an implementation in
146       generic code is questionable, though, since much of the benefit
147       of axuiliary connections is supposed to be to take advantage of
148       hardware support.  (We could make the kernel module somehow
149       send packets across the auxiliary connections directly, for
150       some kind of "hardware" support, if we judged it useful enough.)
151       [optional for OF1.3+]
152
153     * MPLS BoS matching.  (Included in Simon's MPLS series?)
154       [optional for OF1.3+]
155
156     * Provider Backbone Bridge tagging.  I don't plan to implement
157       this (but we'd accept an implementation).
158       [optional for OF1.3+]
159
160     * Rework tag order.  I'm not sure whether we need to do anything
161       for this. Part of MPLS patchset by Simon Horman.
162       [required for v1.3+]
163
164     * On-demand flow counters.  I think this might be a real
165       optimization in some cases for the software switch.
166       [optional for OF1.3+]
167
168 ONF OpenFlow Exensions for 1.3.X Pack1
169 --------------------------------------
170
171 OpenFlow 1.3 has a bunch of ONF extentions.
172 Many of them are necessary for OpenFlow 1.4 as well.
173
174     * Flow entry notifications
175       This seems to be modelled after OVS's NXST_FLOW_MONITOR.
176       [EXT-187]
177       [required for OF1.4+]
178
179     * Role Status
180       [EXT-191]
181       [required for OF1.4+]
182
183     * Flow entry eviction
184       OVS has flow eviction functionality.
185       table_mod OFPTC_EVICTION, flow_mod 'importance', and
186       table_desc ofp_table_mod_prop_eviction need to be implemented.
187       [EXT-192-e]
188       [optional for OF1.4+]
189
190     * Vacancy events
191       [EXT-192-v]
192       [optional for OF1.4+]
193
194     * Bundle
195       Transactional modification.  OpenFlow 1.4 requires to support
196       flow_mods and port_mods in a bundle.
197       (Not related to OVS's 'ofbundle' stuff.)
198       [EXT-230]
199       [required for OF1.4+]
200
201     * Table synchronisation
202       [EXT-232]
203       [optional for OF1.4+]
204
205     * Group notifications
206       [EXT-235]
207       [optional for OF1.4+]
208
209     * Bad flow entry priority error
210       Probably not so useful to the software switch.
211       [EXT-236]
212       [optional for OF1.4+]
213
214     * Set async config error
215       [EXT-237]
216       [optional for OF1.4+]
217
218     * PBB UCA header field
219       [EXT-256]
220       [optional for OF1.4+]
221
222     * Duplicate instruction error
223       We already have ONFBIC_DUP_INSTRUCTION.
224       [EXT-260]
225       [required for OF1.4+]
226
227     * Multipart timeout error
228       [EXT-264]
229       [required for OF1.4+]
230
231 OpenFlow 1.4
232 ------------
233
234     * More extensible wire protocol
235       Many on-wire structures got TLVs.
236       [EXT-262]
237       [required for OF1.4+]
238
239     * More descriptive reasons for packet-in
240       Distinguish OFPR_APPLY_ACTION, OFPR_ACTION_SET, OFPR_GROUP,
241       OFPR_PACKET_OUT.  NO_MATCH was renamed to OFPR_TABLE_MISS.
242       [EXT-136]
243       [required for OF1.4+]
244
245     * Optical port properties
246       [EXT-154]
247       [optional for OF1.4+]
248
249     * Flow-removed reason for meter delete
250       Report flow removal due to meter deletion with OFPRR_METER_DELETE.
251       [EXT-261]
252       [optional for OF1.4+]
253
254     * Meter notifications
255       [EXT-235]
256       [optional for OF1.4+]
257
258 How to contribute
259 -----------------
260
261 If you plan to contribute code for a feature, please let everyone know
262 on ovs-dev before you start work.  This will help avoid duplicating
263 work.
264
265 Please consider the following:
266
267     * Testing.  Please test your code.
268
269     * Unit tests.  Please consider writing some.  The tests directory
270       has many examples that you can use as a starting point.
271
272     * ovs-ofctl.  If you add a feature that is useful for some
273       ovs-ofctl command then you should add support for it there.
274
275     * Documentation.  If you add a user-visible feature, then you
276       should document it in the appropriate manpage and mention it in
277       NEWS as well.
278
279     * Coding style (see the CodingStyle file at the top of the source
280       tree).
281
282     * The patch submission guidelines (see SubmittingPatches).  I
283       recommend using "git send-email", which automatically follows a
284       lot of those guidelines.
285
286 Bug Reporting
287 -------------
288
289 Please report problems to bugs@openvswitch.org.