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

2016-07-24 Thread Daniel Borkmann
On 07/24/2016 06:57 PM, Tom Herbert wrote: On Tue, Jul 19, 2016 at 2:16 PM, 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 touches the packet data. However, in the pursuit of

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

2016-07-24 Thread Tom Herbert
On Tue, Jul 19, 2016 at 2:16 PM, 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 touches the packet data. However, in the pursuit of > speed, XDP programs will not be allo

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

2016-07-24 Thread Jesper Dangaard Brouer
On Tue, 19 Jul 2016 12:16:50 -0700 Brenden Blanco wrote: > The xdp program is present as a per-ring data structure, but as of yet > it is not possible to set at that granularity through any ndo. Thank you for doing this! :-) -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel

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

2016-07-20 Thread Brenden Blanco
On Wed, Jul 20, 2016 at 11:07:57AM +0200, Daniel Borkmann wrote: > On 07/19/2016 09:16 PM, Brenden Blanco wrote: [...] > >+if (ring->xdp_prog) > >+bpf_prog_put(ring->xdp_prog); > > Would be good if you also make this a READ_ONCE() here. I believe this is the > only other spot in yo

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

2016-07-20 Thread Daniel Borkmann
On 07/19/2016 09:16 PM, 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 touches the packet data. However, in the pursuit of speed, XDP programs will not be allowed to use these

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

2016-07-19 Thread Alexei Starovoitov
On Tue, Jul 19, 2016 at 12:16:50PM -0700, 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 touches the packet data. However, in the pursuit of > speed, XDP programs will no

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

2016-07-19 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 touches the packet data. However, in the pursuit of speed, XDP programs will not be allowed to use these slower functions, especially if it involves allo