Skip to content

Commit

Permalink
OpenFlow: Enable OpenFlow 1.5 by default.
Browse files Browse the repository at this point in the history
Open vSwitch now supports all OpenFlow 1.5 required features, so enable
it by default.

Acked-by: Numan Siddique <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
blp committed Jun 20, 2019
1 parent 4332b67 commit 13c952c
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 48 deletions.
27 changes: 13 additions & 14 deletions Documentation/faq/openflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@ Q: What versions of OpenFlow does Open vSwitch support?
A: The following table lists the versions of OpenFlow supported by each
version of Open vSwitch:

=============== ===== ===== ===== ===== ===== =====
Open vSwitch OF1.0 OF1.1 OF1.2 OF1.3 OF1.4 OF1.5
=============== ===== ===== ===== ===== ===== =====
1.9 and earlier yes --- --- --- --- ---
1.10, 1.11 yes --- (*) (*) --- ---
2.0, 2.1 yes (*) (*) (*) --- ---
2.2 yes (*) (*) (*) (%) (*)
2.3, 2.4 yes yes yes yes (*) (*)
2.5, 2.6, 2.7 yes yes yes yes (*) (*)
2.8 yes yes yes yes yes (*)
=============== ===== ===== ===== ===== ===== =====
===================== ===== ===== ===== ===== ===== =====
Open vSwitch OF1.0 OF1.1 OF1.2 OF1.3 OF1.4 OF1.5
===================== ===== ===== ===== ===== ===== =====
1.9 and earlier yes --- --- --- --- ---
1.10, 1.11 yes --- (*) (*) --- ---
2.0, 2.1 yes (*) (*) (*) --- ---
2.2 yes (*) (*) (*) (%) (*)
2.3, 2.4 yes yes yes yes (*) (*)
2.5, 2.6, 2.7 yes yes yes yes (*) (*)
2.8, 2.9, 2.10, 2.11 yes yes yes yes yes (*)
2.12 yes yes yes yes yes yes
===================== ===== ===== ===== ===== ===== =====

--- Not supported.
yes Supported and enabled by default
Expand Down Expand Up @@ -73,8 +74,6 @@ Q: What versions of OpenFlow does Open vSwitch support?
could cause crashes. We don't recommend enabling it.)

:doc:`/topics/openflow` tracks support for OpenFlow 1.1 and later features.
When support for OpenFlow 1.5 is solidly implemented, Open vSwitch will
enable it by default.

Q: Does Open vSwitch support MPLS?

Expand Down Expand Up @@ -476,7 +475,7 @@ Q: How does OVS divide flows among buckets in an OpenFlow "select" group?
different hash function, using a Netronome extension to the OpenFlow 1.5+
group_mod message. For more information, see
Documentation/group-selection-method-property.txt in the Open vSwitch
source tree. (OpenFlow 1.5 support in Open vSwitch is still experimental.)
source tree.

Q: An OpenFlow "select" group isn't dividing packets evenly among the buckets.

Expand Down
16 changes: 8 additions & 8 deletions Documentation/group-selection-method-property.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Contents
1. Introduction
===============

This text describes a Netronome Extension to (draft) OpenFlow 1.5 that allows a
This text describes a Netronome Extension to OpenFlow 1.5 that allows a
controller to provide more information on the selection method for select
groups. This proposal is in the form of an enhanced select group type.

Expand All @@ -30,7 +30,7 @@ the OpenFlow specification.
===============

A new Netronome group experimenter property is defined which provides
compatibility with the group mod message defined in draft Open Flow 1.5
compatibility with the group mod message defined in Open Flow 1.5
(also known as ONF EXT-350) and allows parameters for the selection
method of select groups to be passed by the controller. In particular it
allows controllers to:
Expand Down Expand Up @@ -60,14 +60,14 @@ enum ntr_group_mod_subtype {
};


Modifications to the group table from the controller may be done with a
OFPT_GROUP_MOD message described (draft) Open Flow 1.5. Group Entry
Message. Of relevance here is that (draft) Open Flow 1.5 group messages
have properties.
Modifications to the group table from the controller may be done with
a OFPT_GROUP_MOD message described Open Flow 1.5. Group Entry
Message. Of relevance here is that Open Flow 1.5 group messages have
properties.

This proposal is defined in terms of an implementation of struct
ofp_group_prop_experimenter which is described in (draft) Open Flow 1.5.
The implementation is:
ofp_group_prop_experimenter which is described in Open Flow 1.5. The
implementation is:

struct ntr_group_prop_selection_method {
ovs_be16 type; /* OFPGPT_EXPERIMENTER. */
Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Post-v2.11.0
* Add support for vHost Post-copy Live Migration (experimental).
* OVS validated with DPDK 18.11.1 which is recommended to be used.
- OpenFlow:
* All features required by OpenFlow 1.5 are now implemented, so
ovs-vswitchd now enables OpenFlow 1.5 by default (in addition to
OpenFlow 1.0 to 1.4).
* Removed support for OpenFlow 1.6 (draft), which ONF abandoned.
* New action "check_pkt_larger".
* Support for OpenFlow 1.5 "meter" action.
Expand Down
5 changes: 3 additions & 2 deletions include/openvswitch/ofp-protocol.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008-2017 Nicira, Inc.
* Copyright (c) 2008-2017, 2019 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -151,7 +151,8 @@ enum ofputil_protocol ofputil_protocols_from_version_bitmap(uint32_t bitmap);
(1u << OFP11_VERSION) | \
(1u << OFP12_VERSION) | \
(1u << OFP13_VERSION) | \
(1u << OFP14_VERSION))
(1u << OFP14_VERSION) | \
(1u << OFP15_VERSION))
#define OFPUTIL_DEFAULT_VERSIONS OFPUTIL_SUPPORTED_VERSIONS

