Re: [RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section

2015-06-01 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 01, 2015 at 03:03:11PM +0900, Namhyung Kim escreveu: > On Mon, Jun 01, 2015 at 01:19:16PM +0800, Wangnan (F) wrote: > > On 2015/6/1 10:12, Namhyung Kim wrote: > > >On Thu, May 28, 2015 at 08:35:19PM -0700, Alexei Starovoitov wrote: > > >>On Thu, May 28, 2015 at 03:14:44PM +0800, Wangnan

Re: [RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section

2015-05-31 Thread Namhyung Kim
On Mon, Jun 01, 2015 at 01:19:16PM +0800, Wangnan (F) wrote: > > > On 2015/6/1 10:12, Namhyung Kim wrote: > >Hi Alexei and Wang, > > > >On Thu, May 28, 2015 at 08:35:19PM -0700, Alexei Starovoitov wrote: > >>On Thu, May 28, 2015 at 03:14:44PM +0800, Wangnan (F) wrote: > >>>On 2015/5/28 14:09, Ale

Re: [RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section

2015-05-31 Thread Wangnan (F)
On 2015/6/1 10:12, Namhyung Kim wrote: Hi Alexei and Wang, On Thu, May 28, 2015 at 08:35:19PM -0700, Alexei Starovoitov wrote: On Thu, May 28, 2015 at 03:14:44PM +0800, Wangnan (F) wrote: On 2015/5/28 14:09, Alexei Starovoitov wrote: On Thu, May 28, 2015 at 11:09:50AM +0800, Wangnan (F) wro

Re: [RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section

2015-05-31 Thread Namhyung Kim
Hi Alexei and Wang, On Thu, May 28, 2015 at 08:35:19PM -0700, Alexei Starovoitov wrote: > On Thu, May 28, 2015 at 03:14:44PM +0800, Wangnan (F) wrote: > > On 2015/5/28 14:09, Alexei Starovoitov wrote: > > >On Thu, May 28, 2015 at 11:09:50AM +0800, Wangnan (F) wrote: > > For me, enable eBPF program

Re: [RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section

2015-05-28 Thread Wangnan (F)
On 2015/5/29 11:35, Alexei Starovoitov wrote: On Thu, May 28, 2015 at 03:14:44PM +0800, Wangnan (F) wrote: On 2015/5/28 14:09, Alexei Starovoitov wrote: On Thu, May 28, 2015 at 11:09:50AM +0800, Wangnan (F) wrote: However this breaks a law in current design that opening phase doesn't talk t

Re: [RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section

2015-05-28 Thread Alexei Starovoitov
On Thu, May 28, 2015 at 03:14:44PM +0800, Wangnan (F) wrote: > > > On 2015/5/28 14:09, Alexei Starovoitov wrote: > >On Thu, May 28, 2015 at 11:09:50AM +0800, Wangnan (F) wrote: > >>However this breaks a law in current design that opening phase doesn't > >>talk to kernel with sys_bpf() at all. All

Re: [RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section

2015-05-28 Thread Wangnan (F)
On 2015/5/28 14:09, Alexei Starovoitov wrote: On Thu, May 28, 2015 at 11:09:50AM +0800, Wangnan (F) wrote: However this breaks a law in current design that opening phase doesn't talk to kernel with sys_bpf() at all. All related staff is done in loading phase. This principle ensures that in eve

Re: [RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section

2015-05-27 Thread Alexei Starovoitov
On Thu, May 28, 2015 at 11:09:50AM +0800, Wangnan (F) wrote: > > However this breaks a law in current design that opening phase doesn't > talk to kernel with sys_bpf() at all. All related staff is done in loading > phase. This principle ensures that in every systems, no matter it support > sys_bpf

Re: [RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section

2015-05-27 Thread Wangnan (F)
On 2015/5/28 10:28, Alexei Starovoitov wrote: On Thu, May 28, 2015 at 10:03:04AM +0800, Wangnan (F) wrote: On 2015/5/28 9:53, Alexei Starovoitov wrote: On Wed, May 27, 2015 at 05:19:45AM +, Wang Nan wrote: If maps are used by eBPF programs, corresponding object file(s) should contain a

Re: [RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section

2015-05-27 Thread Alexei Starovoitov
On Thu, May 28, 2015 at 10:03:04AM +0800, Wangnan (F) wrote: > > > On 2015/5/28 9:53, Alexei Starovoitov wrote: > >On Wed, May 27, 2015 at 05:19:45AM +, Wang Nan wrote: > >>If maps are used by eBPF programs, corresponding object file(s) should > >>contain a section named 'map'. Which contains

Re: [RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section

2015-05-27 Thread Wangnan (F)
On 2015/5/28 9:53, Alexei Starovoitov wrote: On Wed, May 27, 2015 at 05:19:45AM +, Wang Nan wrote: If maps are used by eBPF programs, corresponding object file(s) should contain a section named 'map'. Which contains map definitions. This patch copies the data of the whole section. Map data

Re: [RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section

2015-05-27 Thread Alexei Starovoitov
On Wed, May 27, 2015 at 05:19:45AM +, Wang Nan wrote: > If maps are used by eBPF programs, corresponding object file(s) should > contain a section named 'map'. Which contains map definitions. This > patch copies the data of the whole section. Map data parsing should be > acted just before map l

[RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section

2015-05-26 Thread Wang Nan
If maps are used by eBPF programs, corresponding object file(s) should contain a section named 'map'. Which contains map definitions. This patch copies the data of the whole section. Map data parsing should be acted just before map loading. Signed-off-by: Wang Nan --- tools/lib/bpf/libbpf.c | 29