Skip to content

Commit 4a0ee78

Browse files
DanielTimLeeAlexei Starovoitov
authored andcommitted
samples/bpf: unify bpf program suffix to .bpf with tracing programs
Currently, BPF programs typically have a suffix of .bpf.c. However, some programs still utilize a mixture of _kern.c suffix alongside the naming convention. In order to achieve consistency in the naming of these programs, this commit unifies the inconsistency in the naming convention of BPF kernel programs. 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 e7e6c77 commit 4a0ee78

17 files changed

+17
-17
lines changed

samples/bpf/Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,21 +124,21 @@ always-y := $(tprogs-y)
124124
always-y += sockex1_kern.o
125125
always-y += sockex2_kern.o
126126
always-y += sockex3_kern.o
127-
always-y += tracex1_kern.o
127+
always-y += tracex1.bpf.o
128128
always-y += tracex2.bpf.o
129-
always-y += tracex3_kern.o
130-
always-y += tracex4_kern.o
131-
always-y += tracex5_kern.o
132-
always-y += tracex6_kern.o
133-
always-y += tracex7_kern.o
129+
always-y += tracex3.bpf.o
130+
always-y += tracex4.bpf.o
131+
always-y += tracex5.bpf.o
132+
always-y += tracex6.bpf.o
133+
always-y += tracex7.bpf.o
134134
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
138138
always-y += tc_l2_redirect_kern.o
139139
always-y += lathist_kern.o
140-
always-y += offwaketime_kern.o
141-
always-y += spintest_kern.o
140+
always-y += offwaketime.bpf.o
141+
always-y += spintest.bpf.o
142142
always-y += map_perf_test.bpf.o
143143
always-y += test_overhead_tp.bpf.o
144144
always-y += test_overhead_raw_tp.bpf.o
@@ -333,7 +333,7 @@ $(obj)/xdp_redirect_user.o: $(obj)/xdp_redirect.skel.h
333333
$(obj)/xdp_monitor_user.o: $(obj)/xdp_monitor.skel.h
334334
$(obj)/xdp_router_ipv4_user.o: $(obj)/xdp_router_ipv4.skel.h
335335

336-
$(obj)/tracex5_kern.o: $(obj)/syscall_nrs.h
336+
$(obj)/tracex5.bpf.o: $(obj)/syscall_nrs.h
337337
$(obj)/hbm_out_kern.o: $(src)/hbm.h $(src)/hbm_kern.h
338338
$(obj)/hbm.o: $(src)/hbm.h
339339
$(obj)/hbm_edt_kern.o: $(src)/hbm.h $(src)/hbm_kern.h
File renamed without changes.

samples/bpf/offwaketime_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ int main(int argc, char **argv)
105105
return 2;
106106
}
107107

108-
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
108+
snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]);
109109
obj = bpf_object__open_file(filename, NULL);
110110
if (libbpf_get_error(obj)) {
111111
fprintf(stderr, "ERROR: opening BPF object file failed\n");
File renamed without changes.

samples/bpf/spintest_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int main(int ac, char **argv)
2323
return 2;
2424
}
2525

26-
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
26+
snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]);
2727
obj = bpf_object__open_file(filename, NULL);
2828
if (libbpf_get_error(obj)) {
2929
fprintf(stderr, "ERROR: opening BPF object file failed\n");
File renamed without changes.

samples/bpf/tracex1_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int main(int ac, char **argv)
1212
char filename[256];
1313
FILE *f;
1414

15-
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
15+
snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]);
1616
obj = bpf_object__open_file(filename, NULL);
1717
if (libbpf_get_error(obj)) {
1818
fprintf(stderr, "ERROR: opening BPF object file failed\n");
File renamed without changes.

samples/bpf/tracex3_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ int main(int ac, char **argv)
125125
}
126126
}
127127

128-
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
128+
snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]);
129129
obj = bpf_object__open_file(filename, NULL);
130130
if (libbpf_get_error(obj)) {
131131
fprintf(stderr, "ERROR: opening BPF object file failed\n");
File renamed without changes.

0 commit comments

Comments
 (0)