* [PATCH] bpf: fix implicit declaration of bpf_prog_add
@ 2016-07-20 14:55 Brenden Blanco
2016-07-20 16:06 ` Alexei Starovoitov
2016-07-20 18:59 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Brenden Blanco @ 2016-07-20 14:55 UTC (permalink / raw)
To: davem, netdev; +Cc: Brenden Blanco, Tariq Toukan
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
59d3656d5bf50 ("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>
---
include/linux/bpf.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 75a5ae6..36da074 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -289,6 +289,10 @@ static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,
{
return ERR_PTR(-EOPNOTSUPP);
}
+static inline struct bpf_prog *bpf_prog_add(struct bpf_prog *prog, int i)
+{
+ return ERR_PTR(-EOPNOTSUPP);
+}
static inline void bpf_prog_put(struct bpf_prog *prog)
{
--
2.8.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] bpf: fix implicit declaration of bpf_prog_add
2016-07-20 14:55 [PATCH] bpf: fix implicit declaration of bpf_prog_add Brenden Blanco
@ 2016-07-20 16:06 ` Alexei Starovoitov
2016-07-20 18:59 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Alexei Starovoitov @ 2016-07-20 16:06 UTC (permalink / raw)
To: Brenden Blanco; +Cc: davem, netdev, Tariq Toukan, Daniel Borkmann
On Wed, Jul 20, 2016 at 07:55:52AM -0700, Brenden Blanco wrote:
> 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
> 59d3656d5bf50 ("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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bpf: fix implicit declaration of bpf_prog_add
2016-07-20 14:55 [PATCH] bpf: fix implicit declaration of bpf_prog_add Brenden Blanco
2016-07-20 16:06 ` Alexei Starovoitov
@ 2016-07-20 18:59 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-07-20 18:59 UTC (permalink / raw)
To: bblanco; +Cc: netdev, ttoukan.linux
From: Brenden Blanco <bblanco@plumgrid.com>
Date: Wed, 20 Jul 2016 07:55:52 -0700
> 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
> 59d3656d5bf50 ("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>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-20 18:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-20 14:55 [PATCH] bpf: fix implicit declaration of bpf_prog_add Brenden Blanco
2016-07-20 16:06 ` Alexei Starovoitov
2016-07-20 18:59 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).