Skip to content

Commit

Permalink
Remove support for OpenFlow 1.6 (draft).
Browse files Browse the repository at this point in the history
ONF abandoned the OpenFlow specification, so that OpenFlow 1.6 will never
be completed.  It did not contain much in the way of useful features, so
remove what support Open vSwitch already had.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
  • Loading branch information
blp committed Feb 5, 2019
1 parent a0baa7d commit 29718ad
Show file tree
Hide file tree
Showing 45 changed files with 112 additions and 517 deletions.
26 changes: 13 additions & 13 deletions Documentation/faq/openflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ 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 OF1.6
=============== ===== ===== ===== ===== ===== ===== =====
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 yes yes yes yes yes (*)
=============== ===== ===== ===== ===== ===== =====

--- Not supported.
yes Supported and enabled by default
Expand Down Expand Up @@ -73,8 +73,8 @@ 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 and 1.6 is solidly implemented, Open vSwitch
will enable those version by default.
When support for OpenFlow 1.5 is solidly implemented, Open vSwitch will
enable it by default.

Q: Does Open vSwitch support MPLS?

Expand Down
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Post-v2.11.0
- DPDK:
* New option 'other_config:dpdk-socket-limit' to limit amount of
hugepage memory that can be used by DPDK.
- OpenFlow:
* Removed support for OpenFlow 1.6 (draft), which ONF abandoned.
- Userspace datapath:
* ICMPv6 ND enhancements: support for match and set ND options type
and reserved fields.
Expand Down
3 changes: 1 addition & 2 deletions build-aux/extract-ofp-errors
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ version_map = {"1.0": 0x01,
"1.2": 0x03,
"1.3": 0x04,
"1.4": 0x05,
"1.5": 0x06,
"1.6": 0x07}
"1.5": 0x06}
version_reverse_map = dict((v, k) for (k, v) in version_map.items())

token = None
Expand Down
3 changes: 1 addition & 2 deletions build-aux/extract-ofp-msgs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ VERSION = {"1.0": 0x01,
"1.2": 0x03,
"1.3": 0x04,
"1.4": 0x05,
"1.5": 0x06,
"1.6": 0x07}
"1.5": 0x06}

NX_VENDOR_ID = 0x00002320
ONF_VENDOR_ID = 0x4f4e4600
Expand Down
1 change: 0 additions & 1 deletion include/openflow/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ openflowinclude_HEADERS = \
include/openflow/openflow-1.3.h \
include/openflow/openflow-1.4.h \
include/openflow/openflow-1.5.h \
include/openflow/openflow-1.6.h \
include/openflow/openflow-common.h \
include/openflow/openflow.h

Expand Down
7 changes: 1 addition & 6 deletions include/openflow/openflow-1.0.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@

#include <openflow/openflow-common.h>

/* Maximum name of a port.
*
* OpenFlow 1.6 (draft) increases this to 64. */
#define OFP10_MAX_PORT_NAME_LEN 16

/* Port number(s) meaning
* --------------- --------------------------------------
* 0x0000 not assigned a meaning by OpenFlow 1.0
Expand Down Expand Up @@ -102,7 +97,7 @@ enum ofp10_port_features {
struct ofp10_phy_port {
ovs_be16 port_no;
struct eth_addr hw_addr;
char name[OFP10_MAX_PORT_NAME_LEN]; /* Null-terminated */
char name[OFP_MAX_PORT_NAME_LEN]; /* Null-terminated */

