Skip to content

Commit e04946f

Browse files
DanielTimLeeAlexei Starovoitov
authored and
Alexei Starovoitov
committed
samples/bpf: change _kern suffix to .bpf with BPF test programs
This commit changes the _kern suffix to .bpf with the BPF test programs. With this modification, test programs will inherit the benefit of the new CLANG-BPF compile target. Signed-off-by: Daniel T. Lee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent e8acf8f commit e04946f

13 files changed

+14
-14
lines changed

samples/bpf/Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ always-y += tracex4_kern.o
131131
always-y += tracex5_kern.o
132132
always-y += tracex6_kern.o
133133
always-y += tracex7_kern.o
134-
always-y += sock_flags_kern.o
134+
always-y += sock_flags.bpf.o
135135
always-y += test_probe_write_user.bpf.o
136136
always-y += trace_output.bpf.o
137137
always-y += tcbpf1_kern.o
@@ -140,19 +140,19 @@ always-y += lathist_kern.o
140140
always-y += offwaketime_kern.o
141141
always-y += spintest_kern.o
142142
always-y += map_perf_test.bpf.o
143-
always-y += test_overhead_tp_kern.o
144-
always-y += test_overhead_raw_tp_kern.o
145-
always-y += test_overhead_kprobe_kern.o
143+
always-y += test_overhead_tp.bpf.o
144+
always-y += test_overhead_raw_tp.bpf.o
145+
always-y += test_overhead_kprobe.bpf.o
146146
always-y += parse_varlen.o parse_simple.o parse_ldabs.o
147-
always-y += test_cgrp2_tc_kern.o
147+
always-y += test_cgrp2_tc.bpf.o
148148
always-y += xdp1_kern.o
149149
always-y += xdp2_kern.o
150150
always-y += test_current_task_under_cgroup.bpf.o
151151
always-y += trace_event_kern.o
152152
always-y += sampleip_kern.o
153-
always-y += lwt_len_hist_kern.o
153+
always-y += lwt_len_hist.bpf.o
154154
always-y += xdp_tx_iptunnel_kern.o
155-
always-y += test_map_in_map_kern.o
155+
always-y += test_map_in_map.bpf.o
156156
always-y += tcp_synrto_kern.o
157157
always-y += tcp_rwnd_kern.o
158158
always-y += tcp_bufs_kern.o
File renamed without changes.

samples/bpf/lwt_len_hist.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
NS1=lwt_ns1
55
VETH0=tst_lwt1a
66
VETH1=tst_lwt1b
7-
BPF_PROG=lwt_len_hist_kern.o
7+
BPF_PROG=lwt_len_hist.bpf.o
88
TRACE_ROOT=/sys/kernel/debug/tracing
99

1010
function cleanup {
File renamed without changes.

samples/bpf/test_cgrp2_sock2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ BPFFS=/sys/fs/bpf
55
MY_DIR=$(dirname $0)
66
TEST=$MY_DIR/test_cgrp2_sock2
77
LINK_PIN=$BPFFS/test_cgrp2_sock2
8-
BPF_PROG=$MY_DIR/sock_flags_kern.o
8+
BPF_PROG=$MY_DIR/sock_flags.bpf.o
99

1010
function config_device {
1111
ip netns add at_ns0
File renamed without changes.

samples/bpf/test_cgrp2_tc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
MY_DIR=$(dirname $0)
55
# Details on the bpf prog
66
BPF_CGRP2_ARRAY_NAME='test_cgrp2_array_pin'
7-
BPF_PROG="$MY_DIR/test_cgrp2_tc_kern.o"
7+
BPF_PROG="$MY_DIR/test_cgrp2_tc.bpf.o"
88
BPF_SECTION='filter'
99

1010
[ -z "$TC" ] && TC='tc'

samples/bpf/test_map_in_map_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ int main(int argc, char **argv)
120120
struct bpf_object *obj;
121121
char filename[256];
122122

123-
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
123+
snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]);
124124
obj = bpf_object__open_file(filename, NULL);
125125
if (libbpf_get_error(obj)) {
126126
fprintf(stderr, "ERROR: opening BPF object file failed\n");

samples/bpf/test_overhead_user.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ int main(int argc, char **argv)
189189

190190
if (test_flags & 0xC) {
191191
snprintf(filename, sizeof(filename),
192-
"%s_kprobe_kern.o", argv[0]);
192+
"%s_kprobe.bpf.o", argv[0]);
193193

194194
printf("w/KPROBE\n");
195195
err = load_progs(filename);
@@ -201,7 +201,7 @@ int main(int argc, char **argv)
201201

202202
if (test_flags & 0x30) {
203203
snprintf(filename, sizeof(filename),
204-
"%s_tp_kern.o", argv[0]);
204+
"%s_tp.bpf.o", argv[0]);
205205
printf("w/TRACEPOINT\n");
206206
err = load_progs(filename);
207207
if (!err)
@@ -212,7 +212,7 @@ int main(int argc, char **argv)
212212

213213
if (test_flags & 0xC0) {
214214
snprintf(filename, sizeof(filename),
215-
"%s_raw_tp_kern.o", argv[0]);
215+
"%s_raw_tp.bpf.o", argv[0]);
216216
printf("w/RAW_TRACEPOINT\n");
217217
err = load_progs(filename);
218218
if (!err)

0 commit comments

Comments
 (0)