Re: [PATCH v7 02/11] net: add ndo to setup/query xdp prog in adapter rx

2016-07-12 Thread David Miller
From: Brenden Blanco Date: Mon, 11 Jul 2016 23:35:00 -0700 > On Mon, Jul 11, 2016 at 11:12:24PM -0700, David Miller wrote: >> From: Brenden Blanco >> Date: Mon, 11 Jul 2016 14:29:49 -0700 >> >> > + if (fd >= 0) { >> > + prog =

Re: [PATCH v7 02/11] net: add ndo to setup/query xdp prog in adapter rx

2016-07-12 Thread Brenden Blanco
On Mon, Jul 11, 2016 at 11:12:24PM -0700, David Miller wrote: > From: Brenden Blanco > Date: Mon, 11 Jul 2016 14:29:49 -0700 > > > + if (fd >= 0) { > > + prog = bpf_prog_get_type(fd, BPF_PROG_TYPE_XDP); > > + if (IS_ERR(prog)) > > +

Re: [PATCH v7 02/11] net: add ndo to setup/query xdp prog in adapter rx

2016-07-12 Thread David Miller
From: Brenden Blanco Date: Mon, 11 Jul 2016 14:29:49 -0700 > + if (fd >= 0) { > + prog = bpf_prog_get_type(fd, BPF_PROG_TYPE_XDP); > + if (IS_ERR(prog)) > + return PTR_ERR(prog); > + } > + > + xdp.command =

[PATCH v7 02/11] net: add ndo to setup/query xdp prog in adapter rx

2016-07-11 Thread Brenden Blanco
Add one new netdev op for drivers implementing the BPF_PROG_TYPE_XDP filter. The single op is used for both setup/query of the xdp program, modelled after ndo_setup_tc. Signed-off-by: Brenden Blanco --- include/linux/netdevice.h | 32