aboutsummaryrefslogtreecommitdiff
path: root/net/core/drop_monitor.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-04-19 07:16:21 +0000
committerDavid S. Miller <davem@davemloft.net>2012-04-21 16:28:38 -0400
commitbbe362be5368b9f531b95a4a9b502ae2832e1dac (patch)
tree6f31a927c4224e5366d97c621362020ccf7dd689 /net/core/drop_monitor.c
parente8195b24feb208f6e944e7542779f4397776794d (diff)
drop_monitor: allow more events per second
It seems there is a logic error in trace_drop_common(), since we store only 64 drops, even if they are from same location. This fix is a one liner, but we probably need more work to avoid useless atomic dec/inc Now I can watch 1 Mpps drops through dropwatch... Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Neil Horman <nhorman@tuxdriver.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/drop_monitor.c')
-rw-r--r--net/core/drop_monitor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
index 7f36b38e060..5c3c81a609e 100644
--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -150,6 +150,7 @@ static void trace_drop_common(struct sk_buff *skb, void *location)
for (i = 0; i < msg->entries; i++) {
if (!memcmp(&location, msg->points[i].pc, sizeof(void *))) {
msg->points[i].count++;
+ atomic_inc(&data->dm_hit_count);
goto out;
}
}