Linux Audio

Check our new training course

Loading...
Note: File does not exist in v4.6.
 1// SPDX-License-Identifier: GPL-2.0
 2
 3#include <linux/bpf.h>
 4#include "bpf_helpers.h"
 5
 6int _version SEC("version") = 1;
 7char _license[] SEC("license") = "GPL";
 8
 9SEC("skb_ctx")
10int process(struct __sk_buff *skb)
11{
12	#pragma clang loop unroll(full)
13	for (int i = 0; i < 5; i++) {
14		if (skb->cb[i] != i + 1)
15			return 1;
16		skb->cb[i]++;
17	}
18	skb->priority++;
19
20	return 0;
21}