enum ofputil_protocol ofputil_protocols_from_string(const char *s);
Expand Down
2 changes: 1 addition & 1 deletion lib/ofp-version-opt.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#define OFP_VERSION_OPTION_HANDLERS \
case 'V': \
ovs_print_version(OFP10_VERSION, OFP14_VERSION); \
ovs_print_version(OFP10_VERSION, OFP15_VERSION); \
exit(EXIT_SUCCESS); \
\
case 'O': \
Expand Down
7 changes: 1 addition & 6 deletions lib/ofp-version.man
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ by default:
.
.IP \(bu
\fBOpenFlow14\fR, for OpenFlow 1.4.
.RE
.
.IP
Support for the following protocol versions is provided for testing
and development purposes. They are not enabled by default:
.
.RS
.IP \(bu
\fBOpenFlow15\fR, for OpenFlow 1.5.
.RE
14 changes: 7 additions & 7 deletions tests/test-vconn.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2017 Nicira, Inc.
* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2017, 2019 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -239,7 +239,7 @@ test_read_hello(struct ovs_cmdl_context *ctx)
if (retval == sizeof hello) {
enum ofpraw raw;

CHECK(hello.version, OFP14_VERSION);
CHECK(hello.version, OFP15_VERSION);
CHECK(ofpraw_decode_partial(&raw, &hello, sizeof hello), 0);
CHECK(raw, OFPRAW_OFPT_HELLO);
CHECK(ntohs(hello.length), sizeof hello);
Expand Down Expand Up @@ -312,7 +312,7 @@ test_send_hello(const char *type, const void *out, size_t out_size,
if (retval == sizeof hello) {
enum ofpraw raw;

CHECK(hello.version, OFP14_VERSION);
CHECK(hello.version, OFP15_VERSION);
CHECK(ofpraw_decode_partial(&raw, &hello, sizeof hello), 0);
CHECK(raw, OFPRAW_OFPT_HELLO);
CHECK(ntohs(hello.length), sizeof hello);
Expand Down Expand Up @@ -363,7 +363,7 @@ test_send_plain_hello(struct ovs_cmdl_context *ctx)
const char *type = ctx->argv[1];
struct ofpbuf *hello;

hello = ofpraw_alloc_xid(OFPRAW_OFPT_HELLO, OFP14_VERSION,
hello = ofpraw_alloc_xid(OFPRAW_OFPT_HELLO, OFP15_VERSION,
htonl(0x12345678), 0);
test_send_hello(type, hello->data, hello->size, 0);
ofpbuf_delete(hello);
Expand All @@ -379,7 +379,7 @@ test_send_long_hello(struct ovs_cmdl_context *ctx)
struct ofpbuf *hello;
enum { EXTRA_BYTES = 8 };

hello = ofpraw_alloc_xid(OFPRAW_OFPT_HELLO, OFP14_VERSION,
hello = ofpraw_alloc_xid(OFPRAW_OFPT_HELLO, OFP15_VERSION,
htonl(0x12345678), EXTRA_BYTES);
ofpbuf_put_zeros(hello, EXTRA_BYTES);
ofpmsg_update_length(hello);
Expand All @@ -395,7 +395,7 @@ test_send_echo_hello(struct ovs_cmdl_context *ctx)
const char *type = ctx->argv[1];
struct ofpbuf *echo;

echo = ofpraw_alloc_xid(OFPRAW_OFPT_ECHO_REQUEST, OFP14_VERSION,
echo = ofpraw_alloc_xid(OFPRAW_OFPT_ECHO_REQUEST, OFP15_VERSION,
htonl(0x12345678), 0);
test_send_hello(type, echo->data, echo->size, EPROTO);
ofpbuf_delete(echo);
Expand All @@ -421,7 +421,7 @@ test_send_invalid_version_hello(struct ovs_cmdl_context *ctx)
const char *type = ctx->argv[1];
struct ofpbuf *hello;

hello = ofpraw_alloc_xid(OFPRAW_OFPT_HELLO, OFP14_VERSION,
hello = ofpraw_alloc_xid(OFPRAW_OFPT_HELLO, OFP15_VERSION,
htonl(0x12345678), 0);
((struct ofp_header *) hello->data)->version = 0;
test_send_hello(type, hello->data, hello->size, EPROTO);
Expand Down
13 changes: 3 additions & 10 deletions vswitchd/vswitch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1269,16 +1269,9 @@
</column>

<column name="protocols">
<p>
List of OpenFlow protocols that may be used when negotiating
a connection with a controller. OpenFlow 1.0, 1.1, 1.2, 1.3, and
1.4 are enabled by default if this column is empty.
</p>

<p>
OpenFlow 1.5 is not enabled by default because its
implementations is missing features.
</p>
List of OpenFlow protocols that may be used when negotiating a
connection with a controller. OpenFlow 1.0, 1.1, 1.2, 1.3, 1.4, and
1.5 are enabled by default if this column is empty.
</column>
</group>

Expand Down

0 comments on commit 13c952c

Please sign in to comment.