repo.or.cz
/
linux
/
fpc-iii.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
WIP FPC-III support
[linux/fpc-iii.git]
/
tools
/
testing
/
selftests
/
bpf
/
progs
/
test_global_func7.c
blob
309b3f6136bde6d7a84b73bac16f0abeec997fbb
1
// SPDX-License-Identifier: GPL-2.0-only
2
/* Copyright (c) 2020 Facebook */
3
#include <stddef.h>
4
#include <linux/bpf.h>
5
#include <bpf/bpf_helpers.h>
6
7
__attribute__
((
noinline
))
8
void
foo
(
struct
__sk_buff
*
skb
)
9
{
10
skb
->
tc_index
=
0
;
11
}
12
13
SEC
(
"classifier/test"
)
14
int
test_cls
(
struct
__sk_buff
*
skb
)
15
{
16
foo
(
skb
);
17
return
0
;
18
}