Re: [PATCH bpf-next 2/2] bpftool: show flow_dissector attachment status

2019-04-24 Thread Stanislav Fomichev
On 04/24, Quentin Monnet wrote: > 2019-04-23 16:22 UTC-0700 ~ Stanislav Fomichev > > Right now there is no way to query whether BPF flow_dissector program > > is attached to a network namespace or not. In previous commit, I added > > support for querying that info, show it when doing `bpftool net`

Re: [PATCH bpf-next 2/2] bpftool: show flow_dissector attachment status

2019-04-24 Thread Quentin Monnet
2019-04-23 16:22 UTC-0700 ~ Stanislav Fomichev Right now there is no way to query whether BPF flow_dissector program is attached to a network namespace or not. In previous commit, I added support for querying that info, show it when doing `bpftool net`: $ bpftool prog loadall ./bpf_flow.o \

Re: [PATCH bpf-next 2/2] bpftool: show flow_dissector attachment status

2019-04-23 Thread Stanislav Fomichev
On 04/23, Jakub Kicinski wrote: > On Tue, 23 Apr 2019 16:22:00 -0700, Stanislav Fomichev wrote: > > +static int query_flow_dissector(struct bpf_attach_info *attach_info) > > +{ > > + __u32 prog_ids[1] = {0}; > > + __u32 prog_cnt = ARRAY_SIZE(prog_ids); > > + __u32 attach_flags; > > + int fd

Re: [PATCH bpf-next 2/2] bpftool: show flow_dissector attachment status

2019-04-23 Thread Jakub Kicinski
On Tue, 23 Apr 2019 16:22:00 -0700, Stanislav Fomichev wrote: > +static int query_flow_dissector(struct bpf_attach_info *attach_info) > +{ > + __u32 prog_ids[1] = {0}; > + __u32 prog_cnt = ARRAY_SIZE(prog_ids); > + __u32 attach_flags; > + int fd; > + int err; reverse christmas

[PATCH bpf-next 2/2] bpftool: show flow_dissector attachment status

2019-04-23 Thread Stanislav Fomichev
Right now there is no way to query whether BPF flow_dissector program is attached to a network namespace or not. In previous commit, I added support for querying that info, show it when doing `bpftool net`: $ bpftool prog loadall ./bpf_flow.o \ /sys/fs/bpf/flow type flow_dissector \