]> Git Repo - J-linux.git/blob - tools/testing/selftests/bpf/progs/loop4.c
Merge tag 'vfs-6.13-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
[J-linux.git] / tools / testing / selftests / bpf / progs / loop4.c
1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (c) 2019 Facebook
3 #include <linux/bpf.h>
4 #include <bpf/bpf_helpers.h>
5
6 #include "bpf_compiler.h"
7
8 char _license[] SEC("license") = "GPL";
9
10 SEC("socket")
11 int combinations(volatile struct __sk_buff* skb)
12 {
13         int ret = 0, i;
14
15         __pragma_loop_no_unroll
16         for (i = 0; i < 20; i++)
17                 if (skb->len)
18                         ret |= 1 << i;
19         return ret;
20 }
This page took 0.027338 seconds and 4 git commands to generate.