Skip to content

Commit 2e05fca

Browse files
Eric Dumazetdavem330
authored andcommitted
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: 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]>
1 parent d424a2a commit 2e05fca

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

net/ipv4/sysctl_net_ipv4.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ static int comp_sack_nr_max = 255;
5151
static u32 u32_max_div_HZ = UINT_MAX / HZ;
5252
static int one_day_secs = 24 * 3600;
5353

54-
DEFINE_STATIC_KEY_FALSE(tcp_rx_skb_cache_key);
55-
EXPORT_SYMBOL(tcp_rx_skb_cache_key);
56-
57-
DEFINE_STATIC_KEY_FALSE(tcp_tx_skb_cache_key);
58-
5954
/* obsolete */
6055
static int sysctl_tcp_low_latency __read_mostly;
6156

net/ipv4/tcp.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,11 @@ struct tcp_splice_state {
317317
unsigned long tcp_memory_pressure __read_mostly;
318318
EXPORT_SYMBOL_GPL(tcp_memory_pressure);
319319

320+
DEFINE_STATIC_KEY_FALSE(tcp_rx_skb_cache_key);
321+
EXPORT_SYMBOL(tcp_rx_skb_cache_key);
322+
323+
DEFINE_STATIC_KEY_FALSE(tcp_tx_skb_cache_key);
324+
320325
void tcp_enter_memory_pressure(struct sock *sk)
321326
{
322327
unsigned long val;

0 commit comments

Comments
 (0)