linux-stable/tools
Daniel Borkmann 053bbf9bff bpftool: Implement link show support for xdp
Add support to dump XDP link information to bpftool. This reuses the
recently added show_link_ifindex_{plain,json}(). The XDP link info only
exposes the ifindex.

Below shows an example link dump output, and a cgroup link is included
for comparison, too:

  # bpftool link
  [...]
  10: cgroup  prog 2466
        cgroup_id 1  attach_type cgroup_inet6_post_bind
  [...]
  16: xdp  prog 2477
        ifindex enp5s0(3)
  [...]

Equivalent json output:

  # bpftool link --json
  [...]
  {
    "id": 10,
    "type": "cgroup",
    "prog_id": 2466,
    "cgroup_id": 1,
    "attach_type": "cgroup_inet6_post_bind"
  },
  [...]
  {
    "id": 16,
    "type": "xdp",
    "prog_id": 2477,
    "devname": "enp5s0",
    "ifindex": 3
  }
  [...]

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/r/20230816095651.10014-2-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
2023-08-16 10:14:17 -07:00
..
accounting
arch perf tools fixes for v6.5: 3rd batch 2023-08-09 21:06:14 -07:00
bootconfig
bpf bpftool: Implement link show support for xdp 2023-08-16 10:14:17 -07:00
build Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-07-20 15:52:55 -07:00
certs
cgroup
counter
debugging
edid
firewire
firmware
gpio
hv vmbus_testing: fix wrong python syntax for integer value comparison 2023-07-23 23:19:30 +00:00
iio
include bpf: Add support for bpf_get_func_ip helper for uprobe program 2023-08-07 16:42:58 -07:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Set close-on-exec flag on gzopen 2023-08-14 17:35:32 +02:00
memory-model
mm
net/ynl tools: ynl-gen: add missing empty line between policies 2023-08-09 13:13:20 -07:00
objtool x86/srso: Add a Speculative RAS Overflow mitigation 2023-07-27 11:07:14 +02:00
pci
pcmcia
perf perf stat: Don't display zero tool counts 2023-08-08 14:33:57 -03:00
power platform-drivers-x86 for v6.5-1 2023-06-30 14:50:00 -07:00
rcu
scripts
spi
testing selftests/bpf: Add selftest for fill_link_info 2023-08-16 16:44:28 +02:00
thermal
time
tracing rtla/timerlat_hist: Add timerlat user-space support 2023-06-13 16:41:14 -04:00
usb
verification
virtio tools/virtio: fix build break for aarch64 2023-06-27 10:47:08 -04:00
wmi
workqueue
Makefile