mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
ofp-errors: Duplicate instruction error
Add OFPERR_OFPBIC_DUP_INST (type = OFPET_BAD_INSTRUCTION, code = 9) and use it for OpenFlow1.4+. For OpenFlow1.1 - 1.3 map this error to ONFBIC_DUP_INSTRUCTION (experimenter = ONF, type = 2600) which is proposed in OpenFlow enhancement proposal EXT-260 "Add error code for duplicate instruction.". Previously ONFBIC_DUP_INSTRUCTION was used for OpenFlow1.3+. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -171,11 +171,6 @@ Many of them are necessary for OpenFlow 1.4 as well.
|
||||
[EXT-256]
|
||||
[optional for OF1.4+]
|
||||
|
||||
* Duplicate instruction error
|
||||
We already have ONFBIC_DUP_INSTRUCTION.
|
||||
[EXT-260]
|
||||
[required for OF1.4+]
|
||||
|
||||
* Multipart timeout error
|
||||
[EXT-264]
|
||||
[required for OF1.4+]
|
||||
|
@@ -1724,7 +1724,7 @@ decode_openflow11_instructions(const struct ofp11_instruction insts[],
|
||||
}
|
||||
|
||||
if (out[type]) {
|
||||
return OFPERR_ONFBIC_DUP_INSTRUCTION;
|
||||
return OFPERR_OFPBIC_DUP_INST;
|
||||
}
|
||||
out[type] = inst;
|
||||
}
|
||||
|
@@ -272,8 +272,8 @@ enum ofperr {
|
||||
/* OF1.2+(3,8). Permissions error. */
|
||||
OFPERR_OFPBIC_EPERM,
|
||||
|
||||
/* ONF1.1+(2600). Duplicate instruction. */
|
||||
OFPERR_ONFBIC_DUP_INSTRUCTION,
|
||||
/* ONF1.1-1.3(2600), OF1.4+(3,9). Duplicate instruction. */
|
||||
OFPERR_OFPBIC_DUP_INST,
|
||||
|
||||
/* ## --------------- ## */
|
||||
/* ## OFPET_BAD_MATCH ## */
|
||||
|
@@ -339,7 +339,7 @@ dnl Check that an empty Apply-Actions instruction gets dropped.
|
||||
0004 0008 00000000
|
||||
|
||||
dnl Duplicate instruction type:
|
||||
# bad OF1.1 instructions: ONFBIC_DUP_INSTRUCTION
|
||||
# bad OF1.1 instructions: OFPBIC_DUP_INST
|
||||
0004 0008 00000000 0004 0008 00000000
|
||||
|
||||
dnl Instructions not multiple of 8 in length.
|
||||
@@ -381,7 +381,7 @@ dnl Write-Metadata too long.
|
||||
0002 0020 00000000 fedcba9876543210 ffffffffffffffff 0000000000000000
|
||||
|
||||
dnl Write-Metadata duplicated.
|
||||
# bad OF1.1 instructions: ONFBIC_DUP_INSTRUCTION
|
||||
# bad OF1.1 instructions: OFPBIC_DUP_INST
|
||||
0002 0018 00000000 fedcba9876543210 ff00ff00ff00ff00 0002 0018 00000000 fedcba9876543210 ff00ff00ff00ff00
|
||||
|
||||
dnl Write-Metadata in wrong position (OpenFlow 1.1+ disregards the order
|
||||
|
@@ -80,6 +80,16 @@ OFPT_FEATURES_REPLY (OF1.1) (xid=0xeeff0011):
|
||||
])
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([OFPT_ERROR with type OFPBIC_DUP_INST - OF1.4])
|
||||
AT_KEYWORDS([ofp-print ofp-errors])
|
||||
AT_CHECK([ovs-ofctl ofp-print 0501001400000000000300090206ccddeeff0011], [0], [dnl
|
||||
OFPT_ERROR (OF1.4) (xid=0x0): OFPBIC_DUP_INST
|
||||
OFPT_FEATURES_REPLY (OF1.1) (xid=0xeeff0011):
|
||||
(***truncated to 8 bytes from 52445***)
|
||||
00000000 02 06 cc dd ee ff 00 11- |........ |
|
||||
])
|
||||
AT_CLEANUP
|
||||
|
||||
dnl OF1.1 had OFPBIC_UNSUP_EXP_INST as 3,5.
|
||||
dnl OF1.2 broke it into OFPBIC_BAD_EXPERIMENTER as 3,5
|
||||
dnl and OFPBIC_BAD_EXT_TYPE as 3,6.
|
||||
|
Reference in New Issue
Block a user