Re: [iovisor-dev] [PATCH RFC] bpf: allow map helpers access to map values directly

2017-09-08 Thread Alexei Starovoitov via iovisor-dev
On Fri, Sep 08, 2017 at 10:42:06PM +0200, Paul Chaignon wrote: > Helpers that expect ARG_PTR_TO_MAP_KEY and ARG_PTR_TO_MAP_VALUE can only > access stack and packet memory. Allow these helpers to directly access map > values by passing registers of type PTR_TO_MAP_VALUE. thanks for the patch.

Re: [iovisor-dev] [PATCH RFC] Add BPF AsmParser support in LLVM

2017-09-08 Thread Y Song via iovisor-dev
On Fri, Sep 8, 2017 at 1:00 PM, Jiong Wang wrote: > > Hi Y Song, > > Thanks for the review and test. > > [snip] >> >> I guess, we may need to add something like LD_VAR_ADDR so that >> the proper assembly code can be issued. Also we could drop "ll" with >> "r1 =

Re: [iovisor-dev] New bcc helpers

2017-09-08 Thread carlos antonio neira bustos via iovisor-dev
Thank you very much. On Sep 8, 2017 6:35 PM, "Y Song" wrote: > > > On Fri, Sep 8, 2017 at 12:21 PM, carlos antonio neira bustos via > iovisor-dev wrote: > >> Hi, >> >> I'm trying to add new helpers to obtain a pid namespace, I'm working on >>

Re: [iovisor-dev] New bcc helpers

2017-09-08 Thread Y Song via iovisor-dev
On Fri, Sep 8, 2017 at 12:21 PM, carlos antonio neira bustos via iovisor-dev wrote: > Hi, > > I'm trying to add new helpers to obtain a pid namespace, I'm working on > kernel 4.13 > > --- linux/linux-4.13/kernel/bpf/helpers.c 2017-09-03 13:56:17.0 > -0700 >

[iovisor-dev] [PATCH RFC] bpf: allow map helpers access to map values directly

2017-09-08 Thread Paul Chaignon via iovisor-dev
Helpers that expect ARG_PTR_TO_MAP_KEY and ARG_PTR_TO_MAP_VALUE can only access stack and packet memory. Allow these helpers to directly access map values by passing registers of type PTR_TO_MAP_VALUE. This change removes the need for an extra copy to the stack when using a map value to perform