Skip to content

Commit

Permalink
bpf: make function xdp_do_generic_redirect_map() static
Browse files Browse the repository at this point in the history
The function xdp_do_generic_redirect_map() is only used in this file, so
make it static.

Clean up sparse warning:
net/core/filter.c:2687:5: warning: no previous prototype
for 'xdp_do_generic_redirect_map' [-Wmissing-prototypes]

Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
  • Loading branch information
Xiongwei Song authored and Daniel Borkmann committed Dec 19, 2017
1 parent 4ca998f commit c060bc6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2684,8 +2684,9 @@ static int __xdp_generic_ok_fwd_dev(struct sk_buff *skb, struct net_device *fwd)
return 0;
}

int xdp_do_generic_redirect_map(struct net_device *dev, struct sk_buff *skb,
struct bpf_prog *xdp_prog)
static int xdp_do_generic_redirect_map(struct net_device *dev,
struct sk_buff *skb,
struct bpf_prog *xdp_prog)
{
struct redirect_info *ri = this_cpu_ptr(&redirect_info);
unsigned long map_owner = ri->map_owner;
Expand Down

0 comments on commit c060bc6

Please sign in to comment.