Re: [PATCH bpf-next v3 2/4] bpf, netns: Keep attached programs in bpf_prog_array

2020-06-26 Thread Andrii Nakryiko
On Fri, Jun 26, 2020 at 3:13 PM Andrii Nakryiko wrote: > > On Fri, Jun 26, 2020 at 2:45 AM Jakub Sitnicki wrote: > > > > On Thu, Jun 25, 2020 at 10:50 PM CEST, Andrii Nakryiko wrote: > > > On Thu, Jun 25, 2020 at 7:17 AM Jakub Sitnicki > > > wrote: > > >> > > >> Prepare for having multi-prog at

Re: [PATCH bpf-next v3 2/4] bpf, netns: Keep attached programs in bpf_prog_array

2020-06-26 Thread Andrii Nakryiko
On Fri, Jun 26, 2020 at 2:45 AM Jakub Sitnicki wrote: > > On Thu, Jun 25, 2020 at 10:50 PM CEST, Andrii Nakryiko wrote: > > On Thu, Jun 25, 2020 at 7:17 AM Jakub Sitnicki wrote: > >> > >> Prepare for having multi-prog attachments for new netns attach types by > >> storing programs to run in a bpf

Re: [PATCH bpf-next v3 2/4] bpf, netns: Keep attached programs in bpf_prog_array

2020-06-26 Thread Jakub Sitnicki
On Fri, Jun 26, 2020 at 07:41 AM CEST, Martin KaFai Lau wrote: > On Thu, Jun 25, 2020 at 04:13:55PM +0200, Jakub Sitnicki wrote: >> Prepare for having multi-prog attachments for new netns attach types by >> storing programs to run in a bpf_prog_array, which is well suited for >> iterating over prog

Re: [PATCH bpf-next v3 2/4] bpf, netns: Keep attached programs in bpf_prog_array

2020-06-26 Thread Jakub Sitnicki
On Thu, Jun 25, 2020 at 10:50 PM CEST, Andrii Nakryiko wrote: > On Thu, Jun 25, 2020 at 7:17 AM Jakub Sitnicki wrote: >> >> Prepare for having multi-prog attachments for new netns attach types by >> storing programs to run in a bpf_prog_array, which is well suited for >> iterating over programs an

Re: [PATCH bpf-next v3 2/4] bpf, netns: Keep attached programs in bpf_prog_array

2020-06-25 Thread Martin KaFai Lau
On Thu, Jun 25, 2020 at 04:13:55PM +0200, Jakub Sitnicki wrote: > Prepare for having multi-prog attachments for new netns attach types by > storing programs to run in a bpf_prog_array, which is well suited for > iterating over programs and running them in sequence. > > After this change bpf(PROG_Q

Re: [PATCH bpf-next v3 2/4] bpf, netns: Keep attached programs in bpf_prog_array

2020-06-25 Thread Andrii Nakryiko
On Thu, Jun 25, 2020 at 7:17 AM Jakub Sitnicki wrote: > > Prepare for having multi-prog attachments for new netns attach types by > storing programs to run in a bpf_prog_array, which is well suited for > iterating over programs and running them in sequence. > > After this change bpf(PROG_QUERY) ma

[PATCH bpf-next v3 2/4] bpf, netns: Keep attached programs in bpf_prog_array

2020-06-25 Thread Jakub Sitnicki
Prepare for having multi-prog attachments for new netns attach types by storing programs to run in a bpf_prog_array, which is well suited for iterating over programs and running them in sequence. After this change bpf(PROG_QUERY) may block to allocate memory in bpf_prog_array_copy_to_user() for co