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 = bpf_prog_get_type(fd, BPF_PROG_TYPE_XDP);
>> > +
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))
> > + return PTR_ERR(prog);
>
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 = XDP_SETUP_PROG;
> + xdp.prog =
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
net/core/dev.c|