FILE
loop4.c
File preview with syntax highlighting.
linux-6.19.14/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 8char _license[] SEC("license") = "GPL"; 9 10SEC("socket") 11int 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}
~/
Read-only file preview.