From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Yan, Zheng" <zheng.z.yan@intel.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [PATCH] fib_rules: fix unresolved_rules counting
Date: Tue, 18 Oct 2011 05:47:31 +0200 [thread overview]
Message-ID: <1318909651.2571.41.camel@edumazet-laptop> (raw)
In-Reply-To: <4E9CD45C.9050608@intel.com>
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@intel.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@gmail.com>
next prev parent reply other threads:[~2011-10-18 3:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-18 1:20 [PATCH] fib_rules: fix unresolved_rules counting Yan, Zheng
2011-10-18 3:47 ` Eric Dumazet [this message]
2011-10-19 23:18 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1318909651.2571.41.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=zheng.z.yan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox