summaryrefslogtreecommitdiff
path: root/lib/ofp-util.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2014-04-30 06:54:09 -0700
committerBen Pfaff <blp@nicira.com>2014-04-30 06:54:09 -0700
commit6dc5374435cc25bc4051b27bd52635e609a8872a (patch)
treef487d0698b0f10076f3b285f7450000deb8b61b6 /lib/ofp-util.h
parent2f486d4c80dada4194b170ebed0bcf77454b5404 (diff)
downloadopenvswitch-6dc5374435cc25bc4051b27bd52635e609a8872a.tar.gz
Enable OpenFlow 1.0, 1.1, 1.2, and 1.3 by default.
The Open vSwitch software switch now supports all the required features of OpenFlow 1.0 through 1.3, with one known trivial exception[*]. Enable them by default in ovs-vswitchd. For now, ovs-ofctl only enables OpenFlow 1.0 by default. This is because ovs-ofctl implements command such as "add-flow" as raw OpenFlow requests, but those requests have subtly different semantics in different OpenFlow versions. For example: - In OpenFlow 1.0, a "mod-flow" operation that does not find any existing flow to modify adds a new flow. - In OpenFlow 1.1, a "mod-flow" operation that does not find any existing flow to modify adds a new flow, but only if the mod-flow did not match on the flow cookie. - In OpenFlow 1.2 and a later, a "mod-flow" operation never adds a new flow. [*] OpenFlow 1.1, but not any earlier or later version of OpenFlow, requires support for VLANs introduced by Ethertype 0x88a8, but Open vSwitch does not support this Ethertype. Signed-off-by: Ben Pfaff <blp@nicira.com> Reviewed-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Diffstat (limited to 'lib/ofp-util.h')
-rw-r--r--lib/ofp-util.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/ofp-util.h b/lib/ofp-util.h
index fe2c7c23b..7c2803461 100644
--- a/lib/ofp-util.h
+++ b/lib/ofp-util.h
@@ -170,13 +170,15 @@ void ofputil_format_version_bitmap_names(struct ds *msg, uint32_t bitmap);
uint32_t ofputil_protocols_to_version_bitmap(enum ofputil_protocol);
enum ofputil_protocol ofputil_protocols_from_version_bitmap(uint32_t bitmap);
-/* Bitmap of OpenFlow versions that Open vSwitch supports. */
-#define OFPUTIL_SUPPORTED_VERSIONS \
- ((1u << OFP10_VERSION) | (1u << OFP12_VERSION) | (1u << OFP13_VERSION))
-
-/* Bitmap of OpenFlow versions to enable by default (a subset of
- * OFPUTIL_SUPPORTED_VERSIONS). */
-#define OFPUTIL_DEFAULT_VERSIONS (1u << OFP10_VERSION)
+/* Bitmaps of OpenFlow versions that Open vSwitch supports, and that it enables
+ * by default. When Open vSwitch has experimental or incomplete support for
+ * newer versions of OpenFlow, those versions should not be supported by
+ * default and thus should be omitted from the latter bitmap. */
+#define OFPUTIL_SUPPORTED_VERSIONS ((1u << OFP10_VERSION) | \
+ (1u << OFP11_VERSION) | \
+ (1u << OFP12_VERSION) | \
+ (1u << OFP13_VERSION))
+#define OFPUTIL_DEFAULT_VERSIONS OFPUTIL_SUPPORTED_VERSIONS
enum ofputil_protocol ofputil_protocols_from_string(const char *s);