diff options
author | Willem de Bruijn <willemb@google.com> | 2015-05-12 11:56:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-13 15:43:00 -0400 |
commit | a9b6391814d5d6b8668fca2dace86949b7244e2e (patch) | |
tree | 69d0024af991cefa3620b31bdbb094fe42723b72 /net/packet/internal.h | |
parent | 3b3a5b0aab5b9ad345d4beb9a364a7dd02c23d40 (diff) | |
download | linux-a9b6391814d5d6b8668fca2dace86949b7244e2e.tar.gz linux-a9b6391814d5d6b8668fca2dace86949b7244e2e.tar.bz2 linux-a9b6391814d5d6b8668fca2dace86949b7244e2e.zip |
packet: rollover statistics
Rollover indicates exceptional conditions. Export a counter to inform
socket owners of this state.
If no socket with sufficient room is found, rollover fails. Also count
these events.
Finally, also count when flows are rolled over early thanks to huge
flow detection, to validate its correctness.
Tested:
Read counters in bench_rollover on all other tests in the patchset
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet/internal.h')
-rw-r--r-- | net/packet/internal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/packet/internal.h b/net/packet/internal.h index a9d30a17c714..c035d263c1e8 100644 --- a/net/packet/internal.h +++ b/net/packet/internal.h @@ -89,6 +89,9 @@ struct packet_fanout { struct packet_rollover { int sock; + atomic_long_t num; + atomic_long_t num_huge; + atomic_long_t num_failed; #define ROLLOVER_HLEN (L1_CACHE_BYTES / sizeof(u32)) u32 history[ROLLOVER_HLEN] ____cacheline_aligned; } ____cacheline_aligned_in_smp; |