mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
22 lines
367 B
C
22 lines
367 B
C
![]() |
// SPDX-License-Identifier: GPL-2.0
|
||
|
|
||
|
#include <linux/bpf.h>
|
||
|
#include "bpf_helpers.h"
|
||
|
|
||
|
int _version SEC("version") = 1;
|
||
|
char _license[] SEC("license") = "GPL";
|
||
|
|
||
|
SEC("skb_ctx")
|
||
|
int process(struct __sk_buff *skb)
|
||
|
{
|
||
|
#pragma clang loop unroll(full)
|
||
|
for (int i = 0; i < 5; i++) {
|
||
|
if (skb->cb[i] != i + 1)
|
||
|
return 1;
|
||
|
skb->cb[i]++;
|
||
|
}
|
||
|
skb->priority++;
|
||
|
|
||
|
return 0;
|
||
|
}
|