[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1318909651.2571.41.camel@edumazet-laptop>
Date: Tue, 18 Oct 2011 05:47:31 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: "Yan, Zheng" <zheng.z.yan@...el.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>
Subject: Re: [PATCH] fib_rules: fix unresolved_rules counting
Le mardi 18 octobre 2011 à 09:20 +0800, Yan, Zheng a écrit :
> we should decrease ops->unresolved_rules when deleting a unresolved rule.
>
> Signed-off-by: Zheng Yan <zheng.z.yan@...el.com>
> ---
> diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
> index 3231b46..27071ee 100644
> --- a/net/core/fib_rules.c
> +++ b/net/core/fib_rules.c
> @@ -475,8 +475,11 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
>
> list_del_rcu(&rule->list);
>
> - if (rule->action == FR_ACT_GOTO)
> + if (rule->action == FR_ACT_GOTO) {
> ops->nr_goto_rules--;
> + if (rtnl_dereference(rule->ctarget) == NULL)
> + ops->unresolved_rules--;
> + }
>
> /*
> * Check if this rule is a target to any of them. If so,
Acked-by: Eric Dumazet <eric.dumazet@...il.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists