This is an automated email from the ASF dual-hosted git repository.

liuhan pushed a commit to branch tmp_disable_reading
in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git


The following commit(s) were added to refs/heads/tmp_disable_reading by this 
push:
     new fa2dde8  tmp disable ringbuf
fa2dde8 is described below

commit fa2dde8077b3d82aab655d6890d3c3b2258b498d
Author: mrproliu <[email protected]>
AuthorDate: Thu Dec 19 10:22:12 2024 +0800

    tmp disable ringbuf
---
 bpf/include/queue.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/bpf/include/queue.h b/bpf/include/queue.h
index c6b532c..1dce8e3 100644
--- a/bpf/include/queue.h
+++ b/bpf/include/queue.h
@@ -36,26 +36,26 @@ struct {
 static __always_inline void *rover_reserve_buf(void *map, __u64 size) {
        static const int zero = 0;
 
-       if (bpf_core_enum_value_exists(enum bpf_func_id,
-                                      BPF_FUNC_ringbuf_reserve))
-               return bpf_ringbuf_reserve(map, size, 0);
+//     if (bpf_core_enum_value_exists(enum bpf_func_id,
+//                                    BPF_FUNC_ringbuf_reserve))
+//             return bpf_ringbuf_reserve(map, size, 0);
 
        return bpf_map_lookup_elem(&rover_data_heap, &zero);
 }
 
 static __always_inline void rover_discard_buf(void *buf)
 {
-       if (bpf_core_enum_value_exists(enum bpf_func_id,
-                                      BPF_FUNC_ringbuf_discard))
-               bpf_ringbuf_discard(buf, 0);
+//     if (bpf_core_enum_value_exists(enum bpf_func_id,
+//                                    BPF_FUNC_ringbuf_discard))
+//             bpf_ringbuf_discard(buf, 0);
 }
 
 static __always_inline long rover_submit_buf(void *ctx, void *map, void *buf, 
__u64 size) {
-       if (bpf_core_enum_value_exists(enum bpf_func_id,
-                                      BPF_FUNC_ringbuf_submit)) {
-               bpf_ringbuf_submit(buf, 0);
-               return 0;
-       }
+//     if (bpf_core_enum_value_exists(enum bpf_func_id,
+//                                    BPF_FUNC_ringbuf_submit)) {
+//             bpf_ringbuf_submit(buf, 0);
+//             return 0;
+//     }
 
        return bpf_perf_event_output(ctx, map, BPF_F_CURRENT_CPU, buf, size);
 }
\ No newline at end of file

Reply via email to