]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: fix implicit declaration of bpf_prog_add
authorBrenden Blanco <bblanco@plumgrid.com>
Wed, 20 Jul 2016 14:55:52 +0000 (07:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jul 2016 18:59:21 +0000 (11:59 -0700)
commitfc9240653a0ea52a5b3f3fd121eea81f772ae055
tree9da7db7fc7221c3b867239b391f699d3bba4e825
parent955fa3faa35cf84772dba9fb0d663d226075e77d
bpf: fix implicit declaration of bpf_prog_add

For the ifndef case of CONFIG_BPF_SYSCALL, an inline version of
bpf_prog_add needs to exist otherwise the build breaks on some configs.

 drivers/net/ethernet/mellanox/mlx4/en_netdev.c:2544:10: error: implicit declaration of function 'bpf_prog_add'
       prog = bpf_prog_add(prog, priv->rx_ring_num - 1);

The function is introduced in
6bea72da9d1d4 ("bpf: add bpf_prog_add api for bulk prog refcnt")
and first used in
47f1afdba2b87 ("net/mlx4_en: add support for fast rx drop bpf program").

Fixes: 47f1afdba2b87 ("net/mlx4_en: add support for fast rx drop bpf program")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Tariq Toukan <ttoukan.linux@gmail.com>
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/bpf.h