When deleting flows, only insist on matching priority with strict matching.
authorBen Pfaff <blp@nicira.com>
Wed, 7 May 2008 21:43:06 +0000 (14:43 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 7 May 2008 22:23:45 +0000 (15:23 -0700)
(The code before this change would only ever delete flows if strict
matching was turned on.)

datapath/table-linear.c
switch/table-linear.c

index 2275c48..6634303 100644 (file)
@@ -98,7 +98,7 @@ static int table_linear_delete(struct sw_table *swt,
 
        list_for_each_entry_rcu (flow, &tl->flows, node) {
                if (flow_del_matches(&flow->key, key, strict)
-                               && (strict && (flow->priority == priority)))
+                               && (!strict || (flow->priority == priority)))
                        count += do_delete(swt, flow);
        }
        if (count)
index e6b8aed..6371bc2 100644 (file)
@@ -115,7 +115,7 @@ static int table_linear_delete(struct sw_table *swt,
 
     LIST_FOR_EACH_SAFE (flow, n, struct sw_flow, node, &tl->flows) {
         if (flow_del_matches(&flow->key, key, strict)
-                && (strict && (flow->priority == priority))) {
+                && (!strict || (flow->priority == priority))) {
             do_delete(flow);
             count++;
         }