[ovs-dev] [PATCH 1/5] openflow-common: Change flow removal reason codes.

Jarno Rajahalme jarno.rajahalme at nsn.com
Wed Jun 26 22:39:48 UTC 2013


Swap places of OFPRR_METER_DELETE and OFPRR_EVICTION in enumeration to be
compatible with OpenFlow 1.4.

Prior to OpenFlow 1.4 OFPRR_EVICTION was a Nicira specific flow removal reason
code.  OpenFlow 1.3 added support for meters, which require dependent flow
removal when meters are deleted.  The reason code for this is also added in
OpenFlow 1.4, but OFPRR_METER_DELETE now has the value OVS previously had for
OFPRR_EVICTION.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme at nsn.com>
---
 include/openflow/openflow-common.h |    2 +-
 tests/ofp-print.at                 |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/openflow/openflow-common.h b/include/openflow/openflow-common.h
index d3b4e61..a9e5a76 100644
--- a/include/openflow/openflow-common.h
+++ b/include/openflow/openflow-common.h
@@ -374,8 +374,8 @@ enum ofp_flow_removed_reason {
     OFPRR_HARD_TIMEOUT,         /* Time exceeded hard_timeout. */
     OFPRR_DELETE,               /* Evicted by a DELETE flow mod. */
     OFPRR_GROUP_DELETE,         /* Group was removed. */
-    OFPRR_EVICTION,             /* Switch eviction to free resources. */
     OFPRR_METER_DELETE,         /* Meter was removed. */
+    OFPRR_EVICTION,             /* Switch eviction to free resources. */
 };
 
 /* What changed about the physical port */
diff --git a/tests/ofp-print.at b/tests/ofp-print.at
index b3e3eb5..a7fef55 100644
--- a/tests/ofp-print.at
+++ b/tests/ofp-print.at
@@ -2179,7 +2179,7 @@ AT_SETUP([NXST_FLOW_MONITOR reply])
 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
 AT_CHECK([ovs-ofctl ofp-print "\
 01 11 00 40 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 02 00 00 00 00 \
-00 20 00 01 00 04 80 00 00 05 00 10 00 06 01 00 12 34 56 78 9a bc de f0 \
+00 20 00 01 00 05 80 00 00 05 00 10 00 06 01 00 12 34 56 78 9a bc de f0 \
 00 00 00 02 00 01 00 00 \
 00 08 00 03 00 01 86 a0 \
 "], [0], [dnl
-- 
1.7.10.4




More information about the dev mailing list