Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <danieltimlee@gmail.com>
Link: https://lore.kernel.org/r/20230115071613.125791-11-danieltimlee@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Daniel T. Lee and committed by
Alexei Starovoitov
e04946f5 e8acf8f4

+14 -14
+7 -7
samples/bpf/Makefile
··· 131 131 always-y += tracex5_kern.o 132 132 always-y += tracex6_kern.o 133 133 always-y += tracex7_kern.o 134 - always-y += sock_flags_kern.o 134 + always-y += sock_flags.bpf.o 135 135 always-y += test_probe_write_user.bpf.o 136 136 always-y += trace_output.bpf.o 137 137 always-y += tcbpf1_kern.o ··· 140 140 always-y += offwaketime_kern.o 141 141 always-y += spintest_kern.o 142 142 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 146 146 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 148 148 always-y += xdp1_kern.o 149 149 always-y += xdp2_kern.o 150 150 always-y += test_current_task_under_cgroup.bpf.o 151 151 always-y += trace_event_kern.o 152 152 always-y += sampleip_kern.o 153 - always-y += lwt_len_hist_kern.o 153 + always-y += lwt_len_hist.bpf.o 154 154 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 156 156 always-y += tcp_synrto_kern.o 157 157 always-y += tcp_rwnd_kern.o 158 158 always-y += tcp_bufs_kern.o
+1 -1
samples/bpf/lwt_len_hist.sh
··· 4 4 NS1=lwt_ns1 5 5 VETH0=tst_lwt1a 6 6 VETH1=tst_lwt1b 7 - BPF_PROG=lwt_len_hist_kern.o 7 + BPF_PROG=lwt_len_hist.bpf.o 8 8 TRACE_ROOT=/sys/kernel/debug/tracing 9 9 10 10 function cleanup {
samples/bpf/lwt_len_hist_kern.c samples/bpf/lwt_len_hist.bpf.c
samples/bpf/sock_flags_kern.c samples/bpf/sock_flags.bpf.c
+1 -1
samples/bpf/test_cgrp2_sock2.sh
··· 5 5 MY_DIR=$(dirname $0) 6 6 TEST=$MY_DIR/test_cgrp2_sock2 7 7 LINK_PIN=$BPFFS/test_cgrp2_sock2 8 - BPF_PROG=$MY_DIR/sock_flags_kern.o 8 + BPF_PROG=$MY_DIR/sock_flags.bpf.o 9 9 10 10 function config_device { 11 11 ip netns add at_ns0
+1 -1
samples/bpf/test_cgrp2_tc.sh
··· 4 4 MY_DIR=$(dirname $0) 5 5 # Details on the bpf prog 6 6 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" 8 8 BPF_SECTION='filter' 9 9 10 10 [ -z "$TC" ] && TC='tc'
samples/bpf/test_cgrp2_tc_kern.c samples/bpf/test_cgrp2_tc.bpf.c
samples/bpf/test_map_in_map_kern.c samples/bpf/test_map_in_map.bpf.c
+1 -1
samples/bpf/test_map_in_map_user.c
··· 120 120 struct bpf_object *obj; 121 121 char filename[256]; 122 122 123 - snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]); 123 + snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]); 124 124 obj = bpf_object__open_file(filename, NULL); 125 125 if (libbpf_get_error(obj)) { 126 126 fprintf(stderr, "ERROR: opening BPF object file failed\n");
samples/bpf/test_overhead_kprobe_kern.c samples/bpf/test_overhead_kprobe.bpf.c
samples/bpf/test_overhead_raw_tp_kern.c samples/bpf/test_overhead_raw_tp.bpf.c
samples/bpf/test_overhead_tp_kern.c samples/bpf/test_overhead_tp.bpf.c
+3 -3
samples/bpf/test_overhead_user.c
··· 189 189 190 190 if (test_flags & 0xC) { 191 191 snprintf(filename, sizeof(filename), 192 - "%s_kprobe_kern.o", argv[0]); 192 + "%s_kprobe.bpf.o", argv[0]); 193 193 194 194 printf("w/KPROBE\n"); 195 195 err = load_progs(filename); ··· 201 201 202 202 if (test_flags & 0x30) { 203 203 snprintf(filename, sizeof(filename), 204 - "%s_tp_kern.o", argv[0]); 204 + "%s_tp.bpf.o", argv[0]); 205 205 printf("w/TRACEPOINT\n"); 206 206 err = load_progs(filename); 207 207 if (!err) ··· 212 212 213 213 if (test_flags & 0xC0) { 214 214 snprintf(filename, sizeof(filename), 215 - "%s_raw_tp_kern.o", argv[0]); 215 + "%s_raw_tp.bpf.o", argv[0]); 216 216 printf("w/RAW_TRACEPOINT\n"); 217 217 err = load_progs(filename); 218 218 if (!err)