On Tue, Mar 21, 2023 at 4:28 PM Kui-Feng Lee <kuifeng@xxxxxxxx> wrote: > > By improving the BPF_LINK_UPDATE command of bpf(), it should allow you > to conveniently switch between different struct_ops on a single > bpf_link. This would enable smoother transitions from one struct_ops > to another. > > The struct_ops maps passing along with BPF_LINK_UPDATE should have the > BPF_F_LINK flag. > > Signed-off-by: Kui-Feng Lee <kuifeng@xxxxxxxx> > --- Overall API and LINK_UPDATE handling looks good to me. Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > include/linux/bpf.h | 3 +++ > include/uapi/linux/bpf.h | 21 +++++++++++---- > kernel/bpf/bpf_struct_ops.c | 48 +++++++++++++++++++++++++++++++++- > kernel/bpf/syscall.c | 34 ++++++++++++++++++++++++ > net/ipv4/bpf_tcp_ca.c | 6 +++++ > tools/include/uapi/linux/bpf.h | 21 +++++++++++---- > 6 files changed, 122 insertions(+), 11 deletions(-) > [...]