From: Eric Dumazet Date: Thu, 19 Apr 2012 07:16:21 +0000 (+0000) Subject: drop_monitor: allow more events per second X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bbe362be5368b9f531b95a4a9b502ae2832e1dac;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.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 7f36b38e060f..5c3c81a609e5 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; } }