Skip to content

Commit

Permalink
ofp-errors: Add remaining OF1.4 and OF1.5 errors.
Browse files Browse the repository at this point in the history
Also implements the backports of relevant errors to OF1.3 as specified in
ONF extension pack 1 for OF1.3.

ONF-JIRA: EXT-237
ONF-JIRA: EXT-230
ONF-JIRA: EXT-264
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: William Tu <u9012063@gmail.com>
  • Loading branch information
blp committed Feb 13, 2018
1 parent d4b5b1b commit e994fa4
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 35 deletions.
20 changes: 0 additions & 20 deletions Documentation/topics/openflow.rst
Expand Up @@ -205,20 +205,6 @@ in OVS.

(optional for OF1.4+)

* Bad flow entry priority error

Probably not so useful to the software switch.

(EXT-236)

(optional for OF1.4+)

* Set async config error

(EXT-237)

(optional for OF1.4+)

* PBB UCA header field

See comment on Provider Backbone Bridge in section about OpenFlow 1.3.
Expand All @@ -227,12 +213,6 @@ in OVS.

(optional for OF1.4+)

* Multipart timeout error

(EXT-264)

(required for OF1.4+)

OpenFlow 1.4 only
-----------------

Expand Down
88 changes: 73 additions & 15 deletions include/openvswitch/ofp-errors.h
Expand Up @@ -169,10 +169,10 @@ enum ofperr {
/* OF1.0-1.1(1,5), OF1.2+(1,10). Denied because controller is slave. */
OFPERR_OFPBRC_IS_SLAVE,

/* NX1.0-1.1(1,514), OF1.2+(1,11). Invalid port. [ A non-standard error
* (1,514), formerly OFPERR_NXBRC_BAD_IN_PORT is used for OpenFlow 1.0 and
* 1.1 as there seems to be no appropriate error code defined the
* specifications. ] */
/* NX1.0-1.1(1,514), OF1.2+(1,11). Invalid or missing port. [ A
* non-standard error (1,514), formerly OFPERR_NXBRC_BAD_IN_PORT is used
* for OpenFlow 1.0 and 1.1 as there seems to be no appropriate error code
* defined the specifications. ] */
OFPERR_OFPBRC_BAD_PORT,

/* OF1.2+(1,12). Invalid packet in packet-out. */
Expand All @@ -181,9 +181,22 @@ enum ofperr {
/* OF1.3+(1,13). Multipart request overflowed the assigned buffer. */
OFPERR_OFPBRC_MULTIPART_BUFFER_OVERFLOW,

/* ONF1.3(2640), OF1.4+(1,14). Timeout during multipart request. */
OFPERR_OFPBRC_MULTIPART_REQUEST_TIMEOUT,

/* ONF1.3(2641), OF1.4+(1,15). Timeout during multipart reply. */
OFPERR_OFPBRC_MULTIPART_REPLY_TIMEOUT,

/* OF1.5+(1,16). Switch received a OFPMP_BUNDLE_FEATURES request and
* failed to update the scheduling tolerance. */
OFPERR_OFPBRC_MULTIPART_BAD_SCHED,

/* OF1.5+(1,17). Match fields must include only pipeline fields. */
OFPERR_OFPBRC_PIPELINE_FIELDS_ONLY,

/* OF1.5+(1,18). Unspecified error. */
OFPERR_OFPBRC_UNKNOWN,

/* NX1.0-1.1(1,256), NX1.2+(2). Invalid NXM flow match. */
OFPERR_NXBRC_NXM_INVALID,

Expand Down Expand Up @@ -212,7 +225,7 @@ enum ofperr {
/* ## OFPET_BAD_ACTION ## */
/* ## ---------------- ## */

/* OF1.0+(2,0). Unknown action type. */
/* OF1.0+(2,0). Unknown or unsupported action type. */
OFPERR_OFPBAC_BAD_TYPE,

/* OF1.0+(2,1). Length problem in actions. */
Expand All @@ -239,7 +252,7 @@ enum ofperr {
/* OF1.0+(2,8). Problem validating output queue. */
OFPERR_OFPBAC_BAD_QUEUE,

/* OF1.1+(2,9). Invalid group id in forward action. */
/* OF1.1+(2,9). Invalid group id in output action. */
OFPERR_OFPBAC_BAD_OUT_GROUP,

/* NX1.0(1,522), OF1.1+(2,10). Action can't apply for this match or a
Expand Down Expand Up @@ -269,6 +282,9 @@ enum ofperr {
* bit set to 1. */
OFPERR_OFPBAC_BAD_SET_MASK,

/* OF1.5+(2,17). Invalid meter id in meter action. */
OFPERR_OFPBAC_BAD_METER,

/* NX1.0-1.1(2,256), NX1.2+(11). Must-be-zero action argument had nonzero
* value. */
OFPERR_NXBAC_MUST_BE_ZERO,
Expand Down Expand Up @@ -360,8 +376,8 @@ enum ofperr {
* field. */
OFPERR_OFPBMC_BAD_VALUE,

/* NX1.0-1.1(1,259), OF1.2+(4,8). Unsupported mask specified in the match,
* field is not dl-address or nw-address. */
/* NX1.0-1.1(1,259), OF1.2+(4,8). Unsupported mask specified in the
* match. */
OFPERR_OFPBMC_BAD_MASK,

/* NX1.0-1.1(1,260), OF1.2+(4,9). A prerequisite was not met. */
Expand Down Expand Up @@ -413,6 +429,15 @@ enum ofperr {
* flags. */
OFPERR_OFPFMFC_BAD_FLAGS,

/* OF1.4+(5,8). Problem in table synchronization. */
OFPERR_OFPFMFC_CANT_SYNC,

/* ONF1.3(2360), OF1.4+(5,9). Unsupported priority value. */
OFPERR_OFPFMFC_BAD_PRIORITY,

/* OF1.4+(5,10). Synchronized flow entry is read only. */
OFPERR_OFPFMFC_IS_SYNC,

/* OF1.0(3,5). Unsupported action list - cannot process in the order
* specified. */
OFPERR_OFPFMFC_UNSUPPORTED,
Expand Down Expand Up @@ -567,6 +592,12 @@ enum ofperr {
/* NX1.0-1.1(1,513), OF1.2+(11,2). Invalid role. */
OFPERR_OFPRRFC_BAD_ROLE,

/* OF1.5+(11,3). Switch doesn't support changing ID. */
OFPERR_OFPRRFC_ID_UNSUP,

/* OF1.5+(11,4). Requested ID is in use. */
OFPERR_OFPRRFC_ID_IN_USE,

/* ## ---------------------- ## */
/* ## OFPET_METER_MOD_FAILED ## */
/* ## ---------------------- ## */
Expand All @@ -578,11 +609,12 @@ enum ofperr {
* replace an existing Meter. */
OFPERR_OFPMMFC_METER_EXISTS,

/* OF1.3+(12,2). Meter not added because Meter specified is invalid. */
/* OF1.3+(12,2). Meter not added because meter specified is invalid, or
* invalid meter in meter action. */
OFPERR_OFPMMFC_INVALID_METER,

/* OF1.3+(12,3). Meter not modified because a Meter MODIFY attempted
* to modify a non-existent Meter. */
* to modify a non-existent meter, or bad meter in meter action. */
OFPERR_OFPMMFC_UNKNOWN_METER,

/* OF1.3+(12,4). Unsupported or unknown command. */
Expand Down Expand Up @@ -623,12 +655,28 @@ enum ofperr {
/* OF1.3+(13,5). Permissions error. */
OFPERR_OFPTFFC_EPERM,

/* OF1.5+(13,6). Invalid capability field. */
OFPERR_OFPTFFC_BAD_CAPA,

/* OF1.5+(13,7). Invalid max_entries field. */
OFPERR_OFPTFFC_BAD_MAX_ENT,

/* OF1.5+(13,8). Invalid features field. */
OFPERR_OFPTFFC_BAD_FEATURES,

/* OF1.5+(13,9). Invalid command. */
OFPERR_OFPTFFC_BAD_COMMAND,

/* OF1.5+(13,10). Can't handle this many flow tables. */
OFPERR_OFPTFFC_TOO_MANY,


/* ## ------------------ ## */
/* ## OFPET_BAD_PROPERTY ## */
/* ## ------------------ ## */

/* NX1.0-1.1(13,2), NX1.2(25), OF1.3(13,2), OF1.4+(14,0). Unknown property
* type.
/* NX1.0-1.1(13,2), NX1.2(25), OF1.3(13,2), OF1.4+(14,0). Unknown or
* unsupported property type.
*
* [Known as OFPTFFC_BAD_TYPE in OF1.3.] */
OFPERR_OFPBPC_BAD_TYPE,
Expand Down Expand Up @@ -673,13 +721,13 @@ enum ofperr {
/* ## OFPET_ASYNC_CONFIG_FAILED ## */
/* ## -------------------------- ## */

/* OF1.4+(15,0). One mask is invalid. */
/* ONF1.3(2370), OF1.4+(15,0). One mask is invalid. */
OFPERR_OFPACFC_INVALID,

/* OF1.4+(15,1). Requested configuration not supported. */
/* ONF1.3(2371), OF1.4+(15,1). Requested configuration not supported. */
OFPERR_OFPACFC_UNSUPPORTED,

/* OF1.4+(15,2). Permissions error. */
/* ONF1.3(2372), OF1.4+(15,2). Permissions error. */
OFPERR_OFPACFC_EPERM,

/* ## -------------------- ## */
Expand Down Expand Up @@ -738,6 +786,16 @@ enum ofperr {
/* ONF1.3(2315), OF1.4+(17,15). Bundle is locking the resource. */
OFPERR_OFPBFC_BUNDLE_IN_PROGRESS,

/* OF1.5+(17,16). Scheduled commit was received and scheduling is not
* supported. */
OFPERR_OFPBFC_SCHED_NOT_SUPPORTED,

/* OF1.5+(17,17). Scheduled commit time exceeds upper bound. */
OFPERR_OFPBFC_SCHED_FUTURE,

/* 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. */
OFPERR_OFPBFC_BAD_VERSION,
Expand Down

0 comments on commit e994fa4

Please sign in to comment.