[ovs-dev] [PATCH] ofproto: Update stats for exact match flows before expiration.
Justin Pettit
jpettit at nicira.com
Wed Nov 11 19:14:25 UTC 2009
Looks good to me. Thanks for the quick fix!
--Justin
On Nov 10, 2009, at 6:10 PM, Jesse Gross wrote:
> When a wildcarded flow is expired we remove all of the subrules to
> collect their stats before sending a flow expiration message. However,
> we were only removing exact match flows after the expiration message
> is composed. This uninstalls it first.
>
> CC: David Erickson <derickso at stanford.edu>
> ---
> secchan/ofproto.c | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/secchan/ofproto.c b/secchan/ofproto.c
> index 6319b03..89dce12 100644
> --- a/secchan/ofproto.c
> +++ b/secchan/ofproto.c
> @@ -3292,14 +3292,18 @@ expire_rule(struct cls_rule *cls_rule, void *p_)
> }
>
> COVERAGE_INC(ofproto_expired);
> +
> + /* Update stats. */
> if (rule->cr.wc.wildcards) {
> - /* Update stats. (This code will be a no-op if the rule expired
> + /* This code will be a no-op if the rule expired
> * due to an idle timeout, because in that case the rule has no
> - * subrules left.) */
> + * subrules left. */
> struct rule *subrule, *next;
> LIST_FOR_EACH_SAFE (subrule, next, struct rule, list, &rule->list) {
> rule_remove(p, subrule);
> }
> + } else {
> + rule_uninstall(p, rule);
> }
>
> send_flow_exp(p, rule, now,
> --
> 1.6.0.4
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
More information about the dev
mailing list