diff options
author | Rick Jones <rick.jones2@hp.com> | 2015-08-07 11:10:37 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-10 13:46:21 -0700 |
commit | fb811395cd5a71b9e94a068f524a6f4a21b67bdb (patch) | |
tree | 0ad6d565998e141581697b0e83cda9e13d0fab94 /include/net/neighbour.h | |
parent | a7854037da006a7472c48773e3190db55217ec9b (diff) | |
download | linux-fb811395cd5a71b9e94a068f524a6f4a21b67bdb.tar.gz linux-fb811395cd5a71b9e94a068f524a6f4a21b67bdb.tar.bz2 linux-fb811395cd5a71b9e94a068f524a6f4a21b67bdb.zip |
net: add explicit logging and stat for neighbour table overflow
Add an explicit neighbour table overflow message (ratelimited) and
statistic to make diagnosing neighbour table overflows tractable in
the wild.
Diagnosing a neighbour table overflow can be quite difficult in the wild
because there is no explicit dmesg logged. Callers to neighbour code
seem to use net_dbg_ratelimit when the neighbour call fails which means
the "base message" is not emitted and the callback suppressed messages
from the ratelimiting can end-up juxtaposed with unrelated messages.
Further, a forced garbage collection will increment a stat on each call
whether it was successful in freeing-up a table entry or not, so that
statistic is only a hint. So, add a net_info_ratelimited message and
explicit statistic to the neighbour code.
Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/neighbour.h')
-rw-r--r-- | include/net/neighbour.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index bd33e66f49aa..8b683841e574 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -125,6 +125,7 @@ struct neigh_statistics { unsigned long forced_gc_runs; /* number of forced GC runs */ unsigned long unres_discards; /* number of unresolved drops */ + unsigned long table_fulls; /* times even gc couldn't help */ }; #define NEIGH_CACHE_STAT_INC(tbl, field) this_cpu_inc((tbl)->stats->field) |