[ovs-dev] [flow monitor v2 07/12] Add OFPRR_EVICTION to enum ofp_flow_removed_reason.

Ben Pfaff blp at nicira.com
Fri Jul 6 21:49:39 UTC 2012


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 at nicira.com>
---
 include/openflow/openflow-common.h |    3 ++-
 lib/ofp-print.c                    |    2 ++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/include/openflow/openflow-common.h b/include/openflow/openflow-common.h
index bb4de0b..fe91b10 100644
--- a/include/openflow/openflow-common.h
+++ b/include/openflow/openflow-common.h
@@ -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 */
diff --git a/lib/ofp-print.c b/lib/ofp-print.c
index 41baab6..ce99071 100644
--- a/lib/ofp-print.c
+++ b/lib/ofp-print.c
@@ -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;
-- 
1.7.2.5




More information about the dev mailing list