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 2275c48698aabae4b03c5f3816190ff4813c6abb..6634303ce94369fcfb8917625d623d575bb020d9 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 e6b8aed6ab52f1ac9e943578674667ef2aee8a74..6371bc25c795d929514d67a1b5f7bbfdb677275e 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++;
         }