Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Jakub Kicinski
On Thu, 8 Nov 2018 13:29:40 -0800, Stanislav Fomichev wrote: > On 11/08, Jakub Kicinski wrote: > > On Wed, 7 Nov 2018 21:39:57 -0800, Stanislav Fomichev wrote: > > > This commit adds support for loading/attaching/detaching flow > > > dissector program. The structure of the flow dissector program

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Jakub Kicinski
On Thu, 8 Nov 2018 13:25:39 -0800, Stanislav Fomichev wrote: > > > > + goto err_close_obj; > > > > + } > > > > + > > > > const char *sec_name = bpf_program__title(prog, false); > > > > > > > > err = libbpf_prog_type_by_name(sec_

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Jakub Kicinski
On Thu, 8 Nov 2018 13:20:12 -0800, Stanislav Fomichev wrote: > On 11/08, Jakub Kicinski wrote: > > On Thu, 8 Nov 2018 18:21:24 +, Quentin Monnet wrote: > > > >>> @@ -79,8 +82,11 @@ DESCRIPTION > > > >>> contain a dot character ('.'), which is reserved for > > > >>> future > >

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Stanislav Fomichev
On 11/08, Jakub Kicinski wrote: > On Wed, 7 Nov 2018 21:39:57 -0800, Stanislav Fomichev wrote: > > This commit adds support for loading/attaching/detaching flow > > dissector program. The structure of the flow dissector program is > > assumed to be the same as in the selftests: > > > > * flow_dis

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Stanislav Fomichev
On 11/08, Jakub Kicinski wrote: > On Thu, 8 Nov 2018 11:16:43 +, Quentin Monnet wrote: > > > - bpf_program__set_ifindex(prog, ifindex); > > > if (attr.prog_type == BPF_PROG_TYPE_UNSPEC) { > > > + if (!prog) { > > > + p_err("can not guess program type when loadi

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Stanislav Fomichev
On 11/08, Jakub Kicinski wrote: > On Thu, 8 Nov 2018 18:21:24 +, Quentin Monnet wrote: > > >>> @@ -79,8 +82,11 @@ DESCRIPTION > > >>> contain a dot character ('.'), which is reserved for > > >>> future > > >>> extensions of *bpffs*. > > >>> - **bpftool

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Jakub Kicinski
On Wed, 7 Nov 2018 21:39:57 -0800, Stanislav Fomichev wrote: > This commit adds support for loading/attaching/detaching flow > dissector program. The structure of the flow dissector program is > assumed to be the same as in the selftests: > > * flow_dissector section with the main entry point > *

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Jakub Kicinski
On Thu, 8 Nov 2018 11:16:43 +, Quentin Monnet wrote: > > - bpf_program__set_ifindex(prog, ifindex); > > if (attr.prog_type == BPF_PROG_TYPE_UNSPEC) { > > + if (!prog) { > > + p_err("can not guess program type when loading all > > programs\n"); No new lines in

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Jakub Kicinski
On Thu, 8 Nov 2018 18:21:24 +, Quentin Monnet wrote: > >>> @@ -79,8 +82,11 @@ DESCRIPTION > >>> contain a dot character ('.'), which is reserved for > >>> future > >>> extensions of *bpffs*. > >>> - **bpftool prog load** *OBJ* *FILE* [**type** *TYPE*] [*

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Stanislav Fomichev
On 11/08, Quentin Monnet wrote: > 2018-11-08 10:01 UTC-0800 ~ Stanislav Fomichev > > On 11/08, Quentin Monnet wrote: > >> Hi Stanislav, thanks for the changes! More comments below. > > Thank you for another round of review! > > > >> 2018-11-07 21:39 UTC-0800 ~ Stanislav Fomichev > >>> This commi

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Quentin Monnet
2018-11-08 10:01 UTC-0800 ~ Stanislav Fomichev > On 11/08, Quentin Monnet wrote: >> Hi Stanislav, thanks for the changes! More comments below. > Thank you for another round of review! > >> 2018-11-07 21:39 UTC-0800 ~ Stanislav Fomichev >>> This commit adds support for loading/attaching/detaching

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Stanislav Fomichev
On 11/08, Quentin Monnet wrote: > Hi Stanislav, thanks for the changes! More comments below. Thank you for another round of review! > 2018-11-07 21:39 UTC-0800 ~ Stanislav Fomichev > > This commit adds support for loading/attaching/detaching flow > > dissector program. The structure of the flow d

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Quentin Monnet
Hi Stanislav, thanks for the changes! More comments below. 2018-11-07 21:39 UTC-0800 ~ Stanislav Fomichev This commit adds support for loading/attaching/detaching flow dissector program. The structure of the flow dissector program is assumed to be the same as in the selftests: * flow_dissector

[PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-07 Thread Stanislav Fomichev
This commit adds support for loading/attaching/detaching flow dissector program. The structure of the flow dissector program is assumed to be the same as in the selftests: * flow_dissector section with the main entry point * a bunch of tail call progs * a jmp_table map that is populated with the t