Chapter 12. General and Reference Material About Interrupts
This chapter contains several general types of information that apply to the material presented in the previous three chapters on interrupts and frame handling.
Statistics
Statistics about frame reception are
kept in the per-CPU array netdev_rx_stat
, whose
elements are of type netif_rx_stats
(see include/linux/netdevice.h):
struct netif_rx_stats netdev_rx_stat[NR_CPUS]; struct netif_rx_stats { unsigned total; unsigned dropped; unsigned time_squeeze; unsigned throttled; unsigned fastroute_hit; unsigned fastroute_success; unsigned fastroute_defer; unsigned fastroute_deferred_out; unsigned fastroute_latency_reduction; unsigned cpu_collision; } __ _ _cacheline_aligned;
The elements of netif_rx_stats
are:
-
total
Total number of ingress frames processed, including any that might be discarded. This value is updated both in
netif_rx
and innetif_receive_skb
, which means that (by mistake) the same frame is accounted for twice when the driver does not use NAPI (i.e., it uses thenetif_rx
interface; see Figure 10-2 in Chapter 10).-
dropped
Number of frames that were dropped because they were received when the CPU was in the throttle state.
-
time_squeeze
Number of times
net_rx_action
had to return while frames were still in the CPU ingress queue, so as not to become a CPU hog. See the section "Processing the NET_RX_SOFTIRQ: net_rx_action" in Chapter 10.-
throttled
Number of times the CPU went into the throttle state. This value is incremented ...
Get Understanding Linux Network Internals now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.