diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 314c47a8f5d1..577d91fb5626 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -368,6 +368,7 @@ struct sock { | |||
368 | atomic_t sk_drops; | 368 | atomic_t sk_drops; |
369 | int sk_rcvlowat; | 369 | int sk_rcvlowat; |
370 | struct sk_buff_head sk_error_queue; | 370 | struct sk_buff_head sk_error_queue; |
371 | struct sk_buff *sk_rx_skb_cache; | ||
371 | struct sk_buff_head sk_receive_queue; | 372 | struct sk_buff_head sk_receive_queue; |
372 | /* | 373 | /* |
373 | * The backlog queue is special, it is always used with | 374 | * The backlog queue is special, it is always used with |
@@ -2438,6 +2439,15 @@ static inline void skb_setup_tx_timestamp(struct sk_buff *skb, __u16 tsflags) | |||
2438 | static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb) | 2439 | static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb) |
2439 | { | 2440 | { |
2440 | __skb_unlink(skb, &sk->sk_receive_queue); | 2441 | __skb_unlink(skb, &sk->sk_receive_queue); |
2442 | if ( | ||
2443 | #ifdef CONFIG_RPS | ||
2444 | !static_branch_unlikely(&rps_needed) && | ||
2445 | #endif | ||
2446 | !sk->sk_rx_skb_cache) { | ||
2447 | sk->sk_rx_skb_cache = skb; | ||
2448 | skb_orphan(skb); | ||
2449 | return; | ||
2450 | } | ||
2441 | __kfree_skb(skb); | 2451 | __kfree_skb(skb); |
2442 | } | 2452 | } |
2443 | 2453 | ||