]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpf: pass bpf_struct_ops_link to callbacks in bpf_struct_ops.
authorKui-Feng Lee <thinker.li@gmail.com>
Thu, 30 May 2024 06:59:39 +0000 (23:59 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 30 May 2024 22:34:13 +0000 (15:34 -0700)
commit73287fe228721b05690e671adbcccc6cf5435be6
tree79813d3b5556ae05d70eb6794fc8024294db4ca3
parent46253c4ae96162a840ad65c1394de63796d7798a
bpf: pass bpf_struct_ops_link to callbacks in bpf_struct_ops.

Pass an additional pointer of bpf_struct_ops_link to callback function reg,
unreg, and update provided by subsystems defined in bpf_struct_ops. A
bpf_struct_ops_map can be registered for multiple links. Passing a pointer
of bpf_struct_ops_link helps subsystems to distinguish them.

This pointer will be used in the later patches to let the subsystem
initiate a detachment on a link that was registered to it previously.

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20240530065946.979330-2-thinker.li@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
include/linux/bpf.h
kernel/bpf/bpf_struct_ops.c
net/bpf/bpf_dummy_struct_ops.c
net/ipv4/bpf_tcp_ca.c
tools/testing/selftests/bpf/bpf_test_no_cfi/bpf_test_no_cfi.c
tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c