Re: Questions on XDP

2017-02-22 Thread Jesper Dangaard Brouer
On Wed, 22 Feb 2017 09:08:53 -0800 John Fastabend wrote: > > GSO/TSO is getting into advanced stuff I would rather not have to get > > into right now. I figure we need to take this portion one step at a > > time. To support GSO we need more information like the mss. >

Re: Questions on XDP

2017-02-22 Thread John Fastabend
On 17-02-21 09:44 AM, Alexander Duyck wrote: > On Mon, Feb 20, 2017 at 11:55 PM, Alexei Starovoitov > wrote: >> On Mon, Feb 20, 2017 at 08:00:57PM -0800, Alexander Duyck wrote: >>> >>> I assumed "toy Tx" since I wasn't aware that they were actually >>> allowing

Re: Questions on XDP

2017-02-21 Thread John Fastabend
On 17-02-20 12:06 PM, Jakub Kicinski wrote: > On Sat, 18 Feb 2017 19:48:25 -0800, John Fastabend wrote: >> On 17-02-18 06:16 PM, Alexander Duyck wrote: >>> On Sat, Feb 18, 2017 at 3:48 PM, John Fastabend >>> wrote: On 17-02-18 03:31 PM, Alexei Starovoitov wrote:

Re: Questions on XDP

2017-02-21 Thread Alexander Duyck
On Mon, Feb 20, 2017 at 11:55 PM, Alexei Starovoitov wrote: > On Mon, Feb 20, 2017 at 08:00:57PM -0800, Alexander Duyck wrote: >> >> I assumed "toy Tx" since I wasn't aware that they were actually >> allowing writing to the page. I think that might work for the

Re: Questions on XDP

2017-02-20 Thread Alexei Starovoitov
On Mon, Feb 20, 2017 at 08:00:57PM -0800, Alexander Duyck wrote: > > I assumed "toy Tx" since I wasn't aware that they were actually > allowing writing to the page. I think that might work for the XDP_TX > case, Take a look at samples/bpf/xdp_tx_iptunnel_kern.c It's close enough approximation

Re: Questions on XDP

2017-02-20 Thread Alexander Duyck
On Mon, Feb 20, 2017 at 7:39 PM, John Fastabend wrote: > On 17-02-20 07:18 PM, Alexei Starovoitov wrote: >> On Sat, Feb 18, 2017 at 06:16:47PM -0800, Alexander Duyck wrote: >>> >>> I was thinking about the fact that the Mellanox driver is currently >>> mapping pages as

Re: Questions on XDP

2017-02-20 Thread John Fastabend
On 17-02-20 07:18 PM, Alexei Starovoitov wrote: > On Sat, Feb 18, 2017 at 06:16:47PM -0800, Alexander Duyck wrote: >> >> I was thinking about the fact that the Mellanox driver is currently >> mapping pages as bidirectional, so I was sticking to the device to >> device case in regards to that

Re: Questions on XDP

2017-02-20 Thread Alexei Starovoitov
On Sat, Feb 18, 2017 at 06:16:47PM -0800, Alexander Duyck wrote: > > I was thinking about the fact that the Mellanox driver is currently > mapping pages as bidirectional, so I was sticking to the device to > device case in regards to that discussion. For virtual interfaces we > don't even need

Re: Questions on XDP

2017-02-20 Thread Jakub Kicinski
On Sat, 18 Feb 2017 19:48:25 -0800, John Fastabend wrote: > On 17-02-18 06:16 PM, Alexander Duyck wrote: > > On Sat, Feb 18, 2017 at 3:48 PM, John Fastabend > > wrote: > >> On 17-02-18 03:31 PM, Alexei Starovoitov wrote: > >>> On Sat, Feb 18, 2017 at 10:18 AM,

Re: Questions on XDP

2017-02-18 Thread John Fastabend
On 17-02-18 06:16 PM, Alexander Duyck wrote: > On Sat, Feb 18, 2017 at 3:48 PM, John Fastabend > wrote: >> On 17-02-18 03:31 PM, Alexei Starovoitov wrote: >>> On Sat, Feb 18, 2017 at 10:18 AM, Alexander Duyck >>> wrote: > XDP_DROP

