Re: [PATCH v6 04/12] net/mlx4_en: add support for fast rx drop bpf program

2016-07-11 Thread Brenden Blanco
On Mon, Jul 11, 2016 at 02:48:17PM +0300, Saeed Mahameed wrote: [...] > > yes, we need something like: > > +static inline void > +mlx4_en_sync_dma(struct mlx4_en_priv *priv, > +struct mlx4_en_rx_desc *rx_desc, > +int length) > +{ > + dma_addr_t dma; > + > +

Re: [PATCH v6 04/12] net/mlx4_en: add support for fast rx drop bpf program

2016-07-11 Thread Saeed Mahameed
On Sun, Jul 10, 2016 at 7:05 PM, Brenden Blanco wrote: > On Sun, Jul 10, 2016 at 06:25:40PM +0300, Tariq Toukan wrote: >> >> On 09/07/2016 10:58 PM, Saeed Mahameed wrote: >> >On Fri, Jul 8, 2016 at 5:15 AM, Brenden Blanco wrote: >> >>+ /* A bpf program gets first chance to drop the

Re: [PATCH v6 04/12] net/mlx4_en: add support for fast rx drop bpf program

2016-07-10 Thread Tariq Toukan
+ switch (act) { + case XDP_PASS: + break; + default: + bpf_warn_invalid_xdp_action(act); + case XDP_DROP: + goto next

Re: [PATCH v6 04/12] net/mlx4_en: add support for fast rx drop bpf program

2016-07-10 Thread Brenden Blanco
On Sun, Jul 10, 2016 at 06:25:40PM +0300, Tariq Toukan wrote: > > On 09/07/2016 10:58 PM, Saeed Mahameed wrote: > >On Fri, Jul 8, 2016 at 5:15 AM, Brenden Blanco wrote: > >>+ /* A bpf program gets first chance to drop the packet. It > >>may > >>+* read bytes but not

Re: [PATCH v6 04/12] net/mlx4_en: add support for fast rx drop bpf program

2016-07-10 Thread Brenden Blanco
On Sat, Jul 09, 2016 at 05:07:36PM +0300, Or Gerlitz wrote: > On Fri, Jul 8, 2016 at 5:15 AM, Brenden Blanco wrote: > > Add support for the BPF_PROG_TYPE_XDP hook in mlx4 driver. > > > > In tc/socket bpf programs, helpers linearize skb fragments as needed > > when the program touchs the packet dat

Re: [PATCH v6 04/12] net/mlx4_en: add support for fast rx drop bpf program

2016-07-10 Thread Tariq Toukan
On 09/07/2016 10:58 PM, Saeed Mahameed wrote: On Fri, Jul 8, 2016 at 5:15 AM, Brenden Blanco wrote: + /* A bpf program gets first chance to drop the packet. It may +* read bytes but not past the end of the frag. +*/ + if (prog) { +

Re: [PATCH v6 04/12] net/mlx4_en: add support for fast rx drop bpf program

2016-07-09 Thread Or Gerlitz
On Sat, Jul 9, 2016 at 10:58 PM, Saeed Mahameed wrote: > On Fri, Jul 8, 2016 at 5:15 AM, Brenden Blanco wrote: >> Add support for the BPF_PROG_TYPE_XDP hook in mlx4 driver. >> >> In tc/socket bpf programs, helpers linearize skb fragments as needed >> when the program touchs the packet data. Howev

Re: [PATCH v6 04/12] net/mlx4_en: add support for fast rx drop bpf program

2016-07-09 Thread Saeed Mahameed
On Fri, Jul 8, 2016 at 5:15 AM, Brenden Blanco wrote: > Add support for the BPF_PROG_TYPE_XDP hook in mlx4 driver. > > In tc/socket bpf programs, helpers linearize skb fragments as needed > when the program touchs the packet data. However, in the pursuit of > speed, XDP programs will not be allowe

Re: [PATCH v6 04/12] net/mlx4_en: add support for fast rx drop bpf program

2016-07-09 Thread Or Gerlitz
On Fri, Jul 8, 2016 at 5:15 AM, Brenden Blanco wrote: > Add support for the BPF_PROG_TYPE_XDP hook in mlx4 driver. > > In tc/socket bpf programs, helpers linearize skb fragments as needed > when the program touchs the packet data. However, in the pursuit of nit, for the next version touchs --> to

[PATCH v6 04/12] net/mlx4_en: add support for fast rx drop bpf program

2016-07-07 Thread Brenden Blanco
Add support for the BPF_PROG_TYPE_XDP hook in mlx4 driver. In tc/socket bpf programs, helpers linearize skb fragments as needed when the program touchs the packet data. However, in the pursuit of speed, XDP programs will not be allowed to use these slower functions, especially if it involves alloc