Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-21 Thread Stanislav Fomichev
On 03/21, Alexei Starovoitov wrote: > On Thu, Mar 21, 2019 at 9:13 AM Willem de Bruijn > wrote: > > > > On Thu, Mar 21, 2019 at 12:01 PM Alexei Starovoitov > > wrote: > > > > > > On Thu, Mar 21, 2019 at 08:44:33AM -0700, Stanislav Fomichev wrote: > > > > > > > > If we can agree that we switch eve

Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-21 Thread Alexei Starovoitov
On Thu, Mar 21, 2019 at 9:13 AM Willem de Bruijn wrote: > > On Thu, Mar 21, 2019 at 12:01 PM Alexei Starovoitov > wrote: > > > > On Thu, Mar 21, 2019 at 08:44:33AM -0700, Stanislav Fomichev wrote: > > > > > > If we can agree that we switch everything to xpd-like, do we deprecate the > > > skb-one

Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-21 Thread Willem de Bruijn
On Thu, Mar 21, 2019 at 12:01 PM Alexei Starovoitov wrote: > > On Thu, Mar 21, 2019 at 08:44:33AM -0700, Stanislav Fomichev wrote: > > > > If we can agree that we switch everything to xpd-like, do we deprecate the > > skb-one? > > This whole discussion that have been going on for long time is an i

Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-21 Thread Alexei Starovoitov
On Thu, Mar 21, 2019 at 08:44:33AM -0700, Stanislav Fomichev wrote: > > If we can agree that we switch everything to xpd-like, do we deprecate the > skb-one? This whole discussion that have been going on for long time is an indication that initial bpf flow dissector concept was not thought throug

Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-21 Thread Stanislav Fomichev
On 03/21, Willem de Bruijn wrote: > On Thu, Mar 21, 2019 at 12:45 AM Eric Dumazet wrote: > > > > > > > > On 03/20/2019 08:39 PM, Alexei Starovoitov wrote: > > > > > I think you need to convince Dave and Eric that > > > above surgery is necessary to do the hack in patch 6 with > > > +static DEFINE_

Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-21 Thread Willem de Bruijn
On Thu, Mar 21, 2019 at 12:45 AM Eric Dumazet wrote: > > > > On 03/20/2019 08:39 PM, Alexei Starovoitov wrote: > > > I think you need to convince Dave and Eric that > > above surgery is necessary to do the hack in patch 6 with > > +static DEFINE_PER_CPU(struct sk_buff, bpf_flow_skb); > > > > Yes,

Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-20 Thread Eric Dumazet
On 03/20/2019 08:39 PM, Alexei Starovoitov wrote: > I think you need to convince Dave and Eric that > above surgery is necessary to do the hack in patch 6 with > +static DEFINE_PER_CPU(struct sk_buff, bpf_flow_skb); > Yes, this is a huge code churn. Honestly I believe we are going too far in

Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-20 Thread Alexei Starovoitov
On Tue, Mar 19, 2019 at 03:19:40PM -0700, Stanislav Fomichev wrote: > __init_skb is essentially a version of __build_skb which accepts skb as > an argument (instead of doing kmem_cache_alloc to allocate it). > > __init_skb_shinfo initializes shinfo. > > __init_skb_data initializes skb data pointe

[RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-19 Thread Stanislav Fomichev
__init_skb is essentially a version of __build_skb which accepts skb as an argument (instead of doing kmem_cache_alloc to allocate it). __init_skb_shinfo initializes shinfo. __init_skb_data initializes skb data pointers. No functional changes. Signed-off-by: Stanislav Fomichev --- include/lin