mirror_ubuntu-kernels/drivers/net/ethernet
Daniel Borkmann a67edbf4fb bpf: add initial bpf tracepoints
This work adds a number of tracepoints to paths that are either
considered slow-path or exception-like states, where monitoring or
inspecting them would be desirable.

For bpf(2) syscall, tracepoints have been placed for main commands
when they succeed. In XDP case, tracepoint is for exceptions, that
is, f.e. on abnormal BPF program exit such as unknown or XDP_ABORTED
return code, or when error occurs during XDP_TX action and the packet
could not be forwarded.

Both have been split into separate event headers, and can be further
extended. Worst case, if they unexpectedly should get into our way in
future, they can also removed [1]. Of course, these tracepoints (like
any other) can be analyzed by eBPF itself, etc. Example output:

  # ./perf record -a -e bpf:* sleep 10
  # ./perf script
  sock_example  6197 [005]   283.980322:      bpf:bpf_map_create: map type=ARRAY ufd=4 key=4 val=8 max=256 flags=0
  sock_example  6197 [005]   283.980721:       bpf:bpf_prog_load: prog=a5ea8fa30ea6849c type=SOCKET_FILTER ufd=5
  sock_example  6197 [005]   283.988423:   bpf:bpf_prog_get_type: prog=a5ea8fa30ea6849c type=SOCKET_FILTER
  sock_example  6197 [005]   283.988443: bpf:bpf_map_lookup_elem: map type=ARRAY ufd=4 key=[06 00 00 00] val=[00 00 00 00 00 00 00 00]
  [...]
  sock_example  6197 [005]   288.990868: bpf:bpf_map_lookup_elem: map type=ARRAY ufd=4 key=[01 00 00 00] val=[14 00 00 00 00 00 00 00]
       swapper     0 [005]   289.338243:    bpf:bpf_prog_put_rcu: prog=a5ea8fa30ea6849c type=SOCKET_FILTER

  [1] https://lwn.net/Articles/705270/

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-25 13:17:47 -05:00
..
3com net: 3com: typhoon: typhoon_init_one: make return values more specific 2016-12-30 15:26:22 -05:00
8390 Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
adaptec Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
adi Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 19:56:15 -08:00
aeroflex
agere
alacritech net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
allwinner
alteon Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
altera Makefile: drop -D__CHECK_ENDIAN__ from cflags 2016-12-16 00:13:43 +02:00
amazon net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-01-09 15:39:11 -05:00
apm net: remove useless memset's in drivers get_stats64 2017-01-08 17:51:44 -05:00
apple
aquantia net: ethernet: aquantia: Receive side scaling 2017-01-24 15:03:41 -05:00
arc net: arc_emac: add dependencies on associated arches and compile test 2016-11-29 18:57:36 -05:00
atheros alx: add feature flag for rx checksumming 2017-01-09 14:52:54 -05:00
aurora Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
broadcom net: broadcom: bnx2x: use new api ethtool_{get|set}_link_ksettings 2017-01-24 13:49:19 -05:00
brocade net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
cadence macb: Common code to enable ptp support for MACB/GEM 2017-01-19 11:45:54 -05:00
calxeda net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
cavium net: Remove usage of net_device last_rx member 2017-01-18 17:22:49 -05:00
chelsio cxgb4: hide unused warnings 2017-01-20 11:16:57 -05:00
cirrus net: cirrus: ep93xx: use new api ethtool_{get|set}_link_ksettings 2016-12-17 21:31:41 -05:00
cisco net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
davicom net: davicom: dm9000: use new api ethtool_{get|set}_link_ksettings 2016-12-17 21:31:41 -05:00
dec net: dec: winbond-840: use new api ethtool_{get|set}_link_ksettings 2017-01-02 16:59:10 -05:00
dlink net: dlink: sundance: use new api ethtool_{get|set}_link_ksettings 2017-01-02 16:59:10 -05:00
emulex Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-01-17 15:19:37 -05:00
ezchip
faraday net: faraday: ftmac100: use new api ethtool_{get|set}_link_ksettings 2017-01-02 16:59:10 -05:00
freescale net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
fujitsu Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
hisilicon net: Remove usage of net_device last_rx member 2017-01-18 17:22:49 -05:00
hp
i825xx
ibm net: ibm: ibmvnic: use new api ethtool_{get|set}_link_ksettings 2017-01-09 12:09:10 -05:00
intel net: Remove usage of net_device last_rx member 2017-01-18 17:22:49 -05:00
marvell net: Remove usage of net_device last_rx member 2017-01-18 17:22:49 -05:00
mediatek net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
mellanox bpf: add initial bpf tracepoints 2017-01-25 13:17:47 -05:00
micrel net: ks8851: Drop eeprom_size structure member 2017-01-24 14:56:44 -05:00
microchip encx24j600: Fix some checkstyle warnings 2016-12-16 13:31:47 -05:00
moxa net: moxa: constify net_device_ops structures 2017-01-23 15:58:49 -05:00
myricom net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
natsemi Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
neterion net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
netronome bpf: add initial bpf tracepoints 2017-01-25 13:17:47 -05:00
nuvoton
nvidia net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
nxp
oki-semi
packetengines Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
pasemi
qlogic bpf: add initial bpf tracepoints 2017-01-25 13:17:47 -05:00
qualcomm net: qcom/emac: claim the irq only when the device is opened 2017-01-23 13:03:28 -05:00
rdc r6040: move spinlock in r6040_close as SOFTIRQ-unsafe lock order detected 2016-12-17 21:35:12 -05:00
realtek net: Remove usage of net_device last_rx member 2017-01-18 17:22:49 -05:00
renesas Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-01-17 15:19:37 -05:00
rocker ipv4: fib: Replay events when registering FIB notifier 2016-12-03 19:29:35 -05:00
samsung net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
seeq
sfc sfc: read back RX hash config from the NIC when querying it with ethtool -x 2017-01-17 15:49:52 -05:00
sgi Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
silan
sis Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
smsc net: Remove usage of net_device last_rx member 2017-01-18 17:22:49 -05:00
stmicro net: stmmac: dwmac-meson8b: make the RGMII TX delay configurable 2017-01-24 13:35:40 -05:00
sun net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
tehuti
ti net: ethernet: ti: cpsw: clarify ethtool ops changing num of descs 2017-01-20 12:35:10 -05:00
tile tilepro: Fix non-void return from void function 2017-01-12 15:14:09 -05:00
toshiba
tundra
via net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
wiznet
xilinx net: xilinx: constify net_device_ops structure 2017-01-23 15:58:49 -05:00
xircom Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
xscale
dnet.c
dnet.h
ec_bhf.c net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
ethoc.c net: ethoc: Make needlessly global struct ethtool_ops static 2017-01-17 15:50:56 -05:00
fealnx.c net: fealnx: use new api ethtool_{get|set}_link_ksettings 2017-01-02 16:59:10 -05:00
jme.c net: jme: use new api ethtool_{get|set}_link_ksettings 2017-01-17 11:44:27 -05:00
jme.h net: jme: use new api ethtool_{get|set}_link_ksettings 2017-01-17 11:44:27 -05:00
Kconfig net: ethernet: aquantia: Integrate AQtion 2.5/5 GB NIC driver 2017-01-24 15:03:41 -05:00
korina.c net: korina: use new api ethtool_{get|set}_link_ksettings 2017-01-17 11:44:27 -05:00
lantiq_etop.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-10 16:21:55 -05:00
Makefile net: ethernet: aquantia: Integrate AQtion 2.5/5 GB NIC driver 2017-01-24 15:03:41 -05:00
netx-eth.c