[PATCH v2 0/3] leds: trigger: legtrig-bpf: Add ledtrig-bpf trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch set adds a led trigger that interfaces with the bpf
subsystem. It allows for BPF programs to control LED activity using bpf
kfuncs. This functionality is useful in giving users a physical
indication that a BPF program has performed an operation such as
handling a packet or probe point.

V1: https://lore.kernel.org/bpf/cover.1711113657.git.hodges.daniel.scott@xxxxxxxxx/
Changes in V2:
- Change kfunc to trigger based on LED name.
- Fix kfunc registration of BPF_PROG_TYPE_UNSPEC.
- Use new kfunc helpers off bpf-next branch.

Daniel Hodges (3):
  leds: trigger: legtrig-bpf: Add ledtrig-bpf trigger
  selftests/bpf: Add selftests for bpf led programs
  leds: trigger: Add documentation for ledtrig-bpf

 Documentation/leds/index.rst                  |  1 +
 Documentation/leds/ledtrig-bpf.rst            | 13 ++++
 drivers/leds/trigger/Kconfig                  | 10 +++
 drivers/leds/trigger/Makefile                 |  1 +
 drivers/leds/trigger/ledtrig-bpf.c            | 73 +++++++++++++++++++
 tools/testing/selftests/bpf/config            |  1 +
 .../testing/selftests/bpf/progs/ledtrig_bpf.c | 32 ++++++++
 7 files changed, 131 insertions(+)
 create mode 100644 Documentation/leds/ledtrig-bpf.rst
 create mode 100644 drivers/leds/trigger/ledtrig-bpf.c
 create mode 100644 tools/testing/selftests/bpf/progs/ledtrig_bpf.c

-- 
2.43.2





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux