From: Ben Pfaff Date: Wed, 7 May 2008 21:43:06 +0000 (-0700) Subject: When deleting flows, only insist on matching priority with strict matching. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbf5f5607fbc20b0f4107c1d6d11660c0e338abb;p=openvswitch 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.) --- 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++; }