]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
samples/bpf: unify bpf program suffix to .bpf with tracing programs
authorDaniel T. Lee <danieltimlee@gmail.com>
Fri, 18 Aug 2023 09:01:13 +0000 (18:01 +0900)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 21 Aug 2023 22:39:09 +0000 (15:39 -0700)
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>
17 files changed:
samples/bpf/Makefile
samples/bpf/offwaketime.bpf.c [moved from samples/bpf/offwaketime_kern.c with 100% similarity]
samples/bpf/offwaketime_user.c
samples/bpf/spintest.bpf.c [moved from samples/bpf/spintest_kern.c with 100% similarity]
samples/bpf/spintest_user.c
samples/bpf/tracex1.bpf.c [moved from samples/bpf/tracex1_kern.c with 100% similarity]
samples/bpf/tracex1_user.c
samples/bpf/tracex3.bpf.c [moved from samples/bpf/tracex3_kern.c with 100% similarity]
samples/bpf/tracex3_user.c
samples/bpf/tracex4.bpf.c [moved from samples/bpf/tracex4_kern.c with 100% similarity]
samples/bpf/tracex4_user.c
samples/bpf/tracex5.bpf.c [moved from samples/bpf/tracex5_kern.c with 100% similarity]
samples/bpf/tracex5_user.c
samples/bpf/tracex6.bpf.c [moved from samples/bpf/tracex6_kern.c with 100% similarity]
samples/bpf/tracex6_user.c
samples/bpf/tracex7.bpf.c [moved from samples/bpf/tracex7_kern.c with 100% similarity]
samples/bpf/tracex7_user.c

index b32cb8a62335e4862b17f5020b5ce8a4218f8827..f90bcd3696bdffc751686540e900fe17b2e1f159 100644 (file)
@@ -124,21 +124,21 @@ always-y := $(tprogs-y)
 always-y += sockex1_kern.o
 always-y += sockex2_kern.o
 always-y += sockex3_kern.o
-always-y += tracex1_kern.o
+always-y += tracex1.bpf.o
 always-y += tracex2.bpf.o
-always-y += tracex3_kern.o
-always-y += tracex4_kern.o
-always-y += tracex5_kern.o
-always-y += tracex6_kern.o
-always-y += tracex7_kern.o
+always-y += tracex3.bpf.o
+always-y += tracex4.bpf.o
+always-y += tracex5.bpf.o
+always-y += tracex6.bpf.o
+always-y += tracex7.bpf.o
 always-y += sock_flags.bpf.o
 always-y += test_probe_write_user.bpf.o
 always-y += trace_output.bpf.o
 always-y += tcbpf1_kern.o
 always-y += tc_l2_redirect_kern.o
 always-y += lathist_kern.o
-always-y += offwaketime_kern.o
-always-y += spintest_kern.o
+always-y += offwaketime.bpf.o
+always-y += spintest.bpf.o
 always-y += map_perf_test.bpf.o
 always-y += test_overhead_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_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.o: $(src)/hbm.h
 $(obj)/hbm_edt_kern.o: $(src)/hbm.h $(src)/hbm_kern.h
index b6eedcb98fb9adcac5f4089ee73638bb537b2aa4..5557b53936424f6ad4e2ad081f0af9c1425f25cd 100644 (file)
@@ -105,7 +105,7 @@ int main(int argc, char **argv)
                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);
        if (libbpf_get_error(obj)) {
                fprintf(stderr, "ERROR: opening BPF object file failed\n");
index aadac14f748a9f8531c671d327d812ba926141e5..8c77600776fb4206a3b328f7b977e0371a6610b6 100644 (file)
@@ -23,7 +23,7 @@ int main(int ac, char **argv)
                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);
        if (libbpf_get_error(obj)) {
                fprintf(stderr, "ERROR: opening BPF object file failed\n");
index 9d4adb7fd8341e702a710e6904f53b5f9a970454..8c3d9043a2b6b3ace0c233a488f69df1e2a48652 100644 (file)
@@ -12,7 +12,7 @@ int main(int ac, char **argv)
        char filename[256];
        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);
        if (libbpf_get_error(obj)) {
                fprintf(stderr, "ERROR: opening BPF object file failed\n");
index d5eebace31e693a9734d57e779783ed816c21c22..1002eb0323b40004302bf557769aeddaa921bcee 100644 (file)
@@ -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);
        if (libbpf_get_error(obj)) {
                fprintf(stderr, "ERROR: opening BPF object file failed\n");
index dee8f0a091ba6ab253e713aaefeb77e9bb998e7a..a5145ad72cbf631d44c6b78d4a739c28fe19fa52 100644 (file)
@@ -53,7 +53,7 @@ int main(int ac, char **argv)
        char filename[256];
        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);
        if (libbpf_get_error(obj)) {
                fprintf(stderr, "ERROR: opening BPF object file failed\n");
index 9d7d79f0d47d27ab696d6b5aef6812647600c1ff..7e2d8397fb98a35bdbc4f41ec1c1fd0bd63efe50 100644 (file)
@@ -42,7 +42,7 @@ int main(int ac, char **argv)
        char filename[256];
        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);
        if (libbpf_get_error(obj)) {
                fprintf(stderr, "ERROR: opening BPF object file failed\n");
index 8e83bf2a84a460ff262fbe3666ad7cf968e3428d..ae811ac83bc221e76b7f2f98b35635874063939a 100644 (file)
@@ -180,7 +180,7 @@ int main(int argc, char **argv)
        char filename[256];
        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);
        if (libbpf_get_error(obj)) {
                fprintf(stderr, "ERROR: opening BPF object file failed\n");
index 8be7ce18d3ba05682aeaf6c32223f3b22cd499a4..b10b5e03a226ea51d10c7b57974cc241e7e72257 100644 (file)
@@ -19,7 +19,7 @@ int main(int argc, char **argv)
                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);
        if (libbpf_get_error(obj)) {
                fprintf(stderr, "ERROR: opening BPF object file failed\n");