Skip to content

RFC ipv6: dst_entry socket caching improvments

Hannes Frederic Sowa netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ipv6: also increase fib6_node sernum on deletion eventsnet/ipv6/ip6_fib.c+25 -153 replies
2/6ipv6: no need to bump rt_genid_ipv6 on address change anymorenet/ipv6/addrconf.c+0 -10 replies
3/6ipv6: if no function for cleaner is specified only visit nodesnet/ipv6/ip6_fib.c+7 -00 replies
4/6ipv6: new function fib6_flush_trees and use it instead of bumping removed rt6_genidinclude/net/net_namespace.h include/net/netns/ipv6.h net/ipv6/addrconf_core.c +3 more+29 -200 replies
5/6ipv6: keep rt_sernum per namespace to reduce number of flushesinclude/net/netns/ipv6.h net/ipv6/af_inet6.c net/ipv6/ip6_fib.c+13 -100 replies
6/6ipv6: switch rt_sernum to atomic_t and clean up typesinclude/net/ip6_fib.h include/net/netns/ipv6.h net/ipv6/af_inet6.c +1 more+23 -230 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/6] ipv6: dst_entry socket caching improvments

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.

This patchset tries to improve the situation by also updating the fn_sernum in the routing tables during address deletion. The only expensive operation left, which needs a walk over all routing tables, are xfrm policy modifications.

I didn't annotate the patches with fixes-tags as it only solves a performance issue. Please review carefully, thanks! I'll do some more tests and will do a propoer submission if the xfrm slow paths looks ok to everyone.

Hannes Frederic Sowa (6):
ipv6: also increase fib6_node sernum on deletion events
ipv6: no need to bump rt_genid_ipv6 on address change anymore
ipv6: if no function for cleaner is specified only visit nodes
ipv6: new function fib6_flush_trees and use it instead of bumping
removed rt6_genid
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       |  2 +-
 include/net/net_namespace.h | 14 ++------
 include/net/netns/ipv6.h    |  2 +-
 net/ipv6/addrconf.c         |  1 -
 net/ipv6/addrconf_core.c    |  6 ++++
 net/ipv6/af_inet6.c         |  2 +-
 net/ipv6/ip6_fib.c          | 81 ++++++++++++++++++++++++++++++++-------------
 net/ipv6/route.c            |  4 ---
 8 files changed, 70 insertions(+), 42 deletions(-)
Signature · 1 line
1.9.3