public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netfilter: nf_flow_table_bpf: add prototype for bpf_xdp_flow_lookup()
@ 2026-01-19  9:16 Sun Jian
  2026-01-19 17:16 ` Alexei Starovoitov
  0 siblings, 1 reply; 2+ messages in thread
From: Sun Jian @ 2026-01-19  9:16 UTC (permalink / raw)
  To: fw; +Cc: pablo, phil, daniel, ast, netfilter-devel, netdev, bpf, Sun Jian

Sparse reports:

  netfilter/nf_flow_table_bpf.c:58:45:
    symbol 'bpf_xdp_flow_lookup' was not declared. Should it be static?

bpf_xdp_flow_lookup() is exported as a __bpf_kfunc and must remain
non-static. Add a forward declaration to provide an explicit prototype
, only to silence the sparse warning.

No functional change intended.

Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>
---
 net/netfilter/nf_flow_table_bpf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/netfilter/nf_flow_table_bpf.c b/net/netfilter/nf_flow_table_bpf.c
index 4a5f5195f2d2..a129e0ee5e81 100644
--- a/net/netfilter/nf_flow_table_bpf.c
+++ b/net/netfilter/nf_flow_table_bpf.c
@@ -31,6 +31,9 @@ __diag_ignore_all("-Wmissing-prototypes",
 		  "Global functions as their definitions will be in nf_flow_table BTF");
 
 __bpf_kfunc_start_defs();
+__bpf_kfunc struct flow_offload_tuple_rhash *
+bpf_xdp_flow_lookup(struct xdp_md *ctx, struct bpf_fib_lookup *fib_tuple,
+		    struct bpf_flowtable_opts *opts, u32 opts_len);
 
 static struct flow_offload_tuple_rhash *
 bpf_xdp_flow_tuple_lookup(struct net_device *dev,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-19 17:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-19  9:16 [PATCH] netfilter: nf_flow_table_bpf: add prototype for bpf_xdp_flow_lookup() Sun Jian
2026-01-19 17:16 ` Alexei Starovoitov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox