Skip to content

leds: trigger: legtrig-bpf: Add ledtrig-bpf trigger

Daniel Hodges bpf linux-leds lkml netdev netfilter-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 2 repliesIn review
  2. v13 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- Change kfunc to trigger based on LED name.
- Fix kfunc registration of BPF_PROG_TYPE_UNSPEC.
- Use new kfunc helpers off bpf-next branch.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3leds: trigger: legtrig-bpf: Add ledtrig-bpf triggerdrivers/leds/trigger/Kconfig drivers/leds/trigger/Makefile drivers/leds/trigger/ledtrig-bpf.c+84 -01 reply
2/3selftests/bpf: Add selftests for bpf led programstools/testing/selftests/bpf/config tools/testing/selftests/bpf/progs/ledtrig_bpf.c+33 -00 replies
3/3leds: trigger: Add documentation for ledtrig-bpfDocumentation/leds/index.rst Documentation/leds/ledtrig-bpf.rst+14 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

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/[email protected]/
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
Signature · 1 line
2.43.2