15992SN/A// SPDX-License-Identifier: GPL-2.0
25992SN/A// Copyright (c) 2019 Facebook
35992SN/A#include <linux/bpf.h>
45992SN/A#include <bpf/bpf_helpers.h>
55992SN/A
65992SN/A#include "bpf_compiler.h"
75992SN/A
85992SN/Achar _license[] SEC("license") = "GPL";
95992SN/A
105992SN/ASEC("socket")
115992SN/Aint combinations(volatile struct __sk_buff* skb)
125992SN/A{
135992SN/A	int ret = 0, i;
145992SN/A
155992SN/A	__pragma_loop_no_unroll
165992SN/A	for (i = 0; i < 20; i++)
175992SN/A		if (skb->len)
185992SN/A			ret |= 1 << i;
195992SN/A	return ret;
205992SN/A}
215992SN/A