1 // SPDX-License-Identifier: GPL-2.0-only
4 #include <bpf/bpf_helpers.h>
15 __noinline int foo(const struct Big *big)
20 return bpf_get_prandom_u32() < big->y;
23 SEC("cgroup_skb/ingress")
24 int test_cls(struct __sk_buff *skb)
26 const struct Small small = {.x = skb->len };
28 return foo((struct Big *)&small) ? 1 : 0;