[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1459622455.18188.5.camel@sipsolutions.net>
Date: Sat, 02 Apr 2016 20:40:55 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Brenden Blanco <bblanco@...mgrid.com>, davem@...emloft.net
Cc: netdev@...r.kernel.org, tom@...bertland.com,
alexei.starovoitov@...il.com, gerlitz@...lanox.com,
daniel@...earbox.net, john.fastabend@...il.com, brouer@...hat.com
Subject: Re: [RFC PATCH 4/5] mlx4: add support for fast rx drop bpf program
On Fri, 2016-04-01 at 18:21 -0700, Brenden Blanco wrote:
> +static int mlx4_bpf_set(struct net_device *dev, int fd)
> +{
[...]
> + if (prog->type != BPF_PROG_TYPE_PHYS_DEV) {
> + bpf_prog_put(prog);
> + return -EINVAL;
> + }
> + }
Why wouldn't this check be done in the generic code that calls
ndo_bpf_set()?
johannes
Powered by blists - more mailing lists