From: Eric Dumazet Date: Thu, 19 Apr 2012 07:16:21 +0000 (+0000) Subject: drop_monitor: allow more events per second X-Git-Tag: v3.4-rc5~44^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bbe362be5368b9f531b95a4a9b502ae2832e1dac;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Cc: Neil Horman Acked-by: Neil Horman Signed-off-by: David S. Miller --- diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index 7f36b38..5c3c81a 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; } }