ofproto: Add OpenFlow 1.5 group tests.
[cascardo/ovs.git] / ofproto / in-band.c
index 42b3efb..e25a27a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -83,7 +83,7 @@ enum in_band_op {
 struct in_band_rule {
     struct hmap_node hmap_node; /* In struct in_band's "rules" hmap. */
     struct match match;
-    unsigned int priority;
+    int priority;
     enum in_band_op op;
 };
 
@@ -236,7 +236,7 @@ in_band_must_output_to_local_port(const struct flow *flow)
 }
 
 static void
-add_rule(struct in_band *ib, const struct match *match, unsigned int priority)
+add_rule(struct in_band *ib, const struct match *match, int priority)
 {
     uint32_t hash = match_hash(match, 0);
     struct in_band_rule *rule;
@@ -386,13 +386,9 @@ in_band_run(struct in_band *ib)
             break;
 
         case DEL:
-            if (ofproto_delete_flow(ib->ofproto,
-                                    &rule->match, rule->priority)) {
-                /* ofproto doesn't have the rule anymore so there's no reason
-                 * for us to track it any longer. */
-                hmap_remove(&ib->rules, &rule->hmap_node);
-                free(rule);
-            }
+            ofproto_delete_flow(ib->ofproto, &rule->match, rule->priority);
+            hmap_remove(&ib->rules, &rule->hmap_node);
+            free(rule);
             break;
         }
     }