WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / bpf / progs / test_global_func8.c
blobd55a6544b1abd2b763fce2623add52a1bdf30106
1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Copyright (c) 2020 Facebook */
3 #include <stddef.h>
4 #include <linux/bpf.h>
5 #include <bpf/bpf_helpers.h>
7 __noinline int foo(struct __sk_buff *skb)
9 return bpf_get_prandom_u32();
12 SEC("cgroup_skb/ingress")
13 int test_cls(struct __sk_buff *skb)
15 if (!foo(skb))
16 return 0;
18 return 1;