From: Cong Wang <cwang@twopensource.com>
To: Alexander Duyck <alexander.h.duyck@redhat.com>
Cc: netdev <netdev@vger.kernel.org>,
Cong Wang <xiyou.wangcong@gmail.com>,
David Miller <davem@davemloft.net>
Subject: Re: [net-next PATCH 1/2] fib_trie: Fix warning on fib4_rules_exit
Date: Fri, 27 Mar 2015 15:14:24 -0700 [thread overview]
Message-ID: <CAHA+R7McwZQ5PCWFvUh-wrktg3AP0tu7arkcp=+SFmiD5apRBQ@mail.gmail.com> (raw)
In-Reply-To: <20150327211416.2465.23170.stgit@ahduyck-vm-fedora22>
On Fri, Mar 27, 2015 at 2:14 PM, Alexander Duyck
<alexander.h.duyck@redhat.com> wrote:
>
> The issue was that as a part of exiting the default rules were being
> deleted which resulted in the local trie being unmerged. By moving the
> freeing of the FIB tables up we can avoid the unmerge since there is no
> local table left when we call the fib4_rules_exit function.
>
This literally means we no longer need to call ops->delete()
in netns unregister path.
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 68ea695..27b6e04 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -153,8 +153,6 @@ static void fib_rules_cleanup_ops(struct fib_rules_ops *ops)
list_for_each_entry_safe(rule, tmp, &ops->rules_list, list) {
list_del_rcu(&rule->list);
- if (ops->delete)
- ops->delete(rule);
fib_rule_put(rule);
}
}
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index e5b6b05..1481b23 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -1178,6 +1178,7 @@ static void ip_fib_net_exit(struct net *net)
#ifdef CONFIG_IP_MULTIPLE_TABLES
fib4_rules_exit(net);
+ fib_flush_external(net); // <-------- Maybe not needed either.
#endif
for (i = 0; i < FIB_TABLE_HASHSZ; i++) {
next prev parent reply other threads:[~2015-03-27 22:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-27 21:14 [net-next PATCH 1/2] fib_trie: Fix warning on fib4_rules_exit Alexander Duyck
2015-03-27 21:14 ` [net-next PATCH 2/2] fib_trie: Cleanup ip_fib_net_exit code path Alexander Duyck
2015-03-31 17:19 ` David Miller
2015-03-27 22:14 ` Cong Wang [this message]
2015-03-27 23:29 ` [net-next PATCH 1/2] fib_trie: Fix warning on fib4_rules_exit Alexander Duyck
2015-03-30 18:54 ` Cong Wang
2015-03-30 20:24 ` Alexander Duyck
2015-03-30 20:50 ` Cong Wang
2015-03-30 21:58 ` Alexander Duyck
2015-03-31 17:19 ` 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='CAHA+R7McwZQ5PCWFvUh-wrktg3AP0tu7arkcp=+SFmiD5apRBQ@mail.gmail.com' \
--to=cwang@twopensource.com \
--cc=alexander.h.duyck@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.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;
as well as URLs for NNTP newsgroup(s).