Message ID | 1477927006.7065.304.camel@edumazet-glaptop3.roam.corp.google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/include/net/sock.h b/include/net/sock.h index f13ac87a8015cb18c5d3fe5fdcf2d6a0592428f4..a901df591eb45e153517cdb8b409b61563d1a4e3 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -2112,7 +2112,8 @@ struct sock_skb_cb { static inline void sock_skb_set_dropcount(const struct sock *sk, struct sk_buff *skb) { - SOCK_SKB_CB(skb)->dropcount = atomic_read(&sk->sk_drops); + SOCK_SKB_CB(skb)->dropcount = sock_flag(sk, SOCK_RXQ_OVFL) ? + atomic_read(&sk->sk_drops) : 0; } static inline void sk_drops_add(struct sock *sk, const struct sk_buff *skb)