netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: netdev@vger.kernel.org
Cc: eric.dumazet@gmail.com, vyasevich@gmail.com,
	nicolas.dichtel@6wind.com, kafai@fb.com
Subject: [PATCH net-next 0/8] ipv6: fib6: socket dst_entry improvments and cleanups
Date: Sun, 21 Sep 2014 00:05:17 +0200	[thread overview]
Message-ID: <cover.1411249633.git.hannes@stressinduktion.org> (raw)

Eric Dumazet noticed that rt6_nodes wich are neither RTF_NONEXTHOP nor
RTF_GATEWAY but DST_HOST ones cause major routing lookup churn because
their rt6_genid is never renewed, thus ip6_dst_check always considers
them outdated. This is a major problem, because these kind of routes
are normally used to in input handling.

Thus it does not make sense to use rt6i_genid anymore. This series
removes it.

The address deletion path is already covered and does not depend on
rt6i_genid. When we add a new address, we update the fn_sernums while
traversing the tree.

Because inet6_connect_socket depend on dst_check returning NULL also
for source address invalidation, we currently have to walk the whole
tree and update the fn_sernums manually when an address gets deleted.
This is a fairly expensive operation we currenlty have to do for address
deletion and xfrm policy changes. We currently do that for interface
mtu changes already.

I dropped the patch for updating the fn_sernum on deletion as it
showed some side effects with /proc/net/ipv6_route and we currently
don't need it. I stashed it away.

Thanks to Eric Dumazet for noticing the problem with rt6i_genid!

Hannes Frederic Sowa (8):
  ipv6: support for fib6_clean_* to update fn_sernum
  ipv6: a bit more typesafety
  ipv6: only generate one new serial number during fib6_add()
  ipv6: if no function for cleaner is specified only visit fib6_nodes
  ipv6: new function fib6_flush_trees and use it instead of bumping
    removed rt6_genid
  ipv6: no need to bump rt_genid_ipv6 on address addition
  ipv6: keep rt_sernum per namespace to reduce number of flushes
  ipv6: switch rt_sernum to atomic_t and clean up types

 include/net/ip6_fib.h       | 16 ++++++--
 include/net/net_namespace.h | 14 ++-----
 include/net/netns/ipv6.h    |  2 +-
 net/ipv6/addrconf.c         |  3 +-
 net/ipv6/addrconf_core.c    |  6 +++
 net/ipv6/af_inet6.c         |  2 +-
 net/ipv6/ip6_fib.c          | 90 +++++++++++++++++++++++++++------------------
 net/ipv6/route.c            |  4 --
 8 files changed, 81 insertions(+), 56 deletions(-)

-- 
1.9.3

             reply	other threads:[~2014-09-20 22:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-20 22:05 Hannes Frederic Sowa [this message]
2014-09-20 22:05 ` [PATCH net-next 1/8] ipv6: support for fib6_clean_* to update fn_sernum Hannes Frederic Sowa
2014-09-21  2:07   ` YOSHIFUJI Hideaki
2014-09-21 10:09     ` Hannes Frederic Sowa
2014-09-20 22:05 ` [PATCH net-next 2/8] ipv6: a bit more typesafety Hannes Frederic Sowa
2014-09-21  2:13   ` YOSHIFUJI Hideaki
2014-09-21 10:08     ` Hannes Frederic Sowa
2014-09-20 22:05 ` [PATCH net-next 3/8] ipv6: only generate one new serial number during fib6_add() Hannes Frederic Sowa
2014-09-20 22:05 ` [PATCH net-next 4/8] ipv6: if no function for cleaner is specified only visit fib6_nodes Hannes Frederic Sowa
2014-09-20 22:05 ` [PATCH net-next 5/8] ipv6: new function fib6_flush_trees and use it instead of bumping removed rt6_genid Hannes Frederic Sowa
2014-09-21  2:21   ` YOSHIFUJI Hideaki
2014-09-21 10:11     ` Hannes Frederic Sowa
2014-09-20 22:05 ` [PATCH net-next 6/8] ipv6: no need to bump rt_genid_ipv6 on address addition Hannes Frederic Sowa
2014-09-20 22:05 ` [PATCH net-next 7/8] ipv6: keep rt_sernum per namespace to reduce number of flushes Hannes Frederic Sowa
2014-09-20 22:05 ` [PATCH net-next 8/8] ipv6: switch rt_sernum to atomic_t and clean up types Hannes Frederic Sowa

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=cover.1411249633.git.hannes@stressinduktion.org \
    --to=hannes@stressinduktion.org \
    --cc=eric.dumazet@gmail.com \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=vyasevich@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).