diff options
author | Willem de Bruijn <willemb@google.com> | 2015-05-12 18:56:50 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-13 22:43:00 +0300 |
commit | a9b6391814d5d6b8668fca2dace86949b7244e2e (patch) | |
tree | 69d0024af991cefa3620b31bdbb094fe42723b72 /include/uapi/linux/if_packet.h | |
parent | 3b3a5b0aab5b9ad345d4beb9a364a7dd02c23d40 (diff) | |
download | linux-a9b6391814d5d6b8668fca2dace86949b7244e2e.tar.xz |
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 'include/uapi/linux/if_packet.h')
-rw-r--r-- | include/uapi/linux/if_packet.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h index 053bd102fbe0..d3d715f8c88f 100644 --- a/include/uapi/linux/if_packet.h +++ b/include/uapi/linux/if_packet.h @@ -54,6 +54,7 @@ struct sockaddr_ll { #define PACKET_FANOUT 18 #define PACKET_TX_HAS_OFF 19 #define PACKET_QDISC_BYPASS 20 +#define PACKET_ROLLOVER_STATS 21 #define PACKET_FANOUT_HASH 0 #define PACKET_FANOUT_LB 1 @@ -75,6 +76,12 @@ struct tpacket_stats_v3 { unsigned int tp_freeze_q_cnt; }; +struct tpacket_rollover_stats { + __aligned_u64 tp_all; + __aligned_u64 tp_huge; + __aligned_u64 tp_failed; +}; + union tpacket_stats_u { struct tpacket_stats stats1; struct tpacket_stats_v3 stats3; |