Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-10 Thread Martin KaFai Lau
On Tue, Nov 10, 2020 at 04:17:06PM -0800, Andrii Nakryiko wrote: > On Tue, Nov 10, 2020 at 4:07 PM Martin KaFai Lau wrote: > > > > On Tue, Nov 10, 2020 at 03:53:13PM -0800, Andrii Nakryiko wrote: > > > On Tue, Nov 10, 2020 at 3:43 PM Martin KaFai Lau wrote: > > > > > > > > On Tue, Nov 10, 2020 at

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-10 Thread Andrii Nakryiko
On Tue, Nov 10, 2020 at 4:07 PM Martin KaFai Lau wrote: > > On Tue, Nov 10, 2020 at 03:53:13PM -0800, Andrii Nakryiko wrote: > > On Tue, Nov 10, 2020 at 3:43 PM Martin KaFai Lau wrote: > > > > > > On Tue, Nov 10, 2020 at 11:01:12PM +0100, KP Singh wrote: > > > > On Mon, Nov 9, 2020 at 9:32 PM Joh

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-10 Thread Martin KaFai Lau
On Tue, Nov 10, 2020 at 03:53:13PM -0800, Andrii Nakryiko wrote: > On Tue, Nov 10, 2020 at 3:43 PM Martin KaFai Lau wrote: > > > > On Tue, Nov 10, 2020 at 11:01:12PM +0100, KP Singh wrote: > > > On Mon, Nov 9, 2020 at 9:32 PM John Fastabend > > > wrote: > > > > > > > > Andrii Nakryiko wrote: > >

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-10 Thread Andrii Nakryiko
On Tue, Nov 10, 2020 at 3:43 PM Martin KaFai Lau wrote: > > On Tue, Nov 10, 2020 at 11:01:12PM +0100, KP Singh wrote: > > On Mon, Nov 9, 2020 at 9:32 PM John Fastabend > > wrote: > > > > > > Andrii Nakryiko wrote: > > > > On Fri, Nov 6, 2020 at 5:52 PM Martin KaFai Lau wrote: > > > > > > > > >

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-10 Thread Martin KaFai Lau
On Tue, Nov 10, 2020 at 11:01:12PM +0100, KP Singh wrote: > On Mon, Nov 9, 2020 at 9:32 PM John Fastabend > wrote: > > > > Andrii Nakryiko wrote: > > > On Fri, Nov 6, 2020 at 5:52 PM Martin KaFai Lau wrote: > > > > > > > > On Fri, Nov 06, 2020 at 05:14:14PM -0800, Andrii Nakryiko wrote: > > > >

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-10 Thread KP Singh
On Mon, Nov 9, 2020 at 9:32 PM John Fastabend wrote: > > Andrii Nakryiko wrote: > > On Fri, Nov 6, 2020 at 5:52 PM Martin KaFai Lau wrote: > > > > > > On Fri, Nov 06, 2020 at 05:14:14PM -0800, Andrii Nakryiko wrote: > > > > On Fri, Nov 6, 2020 at 2:08 PM Martin KaFai Lau wrote: > > > > > > > > >

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-09 Thread John Fastabend
Andrii Nakryiko wrote: > On Fri, Nov 6, 2020 at 5:52 PM Martin KaFai Lau wrote: > > > > On Fri, Nov 06, 2020 at 05:14:14PM -0800, Andrii Nakryiko wrote: > > > On Fri, Nov 6, 2020 at 2:08 PM Martin KaFai Lau wrote: > > > > > > > > This patch enables the FENTRY/FEXIT/RAW_TP tracing program to use >

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-09 Thread Andrii Nakryiko
On Fri, Nov 6, 2020 at 5:52 PM Martin KaFai Lau wrote: > > On Fri, Nov 06, 2020 at 05:14:14PM -0800, Andrii Nakryiko wrote: > > On Fri, Nov 6, 2020 at 2:08 PM Martin KaFai Lau wrote: > > > > > > This patch enables the FENTRY/FEXIT/RAW_TP tracing program to use > > > the bpf_sk_storage_(get|delete

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Martin KaFai Lau
On Fri, Nov 06, 2020 at 05:14:14PM -0800, Andrii Nakryiko wrote: > On Fri, Nov 6, 2020 at 2:08 PM Martin KaFai Lau wrote: > > > > This patch enables the FENTRY/FEXIT/RAW_TP tracing program to use > > the bpf_sk_storage_(get|delete) helper, so those tracing programs > > can access the sk's bpf_loca

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Andrii Nakryiko
On Fri, Nov 6, 2020 at 2:08 PM Martin KaFai Lau wrote: > > This patch enables the FENTRY/FEXIT/RAW_TP tracing program to use > the bpf_sk_storage_(get|delete) helper, so those tracing programs > can access the sk's bpf_local_storage and the later selftest > will show some examples. > > The bpf_sk_

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Song Liu
> On Nov 6, 2020, at 3:18 PM, Martin Lau wrote: > > On Fri, Nov 06, 2020 at 02:59:14PM -0800, Song Liu wrote: >> >> >>> On Nov 6, 2020, at 2:08 PM, Martin KaFai Lau wrote: >>> [...] >>> +static bool bpf_sk_storage_tracing_allowed(const struct bpf_prog *prog) >>> +{ >>> + const struct b

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Martin KaFai Lau
On Fri, Nov 06, 2020 at 02:59:14PM -0800, Song Liu wrote: > > > > On Nov 6, 2020, at 2:08 PM, Martin KaFai Lau wrote: > > > > This patch enables the FENTRY/FEXIT/RAW_TP tracing program to use > > the bpf_sk_storage_(get|delete) helper, so those tracing programs > > can access the sk's bpf_local

Re: [PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Song Liu
> On Nov 6, 2020, at 2:08 PM, Martin KaFai Lau wrote: > > This patch enables the FENTRY/FEXIT/RAW_TP tracing program to use > the bpf_sk_storage_(get|delete) helper, so those tracing programs > can access the sk's bpf_local_storage and the later selftest > will show some examples. > > The bpf

[PATCH bpf-next 2/3] bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP

2020-11-06 Thread Martin KaFai Lau
This patch enables the FENTRY/FEXIT/RAW_TP tracing program to use the bpf_sk_storage_(get|delete) helper, so those tracing programs can access the sk's bpf_local_storage and the later selftest will show some examples. The bpf_sk_storage is currently used in bpf-tcp-cc, tc, cg sockops...etc which i