Re: [PATCH bpf-next 16/18] selftests/bpf: add checks for bpf_wq_set_callback()

2024-04-17 Thread Song Liu
On Tue, Apr 16, 2024 at 7:11 AM Benjamin Tissoires wrote: [...] > +SEC("?tc") > +__log_level(2) > +__failure > +/* check that the first argument of bpf_wq_set_callback() > + * is a correct bpf_wq pointer. > + */ > +__msg("mark_precise: frame0: regs=r1 stack= before") This line and some other

Re: [PATCH] bpf: Separate bpf_local_storage_lookup() fast and slow paths

2024-02-05 Thread Song Liu
On Wed, Jan 31, 2024 at 6:19 AM Marco Elver wrote: > [...] > > Signed-off-by: Marco Elver > --- > include/linux/bpf_local_storage.h | 17 - > kernel/bpf/bpf_local_storage.c | 14 -- > .../selftests/bpf/progs/cgrp_ls_recursion.c | 2

Re: [PATCH v4 4/4] selftest/bpf: Test a perf bpf program that suppresses side effects.

2024-01-19 Thread Song Liu
On Thu, Jan 18, 2024 at 4:14 PM Kyle Huey wrote: > Acked-by: Song Liu with a couple nitpicks below. [...] > +int sigio_count, sigtrap_count; > + > +static void handle_sigio(int sig __always_unused) > +{ > + ++sigio_count; > +} > + > +static void handle_sigtrap

Re: [RFC PATCH] find_vma BPF test: increase length CPU computation

2024-01-09 Thread Song Liu
On Tue, Jan 9, 2024 at 1:57 AM Alessandro Carminati (Red Hat) wrote: > > Some aarch64 systems running a PREEMPT_RT patched kernel, needs > more time to complete the test. > This change mirrors: > commit ba83af059153 ("Improve stability of find_vma BPF test") > addressing similar requirements and

Re: [PATCH v3 4/4] selftest/bpf: Test a perf bpf program that suppresses side effects.

2024-01-02 Thread Song Liu
On Sun, Dec 10, 2023 at 8:56 PM Kyle Huey wrote: > > The test sets a hardware breakpoint and uses a bpf program to suppress the > side effects of a perf event sample, including I/O availability signals, > SIGTRAPs, and decrementing the event counter limit, if the ip matches the > expected value.

Re: Should I add BPF kfuncs for userspace apps? And how?

2023-12-18 Thread Song Liu
Hi Akihiko, On Tue, Dec 12, 2023 at 12:05 AM Akihiko Odaki wrote: > [...] > --- > > I'm working on a new feature that aids virtio-net implementations using > tuntap virtual network device. You can see [1] for details, but > basically it's to extend BPF_PROG_TYPE_SOCKET_FILTER to report four more

Re: [RFC PATCH v2 1/7] bpf: Introduce BPF_PROG_TYPE_VNET_HASH

2023-12-11 Thread Song Liu
On Sun, Dec 10, 2023 at 9:04 PM Akihiko Odaki wrote: > [...] > > > > I don't think we can provide stability guarantees before seeing something > > being used in the field. How do we know it will be useful forever? If a > > couple years later, there is only one person using it somewhere in the > >

Re: [RFC PATCH v2 1/7] bpf: Introduce BPF_PROG_TYPE_VNET_HASH

2023-12-10 Thread Song Liu
On Sat, Dec 9, 2023 at 11:03 PM Akihiko Odaki wrote: > > On 2023/11/22 14:36, Akihiko Odaki wrote: > > On 2023/11/22 14:25, Song Liu wrote: [...] > > Now the discussion is stale again so let me summarize the discussion: > > A tuntap device can have an eBPF steering prog

Re: [RFC PATCH v2 1/7] bpf: Introduce BPF_PROG_TYPE_VNET_HASH

2023-11-21 Thread Song Liu
On Mon, Nov 20, 2023 at 12:05 AM Akihiko Odaki wrote: > > On 2023/11/20 6:02, Song Liu wrote: [...] > >> In contrast, our intended use case is more like a normal application. > >> So, for example, a user may download a container and run QEMU (including > &g

Re: [RFC PATCH v2 1/7] bpf: Introduce BPF_PROG_TYPE_VNET_HASH

2023-11-19 Thread Song Liu
On Sun, Nov 19, 2023 at 12:03 AM Akihiko Odaki wrote: > [...] > > Unfortunately no. The communication with the userspace can be done with > two different means: > - usual socket read/write > - vhost for direct interaction with a KVM guest > > The BPF map may be a valid option for socket

Re: [RFC PATCH v2 1/7] bpf: Introduce BPF_PROG_TYPE_VNET_HASH

2023-11-18 Thread Song Liu
Hi, A few rookie questions below. On Sat, Nov 18, 2023 at 2:39 AM Akihiko Odaki wrote: > > On 2023/10/18 4:19, Akihiko Odaki wrote: > > On 2023/10/18 4:03, Alexei Starovoitov wrote: [...] > > > > I would also appreciate if you have some documentation or link to > > relevant discussions on the