From bbf5f5607fbc20b0f4107c1d6d11660c0e338abb Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 7 May 2008 14:43:06 -0700 Subject: [PATCH] When deleting flows, only insist on matching priority with strict matching. (The code before this change would only ever delete flows if strict matching was turned on.) --- datapath/table-linear.c | 2 +- switch/table-linear.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath/table-linear.c b/datapath/table-linear.c index 2275c486..6634303c 100644 --- a/datapath/table-linear.c +++ b/datapath/table-linear.c @@ -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) diff --git a/switch/table-linear.c b/switch/table-linear.c index e6b8aed6..6371bc25 100644 --- a/switch/table-linear.c +++ b/switch/table-linear.c @@ -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++; } -- 2.30.2