Re: [PATCH bpf-next] tools: bpftool: add a command to dump the trace pipe

2018-12-10 Thread Quentin Monnet
2018-12-10 11:03 UTC+0100 ~ Daniel Borkmann > By the way, one thing that would still be useful in this context is that > if tracefs hasn't been mounted that bpftool would auto-mount it for the > user. Pretty clear that if the user requests 'bpftool prog tracelog' and > we would fail due to not be

Re: [PATCH bpf-next] tools: bpftool: add a command to dump the trace pipe

2018-12-10 Thread Daniel Borkmann
On 12/06/2018 08:36 PM, Alexei Starovoitov wrote: > On Thu, Dec 06, 2018 at 05:20:54PM +, Quentin Monnet wrote: >> 2018-12-05 19:18 UTC-0800 ~ Alexei Starovoitov >> >>> On Wed, Dec 05, 2018 at 06:15:23PM +, Quentin Monnet wrote: >> + >> +/* Allow room for NULL terminating b

Re: [PATCH bpf-next] tools: bpftool: add a command to dump the trace pipe

2018-12-06 Thread Alexei Starovoitov
On Thu, Dec 06, 2018 at 05:20:54PM +, Quentin Monnet wrote: > 2018-12-05 19:18 UTC-0800 ~ Alexei Starovoitov > > > On Wed, Dec 05, 2018 at 06:15:23PM +, Quentin Monnet wrote: > + > +/* Allow room for NULL terminating byte and pipe file name */ > +snprintf(for

Re: [PATCH bpf-next] tools: bpftool: add a command to dump the trace pipe

2018-12-06 Thread Quentin Monnet
2018-12-05 19:18 UTC-0800 ~ Alexei Starovoitov > On Wed, Dec 05, 2018 at 06:15:23PM +, Quentin Monnet wrote: + + /* Allow room for NULL terminating byte and pipe file name */ + snprintf(format, sizeof(format), "%%*s %%%zds %%99s %%*s %%*d %%*d\\n", + PATH_MAX -

Re: [PATCH bpf-next] tools: bpftool: add a command to dump the trace pipe

2018-12-05 Thread Alexei Starovoitov
On Wed, Dec 05, 2018 at 06:15:23PM +, Quentin Monnet wrote: > > > + > > > + /* Allow room for NULL terminating byte and pipe file name */ > > > + snprintf(format, sizeof(format), "%%*s %%%zds %%99s %%*s %%*d %%*d\\n", > > > + PATH_MAX - strlen(pipe_name) - 1); > > > > before scanning

Re: [PATCH bpf-next] tools: bpftool: add a command to dump the trace pipe

2018-12-05 Thread Quentin Monnet
2018-12-05 08:50 UTC-0800 ~ Alexei Starovoitov On Wed, Dec 05, 2018 at 10:28:24AM +, Quentin Monnet wrote: BPF programs can use the bpf_trace_printk() helper to print debug information into the trace pipe. Add a subcommand "bpftool prog tracelog" to simply dump this pipe to the console. Th

Re: [PATCH bpf-next] tools: bpftool: add a command to dump the trace pipe

2018-12-05 Thread Alexei Starovoitov
On Wed, Dec 05, 2018 at 10:28:24AM +, Quentin Monnet wrote: > BPF programs can use the bpf_trace_printk() helper to print debug > information into the trace pipe. Add a subcommand > "bpftool prog tracelog" to simply dump this pipe to the console. > > This is for a good part copied from iproute

Re: [PATCH bpf-next] tools: bpftool: add a command to dump the trace pipe

2018-12-05 Thread Daniel Borkmann
On 12/05/2018 11:28 AM, Quentin Monnet wrote: > BPF programs can use the bpf_trace_printk() helper to print debug > information into the trace pipe. Add a subcommand > "bpftool prog tracelog" to simply dump this pipe to the console. > > This is for a good part copied from iproute2, where the featu

[PATCH bpf-next] tools: bpftool: add a command to dump the trace pipe

2018-12-05 Thread Quentin Monnet
BPF programs can use the bpf_trace_printk() helper to print debug information into the trace pipe. Add a subcommand "bpftool prog tracelog" to simply dump this pipe to the console. This is for a good part copied from iproute2, where the feature is available with "tc exec bpf dbg". Changes include