Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-29 Thread Jesper Dangaard Brouer
On Wed, 27 Sep 2017 10:32:36 -0700 Alexei Starovoitov wrote: > On Wed, Sep 27, 2017 at 04:54:57PM +0200, Jesper Dangaard Brouer wrote: > > On Wed, 27 Sep 2017 06:35:40 -0700 > > John Fastabend wrote: > > > > > On 09/27/2017 02:26 AM, Jesper Dangaard Brouer wrote: > > > > On Tue, 26 Sep 2017

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-28 Thread Waskiewicz Jr, Peter
On 9/28/17 2:23 PM, John Fastabend wrote: > [...] > >> I'm pretty sure I misunderstood what you were going after with >> XDP_REDIRECT reserving the headroom. Our use case (patches coming in a >> few weeks) will populate the headroom coming out of the driver to XDP, >> and then once the XDP progra

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-28 Thread Daniel Borkmann
On 09/28/2017 10:52 PM, Waskiewicz Jr, Peter wrote: On 9/28/17 12:59 PM, Andy Gospodarek wrote: On Thu, Sep 28, 2017 at 1:59 AM, Waskiewicz Jr, Peter wrote: On 9/26/17 10:21 AM, Andy Gospodarek wrote: On Mon, Sep 25, 2017 at 08:50:28PM +0200, Daniel Borkmann wrote: On 09/25/2017 08:10 PM, An

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-28 Thread John Fastabend
[...] > I'm pretty sure I misunderstood what you were going after with > XDP_REDIRECT reserving the headroom. Our use case (patches coming in a > few weeks) will populate the headroom coming out of the driver to XDP, > and then once the XDP program extracts whatever hints it wants via > helpe

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-28 Thread Waskiewicz Jr, Peter
On 9/28/17 12:59 PM, Andy Gospodarek wrote: > On Thu, Sep 28, 2017 at 1:59 AM, Waskiewicz Jr, Peter > wrote: >> On 9/26/17 10:21 AM, Andy Gospodarek wrote: >>> On Mon, Sep 25, 2017 at 08:50:28PM +0200, Daniel Borkmann wrote: On 09/25/2017 08:10 PM, Andy Gospodarek wrote: [...] > Firs

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-28 Thread Andy Gospodarek
On Thu, Sep 28, 2017 at 1:59 AM, Waskiewicz Jr, Peter wrote: > On 9/26/17 10:21 AM, Andy Gospodarek wrote: >> On Mon, Sep 25, 2017 at 08:50:28PM +0200, Daniel Borkmann wrote: >>> On 09/25/2017 08:10 PM, Andy Gospodarek wrote: >>> [...] First, thanks for this detailed description. It was help

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-27 Thread Waskiewicz Jr, Peter
On 9/26/17 10:21 AM, Andy Gospodarek wrote: > On Mon, Sep 25, 2017 at 08:50:28PM +0200, Daniel Borkmann wrote: >> On 09/25/2017 08:10 PM, Andy Gospodarek wrote: >> [...] >>> First, thanks for this detailed description. It was helpful to read >>> along with the patches. >>> >>> My only concern abou

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-27 Thread Alexei Starovoitov
On Wed, Sep 27, 2017 at 04:54:57PM +0200, Jesper Dangaard Brouer wrote: > On Wed, 27 Sep 2017 06:35:40 -0700 > John Fastabend wrote: > > > On 09/27/2017 02:26 AM, Jesper Dangaard Brouer wrote: > > > On Tue, 26 Sep 2017 21:58:53 +0200 > > > Daniel Borkmann wrote: > > > > > >> On 09/26/2017 09:

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-27 Thread Jesper Dangaard Brouer
On Wed, 27 Sep 2017 06:35:40 -0700 John Fastabend wrote: > On 09/27/2017 02:26 AM, Jesper Dangaard Brouer wrote: > > On Tue, 26 Sep 2017 21:58:53 +0200 > > Daniel Borkmann wrote: > > > >> On 09/26/2017 09:13 PM, Jesper Dangaard Brouer wrote: > >> [...] > >>> I'm currently implementing a cpu

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-27 Thread John Fastabend
On 09/27/2017 02:26 AM, Jesper Dangaard Brouer wrote: > On Tue, 26 Sep 2017 21:58:53 +0200 > Daniel Borkmann wrote: > >> On 09/26/2017 09:13 PM, Jesper Dangaard Brouer wrote: >> [...] >>> I'm currently implementing a cpumap type, that transfers raw XDP frames >>> to another CPU, and the SKB is al

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-27 Thread Jesper Dangaard Brouer
On Tue, 26 Sep 2017 21:58:53 +0200 Daniel Borkmann wrote: > On 09/26/2017 09:13 PM, Jesper Dangaard Brouer wrote: > [...] > > I'm currently implementing a cpumap type, that transfers raw XDP frames > > to another CPU, and the SKB is allocated on the remote CPU. (It > > actually works extremely w

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-26 Thread Daniel Borkmann
On 09/26/2017 09:13 PM, Jesper Dangaard Brouer wrote: [...] I'm currently implementing a cpumap type, that transfers raw XDP frames to another CPU, and the SKB is allocated on the remote CPU. (It actually works extremely well). Meaning you let all the XDP_PASS packets get processed on a differ

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-26 Thread Jesper Dangaard Brouer
On Mon, 25 Sep 2017 02:25:51 +0200 Daniel Borkmann wrote: > This work enables generic transfer of metadata from XDP into skb. The > basic idea is that we can make use of the fact that the resulting skb > must be linear and already comes with a larger headroom for supporting > bpf_xdp_adjust_head(

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-26 Thread Andy Gospodarek
On Mon, Sep 25, 2017 at 08:50:28PM +0200, Daniel Borkmann wrote: > On 09/25/2017 08:10 PM, Andy Gospodarek wrote: > [...] > > First, thanks for this detailed description. It was helpful to read > > along with the patches. > > > > My only concern about this area being generic is that you are now i

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-25 Thread John Fastabend
On 09/25/2017 11:50 AM, Daniel Borkmann wrote: > On 09/25/2017 08:10 PM, Andy Gospodarek wrote: > [...] >> First, thanks for this detailed description.  It was helpful to read >> along with the patches. >> >> My only concern about this area being generic is that you are now in a >> state where any

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-25 Thread Daniel Borkmann
On 09/25/2017 08:10 PM, Andy Gospodarek wrote: [...] First, thanks for this detailed description. It was helpful to read along with the patches. My only concern about this area being generic is that you are now in a state where any bpf program must know about all the bpf programs in the receive

Re: [PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-25 Thread Andy Gospodarek
On Mon, Sep 25, 2017 at 02:25:51AM +0200, Daniel Borkmann wrote: > This work enables generic transfer of metadata from XDP into skb. The > basic idea is that we can make use of the fact that the resulting skb > must be linear and already comes with a larger headroom for supporting > bpf_xdp_adjust_

[PATCH net-next 2/6] bpf: add meta pointer for direct access

2017-09-24 Thread Daniel Borkmann
This work enables generic transfer of metadata from XDP into skb. The basic idea is that we can make use of the fact that the resulting skb must be linear and already comes with a larger headroom for supporting bpf_xdp_adjust_head(), which mangles xdp->data. Here, we base our work on a similar prin