aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-06-15 16:19:55 -0400
committerDavid S. Miller <davem@davemloft.net>2019-06-16 17:15:07 -0400
commit2e05fcae83c41eb2df10558338dc600dc783af47 (patch)
tree1bedfe78c671b634aed0faa9dbb2ec5cda7a4261
parentd424a2afd7da136a98e9485bfd6c5d5506bd77f8 (diff)
tcp: fix compile error if !CONFIG_SYSCTL
tcp_tx_skb_cache_key and tcp_rx_skb_cache_key must be available even if CONFIG_SYSCTL is not set. Fixes: 0b7d7f6b2208 ("tcp: add tcp_tx_skb_cache sysctl") Fixes: ede61ca474a0 ("tcp: add tcp_rx_skb_cache sysctl") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/sysctl_net_ipv4.c5
-rw-r--r--net/ipv4/tcp.c5
2 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 08a428a7b274..fa213bd8e233 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -51,11 +51,6 @@ static int comp_sack_nr_max = 255;
51static u32 u32_max_div_HZ = UINT_MAX / HZ; 51static u32 u32_max_div_HZ = UINT_MAX / HZ;
52static int one_day_secs = 24 * 3600; 52static int one_day_secs = 24 * 3600;
53 53
54DEFINE_STATIC_KEY_FALSE(tcp_rx_skb_cache_key);
55EXPORT_SYMBOL(tcp_rx_skb_cache_key);
56
57DEFINE_STATIC_KEY_FALSE(tcp_tx_skb_cache_key);
58
59/* obsolete */ 54/* obsolete */
60static int sysctl_tcp_low_latency __read_mostly; 55static int sysctl_tcp_low_latency __read_mostly;
61 56
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index f12d500ec85c..f448a288d158 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -317,6 +317,11 @@ struct tcp_splice_state {
317unsigned long tcp_memory_pressure __read_mostly; 317unsigned long tcp_memory_pressure __read_mostly;
318EXPORT_SYMBOL_GPL(tcp_memory_pressure); 318EXPORT_SYMBOL_GPL(tcp_memory_pressure);
319 319
320DEFINE_STATIC_KEY_FALSE(tcp_rx_skb_cache_key);
321EXPORT_SYMBOL(tcp_rx_skb_cache_key);
322
323DEFINE_STATIC_KEY_FALSE(tcp_tx_skb_cache_key);
324
320void tcp_enter_memory_pressure(struct sock *sk) 325void tcp_enter_memory_pressure(struct sock *sk)
321{ 326{
322 unsigned long val; 327 unsigned long val;