]> git.baikalelectronics.ru Git - kernel.git/commit
packet: restore packet statistics tp_packets to include drops
authorWillem de Bruijn <willemb@google.com>
Mon, 19 Aug 2013 20:40:22 +0000 (16:40 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Aug 2013 00:23:58 +0000 (17:23 -0700)
commit996617f5f743b41c9d9dbf2c8611e438f36ca5c0
treea100df027287cf5e047dd8f9c651673afc8b6434
parent473a51a263f73955ad7cf3559d3261c6402fe360
packet: restore packet statistics tp_packets to include drops

getsockopt PACKET_STATISTICS returns tp_packets + tp_drops. Commit
9e9d7fb0e5 ("packet: account statistics only in tpacket_stats_u")
cleaned up the getsockopt PACKET_STATISTICS code.
This also changed semantics. Historically, tp_packets included
tp_drops on return. The commit removed the line that adds tp_drops
into tp_packets.

This patch reinstates the old semantics.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/af_packet.c