Skip to content

Commit

Permalink
tcp: fix compile error if !CONFIG_SYSCTL
Browse files Browse the repository at this point in the history
tcp_tx_skb_cache_key and tcp_rx_skb_cache_key must be available
even if CONFIG_SYSCTL is not set.

Fixes: 0b7d7f6 ("tcp: add tcp_tx_skb_cache sysctl")
Fixes: ede61ca ("tcp: add tcp_rx_skb_cache sysctl")
Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: Willem de Bruijn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed Jun 16, 2019
1 parent d424a2a commit 2e05fca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions net/ipv4/sysctl_net_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ static int comp_sack_nr_max = 255;
static u32 u32_max_div_HZ = UINT_MAX / HZ;
static int one_day_secs = 24 * 3600;

DEFINE_STATIC_KEY_FALSE(tcp_rx_skb_cache_key);
EXPORT_SYMBOL(tcp_rx_skb_cache_key);

DEFINE_STATIC_KEY_FALSE(tcp_tx_skb_cache_key);

/* obsolete */
static int sysctl_tcp_low_latency __read_mostly;

Expand Down
5 changes: 5 additions & 0 deletions net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,11 @@ struct tcp_splice_state {
unsigned long tcp_memory_pressure __read_mostly;
EXPORT_SYMBOL_GPL(tcp_memory_pressure);

DEFINE_STATIC_KEY_FALSE(tcp_rx_skb_cache_key);
EXPORT_SYMBOL(tcp_rx_skb_cache_key);

DEFINE_STATIC_KEY_FALSE(tcp_tx_skb_cache_key);

void tcp_enter_memory_pressure(struct sock *sk)
{
unsigned long val;
Expand Down

0 comments on commit 2e05fca

Please sign in to comment.