Skip to content

Commit

Permalink
drop_monitor: allow more events per second
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Neil Horman <[email protected]>
Acked-by: Neil Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed Apr 21, 2012
1 parent e8195b2 commit bbe362b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/core/drop_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit bbe362b

Please sign in to comment.