]> git.baikalelectronics.ru Git - kernel.git/commit
samples: bpf: Driver interrupt statistics in xdpsock
authorCiara Loftus <ciara.loftus@intel.com>
Fri, 2 Oct 2020 13:36:12 +0000 (13:36 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 6 Oct 2020 18:46:50 +0000 (11:46 -0700)
commit8703d70b5f2f5a3ec63897f9c6e9b2d1b7b369a0
tree1afad1359b572a061f5c0ad49969fcc2e6b7fb17
parentee1dba98e108d2f9890c605e2914138bcdd9f8f9
samples: bpf: Driver interrupt statistics in xdpsock

Add an option to count the number of interrupts generated per second and
total number of interrupts during the lifetime of the application for a
given interface. This information is extracted from /proc/interrupts. Since
there is no naming convention across drivers, the user must provide the
string which is specific to their interface in the /proc/interrupts file on
the command line.

Usage:

./xdpsock ... -I <irq_str>

eg. for queue 0 of i40e device eth0:

./xdpsock ... -I i40e-eth0-TxRx-0

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20201002133612.31536-3-ciara.loftus@intel.com
samples/bpf/xdpsock_user.c