Re: Questions on XDP

2017-02-18 Thread Alexander Duyck
On Sat, Feb 18, 2017 at 3:48 PM, John Fastabend wrote: > On 17-02-18 03:31 PM, Alexei Starovoitov wrote: >> On Sat, Feb 18, 2017 at 10:18 AM, Alexander Duyck >> wrote: >>> XDP_DROP does not require having one page per frame. >>> >>>

Re: Questions on XDP

2017-02-18 Thread Alexei Starovoitov
On Sat, Feb 18, 2017 at 3:48 PM, John Fastabend wrote: > > We are running our vswitch in userspace now for many workloads > it would be nice to have these in kernel if possible. ... > Maybe Alex had something else in mind but we have many virtual interfaces > plus

Re: Questions on XDP

2017-02-18 Thread Eric Dumazet
On Sat, 2017-02-18 at 15:48 -0800, John Fastabend wrote: > I'm not seeing the distinction here. If its a 4k page and > in the stack the driver will get overrun as well. Agree. Using a full page per Ethernet frame does not change the attack vector. It makes attacker job easier.

Re: Questions on XDP

2017-02-18 Thread John Fastabend
On 17-02-18 03:31 PM, Alexei Starovoitov wrote: > On Sat, Feb 18, 2017 at 10:18 AM, Alexander Duyck > wrote: >> >>> XDP_DROP does not require having one page per frame. >> >> Agreed. > > why do you think so? > xdp_drop is targeting ddos where in good case > all traffic

Re: Questions on XDP

2017-02-18 Thread John Fastabend
On 17-02-18 10:18 AM, Alexander Duyck wrote: > On Sat, Feb 18, 2017 at 9:41 AM, Eric Dumazet wrote: >> On Sat, 2017-02-18 at 17:34 +0100, Jesper Dangaard Brouer wrote: >>> On Thu, 16 Feb 2017 14:36:41 -0800 >>> John Fastabend wrote: >>> On

Re: Questions on XDP

2017-02-18 Thread Alexei Starovoitov
On Sat, Feb 18, 2017 at 10:18 AM, Alexander Duyck wrote: > >> XDP_DROP does not require having one page per frame. > > Agreed. why do you think so? xdp_drop is targeting ddos where in good case all traffic is passed up and in bad case most of the traffic is dropped,

Re: Questions on XDP

2017-02-18 Thread Alexander Duyck
On Sat, Feb 18, 2017 at 9:41 AM, Eric Dumazet wrote: > On Sat, 2017-02-18 at 17:34 +0100, Jesper Dangaard Brouer wrote: >> On Thu, 16 Feb 2017 14:36:41 -0800 >> John Fastabend wrote: >> >> > On 17-02-16 12:41 PM, Alexander Duyck wrote: >> > > So

Re: Questions on XDP

2017-02-18 Thread Eric Dumazet
On Sat, 2017-02-18 at 17:34 +0100, Jesper Dangaard Brouer wrote: > On Thu, 16 Feb 2017 14:36:41 -0800 > John Fastabend wrote: > > > On 17-02-16 12:41 PM, Alexander Duyck wrote: > > > So I'm in the process of working on enabling XDP for the Intel NICs > > > and I had a

Re: Questions on XDP

2017-02-18 Thread Jesper Dangaard Brouer
On Thu, 16 Feb 2017 14:36:41 -0800 John Fastabend wrote: > On 17-02-16 12:41 PM, Alexander Duyck wrote: > > So I'm in the process of working on enabling XDP for the Intel NICs > > and I had a few questions so I just thought I would put them out here > > to try and get

Re: Questions on XDP

2017-02-16 Thread John Fastabend
On 17-02-16 12:41 PM, Alexander Duyck wrote: > So I'm in the process of working on enabling XDP for the Intel NICs > and I had a few questions so I just thought I would put them out here > to try and get everything sorted before I paint myself into a corner. > Added Daniel. > So my first

Questions on XDP

2017-02-16 Thread Alexander Duyck
So I'm in the process of working on enabling XDP for the Intel NICs and I had a few questions so I just thought I would put them out here to try and get everything sorted before I paint myself into a corner. So my first question is why does the documentation mention 1 frame per page for XDP? Is