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 Akihiko Odaki
On 2023/12/11 10:40, Song Liu wrote: 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

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 program to let the userspace >

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

2023-12-09 Thread Akihiko Odaki
On 2023/11/22 14:36, Akihiko Odaki wrote: On 2023/11/22 14:25, Song Liu wrote: 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

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

2023-11-21 Thread Akihiko Odaki
On 2023/11/22 14:25, Song Liu wrote: 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 the BPF

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 > >> the BPF program) installed in the

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

2023-11-20 Thread Akihiko Odaki
On 2023/11/20 6:02, Song Liu wrote: 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

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-19 Thread Akihiko Odaki
On 2023/11/19 1:08, Song Liu wrote: Hi, A few rookie questions below. Thanks for questions. 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

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

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

2023-11-18 Thread Akihiko Odaki
On 2023/10/18 4:19, Akihiko Odaki wrote: On 2023/10/18 4:03, Alexei Starovoitov wrote: On Mon, Oct 16, 2023 at 7:38 PM Jason Wang wrote: On Tue, Oct 17, 2023 at 7:53 AM Alexei Starovoitov wrote: On Sun, Oct 15, 2023 at 10:10 AM Akihiko Odaki wrote: On 2023/10/16 1:07, Alexei

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

2023-10-17 Thread Akihiko Odaki
On 2023/10/18 4:03, Alexei Starovoitov wrote: On Mon, Oct 16, 2023 at 7:38 PM Jason Wang wrote: On Tue, Oct 17, 2023 at 7:53 AM Alexei Starovoitov wrote: On Sun, Oct 15, 2023 at 10:10 AM Akihiko Odaki wrote: On 2023/10/16 1:07, Alexei Starovoitov wrote: On Sun, Oct 15, 2023 at 7:17 AM

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

2023-10-17 Thread Alexei Starovoitov
On Mon, Oct 16, 2023 at 7:38 PM Jason Wang wrote: > > On Tue, Oct 17, 2023 at 7:53 AM Alexei Starovoitov > wrote: > > > > On Sun, Oct 15, 2023 at 10:10 AM Akihiko Odaki > > wrote: > > > > > > On 2023/10/16 1:07, Alexei Starovoitov wrote: > > > > On Sun, Oct 15, 2023 at 7:17 AM Akihiko Odaki >

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

2023-10-16 Thread Jason Wang
On Tue, Oct 17, 2023 at 7:53 AM Alexei Starovoitov wrote: > > On Sun, Oct 15, 2023 at 10:10 AM Akihiko Odaki > wrote: > > > > On 2023/10/16 1:07, Alexei Starovoitov wrote: > > > On Sun, Oct 15, 2023 at 7:17 AM Akihiko Odaki > > > wrote: > > >> > > >> diff --git a/include/uapi/linux/bpf.h

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

2023-10-16 Thread Willem de Bruijn
On Mon, Oct 16, 2023 at 7:53 PM Alexei Starovoitov wrote: > > On Sun, Oct 15, 2023 at 10:10 AM Akihiko Odaki > wrote: > > > > On 2023/10/16 1:07, Alexei Starovoitov wrote: > > > On Sun, Oct 15, 2023 at 7:17 AM Akihiko Odaki > > > wrote: > > >> > > >> diff --git a/include/uapi/linux/bpf.h

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

2023-10-16 Thread Alexei Starovoitov
On Sun, Oct 15, 2023 at 10:10 AM Akihiko Odaki wrote: > > On 2023/10/16 1:07, Alexei Starovoitov wrote: > > On Sun, Oct 15, 2023 at 7:17 AM Akihiko Odaki > > wrote: > >> > >> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h > >> index 0448700890f7..298634556fab 100644 > >> ---

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

2023-10-15 Thread Akihiko Odaki
On 2023/10/16 1:07, Alexei Starovoitov wrote: On Sun, Oct 15, 2023 at 7:17 AM Akihiko Odaki wrote: diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 0448700890f7..298634556fab 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -988,6 +988,7 @@ enum

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

2023-10-15 Thread Alexei Starovoitov
On Sun, Oct 15, 2023 at 7:17 AM Akihiko Odaki wrote: > > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h > index 0448700890f7..298634556fab 100644 > --- a/include/uapi/linux/bpf.h > +++ b/include/uapi/linux/bpf.h > @@ -988,6 +988,7 @@ enum bpf_prog_type { >

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

2023-10-15 Thread Akihiko Odaki
This new program type will be used by tun to determine the queues to deliver packets and the hash values and types reported with virtio-net headers. Signed-off-by: Akihiko Odaki --- Documentation/bpf/bpf_prog_run.rst | 1 + Documentation/bpf/libbpf/program_types.rst | 2 ++