/*
- * 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.
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;
};
}
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;
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;
}
}