2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-23 02:17:42 +00:00

ofp-errors: Rename "OF" to "OF1.0+", "NX" to "NX1.0+".

This seems like a more reasonable way to do things given that we will soon
need "OpenFlow 1.1 and later" and "OpenFlow 1.1 only" keywords.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
Ben Pfaff 2012-03-26 11:22:42 -07:00
parent e792ba50dd
commit 4000658b1a
2 changed files with 44 additions and 42 deletions

View File

@ -194,7 +194,7 @@ def extract_ofp_errors(filenames):
names.append(enum) names.append(enum)
for dst in dsts.split(', '): for dst in dsts.split(', '):
m = re.match(r'([A-Z0-9.]+)\((\d+)(?:,(\d+))?\)$', dst) m = re.match(r'([A-Z0-9.+]+)\((\d+)(?:,(\d+))?\)$', dst)
if not m: if not m:
fatal("%s: syntax error in destination" % dst) fatal("%s: syntax error in destination" % dst)
targets = m.group(1) targets = m.group(1)
@ -204,12 +204,13 @@ def extract_ofp_errors(filenames):
else: else:
code = None code = None
target_map = {"OF": ("OF1.0", "OF1.1"), target_map = {"OF1.0+": ("OF1.0", "OF1.1"),
"OF1.0": ("OF1.0",), "OF1.1+": ("OF1.1",),
"OF1.1": ("OF1.1",), "OF1.0": ("OF1.0",),
"NX": ("OF1.0", "OF1.1"), "OF1.1": ("OF1.1",),
"NX1.0": ("OF1.0",), "NX1.0+": ("OF1.0", "OF1.1"),
"NX1.1": ("OF1.1",)} "NX1.0": ("OF1.0",),
"NX1.1": ("OF1.1",)}
if targets not in target_map: if targets not in target_map:
fatal("%s: unknown error domain" % targets) fatal("%s: unknown error domain" % targets)
for target in target_map[targets]: for target in target_map[targets]:

View File

