mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] bpf: Introduce the bpf_list_del API
@ 2026-02-09  2:52 Chengkaitao
  2026-02-09  2:52 ` [PATCH 1/2] bpf: Introduce the bpf_list_del kfunc Chengkaitao
  2026-02-09  2:52 ` [PATCH 2/2] selftests/bpf: Add test cases for bpf_list_del Chengkaitao
  0 siblings, 2 replies; 4+ messages in thread
From: Chengkaitao @ 2026-02-09  2:52 UTC (permalink / raw)
  To: ast, daniel, andrii, martin.lau, eddyz87, song, yonghong.song,
	john.fastabend, kpsingh, sdf, haoluo, jolsa, shuah
  Cc: chengkaitao, leon.hwang, bpf, linux-kernel, linux-kselftest

From: Kaitao Cheng <chengkaitao@kylinos.cn>

In BPF, a list can only be used to implement a stack structure.
Due to an incomplete API set, only FIFO or LIFO operations are
supported.

We propose introducing the bpf_list_del API, which allows users
to directly remove a node from the list if the node pointer is
obtained beforehand. This patch enhances the BPF list API,
making it more list-like.

Kaitao Cheng (2):
  bpf: Introduce the bpf_list_del kfunc.
  selftests/bpf: Add test cases for bpf_list_del

 kernel/bpf/helpers.c                          | 19 +++++++++
 kernel/bpf/verifier.c                         |  6 ++-
 .../testing/selftests/bpf/bpf_experimental.h  | 11 +++++
 .../selftests/bpf/progs/refcounted_kptr.c     | 41 +++++++++++++++++++
 4 files changed, 76 insertions(+), 1 deletion(-)

-- 
2.50.1 (Apple Git-155)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-12  1:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-09  2:52 [PATCH 0/2] bpf: Introduce the bpf_list_del API Chengkaitao
2026-02-09  2:52 ` [PATCH 1/2] bpf: Introduce the bpf_list_del kfunc Chengkaitao
2026-02-12  1:56   ` Alexei Starovoitov
2026-02-09  2:52 ` [PATCH 2/2] selftests/bpf: Add test cases for bpf_list_del Chengkaitao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®