ovs_be32 config; /* Bitmap of OFPPC_* and OFPPC10_* flags. */
ovs_be32 state; /* Bitmap of OFPPS_* and OFPPS10_* flags. */
Expand Down
2 changes: 1 addition & 1 deletion include/openflow/openflow-1.1.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct ofp11_port {
uint8_t pad[4];
struct eth_addr hw_addr;
uint8_t pad2[2]; /* Align to 64 bits. */
char name[OFP10_MAX_PORT_NAME_LEN]; /* Null-terminated */
char name[OFP_MAX_PORT_NAME_LEN]; /* Null-terminated */

ovs_be32 config; /* Bitmap of OFPPC_* flags. */
ovs_be32 state; /* Bitmap of OFPPS_* and OFPPS11_* flags. */
Expand Down
2 changes: 1 addition & 1 deletion include/openflow/openflow-1.4.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct ofp14_port {
uint8_t pad[2];
struct eth_addr hw_addr;
uint8_t pad2[2]; /* Align to 64 bits. */
char name[OFP10_MAX_PORT_NAME_LEN]; /* Null-terminated */
char name[OFP_MAX_PORT_NAME_LEN]; /* Null-terminated */

ovs_be32 config; /* Bitmap of OFPPC_* flags. */
ovs_be32 state; /* Bitmap of OFPPS_* flags. */
Expand Down
91 changes: 0 additions & 91 deletions include/openflow/openflow-1.6.h

This file was deleted.

4 changes: 2 additions & 2 deletions include/openflow/openflow-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ enum ofp_version {
OFP12_VERSION = 0x03,
OFP13_VERSION = 0x04,
OFP14_VERSION = 0x05,
OFP15_VERSION = 0x06,
OFP16_VERSION = 0x07
OFP15_VERSION = 0x06
};

/* Vendor (aka experimenter) IDs.
Expand Down Expand Up @@ -113,6 +112,7 @@ enum ofp_version {
#define INTEL_VENDOR_ID 0x0000AA01 /* Intel */

#define OFP_MAX_TABLE_NAME_LEN 32
#define OFP_MAX_PORT_NAME_LEN 16

#define OFP_OLD_PORT 6633
#define OFP_PORT 6653
Expand Down
1 change: 0 additions & 1 deletion include/openflow/openflow.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@
#include <openflow/openflow-1.3.h>
#include <openflow/openflow-1.4.h>
#include <openflow/openflow-1.5.h>
#include <openflow/openflow-1.6.h>

#endif /* openflow/openflow.h */
4 changes: 2 additions & 2 deletions include/openvswitch/ofp-errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,8 @@ enum ofperr {
/* OF1.5+(17,18). Scheduled commit time exceeds lower bound. */
OFPERR_OFPBFC_SCHED_PAST,

/* NX1.4-1.5(22), OF1.6+(17,19). In an OFPT_BUNDLE_ADD_MESSAGE, the
* OpenFlow version in the inner and outer messages differ. */
/* NX1.4-1.5(22). In an OFPT_BUNDLE_ADD_MESSAGE, the OpenFlow version in
* the inner and outer messages differ. */
OFPERR_OFPBFC_BAD_VERSION,

/* ## ------------------------- ## */
Expand Down
14 changes: 4 additions & 10 deletions include/openvswitch/ofp-msgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,8 @@ enum ofpraw {
OFPRAW_OFPT10_PORT_STATUS,
/* OFPT 1.1-1.3 (12): struct ofp_port_status, struct ofp11_port. */
OFPRAW_OFPT11_PORT_STATUS,
/* OFPT 1.4-1.5 (12): struct ofp_port_status, struct ofp14_port, uint8_t[8][]. */
/* OFPT 1.4+ (12): struct ofp_port_status, struct ofp14_port, uint8_t[8][]. */
OFPRAW_OFPT14_PORT_STATUS,
/* OFPT 1.6+ (12): struct ofp_port_status, struct ofp16_port, uint8_t[8][]. */
OFPRAW_OFPT16_PORT_STATUS,

/* OFPT 1.0 (13): struct ofp10_packet_out, uint8_t[]. */
OFPRAW_OFPT10_PACKET_OUT,
Expand All @@ -207,10 +205,8 @@ enum ofpraw {
OFPRAW_OFPT10_PORT_MOD,
/* OFPT 1.1-1.3 (16): struct ofp11_port_mod. */
OFPRAW_OFPT11_PORT_MOD,
/* OFPT 1.4-1.5 (16): struct ofp14_port_mod, uint8_t[8][]. */
/* OFPT 1.4+ (16): struct ofp14_port_mod, uint8_t[8][]. */
OFPRAW_OFPT14_PORT_MOD,
/* OFPT 1.6+ (16): struct ofp16_port_mod, uint8_t[8][]. */
OFPRAW_OFPT16_PORT_MOD,

/* OFPT 1.1-1.3 (17): struct ofp11_table_mod. */
OFPRAW_OFPT11_TABLE_MOD,
Expand Down Expand Up @@ -592,8 +588,7 @@ enum ofptype {
* OFPRAW_NXT_FLOW_REMOVED. */
OFPTYPE_PORT_STATUS, /* OFPRAW_OFPT10_PORT_STATUS.
* OFPRAW_OFPT11_PORT_STATUS.
* OFPRAW_OFPT14_PORT_STATUS.
* OFPRAW_OFPT16_PORT_STATUS. */
* OFPRAW_OFPT14_PORT_STATUS. */

/* Controller command messages. */
OFPTYPE_PACKET_OUT, /* OFPRAW_OFPT10_PACKET_OUT.
Expand All @@ -607,8 +602,7 @@ enum ofptype {
* OFPRAW_OFPT15_GROUP_MOD. */
OFPTYPE_PORT_MOD, /* OFPRAW_OFPT10_PORT_MOD.
* OFPRAW_OFPT11_PORT_MOD.
* OFPRAW_OFPT14_PORT_MOD.
* OFPRAW_OFPT16_PORT_MOD. */
* OFPRAW_OFPT14_PORT_MOD. */
OFPTYPE_TABLE_MOD, /* OFPRAW_OFPT11_TABLE_MOD.
* OFPRAW_OFPT14_TABLE_MOD. */

Expand Down
12 changes: 2 additions & 10 deletions include/openvswitch/ofp-port.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,12 @@ enum ofputil_port_state {

void ofputil_port_state_format(struct ds *, enum ofputil_port_state);

/* Abstract ofp10_phy_port, ofp11_port, ofp14_port, or ofp16_port. */
/* Abstract ofp10_phy_port, ofp11_port, or ofp14_port. */
struct ofputil_phy_port {
ofp_port_t port_no;

/* Hardware addresses.
*
* Most hardware has a normal 48-bit Ethernet address, in hw_addr.
* Some hardware might have a 64-bit address in hw_addr64.
* All-bits-0 indicates that a given address is not present. */
struct eth_addr hw_addr;
struct eth_addr64 hw_addr64;

char name[OFP16_MAX_PORT_NAME_LEN]; /* 64 bytes in OF1.6+, 16 otherwise. */
char name[OFP_MAX_PORT_NAME_LEN]; /* 16 bytes. */
enum ofputil_port_config config;
enum ofputil_port_state state;

Expand Down Expand Up @@ -142,7 +135,6 @@ void ofputil_port_status_format(struct ds *,
struct ofputil_port_mod {
ofp_port_t port_no;
struct eth_addr hw_addr;
struct eth_addr64 hw_addr64;
enum ofputil_port_config config;
enum ofputil_port_config mask;
enum netdev_features advertise;
Expand Down
7 changes: 2 additions & 5 deletions include/openvswitch/ofp-protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,10 @@ enum ofputil_protocol {
OFPUTIL_P_OF13_OXM = 1 << 6,
OFPUTIL_P_OF14_OXM = 1 << 7,
OFPUTIL_P_OF15_OXM = 1 << 8,
OFPUTIL_P_OF16_OXM = 1 << 9,
#define OFPUTIL_P_ANY_OXM (OFPUTIL_P_OF12_OXM | \
OFPUTIL_P_OF13_OXM | \
OFPUTIL_P_OF14_OXM | \
OFPUTIL_P_OF15_OXM | \
OFPUTIL_P_OF16_OXM)
OFPUTIL_P_OF15_OXM)

#define OFPUTIL_P_NXM_OF11_UP (OFPUTIL_P_OF10_NXM_ANY | OFPUTIL_P_OF11_STD | \
OFPUTIL_P_ANY_OXM)
Expand All @@ -96,8 +94,7 @@ enum ofputil_protocol {
#define OFPUTIL_P_OF12_UP (OFPUTIL_P_OF12_OXM | OFPUTIL_P_OF13_UP)
#define OFPUTIL_P_OF13_UP (OFPUTIL_P_OF13_OXM | OFPUTIL_P_OF14_UP)
#define OFPUTIL_P_OF14_UP (OFPUTIL_P_OF14_OXM | OFPUTIL_P_OF15_UP)
#define OFPUTIL_P_OF15_UP (OFPUTIL_P_OF15_OXM | OFPUTIL_P_OF16_UP)
#define OFPUTIL_P_OF16_UP OFPUTIL_P_OF16_OXM
#define OFPUTIL_P_OF15_UP OFPUTIL_P_OF15_OXM

/* All protocols. */
#define OFPUTIL_P_ANY ((1 << 10) - 1)
Expand Down
4 changes: 1 addition & 3 deletions lib/meta-flow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3720,9 +3720,7 @@ r r c c c.
label at any given time. To match on the second label, one must first
``pop'' the outer label and advance to another OpenFlow table, where the
inner label may be matched. To match on the third label, one must pop
the two outer labels, and so on. The Open Networking Foundation is
considering support for directly matching on multiple MPLS labels for
OpenFlow 1.6.<!-- XXX add EXT-* link -->
the two outer labels, and so on.
</p>

<h2>MPLS Inner Protocol</h2>
Expand Down
1 change: 0 additions & 1 deletion lib/ofp-actions.c
Original file line number Diff line number Diff line change
Expand Up @@ -8632,7 +8632,6 @@ get_ofpact_map(enum ofp_version version)
case OFP13_VERSION:
case OFP14_VERSION:
case OFP15_VERSION:
case OFP16_VERSION:
default:
return of12;
}
Expand Down
1 change: 0 additions & 1 deletion lib/ofp-bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ ofputil_encode_bundle_ctrl_request(enum ofp_version ofp_version,
case OFP13_VERSION:
case OFP14_VERSION:
case OFP15_VERSION:
case OFP16_VERSION:
request = ofpraw_alloc(ofp_version == OFP13_VERSION
? OFPRAW_ONFT13_BUNDLE_CONTROL
: OFPRAW_OFPT14_BUNDLE_CONTROL, ofp_version, 0);
Expand Down
2 changes: 0 additions & 2 deletions lib/ofp-errors.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ ofperr_domain_from_version(enum ofp_version version)
return &ofperr_of14;
case OFP15_VERSION:
return &ofperr_of15;
case OFP16_VERSION:
return &ofperr_of16;
default:
return NULL;
}
Expand Down
6 changes: 2 additions & 4 deletions lib/ofp-flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ ofputil_encode_flow_mod(const struct ofputil_flow_mod *fm,
case OFPUTIL_P_OF12_OXM:
case OFPUTIL_P_OF13_OXM:
case OFPUTIL_P_OF14_OXM:
case OFPUTIL_P_OF15_OXM:
case OFPUTIL_P_OF16_OXM: {
case OFPUTIL_P_OF15_OXM: {
struct ofp11_flow_mod *ofm;
int tailroom;

Expand Down Expand Up @@ -746,8 +745,7 @@ ofputil_encode_flow_stats_request(const struct ofputil_flow_stats_request *fsr,
case OFPUTIL_P_OF12_OXM:
case OFPUTIL_P_OF13_OXM:
case OFPUTIL_P_OF14_OXM:
case OFPUTIL_P_OF15_OXM:
case OFPUTIL_P_OF16_OXM: {
case OFPUTIL_P_OF15_OXM: {
struct ofp11_flow_stats_request *ofsr;

if (protocol > OFPUTIL_P_OF14_OXM) {
Expand Down
Loading

0 comments on commit 29718ad

Please sign in to comment.