@ -48,119 +48,120 @@ enum ofperr {
/* ## OFPET_HELLO_FAILED ## */ /* ## OFPET_HELLO_FAILED ## */
/* ## ------------------ ## */ /* ## ------------------ ## */
/* OF(0). Hello protocol failed. */ /* OF1.0+(0). Hello protocol failed. */
OFPERR_OFPET_HELLO_FAILED = OFPERR_OFS, OFPERR_OFPET_HELLO_FAILED = OFPERR_OFS,
/* OF(0,0). No compatible version. */ /* OF1.0+(0,0). No compatible version. */
OFPERR_OFPHFC_INCOMPATIBLE, OFPERR_OFPHFC_INCOMPATIBLE,
/* OF(0,1). Permissions error. */ /* OF1.0+(0,1). Permissions error. */
OFPERR_OFPHFC_EPERM, OFPERR_OFPHFC_EPERM,
/* ## ----------------- ## */ /* ## ----------------- ## */
/* ## OFPET_BAD_REQUEST ## */ /* ## OFPET_BAD_REQUEST ## */
/* ## ----------------- ## */ /* ## ----------------- ## */
/* OF(1). Request was not understood. */ /* OF1.0+(1). Request was not understood. */
OFPERR_OFPET_BAD_REQUEST, OFPERR_OFPET_BAD_REQUEST,
/* OF(1,0). ofp_header.version not supported. */ /* OF1.0+(1,0). ofp_header.version not supported. */
OFPERR_OFPBRC_BAD_VERSION, OFPERR_OFPBRC_BAD_VERSION,
/* OF(1,1). ofp_header.type not supported. */ /* OF1.0+(1,1). ofp_header.type not supported. */
OFPERR_OFPBRC_BAD_TYPE, OFPERR_OFPBRC_BAD_TYPE,
/* OF(1,2). ofp_stats_msg.type not supported. */ /* OF1.0+(1,2). ofp_stats_msg.type not supported. */
OFPERR_OFPBRC_BAD_STAT, OFPERR_OFPBRC_BAD_STAT,
/* OF(1,3). Vendor not supported (in ofp_vendor_header or /* OF1.0+(1,3). Vendor not supported (in ofp_vendor_header or
* ofp_stats_msg). */ * ofp_stats_msg). */
OFPERR_OFPBRC_BAD_VENDOR, OFPERR_OFPBRC_BAD_VENDOR,
/* OF(1,4). Vendor subtype not supported. */ /* OF1.0+(1,4). Vendor subtype not supported. */
OFPERR_OFPBRC_BAD_SUBTYPE, OFPERR_OFPBRC_BAD_SUBTYPE,
/* OF(1,5). Permissions error. */ /* OF1.0+(1,5). Permissions error. */
OFPERR_OFPBRC_EPERM, OFPERR_OFPBRC_EPERM,
/* OF(1,6). Wrong request length for type. */ /* OF1.0+(1,6). Wrong request length for type. */
OFPERR_OFPBRC_BAD_LEN, OFPERR_OFPBRC_BAD_LEN,
/* OF(1,7). Specified buffer has already been used. */ /* OF1.0+(1,7). Specified buffer has already been used. */
OFPERR_OFPBRC_BUFFER_EMPTY, OFPERR_OFPBRC_BUFFER_EMPTY,
/* OF(1,8). Specified buffer does not exist. */ /* OF1.0+(1,8). Specified buffer does not exist. */
OFPERR_OFPBRC_BUFFER_UNKNOWN, OFPERR_OFPBRC_BUFFER_UNKNOWN,
/* OF1.1(1,9). Specified table-id invalid or does not exist. */ /* OF1.1(1,9). Specified table-id invalid or does not exist. */
OFPERR_OFPBRC_BAD_TABLE_ID, OFPERR_OFPBRC_BAD_TABLE_ID,
/* NX(1,256). Invalid NXM flow match. */ /* NX1.0+(1,256). Invalid NXM flow match. */
OFPERR_NXBRC_NXM_INVALID, OFPERR_NXBRC_NXM_INVALID,
/* NX(1,257). The nxm_type, or nxm_type taken in combination with /* NX1.0+(1,257). The nxm_type, or nxm_type taken in combination with
* nxm_hasmask or nxm_length or both, is invalid or not implemented. */ * nxm_hasmask or nxm_length or both, is invalid or not implemented. */
OFPERR_NXBRC_NXM_BAD_TYPE, OFPERR_NXBRC_NXM_BAD_TYPE,
/* NX(1,258). Invalid nxm_value. */ /* NX1.0+(1,258). Invalid nxm_value. */
OFPERR_NXBRC_NXM_BAD_VALUE, OFPERR_NXBRC_NXM_BAD_VALUE,
/* NX(1,259). Invalid nxm_mask. */ /* NX1.0+(1,259). Invalid nxm_mask. */
OFPERR_NXBRC_NXM_BAD_MASK, OFPERR_NXBRC_NXM_BAD_MASK,
/* NX(1,260). A prerequisite was not met. */ /* NX1.0+(1,260). A prerequisite was not met. */
OFPERR_NXBRC_NXM_BAD_PREREQ, OFPERR_NXBRC_NXM_BAD_PREREQ,
/* NX(1,261). A given nxm_type was specified more than once. */ /* NX1.0+(1,261). A given nxm_type was specified more than once. */
OFPERR_NXBRC_NXM_DUP_TYPE, OFPERR_NXBRC_NXM_DUP_TYPE,
/* NX(1,512). A request specified a nonexistent table ID. */ /* NX1.0+(1,512). A request specified a nonexistent table ID. */
OFPERR_NXBRC_BAD_TABLE_ID, OFPERR_NXBRC_BAD_TABLE_ID,
/* NX(1,513). NXT_ROLE_REQUEST specified an invalid role. */ /* NX1.0+(1,513). NXT_ROLE_REQUEST specified an invalid role. */
OFPERR_NXBRC_BAD_ROLE, OFPERR_NXBRC_BAD_ROLE,
/* NX(1,514). The in_port in an ofp_packet_out request is invalid. */ /* NX1.0+(1,514). The in_port in an ofp_packet_out request is invalid. */
OFPERR_NXBRC_BAD_IN_PORT, OFPERR_NXBRC_BAD_IN_PORT,
/* NX(1,515). Must-be-zero field had nonzero value. */ /* NX1.0+(1,515). Must-be-zero field had nonzero value. */
OFPERR_NXBRC_MUST_BE_ZERO, OFPERR_NXBRC_MUST_BE_ZERO,
/* NX(1,516). The reason in an ofp_port_status message is not valid. */ /* NX1.0+(1,516). The reason in an ofp_port_status message is not
* valid. */
OFPERR_NXBRC_BAD_REASON, OFPERR_NXBRC_BAD_REASON,
/* ## ---------------- ## */ /* ## ---------------- ## */
/* ## OFPET_BAD_ACTION ## */ /* ## OFPET_BAD_ACTION ## */
/* ## ---------------- ## */ /* ## ---------------- ## */
/* OF(2). Error in action description. */ /* OF1.0+(2). Error in action description. */
OFPERR_OFPET_BAD_ACTION, OFPERR_OFPET_BAD_ACTION,
/* OF(2,0). Unknown action type. */ /* OF1.0+(2,0). Unknown action type. */
OFPERR_OFPBAC_BAD_TYPE, OFPERR_OFPBAC_BAD_TYPE,
/* OF(2,1). Length problem in actions. */ /* OF1.0+(2,1). Length problem in actions. */
OFPERR_OFPBAC_BAD_LEN, OFPERR_OFPBAC_BAD_LEN,
/* OF(2,2). Unknown experimenter id specified. */ /* OF1.0+(2,2). Unknown experimenter id specified. */
OFPERR_OFPBAC_BAD_VENDOR, OFPERR_OFPBAC_BAD_VENDOR,
/* OF(2,3). Unknown action type for experimenter id. */ /* OF1.0+(2,3). Unknown action type for experimenter id. */
OFPERR_OFPBAC_BAD_VENDOR_TYPE, OFPERR_OFPBAC_BAD_VENDOR_TYPE,
/* OF(2,4). Problem validating output port. */ /* OF1.0+(2,4). Problem validating output port. */
OFPERR_OFPBAC_BAD_OUT_PORT, OFPERR_OFPBAC_BAD_OUT_PORT,
/* OF(2,5). Bad action argument. */ /* OF1.0+(2,5). Bad action argument. */
OFPERR_OFPBAC_BAD_ARGUMENT, OFPERR_OFPBAC_BAD_ARGUMENT,
/* OF(2,6). Permissions error. */ /* OF1.0+(2,6). Permissions error. */
OFPERR_OFPBAC_EPERM, OFPERR_OFPBAC_EPERM,
/* OF(2,7). Can't handle this many actions. */ /* OF1.0+(2,7). Can't handle this many actions. */
OFPERR_OFPBAC_TOO_MANY, OFPERR_OFPBAC_TOO_MANY,
/* OF(2,8). Problem validating output queue. */ /* OF1.0+(2,8). Problem validating output queue. */
OFPERR_OFPBAC_BAD_QUEUE, OFPERR_OFPBAC_BAD_QUEUE,
/* OF1.1(2,9). Invalid group id in forward action. */ /* OF1.1(2,9). Invalid group id in forward action. */
@ -176,7 +177,7 @@ enum ofperr {
/* OF1.1(2,12). Actions uses an unsupported tag/encap. */ /* OF1.1(2,12). Actions uses an unsupported tag/encap. */
OFPERR_OFPBAC_BAD_TAG, OFPERR_OFPBAC_BAD_TAG,
/* NX(2,256). Must-be-zero action argument had nonzero value. */ /* NX1.0+(2,256). Must-be-zero action argument had nonzero value. */
OFPERR_NXBAC_MUST_BE_ZERO, OFPERR_NXBAC_MUST_BE_ZERO,
/* ## --------------------- ## */ /* ## --------------------- ## */