linux/include/net
Eric Dumazet 29e75252da [IPV4] route cache: Introduce rt_genid for smooth cache invalidation
Current ip route cache implementation is not suited to large caches.

We can consume a lot of CPU when cache must be invalidated, since we
currently need to evict all cache entries, and this eviction is
sometimes asynchronous. min_delay & max_delay can somewhat control this
asynchronism behavior, but whole thing is a kludge, regularly triggering
infamous soft lockup messages. When entries are still in use, this also
consumes a lot of ram, filling dst_garbage.list.

A better scheme is to use a generation identifier on each entry,
so that cache invalidation can be performed by changing the table
identifier, without having to scan all entries.
No more delayed flushing, no more stalling when secret_interval expires.

Invalidated entries will then be freed at GC time (controled by
ip_rt_gc_timeout or stress), or when an invalidated entry is found
in a chain when an insert is done.
Thus we keep a normal equilibrium.

This patch :
- renames rt_hash_rnd to rt_genid (and makes it an atomic_t)
- Adds a new rt_genid field to 'struct rtable' (filling a hole on 64bit)
- Checks entry->rt_genid at appropriate places :
2008-01-31 19:28:27 -08:00
..
9p Use helpers to obtain task pid in printks 2007-10-19 11:53:43 -07:00
bluetooth [NET]: Remove FASTCALL macro 2008-01-28 14:57:23 -08:00
irda [IrDA]: Irport removal - part 1 2008-01-28 15:08:10 -08:00
iucv [AF_IUCV]: postpone receival of iucv-packets 2007-10-10 16:54:51 -07:00
netfilter [NETFILTER]: nf_conntrack: annotate l3protos with const 2008-01-31 19:28:13 -08:00
netns [NETFILTER]: arp_tables: per-netns arp_tables FILTER 2008-01-31 19:27:41 -08:00
sctp [NET] CORE: Introducing new memory accounting interface. 2008-01-28 15:00:18 -08:00
tc_act [PKT_SCHED]: Add stateless NAT 2007-10-10 16:53:11 -07:00
tipc [TIPC]: Optimize stream send routine to avoid fragmentation 2007-07-10 22:06:12 -07:00
act_api.h [NET_SCHED]: act_api: use PTR_ERR in tcf_action_init/tcf_action_get 2008-01-28 15:11:17 -08:00
addrconf.h [IPV4]: Enable use of 240/4 address space. 2008-01-28 15:08:44 -08:00
af_rxrpc.h [AF_RXRPC]: Add an interface to the AF_RXRPC module for the AFS filesystem to use 2007-04-26 15:50:17 -07:00
af_unix.h [AF_UNIX]: Remove unused declaration of sysctl_unix_max_dgram_qlen. 2008-01-28 14:57:13 -08:00
ah.h [IPSEC]: Get rid of ipv6_{auth,esp,comp}_hdr 2007-10-10 16:55:55 -07:00
arp.h [NETFILTER]: ebtables: remove casts, use consts 2008-01-31 19:27:33 -08:00
atmclip.h [ATM]: Annotations. 2006-12-02 21:22:55 -08:00
ax25.h [NET] include/net/: Spelling fixes 2007-12-20 13:56:32 -08:00
ax88796.h ax88796: add 93cx6 eeprom support 2007-10-10 16:53:56 -07:00
cfg80211.h cfg80211/nl80211: implement station attribute retrieval 2008-01-28 14:59:52 -08:00
checksum.h [NET]: Move netfilter checksum helpers to net/core/utils.c 2008-01-28 14:55:14 -08:00
cipso_ipv4.h [NetLabel]: consolidate the struct socket/sock handling to just struct sock 2007-06-08 13:33:09 -07:00
compat.h [NET]: Introduce SIOCGSTAMPNS ioctl to get timestamps with nanosec resolution 2007-04-25 22:24:04 -07:00
datalink.h
dn_dev.h [DECnet]: Endian annotation and fixes for DECnet. 2006-03-20 22:42:39 -08:00
dn_fib.h [DECNet]: Use rtnl registration interface 2007-04-25 22:27:12 -07:00
dn_neigh.h [DECnet]: Endian annotation and fixes for DECnet. 2006-03-20 22:42:39 -08:00
dn_nsp.h [DECnet]: Endian annotation and fixes for DECnet. 2006-03-20 22:42:39 -08:00
dn_route.h [NET]: Wrap netdevice hardware header creation. 2007-10-10 16:52:50 -07:00
dn.h [DECNET]: Another unnecessary net/tcp.h inclusion in net/dn.h 2007-07-10 23:02:12 -07:00
dsfield.h [NET]: Constify include/net/dsfield.h 2008-01-28 14:55:58 -08:00
dst.h [DST]: shrinks sizeof(struct rtable) by 64 bytes on x86_64 2008-01-28 15:10:41 -08:00
esp.h [IPSEC]: Use crypto_aead and authenc in ESP 2008-01-31 19:27:02 -08:00
fib_rules.h [NETNS]: Process FIB rule action in the context of the namespace. 2008-01-28 15:08:14 -08:00
flow.h [IPV4]: Remove unused multipath cached routing defintion in net/flow.h 2008-01-28 15:00:20 -08:00
gen_stats.h [NET_SCHED]: Convert packet schedulers from rtnetlink to new netlink API 2008-01-28 15:11:10 -08:00
genetlink.h [GENETLINK]: Dynamic multicast groups. 2007-07-18 15:47:52 -07:00
icmp.h [IPV4]: Add ICMPMsgStats MIB (RFC 4293) 2007-10-10 16:51:28 -07:00
ieee80211_crypt.h [PATCH] Update my email address from jkmaline@cc.hut.fi to j@w1.fi 2007-04-28 11:01:01 -04:00
ieee80211_radiotap.h [MAC80211]: Add get_unaligned to ieee80211_get_radiotap_len 2007-10-10 16:47:40 -07:00
ieee80211.h ieee80211: fix misannotations 2008-01-28 15:08:48 -08:00
ieee80211softmac_wx.h [PATCH] softmac: add SIOCSIWMLME 2006-04-24 16:15:58 -04:00
ieee80211softmac.h [IEEE80211]: Fix softmac lockdep reports. 2007-10-10 16:52:22 -07:00
if_inet6.h IPoIB: improve IPv4/IPv6 to IB mcast mapping functions 2008-01-25 14:15:37 -08:00
inet6_connection_sock.h [TCP]: Restore SKB socket owner setting in tcp_transmit_skb(). 2007-01-26 01:04:55 -08:00
inet6_hashtables.h [NETNS]: Tcp-v6 sockets per-net lookup. 2008-01-31 19:28:20 -08:00
inet_common.h [INET]: Remove leftover prototypes from include/net/inet_common.h 2007-11-12 21:02:51 -08:00
inet_connection_sock.h [TCP]: Restore SKB socket owner setting in tcp_transmit_skb(). 2007-01-26 01:04:55 -08:00
inet_ecn.h [INET]: Give outer DSCP directly to ip*_copy_dscp 2008-01-28 14:53:45 -08:00
inet_frag.h [NETNS][FRAGS]: Make the pernet subsystem for fragments. 2008-01-28 15:10:40 -08:00
inet_hashtables.h [NETNS]: Tcp-v4 sockets per-net lookup. 2008-01-31 19:28:19 -08:00
inet_sock.h [UDP]: Make use of inet_iif() when doing socket lookups. 2007-10-25 18:54:46 -07:00
inet_timewait_sock.h [INET]: Uninline the inet_twsk_put function. 2008-01-28 14:59:28 -08:00
inetpeer.h [INET]: Use list_head-s in inetpeer.c 2007-11-12 21:27:28 -08:00
ip6_checksum.h [IPV6]: Dumb typo in generic csum_ipv6_magic() 2006-12-22 11:12:07 -08:00
ip6_fib.h [XFRM] IPv6: Fix dst/routing check at transformation. 2008-01-28 14:59:36 -08:00
ip6_route.h [NETNS][IPV6]: Make sysctls route per namespace. 2008-01-28 15:01:20 -08:00
ip6_tunnel.h [NET] include/net/: Spelling fixes 2007-12-20 13:56:32 -08:00
ip_fib.h [NETNS]: Add netns parameter to fib_select_default. 2008-01-28 15:11:03 -08:00
ip_vs.h [IPVS]: Switch to using ctl_paths. 2008-01-28 15:01:08 -08:00
ip.h [NETNS][FRAGS]: Make the mem counter per-namespace. 2008-01-28 15:10:36 -08:00
ipcomp.h [IPSEC]: Get rid of ipv6_{auth,esp,comp}_hdr 2007-10-10 16:55:55 -07:00
ipconfig.h [NET]: ipconfig and nfsroot annotations 2006-12-02 21:21:09 -08:00
ipip.h [IPV4]: Add ip_local_out 2008-01-28 14:53:47 -08:00
ipv6.h [NETNS][FRAGS]: Make the mem counter per-namespace. 2008-01-28 15:10:36 -08:00
ipx.h [SK_BUFF]: Introduce skb_transport_header(skb) 2007-04-25 22:25:31 -07:00
iw_handler.h [NL80211]: add netlink interface to cfg80211 2007-10-10 16:52:14 -07:00
lapb.h
llc_c_ac.h
llc_c_ev.h
llc_c_st.h
llc_conn.h [NET]: Make socket creation namespace safe. 2007-10-10 16:49:07 -07:00
llc_if.h [LLC]: add multicast support for datagrams 2006-06-17 21:26:08 -07:00
llc_pdu.h [SK_BUFF]: Introduce skb_network_header() 2007-04-25 22:24:59 -07:00
llc_s_ac.h
llc_s_ev.h
llc_s_st.h
llc_sap.h
llc.h [LLC]: llc_mac_hdr_init const arguments 2006-03-20 22:59:36 -08:00
mac80211.h mac80211: add unified BSS configuration 2008-01-28 15:09:43 -08:00
mip6.h [IPV6] MIP6: Loadable module support for MIPv6. 2007-07-10 22:15:42 -07:00
ndisc.h [IPv6]: Export userland ND options through netlink (RDNSS support) 2007-10-10 21:22:05 -07:00
neighbour.h [ARP]: neigh_parms_put(destroy) are essentially local to core/neighbour.c. 2008-01-28 15:02:11 -08:00
net_namespace.h [NETFILTER]: x_tables: per-netns xt_tables 2008-01-31 19:27:35 -08:00
netdma.h Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
netevent.h [NET]: Remove unnecessary inclusion of dst.h 2008-01-28 14:53:38 -08:00
netlabel.h NetLabel: Introduce static network labels for unlabeled connections 2008-01-30 08:17:28 +11:00
netlink.h [NETLINK]: Add nla_append() 2008-01-28 15:11:09 -08:00
netrom.h [PATCH] mark struct file_operations const 1 2007-02-12 09:48:44 -08:00
nexthop.h [IPv4]: FIB configuration using struct fib_config 2006-09-22 14:55:04 -07:00
p8022.h
pkt_cls.h [NET_SCHED]: Convert classifiers from rtnetlink to new netlink API 2008-01-28 15:11:11 -08:00
pkt_sched.h [NET_SCHED]: Convert packet schedulers from rtnetlink to new netlink API 2008-01-28 15:11:10 -08:00
protocol.h [IPV6]: make inet6_register_protosw to return an error code 2008-01-28 14:57:12 -08:00
psnap.h
raw.h [RAW]: Wrong content of the /proc/net/raw6. 2008-01-31 19:27:26 -08:00
rawv6.h [IPv6] RAW: Compact the API for the kernel 2008-01-28 14:54:29 -08:00
red.h [NET_SCHED]: turn PSCHED_GET_TIME into inline function 2007-04-25 22:27:55 -07:00
request_sock.h [INET]: Fix potential kfree on vmalloc-ed area of request_sock_queue 2007-11-15 02:57:06 -08:00
rose.h [ROSE]: Fix rose.ko oops on unload 2007-10-07 23:44:17 -07:00
route.h [IPV4] route cache: Introduce rt_genid for smooth cache invalidation 2008-01-31 19:28:27 -08:00
rtnetlink.h [NET]: Make the device list and device lookups per namespace. 2007-10-10 16:49:10 -07:00
sch_generic.h [NET_SCHED]: Convert classifiers from rtnetlink to new netlink API 2008-01-28 15:11:11 -08:00
scm.h pid namespaces: changes to show virtual ids to user 2007-10-19 11:53:40 -07:00
slhc_vj.h
snmp.h [XFRM]: Define packet dropping statistics. 2008-01-28 14:59:38 -08:00
sock.h [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
syncppp.h
tcp_states.h
tcp.h [TCP]: Uninline tcp_is_cwnd_limited 2008-01-28 15:01:48 -08:00
timewait_sock.h [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
transp_v6.h [IPV6]: make the protocol initialization to return an error code 2008-01-28 14:57:13 -08:00
udp.h [NET]: prot_inuse cleanups and optimizations 2008-01-28 15:00:36 -08:00
udplite.h [UDP]: Restore missing inDatagrams increments 2008-01-28 14:56:33 -08:00
wext.h [NET]: Make the device list and device lookups per namespace. 2007-10-10 16:49:10 -07:00
wireless.h [WIRELESS] cfg80211: New wireless config infrastructure. 2007-04-25 22:29:41 -07:00
x25.h [X.25]: Adds /proc/sys/net/x25/x25_forward to control forwarding. 2007-02-08 13:34:36 -08:00
x25device.h [SK_BUFF]: Introduce skb_reset_mac_header(skb) 2007-04-25 22:24:32 -07:00
xfrm.h [XFRM]: constify 'struct xfrm_type' 2008-01-31 19:27:20 -08:00