mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
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 <danieltimlee@gmail.com> Link: https://lore.kernel.org/r/20230818090119.477441-4-danieltimlee@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
e7e6c774f5
commit
4a0ee78890
@ -124,21 +124,21 @@ always-y := $(tprogs-y)
|
|||||||
always-y += sockex1_kern.o
|
always-y += sockex1_kern.o
|
||||||
always-y += sockex2_kern.o
|
always-y += sockex2_kern.o
|
||||||
always-y += sockex3_kern.o
|
always-y += sockex3_kern.o
|
||||||
always-y += tracex1_kern.o
|
always-y += tracex1.bpf.o
|
||||||
always-y += tracex2.bpf.o
|
always-y += tracex2.bpf.o
|
||||||
always-y += tracex3_kern.o
|
always-y += tracex3.bpf.o
|
||||||
always-y += tracex4_kern.o
|
always-y += tracex4.bpf.o
|
||||||
always-y += tracex5_kern.o
|
always-y += tracex5.bpf.o
|
||||||
always-y += tracex6_kern.o
|
always-y += tracex6.bpf.o
|
||||||
always-y += tracex7_kern.o
|
always-y += tracex7.bpf.o
|
||||||
always-y += sock_flags.bpf.o
|
always-y += sock_flags.bpf.o
|
||||||
always-y += test_probe_write_user.bpf.o
|
always-y += test_probe_write_user.bpf.o
|
||||||
always-y += trace_output.bpf.o
|
always-y += trace_output.bpf.o
|
||||||
always-y += tcbpf1_kern.o
|
always-y += tcbpf1_kern.o
|
||||||
always-y += tc_l2_redirect_kern.o
|
always-y += tc_l2_redirect_kern.o
|
||||||
always-y += lathist_kern.o
|
always-y += lathist_kern.o
|
||||||
always-y += offwaketime_kern.o
|
always-y += offwaketime.bpf.o
|
||||||
always-y += spintest_kern.o
|
always-y += spintest.bpf.o
|
||||||
always-y += map_perf_test.bpf.o
|
always-y += map_perf_test.bpf.o
|
||||||
always-y += test_overhead_tp.bpf.o
|
always-y += test_overhead_tp.bpf.o
|
||||||
always-y += test_overhead_raw_tp.bpf.o
|
always-y += test_overhead_raw_tp.bpf.o
|
||||||
@ -333,7 +333,7 @@ $(obj)/xdp_redirect_user.o: $(obj)/xdp_redirect.skel.h
|
|||||||
$(obj)/xdp_monitor_user.o: $(obj)/xdp_monitor.skel.h
|
$(obj)/xdp_monitor_user.o: $(obj)/xdp_monitor.skel.h
|
||||||
$(obj)/xdp_router_ipv4_user.o: $(obj)/xdp_router_ipv4.skel.h
|
$(obj)/xdp_router_ipv4_user.o: $(obj)/xdp_router_ipv4.skel.h
|
||||||
|
|
||||||
$(obj)/tracex5_kern.o: $(obj)/syscall_nrs.h
|
$(obj)/tracex5.bpf.o: $(obj)/syscall_nrs.h
|
||||||
$(obj)/hbm_out_kern.o: $(src)/hbm.h $(src)/hbm_kern.h
|
$(obj)/hbm_out_kern.o: $(src)/hbm.h $(src)/hbm_kern.h
|
||||||
$(obj)/hbm.o: $(src)/hbm.h
|
$(obj)/hbm.o: $(src)/hbm.h
|
||||||
$(obj)/hbm_edt_kern.o: $(src)/hbm.h $(src)/hbm_kern.h
|
$(obj)/hbm_edt_kern.o: $(src)/hbm.h $(src)/hbm_kern.h
|
||||||
|
@ -105,7 +105,7 @@ int main(int argc, char **argv)
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
|
snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]);
|
||||||
obj = bpf_object__open_file(filename, NULL);
|
obj = bpf_object__open_file(filename, NULL);
|
||||||
if (libbpf_get_error(obj)) {
|
if (libbpf_get_error(obj)) {
|
||||||
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
||||||
|
@ -23,7 +23,7 @@ int main(int ac, char **argv)
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
|
snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]);
|
||||||
obj = bpf_object__open_file(filename, NULL);
|
obj = bpf_object__open_file(filename, NULL);
|
||||||
if (libbpf_get_error(obj)) {
|
if (libbpf_get_error(obj)) {
|
||||||
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
||||||
|
@ -12,7 +12,7 @@ int main(int ac, char **argv)
|
|||||||
char filename[256];
|
char filename[256];
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
|
snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]);
|
||||||
obj = bpf_object__open_file(filename, NULL);
|
obj = bpf_object__open_file(filename, NULL);
|
||||||
if (libbpf_get_error(obj)) {
|
if (libbpf_get_error(obj)) {
|
||||||
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
||||||
|
@ -125,7 +125,7 @@ int main(int ac, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
|
snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]);
|
||||||
obj = bpf_object__open_file(filename, NULL);
|
obj = bpf_object__open_file(filename, NULL);
|
||||||
if (libbpf_get_error(obj)) {
|
if (libbpf_get_error(obj)) {
|
||||||
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
||||||
|
@ -53,7 +53,7 @@ int main(int ac, char **argv)
|
|||||||
char filename[256];
|
char filename[256];
|
||||||
int map_fd, j = 0;
|
int map_fd, j = 0;
|
||||||
|
|
||||||
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
|
snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]);
|
||||||
obj = bpf_object__open_file(filename, NULL);
|
obj = bpf_object__open_file(filename, NULL);
|
||||||
if (libbpf_get_error(obj)) {
|
if (libbpf_get_error(obj)) {
|
||||||
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
||||||
|
@ -42,7 +42,7 @@ int main(int ac, char **argv)
|
|||||||
char filename[256];
|
char filename[256];
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
|
snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]);
|
||||||
obj = bpf_object__open_file(filename, NULL);
|
obj = bpf_object__open_file(filename, NULL);
|
||||||
if (libbpf_get_error(obj)) {
|
if (libbpf_get_error(obj)) {
|
||||||
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
||||||
|
@ -180,7 +180,7 @@ int main(int argc, char **argv)
|
|||||||
char filename[256];
|
char filename[256];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
|
snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]);
|
||||||
obj = bpf_object__open_file(filename, NULL);
|
obj = bpf_object__open_file(filename, NULL);
|
||||||
if (libbpf_get_error(obj)) {
|
if (libbpf_get_error(obj)) {
|
||||||
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
||||||
|
@ -19,7 +19,7 @@ int main(int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
|
snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]);
|
||||||
obj = bpf_object__open_file(filename, NULL);
|
obj = bpf_object__open_file(filename, NULL);
|
||||||
if (libbpf_get_error(obj)) {
|
if (libbpf_get_error(obj)) {
|
||||||
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
fprintf(stderr, "ERROR: opening BPF object file failed\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user