summaryrefslogtreecommitdiff
path: root/net/Kconfig
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2016-02-12 17:43:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-25 13:03:34 +0300
commitd365b297433cf2969fa94f243d7afddc073c7bf1 (patch)
treec2c549a09a36d54bfdec2ee3b1d9a09a9416334c /net/Kconfig
parente9fd3d16de83cee2e533448d4601ef89a9ab94c8 (diff)
downloadlinux-d365b297433cf2969fa94f243d7afddc073c7bf1.tar.xz
net: add dst_cache support
commit 911362c70df5b766c243dc297fadeaced786ffd8 upstream. This patch add a generic, lockless dst cache implementation. The need for lock is avoided updating the dst cache fields only in per cpu scope, and requiring that the cache manipulation functions are invoked with the local bh disabled. The refresh_ts and reset_ts fields are used to ensure the cache consistency in case of cuncurrent cache update (dst_cache_set*) and reset operation (dst_cache_reset). Consider the following scenario: CPU1: CPU2: <cache lookup with emtpy cache: it fails> <get dst via uncached route lookup> <related configuration changes> dst_cache_reset() dst_cache_set() The dst entry set passed to dst_cache_set() should not be used for later dst cache lookup, because it's obtained using old configuration values. Since the refresh_ts is updated only on dst_cache lookup, the cached value in the above scenario will be discarded on the next lookup. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Suggested-and-acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Manoj Boopathi Raj <manojboopathi@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/Kconfig')
-rw-r--r--net/Kconfig4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/Kconfig b/net/Kconfig
index 6d94140beacc..ac7bec0c56aa 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -383,6 +383,10 @@ config LWTUNNEL
weight tunnel endpoint. Tunnel encapsulation parameters are stored
with light weight tunnel state associated with fib routes.
+config DST_CACHE
+ bool "dst cache"
+ default n
+
endif # if NET
# Used by archs to tell that they support BPF_JIT