ofp-errors: New error code ONFBIC_DUP_INSTRUCTION.
authorBen Pfaff <blp@nicira.com>
Mon, 24 Jun 2013 20:49:47 +0000 (13:49 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 25 Jun 2013 17:52:21 +0000 (10:52 -0700)
This is a prototype of OpenFlow enhancement proposal EXT-260 "Add error
code for duplicate instruction."  It uses the error code proposed there.

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/ofp-actions.c
lib/ofp-errors.h
tests/ofp-actions.at

index 99494a2..34a700b 100644 (file)
@@ -1003,9 +1003,7 @@ decode_openflow11_instructions(const struct ofp11_instruction insts[],
         }
 
         if (out[type]) {
-            return OFPERR_OFPBAC_UNSUPPORTED_ORDER; /* No specific code for
-                                                     * a duplicate instruction
-                                                     * exist */
+            return OFPERR_ONFBIC_DUP_INSTRUCTION;
         }
         out[type] = inst;
     }
index d144793..17f8bce 100644 (file)
@@ -268,6 +268,9 @@ enum ofperr {
     /* OF1.2+(3,8).  Permissions error. */
     OFPERR_OFPBIC_EPERM,
 
+    /* ONF1.1+(2600).  Duplicate instruction. */
+    OFPERR_ONFBIC_DUP_INSTRUCTION,
+
 /* ## --------------- ## */
 /* ## OFPET_BAD_MATCH ## */
 /* ## --------------- ## */
index b455bb9..ebad040 100644 (file)
@@ -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: OFPBAC_UNSUPPORTED_ORDER
+# bad OF1.1 instructions: ONFBIC_DUP_INSTRUCTION
 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: OFPBAC_UNSUPPORTED_ORDER
+# bad OF1.1 instructions: ONFBIC_DUP_INSTRUCTION
 0002 0018 00000000 fedcba9876543210 ff00ff00ff00ff00 0002 0018 00000000 fedcba9876543210 ff00ff00ff00ff00
 
 dnl Write-Metadata in wrong position (OpenFlow 1.1+ disregards the order