[ovs-dev] [PATCH] ovs-router: Free the entries in ovs_router_flush().

Jarno Rajahalme jrajahalme at nicira.com
Sat Nov 15 00:02:12 UTC 2014


Ben, 

I merged this into the patch on which you commented on this, no need to review this.

  Jarno

On Nov 14, 2014, at 3:17 PM, Jarno Rajahalme <jrajahalme at nicira.com> wrote:

> ovs_router_flush() should call ovsrcu_postpone to free the entries it
> removes from the classifier.
> 
> Suggested-by: Ben Pfaff <blp at nicira.com>
> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
> ---
> lib/ovs-router.c |    4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/ovs-router.c b/lib/ovs-router.c
> index ba51614..20547b1 100644
> --- a/lib/ovs-router.c
> +++ b/lib/ovs-router.c
> @@ -260,7 +260,9 @@ ovs_router_flush(void)
> 
>     CLS_FOR_EACH_SAFE(rt, cr, &cls) {
>         if (rt->priority == rt->plen) {
> -            classifier_remove(&cls, &rt->cr);
> +            if (classifier_remove(&cls, &rt->cr)) {
> +                ovsrcu_postpone(rt_entry_free, rt);
> +            }
>         }
>     }
>     seq_change(tnl_conf_seq);
> -- 
> 1.7.10.4
> 




More information about the dev mailing list