Add OFPRR_EVICTION to enum ofp_flow_removed_reason.
authorBen Pfaff <blp@nicira.com>
Tue, 3 Jul 2012 21:23:10 +0000 (14:23 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 12 Jul 2012 21:12:58 +0000 (14:12 -0700)
This is likely to be part of OpenFlow 1.3.1 or 1.4 and we have use for it
beforehand to report evicted flows.

Signed-off-by: Ben Pfaff <blp@nicira.com>
include/openflow/openflow-common.h
lib/ofp-print.c

index bb4de0b0ea457e4f5c2185c884791cf2420b9f79..fe91b107619c00449a91e9335ae27c9d04a3db05 100644 (file)
@@ -280,7 +280,8 @@ enum ofp_flow_removed_reason {
     OFPRR_IDLE_TIMEOUT,         /* Flow idle time exceeded idle_timeout. */
     OFPRR_HARD_TIMEOUT,         /* Time exceeded hard_timeout. */
     OFPRR_DELETE,               /* Evicted by a DELETE flow mod. */
-    OFPRR_GROUP_DELETE          /* Group was removed. */
+    OFPRR_GROUP_DELETE,         /* Group was removed. */
+    OFPRR_EVICTION,             /* Switch eviction to free resources. */
 };
 
 /* What changed about the physical port */
index 9da76b62c2d36b66ff74d43b22de1460e900f98b..03de5f1e58a6f2840f06e22ab3c8a890fed11e9b 100644 (file)
@@ -810,6 +810,8 @@ ofp_flow_removed_reason_to_string(enum ofp_flow_removed_reason reason)
         return "delete";
     case OFPRR_GROUP_DELETE:
         return "group_delete";
+    case OFPRR_EVICTION:
+        return "eviction";
     default:
         sprintf(s, "%d", (int) reason);
         return s;